Transmitting payload and ATA commands simultaneously messes up connection with USB SATA bridge

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

 



I experience a problem when I transmit payload and issue some ATA commands (e.g. querying SMART or using hdparm) at the same time to an external hard drive which is connected via USB.


Kernel: 2.6.36.2
USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)


The USB SATA bridge is detected and initialized without a problem:

Dec 18 16:57:44 myhost kernel: usb 2-2: new high speed USB device using ehci_hcd and address 4
Dec 18 16:57:45 myhost kernel: scsi7 : usb-storage 2-2:1.0
Dec 18 16:57:46 myhost kernel: scsi 7:0:0:0: Direct-Access ST925082 7AS PQ: 0 ANSI: 0
Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0
Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: [sdb] 488397168 512-byte logical blocks: (250 GB/232 GiB)
Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: [sdb] Write Protect is off
Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00
Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write through Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write through
Dec 18 16:57:46 myhost kernel: sdb: sdb1 sdb2
Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: [sdb] Assuming drive cache: write through
Dec 18 16:57:46 myhost kernel: sd 7:0:0:0: [sdb] Attached SCSI disk
Dec 18 16:57:46 myhost kernel: EXT3-fs: barriers not enabled
Dec 18 16:57:46 myhost kernel: kjournald starting. Commit interval 5 seconds
Dec 18 16:57:46 myhost kernel: EXT3-fs (sdb1): using internal journal
Dec 18 16:57:46 myhost kernel: EXT3-fs (sdb1): mounted filesystem with writeback data mode


USB ATA bridge details:

Bus 002 Device 004: ID 14cd:6116 Super Top
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x14cd Super Top
  idProduct          0x6116
  bcdDevice            1.60
  iManufacturer           1 Super Top
  iProduct                3 USB 2.0  SATA BRIDGE
  iSerial                 2 M6116018VF16
  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


Without simultaneous data transmission querying SMART works fine:

#smartctl -a -d usbcypress /dev/sdb
smartctl 5.40 2010-10-16 r3189 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Momentus 5400.4 series
Device Model:     ST9250827AS
Serial Number:    5RG4FA7V
Firmware Version: 3.CMF
User Capacity:    250.059.350.016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Sat Dec 18 17:06:44 2010 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
--cut--


Now let's transmit some data:

#dd if=/dev/sdb1 of=/dev/null


And now query SMART again:

The "INFORMATION SECTION" is still retrieved quickly, but then it hangs after printing "=== START OF READ SMART DATA SECTION ===" and the status LED of the bridge stops flashing and after a short delay there are some errors in the kernel output:

Dec 18 17:09:23 myhost kernel: usb 2-2: reset high speed USB device using ehci_hcd and address 4
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] Unhandled sense code
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb]  Sense Key : 0x3 [current]
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb]  ASC=0x11 ASCQ=0x0
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 00 1b 6b 9f 00 00 f0 00 Dec 18 17:09:24 myhost kernel: end_request: I/O error, dev sdb, sector 1797023 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224620 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224621 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224622 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224623 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224624 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224625 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224626 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224627 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224628 Dec 18 17:09:24 myhost kernel: Buffer I/O error on device sdb1, logical block 224629
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] Unhandled sense code
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb]  Sense Key : 0x3 [current]
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb]  ASC=0x11 ASCQ=0x0
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 00 1b 6c 8f 00 00 f0 00 Dec 18 17:09:24 myhost kernel: end_request: I/O error, dev sdb, sector 1797263
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] Unhandled sense code
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb]  Sense Key : 0x3 [current]
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb]  ASC=0x11 ASCQ=0x0
Dec 18 17:09:24 myhost kernel: sd 7:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 00 1b 6d 7f 00 00 20 00 Dec 18 17:09:24 myhost kernel: end_request: I/O error, dev sdb, sector 1797503
Dec 18 17:09:36 myhost kernel: sd 7:0:0:0: [sdb] Unhandled sense code
Dec 18 17:09:36 myhost kernel: sd 7:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
Dec 18 17:09:36 myhost kernel: sd 7:0:0:0: [sdb]  Sense Key : 0x3 [current]
Dec 18 17:09:36 myhost kernel: sd 7:0:0:0: [sdb]  ASC=0x11 ASCQ=0x0
Dec 18 17:09:36 myhost kernel: sd 7:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 00 1b 6b 9f 00 00 08 00 Dec 18 17:09:36 myhost kernel: end_request: I/O error, dev sdb, sector 1797023
Dec 18 17:09:36 myhost kernel: quiet_error: 54 callbacks suppressed
Dec 18 17:09:36 myhost kernel: Buffer I/O error on device sdb1, logical block 224620

dd dies with an error of course:

dd: reading `/dev/sdb1': Input/output error
1796960+0 records in
1796960+0 records out
920043520 bytes (920 MB) copied, 69.6778 s, 13.2 MB/s


NOTE: This is reproducible with another USB ATA bridge which supports SAT (smartctl -d sat), too!

I'm not sure if this is a common problem of this SATA USB bridges (as it's reproducible with my other and different external drive, too) or a problem with the USB stack and/or the usb-storage driver handling this situation which needs to be fixed.

--
Regards,
Richard Schütz
--
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