Browse Source

Place the call to adjust_pci_device() back in the individual drivers,

since we probably shouldn't be doing this to arbitrary devices during a
PCI bus scan...
tags/v0.9.3
Michael Brown 19 years ago
parent
commit
5ca20abf95

+ 0
- 3
src/drivers/bus/pci.c View File

185
 			continue;
185
 			continue;
186
 		}
186
 		}
187
 		
187
 		
188
-		/* Fix up PCI device */
189
-		adjust_pci_device ( pci );
190
-		
191
 		/* If driver has a class, and class matches, use it */
188
 		/* If driver has a class, and class matches, use it */
192
 		if ( driver->class && 
189
 		if ( driver->class && 
193
 		     ( driver->class == pci->class ) ) {
190
 		     ( driver->class == pci->class ) ) {

+ 2
- 0
src/drivers/net/3c90x.c View File

703
     if (pci->ioaddr == 0)
703
     if (pci->ioaddr == 0)
704
           return 0;
704
           return 0;
705
 
705
 
706
+    adjust_pci_device(pci);
707
+
706
     nic->ioaddr = pci->ioaddr;
708
     nic->ioaddr = pci->ioaddr;
707
     nic->irqno = 0;
709
     nic->irqno = 0;
708
 
710
 

+ 2
- 0
src/drivers/net/eepro100.c View File

620
 	ioaddr = p->ioaddr;
620
 	ioaddr = p->ioaddr;
621
 	nic->ioaddr = ioaddr;
621
 	nic->ioaddr = ioaddr;
622
 
622
 
623
+	adjust_pci_device(p);
624
+
623
 	/* Copy IRQ from PCI information */
625
 	/* Copy IRQ from PCI information */
624
 	nic->irqno = p->irq;
626
 	nic->irqno = p->irq;
625
 
627
 

+ 2
- 0
src/drivers/net/mtd80x.c View File

684
     /* Mask the bit that says "this is an io addr" */
684
     /* Mask the bit that says "this is an io addr" */
685
     mtdx.ioaddr = pci->ioaddr;
685
     mtdx.ioaddr = pci->ioaddr;
686
 
686
 
687
+    adjust_pci_device(pci);
688
+
687
     mtdx.nic_name = dev->name;
689
     mtdx.nic_name = dev->name;
688
     mtdx.dev_id = pci->dev_id;
690
     mtdx.dev_id = pci->dev_id;
689
 
691
 

+ 2
- 0
src/drivers/net/natsemi.c View File

253
     if (pci->ioaddr == 0)
253
     if (pci->ioaddr == 0)
254
         return 0;
254
         return 0;
255
 
255
 
256
+    adjust_pci_device(pci);
257
+
256
     /* initialize some commonly used globals */
258
     /* initialize some commonly used globals */
257
 	
259
 	
258
     nic->irqno  = 0;
260
     nic->irqno  = 0;

+ 2
- 0
src/drivers/net/rtl8139.c View File

194
 	nic->ioaddr = pci->ioaddr;
194
 	nic->ioaddr = pci->ioaddr;
195
 	nic->irqno = pci->irq;
195
 	nic->irqno = pci->irq;
196
 
196
 
197
+	adjust_pci_device(pci);
198
+
197
 	/* Bring the chip out of low-power mode. */
199
 	/* Bring the chip out of low-power mode. */
198
 	outb(0x00, nic->ioaddr + Config1);
200
 	outb(0x00, nic->ioaddr + Config1);
199
 
201
 

+ 2
- 1
src/drivers/net/tg3.c View File

3239
 
3239
 
3240
 	memset(tp, 0, sizeof(*tp));
3240
 	memset(tp, 0, sizeof(*tp));
3241
 
3241
 
3242
+	adjust_pci_device(pdev);
3243
+
3242
 	nic->irqno  = 0;
3244
 	nic->irqno  = 0;
3243
 	nic->ioaddr = pdev->ioaddr;
3245
 	nic->ioaddr = pdev->ioaddr;
3244
 
3246
 
3342
 	}
3344
 	}
3343
 
3345
 
3344
 	nic->nic_op	= &tg3_operations;
3346
 	nic->nic_op	= &tg3_operations;
3345
-
3346
 	return 1;
3347
 	return 1;
3347
 
3348
 
3348
  err_out_iounmap:
3349
  err_out_iounmap:

+ 3
- 0
src/drivers/net/tlan.c View File

794
 	nic->ioaddr = pci->ioaddr;
794
 	nic->ioaddr = pci->ioaddr;
795
 
795
 
796
 	BASE = pci->ioaddr;
796
 	BASE = pci->ioaddr;
797
+
798
+	/* Set nic as PCI bus master */
799
+	adjust_pci_device(pci);
797
 	
800
 	
798
 	/* Point to private storage */
801
 	/* Point to private storage */
799
 	priv = &TLanPrivateInfo;
802
 	priv = &TLanPrivateInfo;

+ 1
- 2
src/drivers/net/via-rhine.c View File

962
 	return 0;
962
 	return 0;
963
     rhine_probe1 (nic, pci, pci->ioaddr, pci->dev_id, -1);
963
     rhine_probe1 (nic, pci, pci->ioaddr, pci->dev_id, -1);
964
 
964
 
965
+    adjust_pci_device ( pci );
965
     rhine_reset (nic);
966
     rhine_reset (nic);
966
     nic->nic_op	= &rhine_operations;
967
     nic->nic_op	= &rhine_operations;
967
     nic->irqno	  = pci->irq;
968
     nic->irqno	  = pci->irq;
968
     nic->ioaddr   = tp->ioaddr;
969
     nic->ioaddr   = tp->ioaddr;
969
-
970
-
971
     return 1;
970
     return 1;
972
 }
971
 }
973
 
972
 

Loading…
Cancel
Save