Skip to contentSkip to conversation

usbnet: smsc95xx: fix suspend failure

PATCH In review Ming Lei 2 participants 2 messages Mar 4, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 usbnet: smsc95xx: fix suspend failure

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
---
 drivers/net/usb/smsc95xx.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/usb/smsc95xx.c +6 -0
index 9b73670..6214181 100644
@@ -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;
 }
Signature · 1 line
1.7.9.5
#2 lore raw
In reply to a message not in the archive

From: Ming Lei <[email protected]>
Date: Mon, 4 Mar 2013 18:07:13 +0800

Quoted 9 lines

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.

Quoted 8 lines

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 Steve Glendinning <steve.glendinning-nksJyM/[email protected]>

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html