Skip to content

Commit eb970ff

Browse files
Ming Leidavem330
authored andcommitted
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>
1 parent 42e21c0 commit eb970ff

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎drivers/net/usb/smsc95xx.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
#define FEATURE_8_WAKEUP_FILTERS (0x01)
5555
#define FEATURE_PHY_NLP_CROSSOVER (0x02)
56-
#define FEATURE_AUTOSUSPEND (0x04)
56+
#define FEATURE_REMOTE_WAKEUP (0x04)
5757

5858
#define SUSPEND_SUSPEND0 (0x01)
5959
#define SUSPEND_SUSPEND1 (0x02)
@@ -1146,7 +1146,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)
11461146
(val == ID_REV_CHIP_ID_89530_) || (val == ID_REV_CHIP_ID_9730_))
11471147
pdata->features = (FEATURE_8_WAKEUP_FILTERS |
11481148
FEATURE_PHY_NLP_CROSSOVER |
1149-
FEATURE_AUTOSUSPEND);
1149+
FEATURE_REMOTE_WAKEUP);
11501150
else if (val == ID_REV_CHIP_ID_9512_)
11511151
pdata->features = FEATURE_8_WAKEUP_FILTERS;
11521152

@@ -1378,7 +1378,7 @@ static int smsc95xx_autosuspend(struct usbnet *dev, u32 link_up)
13781378
if (!link_up) {
13791379
/* link is down so enter EDPD mode, but only if device can
13801380
* 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
13821382
* FEATURE_PHY_NLP_CROSSOVER but it's included for clarity */
13831383
if (!(pdata->features & FEATURE_PHY_NLP_CROSSOVER)) {
13841384
netdev_warn(dev->net, "EDPD not supported\n");
@@ -1433,7 +1433,7 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
14331433
link_up = smsc95xx_link_ok_nopm(dev);
14341434

14351435
if (message.event == PM_EVENT_AUTO_SUSPEND &&
1436-
(pdata->features & FEATURE_AUTOSUSPEND)) {
1436+
(pdata->features & FEATURE_REMOTE_WAKEUP)) {
14371437
ret = smsc95xx_autosuspend(dev, link_up);
14381438
goto done;
14391439
}
@@ -1870,11 +1870,11 @@ static int smsc95xx_manage_power(struct usbnet *dev, int on)
18701870

18711871
dev->intf->needs_remote_wakeup = on;
18721872

1873-
if (pdata->features & FEATURE_AUTOSUSPEND)
1873+
if (pdata->features & FEATURE_REMOTE_WAKEUP)
18741874
return 0;
18751875

1876-
/* this chip revision doesn't support autosuspend */
1877-
netdev_info(dev->net, "hardware doesn't support USB autosuspend\n");
1876+
/* this chip revision isn't capable of remote wakeup */
1877+
netdev_info(dev->net, "hardware isn't capable of remote wakeup\n");
18781878

18791879
if (on)
18801880
usb_autopm_get_interface_no_resume(dev->intf);

0 commit comments

Comments
 (0)