diff options
author | jhb <jhb@FreeBSD.org> | 2009-08-20 19:17:53 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-08-20 19:17:53 +0000 |
commit | 9b0755de9f1e9517732f96a37f0ef30b8db23811 (patch) | |
tree | ee9b2a74c07c732ee357d4810494c3b6aecd6e71 /sys/dev/usb/net/usb_ethernet.c | |
parent | ab0b6203abac22f7fa981c24cf452d3dab032727 (diff) | |
download | FreeBSD-src-9b0755de9f1e9517732f96a37f0ef30b8db23811.zip FreeBSD-src-9b0755de9f1e9517732f96a37f0ef30b8db23811.tar.gz |
Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.
Approved by: re (kib), attilio
Diffstat (limited to 'sys/dev/usb/net/usb_ethernet.c')
-rw-r--r-- | sys/dev/usb/net/usb_ethernet.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/usb/net/usb_ethernet.c b/sys/dev/usb/net/usb_ethernet.c index 427137a..6cf4460 100644 --- a/sys/dev/usb/net/usb_ethernet.c +++ b/sys/dev/usb/net/usb_ethernet.c @@ -221,10 +221,10 @@ ue_attach_post_task(struct usb_proc_msg *_task) if (ue->ue_methods->ue_mii_upd != NULL && ue->ue_methods->ue_mii_sts != NULL) { - newbus_xlock(); + mtx_lock(&Giant); /* device_xxx() depends on this */ error = mii_phy_probe(ue->ue_dev, &ue->ue_miibus, ue_ifmedia_upd, ue->ue_methods->ue_mii_sts); - newbus_xunlock(); + mtx_unlock(&Giant); if (error) { device_printf(ue->ue_dev, "MII without any PHY\n"); goto error; @@ -279,12 +279,9 @@ uether_ifdetach(struct usb_ether *ue) /* detach miibus */ if (ue->ue_miibus != NULL) { - - /* - * It is up to the callers to provide the correct - * newbus locking. - */ + mtx_lock(&Giant); /* device_xxx() depends on this */ device_delete_child(ue->ue_dev, ue->ue_miibus); + mtx_unlock(&Giant); } /* detach ethernet */ |