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,9 +185,6 @@ int find_pci_device ( struct pci_device *pci,
185 185
 			continue;
186 186
 		}
187 187
 		
188
-		/* Fix up PCI device */
189
-		adjust_pci_device ( pci );
190
-		
191 188
 		/* If driver has a class, and class matches, use it */
192 189
 		if ( driver->class && 
193 190
 		     ( driver->class == pci->class ) ) {

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

@@ -703,6 +703,8 @@ static int a3c90x_probe ( struct dev *dev, struct pci_device *pci ) {
703 703
     if (pci->ioaddr == 0)
704 704
           return 0;
705 705
 
706
+    adjust_pci_device(pci);
707
+
706 708
     nic->ioaddr = pci->ioaddr;
707 709
     nic->irqno = 0;
708 710
 

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

@@ -620,6 +620,8 @@ static int eepro100_probe ( struct dev *dev, struct pci_device *p ) {
620 620
 	ioaddr = p->ioaddr;
621 621
 	nic->ioaddr = ioaddr;
622 622
 
623
+	adjust_pci_device(p);
624
+
623 625
 	/* Copy IRQ from PCI information */
624 626
 	nic->irqno = p->irq;
625 627
 

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

@@ -684,6 +684,8 @@ static int mtd_probe ( struct dev *dev, struct pci_device *pci ) {
684 684
     /* Mask the bit that says "this is an io addr" */
685 685
     mtdx.ioaddr = pci->ioaddr;
686 686
 
687
+    adjust_pci_device(pci);
688
+
687 689
     mtdx.nic_name = dev->name;
688 690
     mtdx.dev_id = pci->dev_id;
689 691
 

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

@@ -253,6 +253,8 @@ natsemi_probe ( struct dev *dev, struct pci_device *pci ) {
253 253
     if (pci->ioaddr == 0)
254 254
         return 0;
255 255
 
256
+    adjust_pci_device(pci);
257
+
256 258
     /* initialize some commonly used globals */
257 259
 	
258 260
     nic->irqno  = 0;

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

@@ -194,6 +194,8 @@ static int rtl8139_probe ( struct dev *dev, struct pci_device *pci ) {
194 194
 	nic->ioaddr = pci->ioaddr;
195 195
 	nic->irqno = pci->irq;
196 196
 
197
+	adjust_pci_device(pci);
198
+
197 199
 	/* Bring the chip out of low-power mode. */
198 200
 	outb(0x00, nic->ioaddr + Config1);
199 201
 

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

@@ -3239,6 +3239,8 @@ static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) {
3239 3239
 
3240 3240
 	memset(tp, 0, sizeof(*tp));
3241 3241
 
3242
+	adjust_pci_device(pdev);
3243
+
3242 3244
 	nic->irqno  = 0;
3243 3245
 	nic->ioaddr = pdev->ioaddr;
3244 3246
 
@@ -3342,7 +3344,6 @@ static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) {
3342 3344
 	}
3343 3345
 
3344 3346
 	nic->nic_op	= &tg3_operations;
3345
-
3346 3347
 	return 1;
3347 3348
 
3348 3349
  err_out_iounmap:

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

@@ -794,6 +794,9 @@ static int tlan_probe ( struct dev *dev, struct pci_device *pci ) {
794 794
 	nic->ioaddr = pci->ioaddr;
795 795
 
796 796
 	BASE = pci->ioaddr;
797
+
798
+	/* Set nic as PCI bus master */
799
+	adjust_pci_device(pci);
797 800
 	
798 801
 	/* Point to private storage */
799 802
 	priv = &TLanPrivateInfo;

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

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

Loading…
Cancel
Save