patch-2.4.9 linux/arch/ppc/kernel/pci.c
Next file: linux/arch/ppc/kernel/pci.h
Previous file: linux/arch/ppc/kernel/feature.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sun Aug 12 12:43:26 2001
- Orig file:
v2.4.8/linux/arch/ppc/kernel/pci.c
- Orig date:
Tue Jul 3 17:08:18 2001
diff -u --recursive --new-file v2.4.8/linux/arch/ppc/kernel/pci.c linux/arch/ppc/kernel/pci.c
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.pci.c 1.26 06/28/01 08:02:41 trini
+ * BK Id: SCCS/s.pci.c 1.28 08/08/01 16:35:43 paulus
*/
/*
* Common pmac/prep/chrp pci routines. -- Cort
@@ -41,6 +41,7 @@
unsigned long pci_dram_offset = 0;
static void pcibios_fixup_resources(struct pci_dev* dev);
+static void fixup_broken_pcnet32(struct pci_dev* dev);
#ifdef CONFIG_ALL_PPC
static void pcibios_fixup_cardbus(struct pci_dev* dev);
static u8* pci_to_OF_bus_map;
@@ -57,6 +58,7 @@
static int pci_bus_count;
struct pci_fixup pcibios_fixups[] = {
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32 },
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources },
#ifdef CONFIG_ALL_PPC
/* We should add per-machine fixup support in xxx_setup.c or xxx_pci.c */
@@ -64,6 +66,16 @@
#endif /* CONFIG_ALL_PPC */
{ 0 }
};
+
+static void
+fixup_broken_pcnet32(struct pci_dev* dev)
+{
+ if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
+ dev->vendor = PCI_VENDOR_ID_AMD;
+ pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
+ pci_name_device(dev);
+ }
+}
void
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)