* [PATCH #upstream-fixes] ahci: fix status register check in ahci_softreset
@ 2006-11-01 8:19 Tejun Heo
2006-11-01 9:21 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2006-11-01 8:19 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide
ahci_softreset() used to use ahci_tf_read() which reads D2H_REG area
to check for the Status register. However, this area is zeroed on
initialization and not set by initial signature FIS. Replace it with
ahci_check_status().
This bug prevented CLO code from being activated whenever BSY and/or
DRQ is set prior to softreset. This fix makes
AHCI_FLAG_RESET_NEEDS_CLO flag redundant.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
Jeff, check_status fix is separated as requested. Please apply to
#upstream-fixes.
Thanks.
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index cef2e70..988f8bb 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -736,8 +736,7 @@ static int ahci_softreset(struct ata_por
}
/* check BUSY/DRQ, perform Command List Override if necessary */
- ahci_tf_read(ap, &tf);
- if (tf.command & (ATA_BUSY | ATA_DRQ)) {
+ if (ahci_check_status(ap) & (ATA_BUSY | ATA_DRQ)) {
rc = ahci_clo(ap);
if (rc == -EOPNOTSUPP) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH #upstream-fixes] ahci: fix status register check in ahci_softreset
2006-11-01 8:19 [PATCH #upstream-fixes] ahci: fix status register check in ahci_softreset Tejun Heo
@ 2006-11-01 9:21 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-11-01 9:21 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> ahci_softreset() used to use ahci_tf_read() which reads D2H_REG area
> to check for the Status register. However, this area is zeroed on
> initialization and not set by initial signature FIS. Replace it with
> ahci_check_status().
>
> This bug prevented CLO code from being activated whenever BSY and/or
> DRQ is set prior to softreset. This fix makes
> AHCI_FLAG_RESET_NEEDS_CLO flag redundant.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-01 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 8:19 [PATCH #upstream-fixes] ahci: fix status register check in ahci_softreset Tejun Heo
2006-11-01 9:21 ` Jeff Garzik
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).