On Sat, 14 Jul 2012, Sami Farin wrote: > On Sat, Jul 14, 2012 at 12:39:49 -0400, Alan Stern wrote: > > On Sat, 14 Jul 2012, Sami Farin wrote: > ... > > > it worked with 1M with and without quirks, but with 300M it failed without > > > quirks, OK with quirks (36 MB/s, though it was advertized 85 MB/s). > > > > The usbmon logs show just what they should: 32-KB transfers with the > > quirk and 120-KB transfers without it (actually more like an > > alternating pattern of 120 KB followed by 8 KB -- I don't know why; it > > might be an artifact of readahead). > > > > Well, the quirk is definitely going to slow things down a little, > > just how much I'm not sure. But that's better than losing data. :-) > > As for why the non-quirk 1-MB transfer worked... It's hard to say. > > The bug might affect reads differently from writes. > > > > I'm still puzzled about the previous test, though. Is it possible that > > you posted a usbmon trace that was taken without the quirk? > > That 1 MB test? 0.1% possible ;() No, I meant the test from yesterday. The first one you tried with the quirk installed. > > Tell you what: Try capturing a single trace including both a 1-MB read > > and your failing write test (and with the quirk present, of course). > > If something strange is going on, that should show it. > > OK, I read 1 MB with dd, then mount it, then cp /dev/urandom . , then umount. > > $ cp /dev/urandom . > cp: writing `./urandom': Input/output error > cp: failed to extend `./urandom': Input/output error > > after mounting again, df shows 8568 KB used, but directory empty. > > quirktest-dmesg.txt > https://docs.google.com/file/d/0B_EMXtsx7o56U20tWVVTSHFNRmM/edit > > quirktest-usbmon.txt > https://docs.google.com/file/d/0B_EMXtsx7o56b1YxQVdkcFRxUm8/edit Hmmm... The test shows that a 32-KB write failed (in fact, the first 32-KB write). It's possible there's something wrong with the memory card. Have you tried using different cards? The usbmon trace doesn't show any reason for the write failures; the second bug interferes before the device can report a reason. Working around that other bug isn't quite so easy as the first -- it requires a kernel patch (below). With that patch in place, maybe the usbmon trace will give a little more information. Alan Stern Index: usb-3.5/drivers/usb/storage/unusual_devs.h =================================================================== --- usb-3.5.orig/drivers/usb/storage/unusual_devs.h +++ usb-3.5/drivers/usb/storage/unusual_devs.h @@ -2011,6 +2011,13 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x "Micro Mini 1GB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), +/* Reported by Sami Farin <hvtaifwkbgefbaei@xxxxxxxxx> */ +UNUSUAL_DEV( 0x8564, 0x4000, 0x0007, 0x0007, + "Genesys", + "GL3220", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_BULK_IGNORE_TAG ), + /* * Nick Bowler <nbowler@xxxxxxxxxxxxxxxx> * SCSI stack spams (otherwise harmless) error messages. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html