From: Nicholas Reilly <nreilly@magma.ca>

I have a Shuttle SN41G2 and the secondary IDE channel alternates between
IRQ 15 (correct) and IRQ 7 (causing failures accessing the DVD+-RW which is
master, no slave and also messing with the parallel port if it is enabled)
on each boot.  This is running ACPI and APIC on 2.6.5, 2.6.7 and 2.6.8. 
dmesg, dmidecode and /proc/acpi/dsdt are all identical (apart from dmesg
printing of IRQ and errors it causes) regardless of whether it decides to
go on 7 or 15.  It is now running the latest BIOS, earlier BIOS did the
same.

Comparing the amd74xx.c with piix.c suggests the following diff which works
for me.  MAINTAINERS doesn't list anyone for this driver and the file lists
Vojtech Pavlik with no email address.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/ide/pci/amd74xx.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -puN drivers/ide/pci/amd74xx.c~fix-for-nforce2-secondary-ide-getting-wrong-irq drivers/ide/pci/amd74xx.c
--- 25/drivers/ide/pci/amd74xx.c~fix-for-nforce2-secondary-ide-getting-wrong-irq	2004-09-03 23:50:44.759571176 -0700
+++ 25-akpm/drivers/ide/pci/amd74xx.c	2004-09-03 23:51:37.715520648 -0700
@@ -438,11 +438,15 @@ static void __init init_hwif_amd74xx(ide
 
 	if (!hwif->udma_four)
 		hwif->udma_four = (amd_80w >> hwif->channel) & 1;
-        hwif->ide_dma_check = &amd74xx_ide_dma_check;
-        if (!noautodma)
-                hwif->autodma = 1;
-        hwif->drives[0].autodma = hwif->autodma;
-        hwif->drives[1].autodma = hwif->autodma;
+	hwif->ide_dma_check = &amd74xx_ide_dma_check;
+	if (!noautodma)
+		hwif->autodma = 1;
+	hwif->drives[0].autodma = hwif->autodma;
+	hwif->drives[1].autodma = hwif->autodma;
+#ifndef CONFIG_IA64
+	if (!hwif->irq)
+		hwif->irq = hwif->channel ? 15 : 14;
+#endif /* CONFIG_IA64 */
 }
 
 #define DECLARE_AMD_DEV(name_str)					\
_