]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Place the call to adjust_pci_device() back in the individual drivers,
authorMichael Brown <mcb30@etherboot.org>
Sat, 16 Apr 2005 17:30:37 +0000 (17:30 +0000)
committerMichael Brown <mcb30@etherboot.org>
Sat, 16 Apr 2005 17:30:37 +0000 (17:30 +0000)
since we probably shouldn't be doing this to arbitrary devices during a
PCI bus scan...

src/drivers/bus/pci.c
src/drivers/net/3c90x.c
src/drivers/net/eepro100.c
src/drivers/net/mtd80x.c
src/drivers/net/natsemi.c
src/drivers/net/rtl8139.c
src/drivers/net/tg3.c
src/drivers/net/tlan.c
src/drivers/net/via-rhine.c

index 37aa1cd9bd302036c386e3a6fb0062af8cb684a2..6894cad9f59d86aca7bca85bd06f1f315552e984 100644 (file)
@@ -185,9 +185,6 @@ int find_pci_device ( struct pci_device *pci,
                        continue;
                }
                
-               /* Fix up PCI device */
-               adjust_pci_device ( pci );
-               
                /* If driver has a class, and class matches, use it */
                if ( driver->class && 
                     ( driver->class == pci->class ) ) {
index 3993ea64fc2d8ab75f6eaee4848add84a8c22c32..b3aa76bfcf0e7e155ad86e296f5fcd37bbad31a9 100644 (file)
@@ -703,6 +703,8 @@ static int a3c90x_probe ( struct dev *dev, struct pci_device *pci ) {
     if (pci->ioaddr == 0)
           return 0;
 
+    adjust_pci_device(pci);
+
     nic->ioaddr = pci->ioaddr;
     nic->irqno = 0;
 
index 92053d5e5b95a16d628149a0d338eae2780fe99d..b5b5f821f519ced4db384bee804fca7b28f29601 100644 (file)
@@ -620,6 +620,8 @@ static int eepro100_probe ( struct dev *dev, struct pci_device *p ) {
        ioaddr = p->ioaddr;
        nic->ioaddr = ioaddr;
 
+       adjust_pci_device(p);
+
        /* Copy IRQ from PCI information */
        nic->irqno = p->irq;
 
index 45a3eb5a2dab41791602bf17793289b758d21948..26debf06204a3352ebf27aa6b2d7e60b733b21d9 100644 (file)
@@ -684,6 +684,8 @@ static int mtd_probe ( struct dev *dev, struct pci_device *pci ) {
     /* Mask the bit that says "this is an io addr" */
     mtdx.ioaddr = pci->ioaddr;
 
+    adjust_pci_device(pci);
+
     mtdx.nic_name = dev->name;
     mtdx.dev_id = pci->dev_id;
 
index a8b6a0dc58408a5af778133c0987e1c58b1ba7e1..6dda7b5bd4be6e53fdae1efca376c0503070f914 100644 (file)
@@ -253,6 +253,8 @@ natsemi_probe ( struct dev *dev, struct pci_device *pci ) {
     if (pci->ioaddr == 0)
         return 0;
 
+    adjust_pci_device(pci);
+
     /* initialize some commonly used globals */
        
     nic->irqno  = 0;
index 9e52feccbf2876c287dee8ff4bf2b7512451be13..c5fb901bfa14daff37aca816c31e97635bc65853 100644 (file)
@@ -194,6 +194,8 @@ static int rtl8139_probe ( struct dev *dev, struct pci_device *pci ) {
        nic->ioaddr = pci->ioaddr;
        nic->irqno = pci->irq;
 
+       adjust_pci_device(pci);
+
        /* Bring the chip out of low-power mode. */
        outb(0x00, nic->ioaddr + Config1);
 
index 96829c0df692fcf827fc1e166c3c191310a07cc0..e4e6713668143fcd251619fa0c37606c6de1bef6 100644 (file)
@@ -3239,6 +3239,8 @@ static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) {
 
        memset(tp, 0, sizeof(*tp));
 
+       adjust_pci_device(pdev);
+
        nic->irqno  = 0;
        nic->ioaddr = pdev->ioaddr;
 
@@ -3342,7 +3344,6 @@ static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) {
        }
 
        nic->nic_op     = &tg3_operations;
-
        return 1;
 
  err_out_iounmap:
index 7c6d5628acfde1aa4afed7c71796cf5b536099e0..3041dcfea394dbf211c55b6e4a5e797f8f0f63db 100644 (file)
@@ -794,6 +794,9 @@ static int tlan_probe ( struct dev *dev, struct pci_device *pci ) {
        nic->ioaddr = pci->ioaddr;
 
        BASE = pci->ioaddr;
+
+       /* Set nic as PCI bus master */
+       adjust_pci_device(pci);
        
        /* Point to private storage */
        priv = &TLanPrivateInfo;
index 7c68e8730dc1774466a364ea2cc823dd49da984a..f3bfc0524394603cb02dae7b9179ba8567bc9032 100644 (file)
@@ -962,12 +962,11 @@ rhine_probe ( struct dev *dev, struct pci_device *pci ) {
        return 0;
     rhine_probe1 (nic, pci, pci->ioaddr, pci->dev_id, -1);
 
+    adjust_pci_device ( pci );
     rhine_reset (nic);
     nic->nic_op        = &rhine_operations;
     nic->irqno   = pci->irq;
     nic->ioaddr   = tp->ioaddr;
-
-
     return 1;
 }