Skip to contentSkip to conversation

ahci: use 0x80 as wait stat value instead of 0xff

PATCH Applied Tejun Heo 2 participants 4 messages Jan 26, 2007 – Jan 27, 2007 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 ahci: use 0x80 as wait stat value instead of 0xff

Before hardreset, ahci initialized stat part of received FIS area to 0xff to wait for the first D2H Reg FIS which would change the value to device ready state. This used to work but now libata considers status value of 0xff as device not present making this wait prone to failure.

This patch makes ahci use 0x80 for the wait stat value instead of 0xff to fix the above problem.

 drivers/ata/ahci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/ahci.c +1 -1
Index: work/drivers/ata/ahci.c
===================================================================
@@ -915,7 +915,7 @@ static int ahci_hardreset(struct ata_por
 
 	/* clear D2H reception area to properly wait for D2H FIS */
 	ata_tf_init(ap->device, &tf);
-	tf.command = 0xff;
+	tf.command = 0x80;
 	ata_tf_to_fis(&tf, d2h_fis, 0);
 
 	rc = sata_std_hardreset(ap, class);
Applied
#1 lore raw
Quoted 9 lines · Tejun Heo

Before hardreset, ahci initialized stat part of received FIS area to 0xff to wait for the first D2H Reg FIS which would change the value to device ready state. This used to work but now libata considers status value of 0xff as device not present making this wait prone to failure.

This patch makes ahci use 0x80 for the wait stat value instead of 0xff to fix the above problem.

applied to #upstream-fixes

#2 lore raw
In reply to Tejun Heo
Quoted 5 lines · Tejun Heo

Before hardreset, ahci initialized stat part of received FIS area to 0xff to wait for the first D2H Reg FIS which would change the value to device ready state. This used to work but now libata considers status value of 0xff as device not present making this wait prone to failure.

Quoted 7 lines

This patch makes ahci use 0x80 for the wait stat value instead of 0xff to fix the above problem.

 drivers/ata/ahci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

For the future, please make sure to include the "---" terminator prior to the diffstat, otherwise it will get copied into the kernel changelog.

Jeff

author
#3 lore raw
Quoted 9 lines · Jeff Garzik
Quoted 8 lines · Tejun Heo

Before hardreset, ahci initialized stat part of received FIS area to 0xff to wait for the first D2H Reg FIS which would change the value to device ready state. This used to work but now libata considers status value of 0xff as device not present making this wait prone to failure.

This patch makes ahci use 0x80 for the wait stat value instead of 0xff to fix the above problem.

Quoted 7 lines
Quoted 4 lines
 drivers/ata/ahci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

For the future, please make sure to include the "---" terminator prior to the diffstat, otherwise it will get copied into the kernel changelog.

Argh... sure. My mistake. Sorry.

Signature · 1 line
tejun