Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341661
b: refs/heads/master
c: 3b14692
h: refs/heads/master
i:
  341659: 78c4b24
v: v3
  • Loading branch information
Steve Glendinning authored and David S. Miller committed Nov 30, 2012
1 parent 9e58028 commit 018a5c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b9f7d8cdb6db2b6ba78c149dacec3d72591c544
refs/heads/master: 3b14692c01e0b68f0ce51138dfcea967a63cd7bb
30 changes: 5 additions & 25 deletions trunk/drivers/net/usb/smsc95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,6 @@ static int __must_check smsc95xx_write_reg(struct usbnet *dev, u32 index,
{
return __smsc95xx_write_reg(dev, index, data, 0);
}
static int smsc95xx_set_feature(struct usbnet *dev, u32 feature)
{
if (WARN_ON_ONCE(!dev))
return -EINVAL;

return usbnet_write_cmd_nopm(dev, USB_REQ_SET_FEATURE,
USB_RECIP_DEVICE, feature, 0,
NULL, 0);
}

static int smsc95xx_clear_feature(struct usbnet *dev, u32 feature)
{
if (WARN_ON_ONCE(!dev))
return -EINVAL;

return usbnet_write_cmd_nopm(dev, USB_REQ_CLEAR_FEATURE,
USB_RECIP_DEVICE, feature,
0, NULL, 0);
}

/* Loop until the read is completed with timeout
* called with phy_mutex held */
Expand Down Expand Up @@ -685,8 +666,13 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,
{
struct usbnet *dev = netdev_priv(net);
struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
int ret;

pdata->wolopts = wolinfo->wolopts & SUPPORTED_WAKE;

ret = device_set_wakeup_enable(&dev->udev->dev, pdata->wolopts);
check_warn_return(ret, "device_set_wakeup_enable error %d\n", ret);

return 0;
}

Expand Down Expand Up @@ -1160,8 +1146,6 @@ static int smsc95xx_enter_suspend0(struct usbnet *dev)
ret = smsc95xx_read_reg_nopm(dev, PM_CTRL, &val);
check_warn_return(ret, "Error reading PM_CTRL\n");

smsc95xx_set_feature(dev, USB_DEVICE_REMOTE_WAKEUP);

return 0;
}

Expand Down Expand Up @@ -1204,8 +1188,6 @@ static int smsc95xx_enter_suspend1(struct usbnet *dev)
ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val);
check_warn_return(ret, "Error writing PM_CTRL\n");

smsc95xx_set_feature(dev, USB_DEVICE_REMOTE_WAKEUP);

return 0;
}

Expand Down Expand Up @@ -1456,8 +1438,6 @@ static int smsc95xx_resume(struct usb_interface *intf)
BUG_ON(!dev);

if (pdata->wolopts) {
smsc95xx_clear_feature(dev, USB_DEVICE_REMOTE_WAKEUP);

/* clear wake-up sources */
ret = smsc95xx_read_reg_nopm(dev, WUCSR, &val);
check_warn_return(ret, "Error reading WUCSR\n");
Expand Down

0 comments on commit 018a5c2

Please sign in to comment.