|
@@ -1,4 +1,3 @@
|
1
|
|
-#define EB54 1
|
2
|
1
|
/**************************************************************************
|
3
|
2
|
* via-velocity.c: Etherboot device driver for the VIA 6120 Gigabit
|
4
|
3
|
* Changes for Etherboot port:
|
|
@@ -627,7 +626,6 @@ static void velocity_disable(struct dev *dev __unused)
|
627
|
626
|
vptr->flags &= (~VELOCITY_FLAGS_OPENED);
|
628
|
627
|
}
|
629
|
628
|
|
630
|
|
-#ifdef EB54
|
631
|
629
|
/**************************************************************************
|
632
|
630
|
IRQ - handle interrupts
|
633
|
631
|
***************************************************************************/
|
|
@@ -660,13 +658,17 @@ static void velocity_irq(struct nic *nic __unused, irq_action_t action)
|
660
|
658
|
break;
|
661
|
659
|
}
|
662
|
660
|
}
|
663
|
|
-#endif
|
|
661
|
+
|
|
662
|
+static struct nic_operations velocity_operations = {
|
|
663
|
+ .connect = dummy_connect,
|
|
664
|
+ .poll = velocity_poll,
|
|
665
|
+ .transmit = velocity_transmit,
|
|
666
|
+ .irq = velocity_irq,
|
|
667
|
+};
|
|
668
|
+
|
664
|
669
|
/**************************************************************************
|
665
|
670
|
PROBE - Look for an adapter, this routine's visible to the outside
|
666
|
671
|
***************************************************************************/
|
667
|
|
-
|
668
|
|
-#define board_found 1
|
669
|
|
-#define valid_link 0
|
670
|
672
|
static int velocity_probe(struct dev *dev, struct pci_device *pci)
|
671
|
673
|
{
|
672
|
674
|
struct nic *nic = (struct nic *) dev;
|
|
@@ -674,7 +676,7 @@ static int velocity_probe(struct dev *dev, struct pci_device *pci)
|
674
|
676
|
struct mac_regs *regs;
|
675
|
677
|
|
676
|
678
|
printf("via-velocity.c: Found %s Vendor=0x%hX Device=0x%hX\n",
|
677
|
|
- pci->name, pci->vendor, pci->dev_id);
|
|
679
|
+ pci->name, pci->vendor_id, pci->device_id);
|
678
|
680
|
|
679
|
681
|
/* point to private storage */
|
680
|
682
|
vptr = &vptx;
|
|
@@ -740,14 +742,7 @@ static int velocity_probe(struct dev *dev, struct pci_device *pci)
|
740
|
742
|
velocity_open(nic, pci);
|
741
|
743
|
|
742
|
744
|
/* store NIC parameters */
|
743
|
|
-#ifdef EB54
|
744
|
|
- nic->ioaddr = pci->ioaddr & ~3;
|
745
|
|
- nic->irqno = pci->irq;
|
746
|
|
- nic->irq = velocity_irq;
|
747
|
|
-#endif
|
748
|
|
- dev->disable = velocity_disable;
|
749
|
|
- nic->poll = velocity_poll;
|
750
|
|
- nic->transmit = velocity_transmit;
|
|
745
|
+ nic->nic_op = &velocity_operations;
|
751
|
746
|
return 1;
|
752
|
747
|
}
|
753
|
748
|
|
|
@@ -1939,11 +1934,7 @@ static struct pci_id velocity_nics[] = {
|
1939
|
1934
|
PCI_ROM(0x1106, 0x3119, "via-velocity", "VIA Networking Velocity Family Gigabit Ethernet Adapter"),
|
1940
|
1935
|
};
|
1941
|
1936
|
|
1942
|
|
-static struct pci_driver velocity_driver __pci_driver = {
|
1943
|
|
- .type = NIC_DRIVER,
|
1944
|
|
- .name = "VIA-VELOCITY/PCI",
|
1945
|
|
- .probe = velocity_probe,
|
1946
|
|
- .ids = velocity_nics,
|
1947
|
|
- .id_count = sizeof(velocity_nics) / sizeof(velocity_nics[0]),
|
1948
|
|
- .class = 0,
|
1949
|
|
-};
|
|
1937
|
+PCI_DRIVER ( velocity_driver, velocity_nics, PCI_NO_CLASS );
|
|
1938
|
+
|
|
1939
|
+DRIVER ( "VIA-VELOCITY/PCI", nic_driver, pci_driver, velocity_driver,
|
|
1940
|
+ velocity_probe, velocity_disable );
|