Skip to content

Commit

Permalink
ahci: use 0x80 as wait stat value instead of 0xff
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 drivers/ata/ahci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 26, 2007
1 parent d025987 commit dfd7a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ static int ahci_hardreset(struct ata_port *ap, unsigned int *class)

/* 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);
Expand Down

0 comments on commit dfd7a3d

Please sign in to comment.