On Sat, 9 Jul 2005, Artur Szymiec wrote:
> Dear Alan,
>
> thanks for a quick answer.
> I check the 2.6.12-2 Kernel - this patch is already
> there - I tried with this Kernel - still NG.
The patch is _not_ already in 2.6.12-2. Look at it again. The original
kernel source contains an "if" statement followed by a call to
udelay(125). The patch comments out the "if" line, so that the call will
always be executed.
> See attached log.
>
> I'm considering now what is wrong:
> - the USB handling is restrictive in Linux - timing between device & hosts ?
> - the USB-storage handling is different then Win ?
>
> The point is - either there are transmission errors to the USB storage driver
> or there are errors perhaps becuse of wrong "questions" sent to device ?
There are transmission errors from the device to the computer. It's not
clear what causes those errors.
It is possible that one of the commands sent to the device is wrong --
sort of. I noticed it for the first time just now, looking through your
most recent log. (The same command was present in your earlier logs too;
I simply didn't notice it -- my apologies.) The command is REPORT LUNS,
and it's supposed to be supported by every SCSI Level 4 device. Your
device does claim to be level 4, but maybe it doesn't like REPORT LUNS.
Other devices have been reported on the mailing list with this problem.
Below is a patch which will prevent Linux from sending the REPORT LUNS
command. I'm not sure if the patch will apply to 2.6.12-2, and I don't
have a copy here to check against. If it doesn't apply you can try making
the change by editing the source file by hand -- it only involves adding
one line of code. Or you can wait until Monday, when I will be able to
send a version that does apply to 2.6.12-2.
Alan Stern
===== drivers/usb/storage/scsiglue.c 1.95 vs edited =====
--- 1.95/drivers/usb/storage/scsiglue.c 2005-02-10 16:22:46 -05:00
+++ edited/drivers/usb/storage/scsiglue.c 2005-02-22 10:50:08 -05:00
@@ -154,6 +154,14 @@
* If this device makes that mistake, tell the sd driver. */
if (us->flags & US_FL_FIX_CAPACITY)
sdev->fix_capacity = 1;
+
+ /* Some devices report a SCSI revision level above 2 but are
+ * unable to handle the REPORT LUNS command (for which
+ * support is mandatory at level 3). Since we already have
+ * a Get-Max-LUN request, we won't lose much by setting the
+ * revision level down to 2. The only devices that would be
+ * affected are those with sparse LUNs. */
+ sdev->scsi_level = SCSI_2;
} else {
/* Non-disk-type devices don't need to blacklist any pages
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users