Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342062
b: refs/heads/master
c: 7b9e758
h: refs/heads/master
v: v3
  • Loading branch information
Steve Glendinning authored and David S. Miller committed Dec 10, 2012
1 parent 844d2d5 commit a2421a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: 9624531701ea84f4b7eb966284b53b34b1c52365
refs/heads/master: 7b9e75802f1c50bfeae53c86c0bfbc5c45fd8719
14 changes: 9 additions & 5 deletions trunk/drivers/net/usb/smsc95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,19 @@ static int smsc95xx_write_eeprom(struct usbnet *dev, u32 offset, u32 length,
}

static int __must_check smsc95xx_write_reg_async(struct usbnet *dev, u16 index,
u32 *data)
u32 data)
{
const u16 size = 4;
u32 buf;
int ret;

buf = data;
cpu_to_le32s(&buf);

ret = usbnet_write_cmd_async(dev, USB_VENDOR_REQUEST_WRITE_REGISTER,
USB_DIR_OUT | USB_TYPE_VENDOR |
USB_RECIP_DEVICE,
0, index, data, size);
0, index, &buf, size);
if (ret < 0)
netdev_warn(dev->net, "Error write async cmd, sts=%d\n",
ret);
Expand Down Expand Up @@ -490,15 +494,15 @@ static void smsc95xx_set_multicast(struct net_device *netdev)
spin_unlock_irqrestore(&pdata->mac_cr_lock, flags);

/* Initiate async writes, as we can't wait for completion here */
ret = smsc95xx_write_reg_async(dev, HASHH, &pdata->hash_hi);
ret = smsc95xx_write_reg_async(dev, HASHH, pdata->hash_hi);
if (ret < 0)
netdev_warn(dev->net, "failed to initiate async write to HASHH\n");

ret = smsc95xx_write_reg_async(dev, HASHL, &pdata->hash_lo);
ret = smsc95xx_write_reg_async(dev, HASHL, pdata->hash_lo);
if (ret < 0)
netdev_warn(dev->net, "failed to initiate async write to HASHL\n");

ret = smsc95xx_write_reg_async(dev, MAC_CR, &pdata->mac_cr);
ret = smsc95xx_write_reg_async(dev, MAC_CR, pdata->mac_cr);
if (ret < 0)
netdev_warn(dev->net, "failed to initiate async write to MAC_CR\n");
}
Expand Down

0 comments on commit a2421a3

Please sign in to comment.