Date: Fri, 19 Sep 2008 07:40:30 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/usb if_zyd.c Message-ID: <200809190740.m8J7ehPS004611@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
weongyo 2008-09-19 07:40:30 UTC FreeBSD src repository Modified files: sys/dev/usb if_zyd.c Log: 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 prevented. Revision Changes Path 1.22 +18 -6 src/sys/dev/usb/if_zyd.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809190740.m8J7ehPS004611>