Home Home > GIT Browse > stable-xen
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-10-04 10:07:24 +0200
committerTakashi Iwai <tiwai@suse.de>2018-10-04 10:11:00 +0200
commite266792072847defe2fb2195139c22ce23857e90 (patch)
treef5fcfb0e482f1d0eb072bff788a1f6ac4f97e8de
parent98d57bfdf66e4bbf240ff3d1d55d82795300aa02 (diff)
smsc95xx: Check for Wake-on-LAN modes (bsc#1051510).
-rw-r--r--patches.drivers/smsc95xx-Check-for-Wake-on-LAN-modes.patch38
-rw-r--r--series.conf1
2 files changed, 39 insertions, 0 deletions
diff --git a/patches.drivers/smsc95xx-Check-for-Wake-on-LAN-modes.patch b/patches.drivers/smsc95xx-Check-for-Wake-on-LAN-modes.patch
new file mode 100644
index 0000000000..c70414bc3f
--- /dev/null
+++ b/patches.drivers/smsc95xx-Check-for-Wake-on-LAN-modes.patch
@@ -0,0 +1,38 @@
+From c530c471ba37bdd9fe1c7185b01455c00ae606fb Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Fri, 28 Sep 2018 16:18:56 -0700
+Subject: [PATCH] smsc95xx: Check for Wake-on-LAN modes
+Git-commit: c530c471ba37bdd9fe1c7185b01455c00ae606fb
+Patch-mainline: v4.19-rc7
+References: bsc#1051510
+
+The driver does not check for Wake-on-LAN modes specified by an user,
+but will conditionally set the device as wake-up enabled or not based on
+that, which could be a very confusing user experience.
+
+Fixes: e0e474a83c18 ("smsc95xx: add wol magic packet support")
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/net/usb/smsc95xx.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
+index 06b4d290784d..262e7a3c23cb 100644
+--- a/drivers/net/usb/smsc95xx.c
++++ b/drivers/net/usb/smsc95xx.c
+@@ -774,6 +774,9 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,
+ struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
+ int ret;
+
++ if (wolinfo->wolopts & ~SUPPORTED_WAKE)
++ return -EINVAL;
++
+ pdata->wolopts = wolinfo->wolopts & SUPPORTED_WAKE;
+
+ ret = device_set_wakeup_enable(&dev->udev->dev, pdata->wolopts);
+--
+2.18.0
+
diff --git a/series.conf b/series.conf
index 3a7e90f42e..566af58f3e 100644
--- a/series.conf
+++ b/series.conf
@@ -17498,6 +17498,7 @@
patches.drivers/sr9800-Check-for-supported-Wake-on-LAN-modes.patch
patches.drivers/r8152-Check-for-supported-Wake-on-LAN-Modes.patch
patches.drivers/smsc75xx-Check-for-Wake-on-LAN-modes.patch
+ patches.drivers/smsc95xx-Check-for-Wake-on-LAN-modes.patch
# jejb/scsi for-next
patches.drivers/scsi-qla2xxx-Fix-process-response-queue-for-ISP26XX-.patch