Delay from libata when connecting eSATA

I get some errors in dmesg and a delay as libata probes and tries to negotiate with my eSATA enclosure. Would anyone possibly have some advice?

There is a workaround that I will describe later in this post.

Some backstory to this adventure:

  • My mainboard is an MSI K9AGM2-L with the AMD SB600 chipset providing the AHCI SATA controller for four ports, two of which (#s 3 and 4) are available.

  • A Rosewill RCR-AK-IM5002 internal card reader (manufacturer page missing) provides a SATA-to-eSATA adaptor port.

  • I wish to use a SAMSUNG Spinpoint M7E HM641JI 640GB 2.5" SATA hard disk drive externally.

First, I had a Vantec NST-260SU-BK 2.5" SATA to USB 2.0 and eSATA enclosure. As explained in this forum post, all seemed well at first. But even though I got absolutely no visible errors, I could see (through hash checking and byte-by-byte comparisons) that writing (copying) to the external disk was not happening correctly. After exchanging the enclosure several times, I finally noticed that the retailer had a different (generic) brand, so I got one of those instead. (The particular unit I got was missing its screws; had a protrusion in its casing that obstructed the circuit board’s seating; and caused even my mainboard’s firmware to lock up when it was probed, twice, on each boot. A replacement with the same model remedied those three issues.)

Now we come to the present. The Comkia MM-G3BK-SUE MobiMe G3 2.5" SATA to USB 2.0 and eSATA enclosure (manufacturer page missing) doesn’t seem to exhibit the writing issue (yet) – hurray! However, it causes libata to struggle for fifteen seconds or so trying to connect when it is plugged in. (It also causes openSUSE to stall while booting for that reason.) Here is the output from dmesg:


  127.732765] ata4: exception Emask 0x10 SAct 0x0 SErr 0x40d0000 action 0xe frozen
  127.732770] ata4: irq_stat 0x00000040, connection status changed
  127.732774] ata4: SError: { PHYRdyChg CommWake 10B8B DevExch }
  127.732782] ata4: hard resetting link
  131.005021] ata4: softreset failed (device not ready)
  131.005026] ata4: applying SB600 PMP SRST workaround and retrying
  131.158042] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  131.164096] ata4.00: ATA-8: SAMSUNG HM641JI, 2AJ10001, max UDMA/133
  131.164099] ata4.00: 1250263728 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
  131.164118] ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
  131.170208] ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
  131.170211] ata4.00: configured for UDMA/133
  131.170218] ata4: EH complete
  131.170330] scsi 3:0:0:0: Direct-Access     ATA      SAMSUNG HM641JI  2AJ1 PQ: 0 ANSI: 5
  131.170512] sd 3:0:0:0: Attached scsi generic sg7 type 0
  131.170631] sd 3:0:0:0: [sdg] 1250263728 512-byte logical blocks: (640 GB/596 GiB)
  131.170676] sd 3:0:0:0: [sdg] Write Protect is off
  131.170679] sd 3:0:0:0: [sdg] Mode Sense: 00 3a 00 00
  131.170699] sd 3:0:0:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
  131.172105]  sdg:
  131.177322] ata4.00: exception Emask 0x50 SAct 0x1 SErr 0x680901 action 0x6 frozen
  131.177326] ata4.00: irq_stat 0x08000000, interface fatal error
  131.177331] ata4: SError: { RecovData UnrecovData HostInt 10B8B BadCRC Handshk }
  131.177335] ata4.00: failed command: READ FPDMA QUEUED
  131.177341] ata4.00: cmd 60/08:00:00:00:00/00:00:00:00:00/40 tag 0 ncq 4096 in
  131.177343]          res 40/00:04:00:00:00/00:00:00:00:00/40 Emask 0x50 (ATA bus error)
  131.177346] ata4.00: status: { DRDY }
  131.177351] ata4: hard resetting link
  131.635041] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  136.635033] ata4.00: qc timeout (cmd 0xec)
  136.635046] ata4.00: failed to IDENTIFY (I/O error, err_mask=0x4)
  136.635049] ata4.00: revalidation failed (errno=-5)
  136.635054] ata4: hard resetting link
  137.093266] ata4: softreset failed (device not ready)
  137.093271] ata4: applying SB600 PMP SRST workaround and retrying
  137.246045] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  137.252060] ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
  137.257911] ata4.00: failed to IDENTIFY (I/O error, err_mask=0x100)
  137.257915] ata4.00: revalidation failed (errno=-5)
  137.257919] ata4: limiting SATA link speed to 1.5 Gbps
  137.257922] ata4.00: limiting speed to UDMA/133:PIO3
  142.246032] ata4: hard resetting link
  142.704033] ata4: softreset failed (device not ready)
  142.704036] ata4: applying SB600 PMP SRST workaround and retrying
  142.857032] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
  142.863047] ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
  142.869096] ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
  142.869100] ata4.00: configured for UDMA/133
  142.869112] ata4: EH complete
  142.894927]  sdg1 sdg2 sdg3
  142.895781] sdg: detected capacity change from 0 to 640135028736
  142.895964] sd 3:0:0:0: [sdg] Attached SCSI disk

