On Thu, 13 May 2004, Alberto Bertogli wrote: > Hi! > > I've just hit a bug after removing a Kingston USB flash drive. > > I have removed it several (probably more than 40) times today without > problems until now. I'm removing it while doing streaming write()s on > the device (using /dev/sda) because I'm testing some things with the > drive. This was just like all the other times, so it looks like a race > somewhere. > > This is a stock 2.6.6 kernel, on a Pentium 4 with HT (the kernel is > compiled with both SMP and preempt). > > After the BUG the kernel doesn't detect the device anymore. > > Please let me know if you need any more information or if I can give you a > hand with testing. > > Thanks a lot, > Alberto > > > kernel BUG at drivers/usb/storage/usb.c:848!
This BUG happened because the SCSI layer was still using the drive after usb-storage had called scsi_remove_host(). This is an aspect of SCSI midlayer <-> low-level driver interaction that I'm not very clear about. How long after the host is removed can the midlayer continue to use it? How does the driver know when the midlayer is finished using the host so the driver can exit (and unload from memory)? Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel