On Wed, 4 May 2005, Grégory SCHMITT wrote: > > > > It sounds like the ignore-residue-for-writes patch fixed your problem. > > > > The patch will be included in 2.6.12. The reason for the your slow > > > > transfers is probably that you are still using the "sync" option. > > > > > > I tried to remove the sync option. Data will be corrupted on the key, > > > even with the patch, though no error messages appear in the log. > > > Putting a low value (like 16) for max-sectors seems to help, but > > > transfers are so slow... > > > > Please post the usb-storage verbose debugging logs. Without those nobody > > will be able to help you and your changes won't be accepted. > > Here's the syslog. I removed the US_PR_BULK AND US_FL_NEED_OVERRIDE. I > left the US_FL_FIX_INQUIRY and US_FL_IGNORE_RESIDUE.
The FIX_INQUIRY won't do anything useful in 2.6.12, so you may as well leave it out. IGNORE_RESIDUE is definitely needed though; your device puts garbage in the Residue field. You should redo your patch and submit it to Phil Dibowitz according to the instructions at the top of unusual_devs.h. Leave out all the flags except IGNORE_RESIDUE. > What I have done in this log: I plugged the key (it was detected, and > sda1 was found). I mounted sda1 (line 258), copied some files, unmounted > sda1 (manually), re-mounted sda1 (line 2410) without unplugging the key > and had a look at the files (reading only, no write operations). One > file was corrupted, others were fine. The log doesn't show any indications of error. If you run the same test multiple times does the corruption always show up at the same place in the same file? Or is it random? Possible reasons for your file corruption: the device isn't working right (relatively high probability), your computer isn't working right (very low probability since you can run Linux without crashing), or some part of the kernel isn't working right (also pretty low probability). You mentioned earlier that even under Windows you sometimes see data corruption. So the problem isn't anywhere in Linux. Have you tried testing your device on a different computer? > Btw, how can I know the maximum number of sectors (max_sectors) a > device can accept ? There are a few ways to find out. The simplest (but least likely to yield useful information) is to ask the manufacturer. Another is to install a USB sniffer under Windows and see how large the transfers are (but this value may be lower than necessary). Finally you can try a bunch of different values and see which ones fail. The failure is generally pretty obvious, much more obvious than data corruption -- you get tons of error messages in the system log. Rather like what you were seeing without the IGNORE_RESIDUE flag. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel