Re: Large disk drives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux