[PATCH] ata: libata-eh: Fix the low data link negotiation

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

 



large capacity hard drives, such as the 16TB Seagate hard drive in hotplug,
have data link negotiations that only reach 3.0 Gbps.
The reason for the issue is that after powering on, the hardware reset time
of the hard drive is relatively long.
In the driver, after the hardreset signal is sent, the waiting time for the
first two tries is too short,
causing the hardware reset to fall into a vicious cycle.

log is as follows:
[ 959.461875] ata7: found unknown device (class 0)
[ 963.686830] ata7: softreset failed (1st FIS failed)
[ 969.442516] ata7: found unknown device (class 0)
[ 973.686229] ata7: softreset failed (1st FIS failed)
[ 979.426704] ata7: found unknown device (class 0)
[1008.687432] ata7: softreset failed (1st FIS failed)
[1008.687447] ata7: limiting SATA link speed to 3.0 Gbps
[1009.566733] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[1009.567405] ata7.00: ATA-11: ST16000NT001-3LV101, EN01, max UDMA/133
[10009.613694] ata7.00: 31251759104 sectors,
multi 16: LBA48 NCQ (depth32), AA
[10009.614223] ata7.00: Features: NCQ-sndrcv
[10009.639149] ata7.00: configured for UDMA/133
[10009.639366] scsi 6:0:0:0: Direct-Access  ATA ST16000NT001-3LVEN01
 PQ: 0 ANSI: 5
[10009.639779] sd 6:0:0:0: Attached scsi generic sg2 type 0
[10009.639989] sd 6:0:0:0: [sdc] 31251759104 512-byte logical blocks:
(16.0 TB/14.6 TiB)
[10009.639999] sd 6:0:0:0: [sdc] 4096-byte physical blocks
[10009.640028] sd 6:0:0:0: [sdc] Write Protect is off
[10009.640038] sd 6:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[10009.640082] sd 6:0:0:0: [sdc] Write cache: enabled, read cache:enabled,
doesn't support DPO or FUA
[10009.717866]  sdc: sdc1 sdc2 sdc3 sdc4
[10009.739038] sd 6:0:0:0: [sdc] Attached SCSI disk
========
Logs after modify:
[  661.023298] ata7: found unknown device (class 0)
[  675.253714] ata7: softreset failed (1st FIS failed)
[  680.996545] ata7: found unknown device (class 0)
[  695.251101] ata7: softreset failed (1st FIS failed)
[  696.131404] ata7: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[  696.132140] ata7.00: ATA-11: ST16000NT001-3LV101, EN01, max UDMA/133
[  696.172742] ata7.00: 31251759104 sectors, multi 16: LBA48 NCQ (depth
32), AA
[  696.173327] ata7.00: Features: NCQ-sndrcv
[  696.198155] ata7.00: configured for UDMA/133

Signed-off-by: Guoliang Zhang <zhangguoliang@xxxxxxxxx>
---
 drivers/ata/libata-eh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 214b935c2ced..9e0f17e93e73 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -80,7 +80,7 @@ enum {
  */
 static const unsigned int ata_eh_reset_timeouts[] = {
 	10000,	/* most drives spin up by 10sec */
-	10000,	/* > 99% working drives spin up before 20sec */
+	20000,	/* > 99% working drives spin up before 30sec */
 	35000,	/* give > 30 secs of idleness for outlier devices */
 	 5000,	/* and sweet one last chance */
 	UINT_MAX, /* > 1 min has elapsed, give up */
-- 
2.43.0





[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux