aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2013-02-21 22:05:05 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-25 15:49:52 -0500
commiteb970ff07c15f13eb474f643fd165ebe3e4e24b2 (patch)
tree962a3e71e1bd496884357dc2da7b412322cb0914
parent42e21c01071b4406341e32aba65e40c7f9b7e973 (diff)
usbnet: smsc95xx: rename FEATURE_AUTOSUSPEND
The name of FEATURE_AUTOSUSPEND is very misleading and the actual meaning is remote wakeup, but a device incapable of remote wakeup still can support USB autosuspend under some situations, so rename it to avoid misunderstanding. Cc: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/usb/smsc95xx.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 7fa9622aabbd..e6d2dea1373c 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -53,7 +53,7 @@
53 53
54#define FEATURE_8_WAKEUP_FILTERS (0x01) 54#define FEATURE_8_WAKEUP_FILTERS (0x01)
55#define FEATURE_PHY_NLP_CROSSOVER (0x02) 55#define FEATURE_PHY_NLP_CROSSOVER (0x02)
56#define FEATURE_AUTOSUSPEND (0x04) 56#define FEATURE_REMOTE_WAKEUP (0x04)
57 57
58#define SUSPEND_SUSPEND0 (0x01) 58#define SUSPEND_SUSPEND0 (0x01)
59#define SUSPEND_SUSPEND1 (0x02) 59#define SUSPEND_SUSPEND1 (0x02)
@@ -1146,7 +1146,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
1146 (val == ID_REV_CHIP_ID_89530_) || (val == ID_REV_CHIP_ID_9730_)) 1146 (val == ID_REV_CHIP_ID_89530_) || (val == ID_REV_CHIP_ID_9730_))
1147 pdata->features = (FEATURE_8_WAKEUP_FILTERS | 1147 pdata->features = (FEATURE_8_WAKEUP_FILTERS |
1148 FEATURE_PHY_NLP_CROSSOVER | 1148 FEATURE_PHY_NLP_CROSSOVER |
1149 FEATURE_AUTOSUSPEND); 1149 FEATURE_REMOTE_WAKEUP);
1150 else if (val == ID_REV_CHIP_ID_9512_) 1150 else if (val == ID_REV_CHIP_ID_9512_)
1151 pdata->features = FEATURE_8_WAKEUP_FILTERS; 1151 pdata->features = FEATURE_8_WAKEUP_FILTERS;
1152 1152
@@ -1378,7 +1378,7 @@ static int smsc95xx_autosuspend(struct usbnet *dev, u32 link_up)
1378 if (!link_up) { 1378 if (!link_up) {
1379 /* link is down so enter EDPD mode, but only if device can 1379 /* link is down so enter EDPD mode, but only if device can
1380 * reliably resume from it. This check should be redundant 1380 * reliably resume from it. This check should be redundant
1381 * as current FEATURE_AUTOSUSPEND parts also support 1381 * as current FEATURE_REMOTE_WAKEUP parts also support
1382 * FEATURE_PHY_NLP_CROSSOVER but it's included for clarity */ 1382 * FEATURE_PHY_NLP_CROSSOVER but it's included for clarity */
1383 if (!(pdata->features & FEATURE_PHY_NLP_CROSSOVER)) { 1383 if (!(pdata->features & FEATURE_PHY_NLP_CROSSOVER)) {
1384 netdev_warn(dev->net, "EDPD not supported\n"); 1384 netdev_warn(dev->net, "EDPD not supported\n");
@@ -1433,7 +1433,7 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
1433 link_up = smsc95xx_link_ok_nopm(dev); 1433 link_up = smsc95xx_link_ok_nopm(dev);
1434 1434
1435 if (message.event == PM_EVENT_AUTO_SUSPEND && 1435 if (message.event == PM_EVENT_AUTO_SUSPEND &&
1436 (pdata->features & FEATURE_AUTOSUSPEND)) { 1436 (pdata->features & FEATURE_REMOTE_WAKEUP)) {
1437 ret = smsc95xx_autosuspend(dev, link_up); 1437 ret = smsc95xx_autosuspend(dev, link_up);
1438 goto done; 1438 goto done;
1439 } 1439 }
@@ -1870,11 +1870,11 @@ static int smsc95xx_manage_power(struct usbnet *dev, int on)
1870 1870
1871 dev->intf->needs_remote_wakeup = on; 1871 dev->intf->needs_remote_wakeup = on;
1872 1872
1873 if (pdata->features & FEATURE_AUTOSUSPEND) 1873 if (pdata->features & FEATURE_REMOTE_WAKEUP)
1874 return 0; 1874 return 0;
1875 1875
1876 /* this chip revision doesn't support autosuspend */ 1876 /* this chip revision isn't capable of remote wakeup */
1877 netdev_info(dev->net, "hardware doesn't support USB autosuspend\n"); 1877 netdev_info(dev->net, "hardware isn't capable of remote wakeup\n");
1878 1878
1879 if (on) 1879 if (on)
1880 usb_autopm_get_interface_no_resume(dev->intf); 1880 usb_autopm_get_interface_no_resume(dev->intf);