Browse Source

Ensured that all drivers call xxx_fill_nic().

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

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

3618
 
3618
 
3619
 	adjust_pci_device(p);
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
 	/* From Matt Hortman <mbhortman@acpthinclient.com> */
3623
 	/* From Matt Hortman <mbhortman@acpthinclient.com> */
3625
 	/* MAC and Phy settings */
3624
 	/* MAC and Phy settings */

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

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

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

682
     if (pci->ioaddr == 0)
682
     if (pci->ioaddr == 0)
683
 	    return 0;
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
     adjust_pci_device(pci);
686
     adjust_pci_device(pci);
689
 
687
 
690
     mtdx.nic_name = pci->name;
688
     mtdx.nic_name = pci->name;
691
     mtdx.dev_id = pci->device_id;
689
     mtdx.dev_id = pci->device_id;
690
+    mtdx.ioaddr = nic->ioaddr;
692
 
691
 
693
     /* read ethernet id */
692
     /* read ethernet id */
694
     for (i = 0; i < 6; ++i)
693
     for (i = 0; i < 6; ++i)

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

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

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

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

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

634
     if (p->ioaddr == 0)
634
     if (p->ioaddr == 0)
635
         return 0;
635
         return 0;
636
 
636
 
637
-    ioaddr      = p->ioaddr;
638
-    nic->ioaddr = p->ioaddr & ~3;
637
+    pci_fill_nic ( nic, p );
639
     nic->irqno  = 0;
638
     nic->irqno  = 0;
640
 
639
 
641
 
640
 

Loading…
Cancel
Save