* [PATCH 3.8-stable] usbnet: smsc95xx: fix suspend failure
@ 2013-03-04 10:07 Ming Lei
[not found] ` <1362391633-27551-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Ming Lei @ 2013-03-04 10:07 UTC (permalink / raw)
To: David S. Miller, Greg Kroah-Hartman
Cc: Oliver Neukum, netdev, linux-usb, Ming Lei, stable,
Steve Glendinning
The three below functions:
smsc95xx_enter_suspend0()
smsc95xx_enter_suspend1()
smsc95xx_enter_suspend2()
return > 0 in case of success, so they will cause smsc95xx_suspend()
to return > 0 and suspend failure.
This patch is backported from the upstream commit:
From 7643721471117d5f62ca36f328d3dc8d84af4402 Mon Sep 17 00:00:00 2001
Subject: [PATCH] usbnet: smsc95xx: fix suspend failure
Cc: <stable@vger.kernel.org>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
drivers/net/usb/smsc95xx.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 9b73670..6214181 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1340,6 +1340,8 @@ static int smsc95xx_enter_suspend0(struct usbnet *dev)
ret = smsc95xx_read_reg_nopm(dev, PM_CTRL, &val);
if (ret < 0)
netdev_warn(dev->net, "Error reading PM_CTRL\n");
+ else
+ ret = 0;
return ret;
}
@@ -1392,6 +1394,8 @@ static int smsc95xx_enter_suspend1(struct usbnet *dev)
ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val);
if (ret < 0)
netdev_warn(dev->net, "Error writing PM_CTRL\n");
+ else
+ ret = 0;
return ret;
}
@@ -1413,6 +1417,8 @@ static int smsc95xx_enter_suspend2(struct usbnet *dev)
ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val);
if (ret < 0)
netdev_warn(dev->net, "Error writing PM_CTRL\n");
+ else
+ ret = 0;
return ret;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3.8-stable] usbnet: smsc95xx: fix suspend failure
[not found] ` <1362391633-27551-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2013-03-04 18:56 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-04 18:56 UTC (permalink / raw)
To: ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, oneukum-l3A5Bk7waGM,
netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
stable-u79uwXL29TY76Z2rM5mHXA,
steve.glendinning-nksJyM/082jR7s880joybQ
From: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Date: Mon, 4 Mar 2013 18:07:13 +0800
> The three below functions:
>
> smsc95xx_enter_suspend0()
> smsc95xx_enter_suspend1()
> smsc95xx_enter_suspend2()
>
> return > 0 in case of success, so they will cause smsc95xx_suspend()
> to return > 0 and suspend failure.
>
> This patch is backported from the upstream commit:
>
> From 7643721471117d5f62ca36f328d3dc8d84af4402 Mon Sep 17 00:00:00 2001
> Subject: [PATCH] usbnet: smsc95xx: fix suspend failure
>
> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
> Cc: Steve Glendinning <steve.glendinning-nksJyM/082jR7s880joybQ@public.gmane.org>
> Signed-off-by: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
This is fine, Greg please apply to 3.8-stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-04 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 10:07 [PATCH 3.8-stable] usbnet: smsc95xx: fix suspend failure Ming Lei
[not found] ` <1362391633-27551-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-03-04 18:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).