On Wed, Nov 7, 2012 at 12:14 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Wed, 7 Nov 2012, Jason J. Herne wrote: > >> > Most likely that's the answer. Of course, for a device to recognize >> > READ(16) but not READ(10) is a violation of the SCSI spec. >> > >> > I don't know what criterion Windows uses. Maybe it uses READ(16) >> > whenever the total capacity is >= 2^32 blocks. >> >> I've not had enough time to properly find where/how to fix/hack this >> into the code. > > It won't be simple. The current algorithm has been working for a long > time, so people won't want to change it. > >> I'll keep looking at it. Does there happen to be any "quirks" that might help? > > No. > >> Also, i assume the place to look is drivers/usb/storage? > > No. The decision about which command to use is made in > drivers/scsi/sd.c, in sd_prep_fn(). Look at the lines starting with > > } else if (block > 0xffffffff) { > > (line 891 in my copy of the file). > >> Is anything in drivers/scsi related? >> Forgive my ignorance, my kernel development experience is primarily in >> the realm of kvm. >> Any tips you could provide would be most appreciated. > > What happens if you put a smaller drive (under 2 TB) in that enclosure? > Does it then work with READ(10) or does it still require READ(16)? > I just put a Seagate ST315003 1.5 GB Sata drive in this enclosure and captured USB with Wireshark on Linux. The USB trace shows READ(10) is use, and the drive appears to work. # dmesg [128481.865196] usb 1-1.2: new high-speed USB device number 5 using ehci_hcd [128482.072178] scsi13 : usb-storage 1-1.2:1.0 [128492.244106] scsi 13:0:0:0: Direct-Access ST315003 41AS CC1H PQ: 0 ANSI: 0 [128492.245340] sd 13:0:0:0: Attached scsi generic sg3 type 0 [128492.245921] sd 13:0:0:0: [sdc] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) [128492.246767] sd 13:0:0:0: [sdc] Write Protect is off [128492.246774] sd 13:0:0:0: [sdc] Mode Sense: 23 00 00 00 [128492.248526] sd 13:0:0:0: [sdc] No Caching mode page present [128492.248533] sd 13:0:0:0: [sdc] Assuming drive cache: write through [128492.251033] sd 13:0:0:0: [sdc] No Caching mode page present [128492.251039] sd 13:0:0:0: [sdc] Assuming drive cache: write through [128492.281814] sdc: sdc1 sdc2 [128492.285558] sd 13:0:0:0: [sdc] No Caching mode page present [128492.285563] sd 13:0:0:0: [sdc] Assuming drive cache: write through [128492.285566] sd 13:0:0:0: [sdc] Attached SCSI disk [128493.584668] kjournald starting. Commit interval 5 seconds [128493.585548] EXT3-fs (sdc1): warning: maximal mount count reached, running e2fsck is recommended [128493.587108] EXT3-fs (sdc1): using internal journal [128493.587115] EXT3-fs (sdc1): mounted filesystem with ordered data mode -- - Jason J. Herne (hernejj@xxxxxxxxx) -- 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