Message ID | 201508212224.00090.linux@rainbow-software.org |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Ondrej Zary <linux@rainbow-software.org> : [...] > The patch below is enough to make my IP1000A card work with dl2k driver - no > more lost packets and hangs. Haven't tested gigabit speed yet - the PHY will > probably need some tweaking but that should be easy. Neither dl2k nor ipg uses napi. They are a bit dusty. > So maybe we should add IP1000A support to dl2k and remove the broken ipg > driver. Do you mean to merge both ? > Does anyone have HW to test? I have a PCI 32 IC Plus IP1000A at hand (courtesy of IC Plus Corp).
diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c index cf0a5fc..d5a60fe 100644 --- a/drivers/net/ethernet/dlink/dl2k.c +++ b/drivers/net/ethernet/dlink/dl2k.c @@ -433,9 +455,9 @@ rio_open (struct net_device *dev) alloc_list (dev); - /* Get station address */ - for (i = 0; i < 6; i++) - dw8(StationAddr0 + i, dev->dev_addr[i]); + /* Set station address */ + for (i = 0; i < 3; i++) + dw16(StationAddr0 + 2 * i, cpu_to_le16(((u16 *)dev->dev_addr)[i])); set_multicast (dev); if (np->coalesce) { diff --git a/drivers/net/ethernet/dlink/dl2k.h b/drivers/net/ethernet/dlink/dl2k.h index 23c07b0..da35e66 100644 --- a/drivers/net/ethernet/dlink/dl2k.h +++ b/drivers/net/ethernet/dlink/dl2k.h @@ -411,6 +411,7 @@ struct netdev_private { static const struct pci_device_id rio_pci_tbl[] = { {0x1186, 0x4000, PCI_ANY_ID, PCI_ANY_ID, }, {0x13f0, 0x1021, PCI_ANY_ID, PCI_ANY_ID, }, + {0x13f0, 0x1023, PCI_ANY_ID, PCI_ANY_ID, }, { } }; MODULE_DEVICE_TABLE (pci, rio_pci_tbl);