I was trying to find the unusual_devs.h entry for my usb-storage camera that did not work out of the box and I found a behavior of the usb-storage/SCSI drivers that I do not understand...
So, I was doing my tests with a 2.6-test9, in verbose mode for usb-storage, and I found that the first INQUIRY failed for the camera. OK, big deal, one more buggy camera... but ...
...what suprised me was that their was no usb-storage
dmesg to tell me that the initial probing failed...
And something by far worst, a usb-storage message said 'new usb-storage device'
and their was a new entry in /proc/bus/scsi/storage, meaning that from usb-storage
driver point of view, everything's OK.
In the same time, no new entry in /proc/scsi/scsi and of course, no new SCSI device.
So, I looked at the code... My understanding of the SCSI layer is very light, but it seems that the final registration into the SCSI layer is made in the scsi_scan_host function, that as no return status.
So when the scsi_scan_host function internally fails (it is the case with my camera, no host is found actually) the usb-storage driver thinks that everything's OK (It only tests the value returned by the scsi_add_host function, but all the work is done in scsi_scan_host).
So, what have I missed ? I've checked how the other drivers used the scsi_scan_function, and it is always the same thing.
I found out that in 2.6-test1 the scsi_scan_host function was called by the scsi_add_host function itself, but even in this case, nothing more was checked by scsi_add_host...
Any rational explanation ? Is it normal that the usb-storage layer can not be informed that the managed host was not found by the underlaying layer ?
Stephane Galles
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
