Browse Source

Ensured that all drivers call xxx_fill_nic().

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
08ff0c1d30

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

@@ -3618,8 +3618,7 @@ static int e1000_probe ( struct nic *nic, struct pci_device *p ) {
3618 3618
 
3619 3619
 	adjust_pci_device(p);
3620 3620
 
3621
-	nic->ioaddr   = p->ioaddr & ~3;
3622
-	nic->irqno    = p->irq;
3621
+	pci_fill_nic ( nic, p );
3623 3622
 
3624 3623
 	/* From Matt Hortman <mbhortman@acpthinclient.com> */
3625 3624
 	/* MAC and Phy settings */

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

@@ -617,13 +617,9 @@ static int eepro100_probe ( struct nic *nic, struct pci_device *p ) {
617 617
 
618 618
 	if (p->ioaddr == 0)
619 619
 		return 0;
620
-	ioaddr = p->ioaddr;
621
-	nic->ioaddr = ioaddr;
622
-
620
+	pci_fill_nic ( nic, pci );
623 621
 	adjust_pci_device(p);
624
-
625
-	/* Copy IRQ from PCI information */
626
-	nic->irqno = p->irq;
622
+	ioaddr = nic->ioaddr;
627 623
 
628 624
 	if ((do_eeprom_cmd(EE_READ_CMD << 24, 27) & 0xffe0000)
629 625
 		== 0xffe0000) {

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

@@ -682,13 +682,12 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
682 682
     if (pci->ioaddr == 0)
683 683
 	    return 0;
684 684
 
685
-    /* Mask the bit that says "this is an io addr" */
686
-    mtdx.ioaddr = pci->ioaddr;
687
-
685
+    pci_fill_nic ( nic, pci );
688 686
     adjust_pci_device(pci);
689 687
 
690 688
     mtdx.nic_name = pci->name;
691 689
     mtdx.dev_id = pci->device_id;
690
+    mtdx.ioaddr = nic->ioaddr;
692 691
 
693 692
     /* read ethernet id */
694 693
     for (i = 0; i < 6; ++i)

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

@@ -80,6 +80,8 @@ static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p )
80 80
 
81 81
 static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) {
82 82
   hfa384x_t *hw = &hw_global;
83
+  
84
+  pci_fill_nic ( nic, pci );
83 85
 
84 86
   /* Find and intialise PLX Prism2 card */
85 87
   if ( ! prism2_find_plx ( hw, pci ) ) return 0;

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

@@ -3241,8 +3241,8 @@ static int tg3_probe ( struct nic *nic, struct pci_device *pdev ) {
3241 3241
 
3242 3242
 	adjust_pci_device(pdev);
3243 3243
 
3244
+	pci_fill_nic ( nic, pdev );
3244 3245
 	nic->irqno  = 0;
3245
-	nic->ioaddr = pdev->ioaddr;
3246 3246
 
3247 3247
 	/* Find power-management capability. */
3248 3248
 	pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);

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

@@ -634,8 +634,7 @@ static int w89c840_probe ( struct nic *nic, struct pci_device *p ) {
634 634
     if (p->ioaddr == 0)
635 635
         return 0;
636 636
 
637
-    ioaddr      = p->ioaddr;
638
-    nic->ioaddr = p->ioaddr & ~3;
637
+    pci_fill_nic ( nic, p );
639 638
     nic->irqno  = 0;
640 639
 
641 640
 

Loading…
Cancel
Save