Date: Mon, 31 Dec 2007 02:34:17 +0100 From: Henrik Gulbrandsen <henrik@gulbra.net> To: freebsd-usb <freebsd-usb@freebsd.org> Subject: usb/46176: Let's save the horse! Message-ID: <1199064857.75510.43.camel@Particle>
next in thread | raw e-mail | index | archive | help
I have uploaded an updated version of the patch set: http://www.gulbra.net/freebsd-usb/umass2.tar.gz Apparently, the original patches didn't help much for the latest version of FreeBSD-CURRENT, but this version seems to do the trick. I have tried it with 1001 attach/detach iterations and didn't get a single error. 1001 iterations correspond to about two and a half hours of manual testing, so that's about as far as I'm prepared to go for today! :-) As before, here is a quick overview of the contents of umass2.tar.gz: etc/devd.conf.patch: Hurray! I've updated it to use devd.conf instead of the obsoleted usbd.conf file. This also means that the usb_subr.c patch is no longer needed for things to work in this version. etc/devd/umass: Other things in devd.conf seem to have their scripts in the rc.d directory, but I didn't want to think about that now, so the umass script has simply been moved from etc/usbd to etc/devd. Also, the original script had a bug: I had forgotten to initialize the user data before attempting to execute the user's .umass script after detaching. In the current version, user info is fetched from the device directory. src/msdosfs_vfsops.c.patch: The msdosfs_vfsops.c file had changed in a radical way, so this is a new patch that should do about the same thing as the corresponding patch in the original patch set. src/scsi_da.c.patch: I couldn't help noticing that detaching failed miserably in the latest CURRENT. Basically, the unmount call attempted to close the da device, but crashed because the SCSI Interface Module was already gone. This patch tries to solve it by explicitly calling daclose as soon as the AC_LOST_DEVICE event is received. I'm hoping to get away with it, since everything happens within the da device driver, but some extra code review would probably not hurt... /Henrik
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1199064857.75510.43.camel>
