cvs commit: src/sys/dev/usb if_zyd.c
weongyo at FreeBSD.org
Fri Sep 19 07:40:44 UTC 2008
weongyo 2008-09-19 07:40:30 UTC
FreeBSD src repository
SVN rev 183176 on 2008-09-19 07:40:30Z by weongyo
fix a another driver bug related with tsleep() during detaching that
this also can be happened if we pull the USN stick out forcibly.
Currently the ZyDAS driver uses tsleep() when it try to query a read
command to the device and it'd make a timeout if the device doesn't
response within about 1 sec.
In a case of that the USB stick is gone by hand and the driver's
scanning with changing the channel numbers, the thread which is sleeping
until a command requested is responded can be waked up after all
detaching routines finished that means the zyd softc already freed.
Tring to touch the softc freed by the wakeup thread makes a panic.
So make sure that all sleeping threads should be waken up before the
detach is completed and any other new requests to the device should be
Revision Changes Path
1.22 +18 -6 src/sys/dev/usb/if_zyd.c
More information about the cvs-all