freebsd-dev/sys/dev/usb
Alfred Perlstein cc8317f2b0 Fix a deadlock in detach/shutdown.
The problem was that I was acquiring the driver sx lock and then waiting
for a taskqueue to drain, however the taskqueue itself would try to
acquire the lock as well leading to a deadlock.

To fix the problem roll my own exclusive lock that allows for lock
cancellation.  This is a normal exclusive lock, however if someone
marks it as "dead" then all waiters who request an error return will
get back an error instead of continuing to wait for the lock.

In this particular case, the shutdown and detach functions kill the
lock while the async task thread tries to acquire the lock but will
abort if the lock returns an error.

The other option was to drop the driver lock mid-detach and mid-shutdown,
mid-detach was a ok, however mid-shutdown was not.

While I'm here, fix a bug in what appears to be the mii link status
word in the softc going out to lunch.  Explicitly set the status
word to 1 after initializing the mii.  This would result in an interface
that would never respond to "if_start" requests as the mii interface
would always look down.
2006-12-23 17:18:18 +00:00
..
dsbr100io.h
ehci_pci.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
ehci.c Use a different task queue for host controller and peripheral driver 2006-10-19 01:15:58 +00:00
ehcireg.h ehcivar.h: 2005-09-18 11:45:39 +00:00
ehcivar.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
FILES Acknowledge (dearly) departed files 2006-11-21 22:29:06 +00:00
hid.c s/Static/static/g 2006-09-06 23:44:25 +00:00
hid.h
if_aue.c Fix a deadlock in detach/shutdown. 2006-12-23 17:18:18 +00:00
if_auereg.h Fix a deadlock in detach/shutdown. 2006-12-23 17:18:18 +00:00
if_axe.c Use a different task queue for host controller and peripheral driver 2006-10-19 01:15:58 +00:00
if_axereg.h Add a sleep lock that protects access to sequences of blocking 2006-06-04 14:42:38 +00:00
if_cdce.c Add support for Familiar Linux powered iPaq handhelds to cdce(4). 2006-10-07 17:35:37 +00:00
if_cdcereg.h Add dummy support for ifmedia subsystem. This allows devd to see cdce as an 2005-09-26 05:29:46 +00:00
if_cue.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
if_cuereg.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_kue.c Add support for Psion Gold Port Ethernet USB NIC. 2006-10-07 18:03:39 +00:00
if_kuereg.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_rue.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
if_ruereg.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_udav.c Use a different task queue for host controller and peripheral driver 2006-10-19 01:15:58 +00:00
if_udavreg.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
if_ural.c add codes for Atheros USB devices; shuffle one ural code to 2006-11-23 00:50:48 +00:00
if_uralreg.h o fix initialization sequence. 2006-01-21 10:25:51 +00:00
if_uralvar.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
kue_fw.h s/Static/static/g 2006-09-06 23:44:25 +00:00
ohci_pci.c add a newbus method for obtaining the bus's bus_dma_tag_t... This is 2006-09-03 00:27:42 +00:00
ohci.c Use a different task queue for host controller and peripheral driver 2006-10-19 01:15:58 +00:00
ohcireg.h Use the limited scatter-gather capabilities of ehci, ohci and uhci 2006-05-28 05:27:09 +00:00
ohcivar.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
rio500_usb.h
sl811hs.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
sl811hsreg.h Add SL811 based host controller driver for CF usb host controller. 2005-07-14 15:57:01 +00:00
sl811hsvar.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
slhci_pccard.c Remove OLDCARD shims 2005-09-22 05:06:37 +00:00
uark.c o Add uark(4), a driver for Arkmicro Technologies ARK3116 based serial 2006-11-15 09:13:25 +00:00
ubsa.c Add support for Option GT 3G/3G quad datacard in ubsa. 2006-10-31 02:27:24 +00:00
ubser.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
ubser.h
ucom.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
ucomvar.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
ucycom.c Eliminate two unused arguments to ttycreate(). 2005-10-16 20:22:56 +00:00
udbp.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
udbp.h
ufm.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
ufoma.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
uftdi.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
uftdireg.h
ugen.c More antideclarification. 2006-09-06 23:29:53 +00:00
ugraphire_rdesc.h Add support for the Wacom Graphire 3 4x5. Like the Graphire 3, it has a 2005-12-31 04:38:50 +00:00
uhci_pci.c Use the limited scatter-gather capabilities of ehci, ohci and uhci 2006-05-28 05:27:09 +00:00
uhci.c Use a different task queue for host controller and peripheral driver 2006-10-19 01:15:58 +00:00
uhcireg.h
uhcivar.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
uhid.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
uhub.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
ukbd.c Add a quirk for devices recognized as usb keyboards not to be hooked by 2006-11-28 21:13:07 +00:00
ulpt.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
umass.c 2nd and final commit that moves us to CAM_NEW_TRAN_CODE 2006-11-02 00:54:38 +00:00
umct.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
umodem.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
ums.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
uplcom.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
urio.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
usb_ethersubr.c defer all processing to a full fledged thread. 2006-12-11 09:57:41 +00:00
usb_ethersubr.h defer all processing to a full fledged thread. 2006-12-11 09:57:41 +00:00
usb_if.m
usb_mem.c s/Static/static/g 2006-09-06 23:44:25 +00:00
usb_mem.h
usb_port.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
usb_quirks.c Add a quirk for devices recognized as usb keyboards not to be hooked by 2006-11-28 21:13:07 +00:00
usb_quirks.h Add a quirk for devices recognized as usb keyboards not to be hooked by 2006-11-28 21:13:07 +00:00
usb_subr.c When changing the device address and max packet size in usbd_new_device(), 2006-10-03 01:13:26 +00:00
usb.c Use a different task queue for host controller and peripheral driver 2006-10-19 01:15:58 +00:00
usb.h s/Static/static/g 2006-09-06 23:44:25 +00:00
usbcdc.h
usbdevs Add a quirk for devices recognized as usb keyboards not to be hooked by 2006-11-28 21:13:07 +00:00
usbdi_util.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
usbdi_util.h s/Static/static/g 2006-09-06 23:44:25 +00:00
usbdi.c Refine the previous change to only call bus_dmamap_sync() in case of 2006-11-27 18:39:02 +00:00
usbdi.h Use a different task queue for host controller and peripheral driver 2006-10-19 01:15:58 +00:00
usbdivar.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
usbhid.h
uscanner.c Add support for Epson Stylus CX4200 in uscanner(4). 2006-10-07 18:09:27 +00:00
uvisor.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
uvscom.c More removing compatibility macros. 2006-09-07 00:06:42 +00:00
uxb360gp_rdesc.h Add support for the Wacom Graphire 3 4x5. Like the Graphire 3, it has a 2005-12-31 04:38:50 +00:00