On Sat, 25 Sep 2004, Joris van Rantwijk wrote:

> Thanks for your quick reply.
> After adding my device to the table, I could read it fine again, but
> writing is still a problem. My dmesg is still filled with messages like:
> 
> SCSI error : <3 0 0 0> return code = 0x10070000
> end_request: I/O error, dev sda, sector 228958
> printk: 5 messages suppressed.
> Buffer I/O error on device sda1, logical block 228851
> lost page write due to I/O error on sda1
> 
> .. and the file ends up corrupted on the device.
> 
> If I completely back out the residue checking I don't get any errors
> (obviously), and the device still seems to "get" all data correctly.
> That is: after unplugging, replugging, remounting, the contents of the
> just written file is still correct.
> 
> Adding a few printk-s tells us that the problems always occur on transfers
> of length 65536 where my device will report residue 65536. So I can copy
> files up to about 60k to the device (no residues nothing), but larger
> files will set off the underflow problem.
> 
> I guess the no-check-residue-on-read is not good enough for this device.
> Doesn't really surprise me; the thing has given me no end of problems with
> corrupted data and stuff. But still the recent change in the USB Storage
> driver makes it totally impossible to use this device while it was working
> reasonably on earlier Linux versions; that is not very nice.
> Do you have any more ideas on this ?

Hmm...  It sounds like your device isn't working all that great to begin 
with.

The fact is, there's no reliable way to report write errors other than
though the residue field.  So I really don't want to disable residue
checking for writes.

A workaround that might do the trick is for you to force all data
transfers to be less than 64 KB.  You can do that by setting max_sectors
to a value < 128, like 120.  See the FAQ on linux-usb.org to find out
how max_sectors works.

And do post your patch with the new unusual_devs.h entry (don't forget the 
Signed-off-by: line!).

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to