Now for the workaround I mentioned. By forcing the SATA interface to limit itself to 1.5 Gbps, the enclosure seems to connect right away. I do this at boot-time by adding the following option to GRUB:

libata.force=1.5Gbps

I could, of course, force the limitation just on the interface(s) in question.

libata.force=3:1.5Gbps,4:1.5Gbps

The dmesg output after limiting the ports:


[23365.024227] ata4: exception Emask 0x10 SAct 0x0 SErr 0x40c0000 action 0xe frozen
[23365.024231] ata4: irq_stat 0x00000040, connection status changed
[23365.024235] ata4: SError: { CommWake 10B8B DevExch }
[23365.024243] ata4: hard resetting link
[23368.246268] ata4: softreset failed (device not ready)
[23368.246274] ata4: applying SB600 PMP SRST workaround and retrying
[23368.399035] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[23368.404965] ata4.00: ATA-8: SAMSUNG HM641JI, 2AJ10001, max UDMA/133
[23368.404968] ata4.00: 1250263728 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[23368.404987] ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
[23368.410977] ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
[23368.410980] ata4.00: configured for UDMA/133
[23368.410987] ata4: EH complete
[23368.411088] scsi 3:0:0:0: Direct-Access     ATA      SAMSUNG HM641JI  2AJ1 PQ: 0 ANSI: 5
[23368.411292] sd 3:0:0:0: Attached scsi generic sg2 type 0
[23368.419008] sd 3:0:0:0: [sdb] 1250263728 512-byte logical blocks: (640 GB/596 GiB)
[23368.419056] sd 3:0:0:0: [sdb] Write Protect is off
[23368.419059] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[23368.419079] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[23368.419238]  sdb: sdb1 sdb2 sdb3
[23368.427735] sd 3:0:0:0: [sdb] Attached SCSI disk

And when I disconnect power from the enclosure:


[23464.470405] ata4: exception Emask 0x10 SAct 0x0 SErr 0x90200 action 0xe frozen
[23464.470409] ata4: irq_stat 0x00400000, PHY RDY changed
[23464.470413] ata4: SError: { Persist PHYRdyChg 10B8B }
[23464.470420] ata4: hard resetting link
[23465.193042] ata4: SATA link down (SStatus 0 SControl 310)
[23470.193270] ata4: hard resetting link
[23470.498041] ata4: SATA link down (SStatus 0 SControl 310)
[23475.498270] ata4: hard resetting link
[23475.803038] ata4: SATA link down (SStatus 0 SControl 310)
[23475.803049] ata4.00: disabled
[23475.803061] ata4: EH complete
[23475.803070] ata4.00: detaching (SCSI 3:0:0:0)
[23475.805644] sd 3:0:0:0: [sdb] Synchronizing SCSI cache
[23475.809006] sd 3:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[23475.809014] sd 3:0:0:0: [sdb] Stopping disk
[23475.809022] sd 3:0:0:0: [sdb] START_STOP FAILED
[23475.809025] sd 3:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK

However, I obviously don’t wish to rely on the workaround forever. So if anyone has any insight, I would greatly appreciate it.

I suggest that you file a bug report at bugzilla. You have already provided a lot of precise information in your post and this should make it possible to track the cause of this.