James: Giulio Bernardi recently reported a problem (the second Logical Unit of his SATA-USB docking station was not being detected) which we traced down to a bug in the matching code in scsi_devinfo.c. The entire search algorithm (including the bug) is present in two separate routines of that source file. The first patch in the following sequence refactors the matching code by moving it into its own subroutine, where the others can call it. The second patch fixes the matching code's bug. Namely, the code thinks it has found a match if either the device's vendor string (with leading blanks removed) or the device list entry's vendor string is a substring of the other, and likewise for the product strings. For example, a device string of "VENDOR12" would match against a list entry's string of "VENDOR", which obviously is not what we want. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html