Re: usb device problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jiri Slaby wrote:
Jiri Slaby napsal(a):
Mark Lord napsal(a):
Mmm.. okay, a quick glance at the USB storage code revealed one instance:

       /* Did we transfer less than the minimum amount required? */
       if (srb->result == SAM_STAT_GOOD &&
                       srb->request_bufflen - srb->resid < srb->underflow)
               srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24);

       return;

So I suppose this *could* be the driver thinking it had a bad sector,
but it really looks like it's guessing.  The code also appears to be
instrumented for some kind of USB tracing.. If you can figure out how
to turn that on, then the trace will probably tell us what is really
going on there.
Look for a file called "usbmon.txt" in the Documentation/usb/ subdir
of your kernel source tree.  It describes how to do the tracing.
Did you want me to do something like this:
http://www.fi.muni.cz/~xslaby/sklad/usbmon/?M=A

usb2 means usb bus 2.

without "a"s commands was:

[connect the device]
mount /dev/sdb usb/ [filesystem is vfat]
dd if=/dev/zero of=usb/zero1 bs=1k count=3
[wait some time to let system syncing automagically]
umount usb/
[disconnect the device]



with "a" there is only difference in dd command:
...
dd if=/dev/zero of=usb/zero2 bs=1k count=5
...

The first serie is without the error in the latter one appeared (some time after
`dd', when system syncs):
sd 6:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sdb, sector 8223
[same as before]



I have i386 arch, so 4096 is PAGE_SIZE, when it syncs only one dirty page, it
seems to be OK, otherwise it's not, if this helps in any way.


Just a notice, I've just returned from the big w*ows system and it's working
there ... huh ... better to say, it doesn't complain ... hum ... it means almost
nothing ... But seems to work.

I think it's time for you to try the USB Storage maintainer(s).

I've CC'd their mailing list on this note, but you should probably
repost the earlier descriptions to their lists.

Cheers


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux