summaryrefslogtreecommitdiffstats
path: root/drivers/usb/net/usbnet.c
diff options
context:
space:
mode:
authorArnd Bergmann2006-10-09 00:08:02 +0200
committerGreg Kroah-Hartman2006-10-17 23:46:32 +0200
commita9fc6338bd51a3d5735839e756fe7b741c2e6fad (patch)
tree0c75d1739bd65f21b125562dd9f603b1d195dd8c /drivers/usb/net/usbnet.c
parentusbnet: improve generic ethtool support (diff)
downloadkernel-qcow2-linux-a9fc6338bd51a3d5735839e756fe7b741c2e6fad.tar.gz
kernel-qcow2-linux-a9fc6338bd51a3d5735839e756fe7b741c2e6fad.tar.xz
kernel-qcow2-linux-a9fc6338bd51a3d5735839e756fe7b741c2e6fad.zip
usbnet: add a mutex around phy register access
When working on the mcs7830, I noticed the need for a mutex in its mdio_read/mdio_write functions. A related problem seems to be present in the asix driver in the respective functions. This introduces a mutex in the common usbnet driver and uses it from the two hardware specific drivers. Acked-by: David Hollis <dhollis@davehollis.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/net/usbnet.c')
-rw-r--r--drivers/usb/net/usbnet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index decc1b179246..cf3d20eb781c 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -1144,6 +1144,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
dev->delay.function = usbnet_bh;
dev->delay.data = (unsigned long) dev;
init_timer (&dev->delay);
+ mutex_init (&dev->phy_mutex);
SET_MODULE_OWNER (net);
dev->net = net;