Seagate GoFlex Desk USB dock READ CAPACITY off-by-one bug

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

 



Hi,

I hope this it the right list to report issues like this.

I have a 2TB Seagate FreeAgent GoFlex Desk. That consists of a 3.5" SATA
hard disk in a case, which plugs into a base unit which has SATA connector
for the drive and USB 2.0 for connection to host computer. The USB 2.0
dock bundled with the drive has Seagate part number 9ZH9P9-RAA.

The 2TB drive actually has 3,907,029,168 (emulated) 512-byte sectors.
However, the USB 2.0 dock firmware reports one fewer than that. It reports
last LBA as 3,907,029,166, i.e. that the drive has 3,907,029,167 sectors.

So the USB 2.0 dock (VID:PID 0BC2:5071) has an off-by-one bug with its
READ CAPACITY response. It may be worth adding it to the Linux USB quirks
list.

Consequently, using tools like dd to image/clone the disk to/from another
2TB drive will fail, missing the last sector when restoring an image to
the GoFlex Desk. And missing whatever data is actually in the 3907029168th
sector on the GoFlex disk when creating an image. And causing MD5
checksums to differ.

The actual last sector on the GoFlex disk -- when connected via the USB
2.0 dock -- is accessible, but only via direct SCSI access (tools like
sg_dd and ddpt).

It's worth noting that Seagate's own "SeaTools for Windows" diagnostic
program has the opposite bug! SeaTools for Windows reports drives as
having one sector *more* than they actually have. So for my GoFlex Desk
with USB 2.0 dock, the program reports it as having 3,907,029,168 sectors.
With an older FreeAgent Xtreme 2TB USB drive which does report the correct
number of sectors, SeaTools reports that as having 3,907,029,169 sectors!

I contacted Seagate about this but frankly they seemed pretty clueless,
denying any problem.

Seagate also sell USB 3.0 and Firewire 800 docks, but I don't have either
to test.


I have attached lsusb -v output (with my drive's serial number redacted).

# sg_readcap /dev/sdc
Read Capacity results:
   Last logical block address=3907029166 (0xe8e088ae), Number of
blocks=3907029167
   Logical block length=512 bytes
Hence:
   Device size: 2000398933504 bytes, 1907729.1 MiB, 2000.40 GB

Using ddpt to read actual last sector via the block device fails of course:
# ddpt if=/dev/sdc of=real_last_sector.bin bs=512 count=1 skip=3907029167
  remaining block count=1
0+0 records in
0+0 records out
time to transfer data: 0.003198 secs
Early termination, EOF on input?

Using SCSI passthrough works:
# ddpt if=/dev/sdc iflag=pt of=real_last_sector.bin bs=512 count=1
skip=3907029167
1+0 records in
1+0 records out
time to transfer data: 0.000666 secs at 0.77 MB/sec


-- Mark
Bus 002 Device 003: ID 0bc2:5071 Seagate RSS LLC 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bc2 Seagate RSS LLC
  idProduct          0x5071 
  bcdDevice            1.55
  iManufacturer           1 Seagate
  iProduct                2 FA GoFlex Desk
  iSerial                 3 xxxxxxxx
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

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

  Powered by Linux