All of lore.kernel.org
 help / color / mirror / Atom feed
* Large disk drives
@ 2014-11-03 21:06 Dale R. Worley
  2014-11-04  7:52 ` James Bottomley
  0 siblings, 1 reply; 26+ messages in thread
From: Dale R. Worley @ 2014-11-03 21:06 UTC (permalink / raw)
  To: linux-scsi-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

Was there any resolution as to how large disk drives would be handled
if their interface did not support the "capacity" request that would
tell how large they were?

Or as an alternative, is there any way to avoid buying USB-SCSI
interfaces that do not support the large-capacity request?
Unfortunately, such devices work OK with Windows (since Windows trusts
what the partition table says), you can't just say to the salesperson
"It has to work on drives over 3 TB."

Dale
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: Large disk drives
@ 2014-11-07  4:53 Norman Diamond
       [not found] ` <533357.25557.qm-303aDswoEIZ5hgrKqgaBcEyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Norman Diamond @ 2014-11-07  4:53 UTC (permalink / raw)
  To: linux-scsi-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

If READ_CAPACITY_10 returns something that looks valid but might be off
by a multiple of 2TB, and READ_CAPACITY_16 fails, what do we really want
to do when we read the partition table?
 
If the partition table indicates that everything fits in the capacity
returned by READ_CAPACITY_10, great, it isn't a large disk drive and we
can do all 10-byte commands.
 
If the partition table indicates that the disk drive really is large and
the USB bridge has problems, I'd say we'd better not touch the drive any
further (with possible exceptions).  If the USB bridge fails
READ_CAPACITY_16 but the USB bridge pretends to succeed with READ_16 and
WRITE_16, well maybe it wraps around at 2TB and writes the wrong sector
on the drive.  If READ_CAPACITY_16 fails, I wouldn't trust the USB bridge
with any 16-byte command.  If the partition table indicates that the
drive is larger, the user had better be told to find a different USB
bridge or use a real SATA or SCSI controller.
 
A possible exception is that if a USB bridge is well tested and confirmed
to handle READ_16 and WRITE_16 correctly while failing READ_CAPACITY_16,
an antiquirk could be configured to say we rely on the bridge.
 
By the way, I've seen some USB bridges that lie about whether they
performed various SAT commands (ATA passthrough), but told the truth
about performing an ATA IDENTIFY DEVICE through SAT.  So we could attempt
ATA passthrough with an IDENTIFY DEVICE command, and if it happens to
return a sane looking result, we could comparre it to the bridge's own
translation of READ_CAPACITY_10 and READ_CAPACITY_16.  If the passthrough
yielded a sane result and the capacity doesn't match, we know not to
trust the bridge with 16-byte commands (except if tested, as mentioned).
In such a case, we don't even have to look at the partition table.  Of
course if the ATA passthrough fails or if the result is garbage then
abandon this test and maybe look at the partition table.
 
By the way, it's not just USB bridges.  I have a particularly obnoxious
ExpressCard with an eSATA connection.  Where the SATA drive operates on
512-byte LBAs (whether real or emulated doesn't matter), the eSATA bridge
translates groups of 8 of them into emulated 4096-byte LBAs.  This should
make it possible for a 3TB drive to be used when the PC's drivers don't
know how to use ATA commands on sector numbers bigger than 32 bits, as
long as the PC's drivers can handle 4096-byte sectors, right?  Well, no.
This eSATA bridge's firmware wraps around at 2TB.  The vendor went to
all this effort just to screw up and maximize the amount of damage that
occurs by hiding their screw up.  I don't know if eBay's warranty covers
this kind of defect, but it wouldn't be worth paying for postage to
return this POS.  I should have bought the Brooklyn Bridge instead.
To compound the oddity, the same ExpressCard contains a working USB 3.0
bridge.
 
(Sorry I can't construct headers to get this message threaded correctly
in the mailing list.)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-11-08  0:35 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-03 21:06 Large disk drives Dale R. Worley
2014-11-04  7:52 ` James Bottomley
     [not found]   ` <1415087562.2351.3.camel-7O4RPy5TklLPRNG96csxHf8+0UxHXcjY@public.gmane.org>
2014-11-04 16:14     ` Alan Stern
     [not found]       ` <Pine.LNX.4.44L0.1411041112010.966-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-11-05 15:51         ` Dale R. Worley
2014-11-05 16:07       ` James Bottomley
2014-11-05 16:34         ` Alan Stern
     [not found]           ` <Pine.LNX.4.44L0.1411051130470.1531-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-11-05 18:53             ` Boaz Harrosh
2014-11-05 19:30           ` Christoph Hellwig
     [not found]             ` <20141105193045.GA13265-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-11-06 10:30               ` James Bottomley
2014-11-06 14:33                 ` Boaz Harrosh
     [not found]                   ` <545B86AC.3080704-/8YdC2HfS5554TAoqtyWWQ@public.gmane.org>
2014-11-06 15:53                     ` Alan Stern
2014-11-06 16:43                       ` Boaz Harrosh
     [not found]                         ` <545BA52F.6050205-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-06 17:08                           ` David Laight
2014-11-06 17:18                             ` James Bottomley
2014-11-06 15:54                   ` James Bottomley
2014-11-06 16:34                     ` Boaz Harrosh
2014-11-06 16:59                       ` Alan Stern
2014-11-06 19:23                 ` Dale R. Worley
2014-11-06 20:16                   ` Alan Stern
2014-11-05 19:15         ` Theodore Ts'o
     [not found]           ` <20141105191505.GF27083-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2014-11-06 19:17             ` Dale R. Worley
2014-11-05 23:30       ` Dale R. Worley
2014-11-06 17:47         ` Alan Stern
2014-11-07  4:53 Norman Diamond
     [not found] ` <533357.25557.qm-303aDswoEIZ5hgrKqgaBcEyFvBl6snHEEwWAM/ix52Y@public.gmane.org>
2014-11-07 10:03   ` David Laight
2014-11-08  0:35     ` Norman Diamond

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.