Commit eb970ff0 authored by Ming Lei's avatar Ming Lei Committed by David S. Miller

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: default avatarMing Lei <ming.lei@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 42e21c01
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#define FEATURE_8_WAKEUP_FILTERS (0x01) #define FEATURE_8_WAKEUP_FILTERS (0x01)
#define FEATURE_PHY_NLP_CROSSOVER (0x02) #define FEATURE_PHY_NLP_CROSSOVER (0x02)
#define FEATURE_AUTOSUSPEND (0x04) #define FEATURE_REMOTE_WAKEUP (0x04)
#define SUSPEND_SUSPEND0 (0x01) #define SUSPEND_SUSPEND0 (0x01)
#define SUSPEND_SUSPEND1 (0x02) #define SUSPEND_SUSPEND1 (0x02)
...@@ -1146,7 +1146,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -1146,7 +1146,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
(val == ID_REV_CHIP_ID_89530_) || (val == ID_REV_CHIP_ID_9730_)) (val == ID_REV_CHIP_ID_89530_) || (val == ID_REV_CHIP_ID_9730_))
pdata->features = (FEATURE_8_WAKEUP_FILTERS | pdata->features = (FEATURE_8_WAKEUP_FILTERS |
FEATURE_PHY_NLP_CROSSOVER | FEATURE_PHY_NLP_CROSSOVER |
FEATURE_AUTOSUSPEND); FEATURE_REMOTE_WAKEUP);
else if (val == ID_REV_CHIP_ID_9512_) else if (val == ID_REV_CHIP_ID_9512_)
pdata->features = FEATURE_8_WAKEUP_FILTERS; pdata->features = FEATURE_8_WAKEUP_FILTERS;
...@@ -1378,7 +1378,7 @@ static int smsc95xx_autosuspend(struct usbnet *dev, u32 link_up) ...@@ -1378,7 +1378,7 @@ static int smsc95xx_autosuspend(struct usbnet *dev, u32 link_up)
if (!link_up) { if (!link_up) {
/* link is down so enter EDPD mode, but only if device can /* link is down so enter EDPD mode, but only if device can
* reliably resume from it. This check should be redundant * reliably resume from it. This check should be redundant
* as current FEATURE_AUTOSUSPEND parts also support * as current FEATURE_REMOTE_WAKEUP parts also support
* FEATURE_PHY_NLP_CROSSOVER but it's included for clarity */ * FEATURE_PHY_NLP_CROSSOVER but it's included for clarity */
if (!(pdata->features & FEATURE_PHY_NLP_CROSSOVER)) { if (!(pdata->features & FEATURE_PHY_NLP_CROSSOVER)) {
netdev_warn(dev->net, "EDPD not supported\n"); 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,7 +1433,7 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
link_up = smsc95xx_link_ok_nopm(dev); link_up = smsc95xx_link_ok_nopm(dev);
if (message.event == PM_EVENT_AUTO_SUSPEND && if (message.event == PM_EVENT_AUTO_SUSPEND &&
(pdata->features & FEATURE_AUTOSUSPEND)) { (pdata->features & FEATURE_REMOTE_WAKEUP)) {
ret = smsc95xx_autosuspend(dev, link_up); ret = smsc95xx_autosuspend(dev, link_up);
goto done; goto done;
} }
...@@ -1870,11 +1870,11 @@ static int smsc95xx_manage_power(struct usbnet *dev, int on) ...@@ -1870,11 +1870,11 @@ static int smsc95xx_manage_power(struct usbnet *dev, int on)
dev->intf->needs_remote_wakeup = on; dev->intf->needs_remote_wakeup = on;
if (pdata->features & FEATURE_AUTOSUSPEND) if (pdata->features & FEATURE_REMOTE_WAKEUP)
return 0; return 0;
/* this chip revision doesn't support autosuspend */ /* this chip revision isn't capable of remote wakeup */
netdev_info(dev->net, "hardware doesn't support USB autosuspend\n"); netdev_info(dev->net, "hardware isn't capable of remote wakeup\n");
if (on) if (on)
usb_autopm_get_interface_no_resume(dev->intf); usb_autopm_get_interface_no_resume(dev->intf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment