linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.21-rc2] pata_legacy: fix io/irq mismatch
@ 2007-03-03 19:57 Mikael Pettersson
  2007-03-03 22:59 ` Alan Cox
  2007-03-06  9:05 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Mikael Pettersson @ 2007-03-03 19:57 UTC (permalink / raw)
  To: alan; +Cc: linux-ide

pata_legacy fails to detect the disk on my old ISA/VLB 486:
it starts to probe io=0x1f0 ctr=0x3f6 irq=15, complains
loudly about IDENTIFYs timing out, and finally fails.
(Sorry I couldn't capture the kernel's boot messages.)

It turns out that the driver's mapping from io to irq in
legacy_irq[] is wrong: index 0 for io=0x1f0 has irq=15 but
should have irq=14, and index 1 for io=0x170 has irq=14 but
should have irq=15. This is confirmed by a comparison with
include/asm-i386/ide.h:ide_default_irq().

This patch swaps the first two elements in legacy_irq[],
which makes pata_legacy work on my 486.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>

--- linux-2.6.21-rc2/drivers/ata/pata_legacy.c.~1~	2007-02-28 13:32:46.000000000 +0100
+++ linux-2.6.21-rc2/drivers/ata/pata_legacy.c	2007-03-03 18:40:37.000000000 +0100
@@ -69,7 +69,7 @@
 #define NR_HOST 6
 
 static int legacy_port[NR_HOST] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
-static int legacy_irq[NR_HOST] = { 15, 14, 11, 10, 8, 12 };
+static int legacy_irq[NR_HOST] = { 14, 15, 11, 10, 8, 12 };
 
 struct legacy_data {
 	unsigned long timing;

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

* Re: [PATCH 2.6.21-rc2] pata_legacy: fix io/irq mismatch
  2007-03-03 19:57 [PATCH 2.6.21-rc2] pata_legacy: fix io/irq mismatch Mikael Pettersson
@ 2007-03-03 22:59 ` Alan Cox
  2007-03-06  9:05 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2007-03-03 22:59 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: alan, linux-ide

On Sat, Mar 03, 2007 at 08:57:44PM +0100, Mikael Pettersson wrote:
> pata_legacy fails to detect the disk on my old ISA/VLB 486:
> it starts to probe io=0x1f0 ctr=0x3f6 irq=15, complains
> loudly about IDENTIFYs timing out, and finally fails.
> (Sorry I couldn't capture the kernel's boot messages.)
> 
> It turns out that the driver's mapping from io to irq in
> legacy_irq[] is wrong: index 0 for io=0x1f0 has irq=15 but
> should have irq=14, and index 1 for io=0x170 has irq=14 but
> should have irq=15. This is confirmed by a comparison with
> include/asm-i386/ide.h:ide_default_irq().
> 
> This patch swaps the first two elements in legacy_irq[],
> which makes pata_legacy work on my 486.
> 
> Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>

Acked-by: Alan Cox <alan@redhat.com>

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

* Re: [PATCH 2.6.21-rc2] pata_legacy: fix io/irq mismatch
  2007-03-03 19:57 [PATCH 2.6.21-rc2] pata_legacy: fix io/irq mismatch Mikael Pettersson
  2007-03-03 22:59 ` Alan Cox
@ 2007-03-06  9:05 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-03-06  9:05 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: alan, linux-ide

Mikael Pettersson wrote:
> pata_legacy fails to detect the disk on my old ISA/VLB 486:
> it starts to probe io=0x1f0 ctr=0x3f6 irq=15, complains
> loudly about IDENTIFYs timing out, and finally fails.
> (Sorry I couldn't capture the kernel's boot messages.)
> 
> It turns out that the driver's mapping from io to irq in
> legacy_irq[] is wrong: index 0 for io=0x1f0 has irq=15 but
> should have irq=14, and index 1 for io=0x170 has irq=14 but
> should have irq=15. This is confirmed by a comparison with
> include/asm-i386/ide.h:ide_default_irq().
> 
> This patch swaps the first two elements in legacy_irq[],
> which makes pata_legacy work on my 486.
> 
> Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>

applied



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

end of thread, other threads:[~2007-03-06  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-03 19:57 [PATCH 2.6.21-rc2] pata_legacy: fix io/irq mismatch Mikael Pettersson
2007-03-03 22:59 ` Alan Cox
2007-03-06  9:05 ` 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).