* [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers
@ 2007-11-08 2:20 Tejun Heo
2007-11-08 10:53 ` Alan Cox
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Tejun Heo @ 2007-11-08 2:20 UTC (permalink / raw)
To: Jeff Garzik, IDE/ATA development list; +Cc: Luca Tettamanti
In a presentation of true workmanship, pata_ali asserts IRQ
permanantly if the TF status register is read more than once when
there's no device attached to the port.
Avoid waiting polling for !0xff if it's PATA. It's needed only for
some rare SATA devices anyway.
This problem is reported by Luca Tettamanti in bugzilla bug 9298.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Tested-By: Luca Tettamanti <kronos.it@gmail.com>
---
drivers/ata/libata-core.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 009bd60..fd73f0b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3383,14 +3383,20 @@ void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline)
* to clear 0xff after reset. For example, HHD424020F7SV00
* iVDR needs >= 800ms while. Quantum GoVault needs even more
* than that.
+ *
+ * Note that some PATA controllers (pata_ali) explode if
+ * status register is read more than once when there's no
+ * device attached.
*/
- while (1) {
- u8 status = ata_chk_status(ap);
+ if (ap->flags & ATA_FLAG_SATA) {
+ while (1) {
+ u8 status = ata_chk_status(ap);
- if (status != 0xff || time_after(jiffies, deadline))
- return;
+ if (status != 0xff || time_after(jiffies, deadline))
+ return;
- msleep(50);
+ msleep(50);
+ }
}
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers
2007-11-08 2:20 [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers Tejun Heo
@ 2007-11-08 10:53 ` Alan Cox
2007-11-08 13:39 ` Mark Lord
2007-11-08 18:14 ` Jeff Garzik
2 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2007-11-08 10:53 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, IDE/ATA development list, Luca Tettamanti
On Thu, 08 Nov 2007 11:20:18 +0900
Tejun Heo <htejun@gmail.com> wrote:
> In a presentation of true workmanship, pata_ali asserts IRQ
> permanantly if the TF status register is read more than once when
> there's no device attached to the port.
>
> Avoid waiting polling for !0xff if it's PATA. It's needed only for
> some rare SATA devices anyway.
>
> This problem is reported by Luca Tettamanti in bugzilla bug 9298.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Tested-By: Luca Tettamanti <kronos.it@gmail.com>
> ---
> drivers/ata/libata-core.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
Bletch.. 8)
Acked-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers
2007-11-08 2:20 [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers Tejun Heo
2007-11-08 10:53 ` Alan Cox
@ 2007-11-08 13:39 ` Mark Lord
2007-11-09 0:41 ` Tejun Heo
2007-11-08 18:14 ` Jeff Garzik
2 siblings, 1 reply; 5+ messages in thread
From: Mark Lord @ 2007-11-08 13:39 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, IDE/ATA development list, Luca Tettamanti
Tejun Heo wrote:
> In a presentation of true workmanship, pata_ali asserts IRQ
> permanantly if the TF status register is read more than once when
> there's no device attached to the port.
..
Is using the altstatus reg (rather than status reg), when possible,
a better idea here?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers
2007-11-08 2:20 [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers Tejun Heo
2007-11-08 10:53 ` Alan Cox
2007-11-08 13:39 ` Mark Lord
@ 2007-11-08 18:14 ` Jeff Garzik
2 siblings, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2007-11-08 18:14 UTC (permalink / raw)
To: Tejun Heo; +Cc: IDE/ATA development list, Luca Tettamanti
On Thu, Nov 08, 2007 at 11:20:18AM +0900, Tejun Heo wrote:
> In a presentation of true workmanship, pata_ali asserts IRQ
> permanantly if the TF status register is read more than once when
> there's no device attached to the port.
>
> Avoid waiting polling for !0xff if it's PATA. It's needed only for
> some rare SATA devices anyway.
>
> This problem is reported by Luca Tettamanti in bugzilla bug 9298.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Tested-By: Luca Tettamanti <kronos.it@gmail.com>
applied
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers
2007-11-08 13:39 ` Mark Lord
@ 2007-11-09 0:41 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2007-11-09 0:41 UTC (permalink / raw)
To: Mark Lord; +Cc: Jeff Garzik, IDE/ATA development list, Luca Tettamanti
Mark Lord wrote:
> Tejun Heo wrote:
>> In a presentation of true workmanship, pata_ali asserts IRQ
>> permanantly if the TF status register is read more than once when
>> there's no device attached to the port.
> ..
>
> Is using the altstatus reg (rather than status reg), when possible,
> a better idea here?
I dunno. It probably differs case-by-case. In general, status reg
should be safer as it is supposed to clear IRQ.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-09 1:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-08 2:20 [PATCH #upstream-fixes] libata: skip 0xff polling for PATA controllers Tejun Heo
2007-11-08 10:53 ` Alan Cox
2007-11-08 13:39 ` Mark Lord
2007-11-09 0:41 ` Tejun Heo
2007-11-08 18:14 ` 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).