On Sun, 5 Dec 1999, Richard Henderson wrote:
>Try this instead of hacking up the generic pci code unnecessarily.
That's fine for me. Linus, this patch is incremental with the last one I
sent you against 2.3.30pre6. It includes Richard's patch and it back out
the pci common code changes I did:
diff -urN 2.3.30pre6-alpha-1/arch/alpha/kernel/pci.c
2.3.30pre6-alpha-1-richard/arch/alpha/kernel/pci.c
--- 2.3.30pre6-alpha-1/arch/alpha/kernel/pci.c Sun Dec 5 15:23:32 1999
+++ 2.3.30pre6-alpha-1-richard/arch/alpha/kernel/pci.c Mon Dec 6 13:48:18 1999
@@ -316,31 +316,6 @@
}
void __init
-pcibios_fixup_irqs(void)
-{
- struct pci_dev *dev;
- for (dev = pci_devices; dev; dev = dev->next)
- {
- if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
- (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
- continue;
-
- /*
- * We don't have code that will init the CYPRESS bridge
- * correctly so we do the next best thing, and depend on
- * the previous console code to do the right thing, and
- * ignore it here... :-\
- */
- if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
- dev->device == PCI_DEVICE_ID_CONTAQ_82C693)
- continue;
-
- pdev_fixup_irq(dev,
- alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);
- }
-}
-
-void __init
common_init_pci(void)
{
struct pci_controler *hose;
@@ -359,7 +334,7 @@
pci_assign_unassigned_resources(alpha_mv.min_io_address,
alpha_mv.min_mem_address);
- pcibios_fixup_irqs();
+ pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);
pci_set_bus_ranges();
}
diff -urN 2.3.30pre6-alpha-1/arch/alpha/kernel/sys_dp264.c
2.3.30pre6-alpha-1-richard/arch/alpha/kernel/sys_dp264.c
--- 2.3.30pre6-alpha-1/arch/alpha/kernel/sys_dp264.c Sun Dec 5 15:32:25 1999
+++ 2.3.30pre6-alpha-1-richard/arch/alpha/kernel/sys_dp264.c Mon Dec 6 13:47:08
+1999
@@ -276,8 +276,19 @@
struct pci_controler *hose = dev->sysdata;
int irq = COMMON_TABLE_LOOKUP;
- if (irq > 0)
+ if (irq > 0) {
irq += 16 * hose->index;
+ } else {
+ /* ??? The Contaq IDE controler on the ISA bridge uses
+ "legacy" interrupts 14 and 15. I don't know if anything
+ can wind up at the same slot+pin on hose1, so we'll
+ just have to trust whatever value the console might
+ have assigned. */
+
+ u8 irq8;
+ pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8);
+ irq = irq8;
+ }
return irq;
}
diff -urN 2.3.30pre6-alpha-1/drivers/pci/setup.c
2.3.30pre6-alpha-1-richard/drivers/pci/setup.c
--- 2.3.30pre6-alpha-1/drivers/pci/setup.c Sun Dec 5 15:20:08 1999
+++ 2.3.30pre6-alpha-1-richard/drivers/pci/setup.c Mon Dec 6 13:49:29 1999
@@ -270,7 +270,7 @@
pbus_set_ranges(bus, NULL);
}
-void __init
+static void __init
pdev_fixup_irq(struct pci_dev *dev,
u8 (*swizzle)(struct pci_dev *, u8 *),
int (*map_irq)(struct pci_dev *, u8, u8))
diff -urN 2.3.30pre6-alpha-1/include/linux/pci.h
2.3.30pre6-alpha-1-richard/include/linux/pci.h
--- 2.3.30pre6-alpha-1/include/linux/pci.h Mon Dec 6 03:27:08 1999
+++ 2.3.30pre6-alpha-1-richard/include/linux/pci.h Mon Dec 6 13:51:31 1999
@@ -478,8 +478,6 @@
int pci_claim_resource(struct pci_dev *, int);
void pci_assign_unassigned_resources(u32 min_io, u32 min_mem);
void pci_set_bus_ranges(void);
-void pdev_fixup_irq(struct pci_dev *, u8 (*)(struct pci_dev *, u8 *),
- int (*)(struct pci_dev *, u8, u8));
void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
int (*)(struct pci_dev *, u8, u8));
Andrea