Skip to contentSkip to conversation

ia64: add pci_get_legacy_ide_irq() (was: [2.6 patch] let BLK_DEV_AMD74XX depend on X86)

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 2 messages Jan 11, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: add pci_get_legacy_ide_irq() (was: [2.6 patch] let BLK_DEV_AMD74XX depend on X86)

Quoted 3 lines · Adrian Bunk

It's unlikely that this driver will ever be of any use on other architectures.

It is already used on PPC.

[ see arch/powerpc/platforms/maple/pci.c:maple_pci_get_legacy_ide_irq() ]

Quoted 17 lines

This fixes the following compile error on ia64:

<-- snip -->

...
CC drivers/ide/pci/amd74xx.o
/home/bunk/linux/kernel-2.6/linux-2.6.20-rc3-mm1/drivers/ide/pci/amd74xx.c:
In function 'init_hwif_amd74xx':
/home/bunk/linux/kernel-2.6/linux-2.6.20-rc3-mm1/drivers/ide/pci/amd74xx.c:421:

warning: implicit declaration of function 'pci_get_legacy_ide_irq'
CC drivers/ide/pci/cmd64x.o
...
LD .tmp_vmlinux1
drivers/built-in.o: In function `init_hwif_amd74xx':
/home/bunk/linux/kernel-2.6/linux-2.6.20-rc3-mm1/drivers/ide/pci/amd74xx.c:421:

Quoted 7 lines

undefined reference to `pci_get_legacy_ide_irq'
make[1]: *** [.tmp_vmlinux1] Error 1

<-- snip -->

This fixes kernel Bugzilla #6644.

Does the following patch fix the problem?

[PATCH] ia64: add pci_get_legacy_ide_irq()

Add pci_get_legacy_ide_irq() identical to the one used by i386/x86_64. Fixes amd74xx driver build on ia64 (bugzilla bug #6644).

---
 include/asm-ia64/pci.h |    6 ++++++
 1 file changed, 6 insertions(+)
include/asm-ia64/pci.h +6 -0
Index: a/include/asm-ia64/pci.h
===================================================================
@@ -167,4 +167,10 @@ pcibios_select_root(struct pci_dev *pdev
 
 #define pcibios_scan_all_fns(a, b)	0
 
+#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
+static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
+{
+	return channel ? 15 : 14;
+}
+
 #endif /* _ASM_IA64_PCI_H */
#1 lore raw
Quoted 9 lines · Bartlomiej Zolnierkiewicz
Quoted 3 lines · Adrian Bunk

It's unlikely that this driver will ever be of any use on other architectures.

It is already used on PPC.

[ see arch/powerpc/platforms/maple/pci.c:maple_pci_get_legacy_ide_irq() ]

You can call me surprised.

Quoted 3 lines

...
Does the following patch fix the problem?
...

Yes, it fixes the compilation.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed