I have a (cheap and nasty) EM732X MP3 player made by Yifang Digital:
http://www.yifangdigital.com/Portals/118056c2de4d/40f5a5ace647/c7d06f0150.html
which doesn't work out of the box on Linux: there are I/O errors on
read and write. This turns out to be because it can't handle attempts
to transfer 32KB or more in one go: if /sys/block/sda/device/max_sectors
is set to 63 then it works; if set to 64 it does not:
usb-storage: usb_stor_bulk_transfer_sglist: xfer 32768 bytes, 8 entries
usb-storage: Status code 0; transferred 32768/32768
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x8c R 4294901760 Stat 0x0
usb-storage: -- unexpectedly short transfer
usb-storage: scsi cmd done, result=0x10070000
Note that the Residue here is 0xFFFF0000 -- looks suspiciously to
me like something overflowing a signed 16 bit int in the device...
Anyway, there's already special casing for some other device with
a similar problem in slave_configure() in drivers/usb/storage/scsiglue.c,
and I was just going to write a patch to add this device, but:
(1) shouldn't this be rolled into the unusual_devs.h list rather than
being hardcoded inside scsiglue.c?
(2) the existing special case just checks the Vendor ID, but my device
has a vendor ID of 0419, which the webpage says is Samsung --
applying the workaround to all Samsung devices seems a bit broad
and I wasn't sure how best to narrow it down.
Here's the stanza from /proc/bus/usb/devices:
T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=0419 ProdID=aaf8 Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
I'm using kernel 2.6.14.3, but kernel.org suggests that scsiglue.c
is still the same in Linus' latest kernel.
[NB: I'm not subscribed to this mailing list but will be reading replies
via the web archive; however, if you could CC me on replies I'd be
grateful.]
thanks in advance
-- PMM
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users