linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ahci: use 0x80 as wait stat value instead of 0xff
@ 2007-01-26  6:37 Tejun Heo
  2007-01-26 22:24 ` Jeff Garzik
  2007-01-26 22:28 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Tejun Heo @ 2007-01-26  6:37 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide

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(-)

Index: work/drivers/ata/ahci.c
===================================================================
--- work.orig/drivers/ata/ahci.c
+++ 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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ahci: use 0x80 as wait stat value instead of 0xff
  2007-01-26  6:37 [PATCH] ahci: use 0x80 as wait stat value instead of 0xff Tejun Heo
@ 2007-01-26 22:24 ` Jeff Garzik
  2007-01-26 22:28 ` Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-01-26 22:24 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

Tejun Heo wrote:
> 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>

applied to #upstream-fixes



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ahci: use 0x80 as wait stat value instead of 0xff
  2007-01-26  6:37 [PATCH] ahci: use 0x80 as wait stat value instead of 0xff Tejun Heo
  2007-01-26 22:24 ` Jeff Garzik
@ 2007-01-26 22:28 ` Jeff Garzik
  2007-01-27  1:33   ` Tejun Heo
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2007-01-26 22:28 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

Tejun Heo wrote:
> 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(-)

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

	Jeff




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ahci: use 0x80 as wait stat value instead of 0xff
  2007-01-26 22:28 ` Jeff Garzik
@ 2007-01-27  1:33   ` Tejun Heo
  0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2007-01-27  1:33 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide

Jeff Garzik wrote:
> Tejun Heo wrote:
>> 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(-)
> 
> 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.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-27  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26  6:37 [PATCH] ahci: use 0x80 as wait stat value instead of 0xff Tejun Heo
2007-01-26 22:24 ` Jeff Garzik
2007-01-26 22:28 ` Jeff Garzik
2007-01-27  1:33   ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).