|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
|
|
|
|
|
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
|
|
|
|
|
@@ -207,6 +207,7 @@ struct tulip_chip_table tulip_tbl[] = {
|
|
|
|
|
@@ -206,6 +206,7 @@ struct tulip_chip_table tulip_tbl[] = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
static const struct pci_device_id tulip_pci_tbl[] = {
|
|
|
|
|
{ 0x1011, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DC21140 },
|
|
|
|
|
{ 0x1011, 0x0019, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DC21143 },
|
|
|
|
|
@@ -250,7 +251,7 @@ static const struct pci_device_id tulip_
|
|
|
|
|
@@ -249,7 +250,7 @@ static const struct pci_device_id tulip_
|
|
|
|
|
{ } /* terminate list */
|
|
|
|
|
};
|
|
|
|
|
MODULE_DEVICE_TABLE(pci, tulip_pci_tbl);
|
|
|
|
@ -17,7 +17,7 @@
|
|
|
|
|
|
|
|
|
|
/* A full-duplex map for media types. */
|
|
|
|
|
const char tulip_media_cap[32] =
|
|
|
|
|
@@ -268,11 +269,14 @@ static void tulip_down(struct net_device
|
|
|
|
|
@@ -267,11 +268,14 @@ static void tulip_down(struct net_device
|
|
|
|
|
static struct net_device_stats *tulip_get_stats(struct net_device *dev);
|
|
|
|
|
static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
|
|
|
|
|
static void set_rx_mode(struct net_device *dev);
|
|
|
|
@ -32,7 +32,7 @@
|
|
|
|
|
static void tulip_set_power_state (struct tulip_private *tp,
|
|
|
|
|
int sleep, int snooze)
|
|
|
|
|
{
|
|
|
|
|
@@ -289,7 +293,7 @@ static void tulip_set_power_state (struc
|
|
|
|
|
@@ -288,7 +292,7 @@ static void tulip_set_power_state (struc
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -41,7 +41,7 @@
|
|
|
|
|
|
|
|
|
|
static void tulip_up(struct net_device *dev)
|
|
|
|
|
{
|
|
|
|
|
@@ -303,6 +307,7 @@ static void tulip_up(struct net_device *
|
|
|
|
|
@@ -302,6 +306,7 @@ static void tulip_up(struct net_device *
|
|
|
|
|
napi_enable(&tp->napi);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -49,7 +49,7 @@
|
|
|
|
|
/* Wake the chip from sleep/snooze mode. */
|
|
|
|
|
tulip_set_power_state (tp, 0, 0);
|
|
|
|
|
|
|
|
|
|
@@ -310,6 +315,7 @@ static void tulip_up(struct net_device *
|
|
|
|
|
@@ -309,6 +314,7 @@ static void tulip_up(struct net_device *
|
|
|
|
|
pci_enable_wake(tp->pdev, PCI_D3hot, 0);
|
|
|
|
|
pci_enable_wake(tp->pdev, PCI_D3cold, 0);
|
|
|
|
|
tulip_set_wolopts(tp->pdev, 0);
|
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
|
|
|
|
|
/* On some chip revs we must set the MII/SYM port before the reset!? */
|
|
|
|
|
if (tp->mii_cnt || (tp->mtable && tp->mtable->has_mii))
|
|
|
|
|
@@ -317,18 +323,22 @@ static void tulip_up(struct net_device *
|
|
|
|
|
@@ -316,18 +322,22 @@ static void tulip_up(struct net_device *
|
|
|
|
|
|
|
|
|
|
/* Reset the chip, holding bit 0 set at least 50 PCI cycles. */
|
|
|
|
|
iowrite32(0x00000001, ioaddr + CSR0);
|
|
|
|
@ -81,7 +81,7 @@
|
|
|
|
|
|
|
|
|
|
iowrite32(tp->rx_ring_dma, ioaddr + CSR3);
|
|
|
|
|
iowrite32(tp->tx_ring_dma, ioaddr + CSR4);
|
|
|
|
|
@@ -362,9 +372,11 @@ static void tulip_up(struct net_device *
|
|
|
|
|
@@ -361,9 +371,11 @@ static void tulip_up(struct net_device *
|
|
|
|
|
*setup_frm++ = eaddrs[1]; *setup_frm++ = eaddrs[1];
|
|
|
|
|
*setup_frm++ = eaddrs[2]; *setup_frm++ = eaddrs[2];
|
|
|
|
|
|
|
|
|
@ -93,7 +93,7 @@
|
|
|
|
|
tp->tx_buffers[tp->cur_tx].skb = NULL;
|
|
|
|
|
tp->tx_buffers[tp->cur_tx].mapping = mapping;
|
|
|
|
|
|
|
|
|
|
@@ -520,7 +532,7 @@ tulip_open(struct net_device *dev)
|
|
|
|
|
@@ -519,7 +531,7 @@ tulip_open(struct net_device *dev)
|
|
|
|
|
|
|
|
|
|
tulip_init_ring (dev);
|
|
|
|
|
|
|
|
|
@ -102,7 +102,7 @@
|
|
|
|
|
dev->name, dev);
|
|
|
|
|
if (retval)
|
|
|
|
|
goto free_ring;
|
|
|
|
|
@@ -644,8 +656,10 @@ static void tulip_init_ring(struct net_d
|
|
|
|
|
@@ -643,8 +655,10 @@ static void tulip_init_ring(struct net_d
|
|
|
|
|
tp->rx_buffers[i].skb = skb;
|
|
|
|
|
if (skb == NULL)
|
|
|
|
|
break;
|
|
|
|
@ -113,7 +113,7 @@
|
|
|
|
|
tp->rx_buffers[i].mapping = mapping;
|
|
|
|
|
tp->rx_ring[i].status = cpu_to_le32(DescOwned); /* Owned by Tulip chip */
|
|
|
|
|
tp->rx_ring[i].buffer1 = cpu_to_le32(mapping);
|
|
|
|
|
@@ -678,8 +692,10 @@ tulip_start_xmit(struct sk_buff *skb, st
|
|
|
|
|
@@ -677,8 +691,10 @@ tulip_start_xmit(struct sk_buff *skb, st
|
|
|
|
|
entry = tp->cur_tx % TX_RING_SIZE;
|
|
|
|
|
|
|
|
|
|
tp->tx_buffers[entry].skb = skb;
|
|
|
|
@ -124,7 +124,7 @@
|
|
|
|
|
tp->tx_buffers[entry].mapping = mapping;
|
|
|
|
|
tp->tx_ring[entry].buffer1 = cpu_to_le32(mapping);
|
|
|
|
|
|
|
|
|
|
@@ -730,16 +746,19 @@ static void tulip_clean_tx_ring(struct t
|
|
|
|
|
@@ -729,16 +745,19 @@ static void tulip_clean_tx_ring(struct t
|
|
|
|
|
if (tp->tx_buffers[entry].skb == NULL) {
|
|
|
|
|
/* test because dummy frames not mapped */
|
|
|
|
|
if (tp->tx_buffers[entry].mapping)
|
|
|
|
@ -145,7 +145,7 @@
|
|
|
|
|
|
|
|
|
|
/* Free the original skb. */
|
|
|
|
|
dev_kfree_skb_irq(tp->tx_buffers[entry].skb);
|
|
|
|
|
@@ -790,7 +809,9 @@ static void tulip_down (struct net_devic
|
|
|
|
|
@@ -789,7 +808,9 @@ static void tulip_down (struct net_devic
|
|
|
|
|
dev->if_port = tp->saved_if_port;
|
|
|
|
|
|
|
|
|
|
/* Leave the driver in snooze, not sleep, mode. */
|
|
|
|
@ -155,7 +155,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void tulip_free_ring (struct net_device *dev)
|
|
|
|
|
@@ -811,8 +832,10 @@ static void tulip_free_ring (struct net_
|
|
|
|
|
@@ -810,8 +831,10 @@ static void tulip_free_ring (struct net_
|
|
|
|
|
/* An invalid address. */
|
|
|
|
|
tp->rx_ring[i].buffer1 = cpu_to_le32(0xBADF00D0);
|
|
|
|
|
if (skb) {
|
|
|
|
@ -166,7 +166,7 @@
|
|
|
|
|
dev_kfree_skb (skb);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -821,8 +844,10 @@ static void tulip_free_ring (struct net_
|
|
|
|
|
@@ -820,8 +843,10 @@ static void tulip_free_ring (struct net_
|
|
|
|
|
struct sk_buff *skb = tp->tx_buffers[i].skb;
|
|
|
|
|
|
|
|
|
|
if (skb != NULL) {
|
|
|
|
@ -177,7 +177,7 @@
|
|
|
|
|
dev_kfree_skb (skb);
|
|
|
|
|
}
|
|
|
|
|
tp->tx_buffers[i].skb = NULL;
|
|
|
|
|
@@ -843,7 +868,7 @@ static int tulip_close (struct net_devic
|
|
|
|
|
@@ -842,7 +867,7 @@ static int tulip_close (struct net_devic
|
|
|
|
|
netdev_dbg(dev, "Shutting down ethercard, status was %02x\n",
|
|
|
|
|
ioread32 (ioaddr + CSR5));
|
|
|
|
|
|
|
|
|
@ -186,7 +186,7 @@
|
|
|
|
|
|
|
|
|
|
tulip_free_ring (dev);
|
|
|
|
|
|
|
|
|
|
@@ -874,7 +899,9 @@ static void tulip_get_drvinfo(struct net
|
|
|
|
|
@@ -873,7 +898,9 @@ static void tulip_get_drvinfo(struct net
|
|
|
|
|
struct tulip_private *np = netdev_priv(dev);
|
|
|
|
|
strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
|
|
|
|
|
strlcpy(info->version, DRV_VERSION, sizeof(info->version));
|
|
|
|
@ -196,7 +196,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -887,7 +914,9 @@ static int tulip_ethtool_set_wol(struct
|
|
|
|
|
@@ -886,7 +913,9 @@ static int tulip_ethtool_set_wol(struct
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
|
|
|
|
tp->wolinfo.wolopts = wolinfo->wolopts;
|
|
|
|
@ -207,7 +207,7 @@
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1165,9 +1194,11 @@ static void set_rx_mode(struct net_devic
|
|
|
|
|
@@ -1164,9 +1193,11 @@ static void set_rx_mode(struct net_devic
|
|
|
|
|
|
|
|
|
|
tp->tx_buffers[entry].skb = NULL;
|
|
|
|
|
tp->tx_buffers[entry].mapping =
|
|
|
|
@ -219,7 +219,7 @@
|
|
|
|
|
/* Put the setup frame on the Tx list. */
|
|
|
|
|
if (entry == TX_RING_SIZE-1)
|
|
|
|
|
tx_flags |= DESC_RING_WRAP; /* Wrap ring. */
|
|
|
|
|
@@ -1264,19 +1295,22 @@ out:
|
|
|
|
|
@@ -1263,19 +1294,22 @@ out:
|
|
|
|
|
netdev_dbg(dev, "MWI config cacheline=%d, csr0=%08x\n",
|
|
|
|
|
cache, csr0);
|
|
|
|
|
}
|
|
|
|
@ -243,7 +243,7 @@
|
|
|
|
|
|
|
|
|
|
static const struct net_device_ops tulip_netdev_ops = {
|
|
|
|
|
.ndo_open = tulip_open,
|
|
|
|
|
@@ -1294,6 +1328,7 @@ static const struct net_device_ops tulip
|
|
|
|
|
@@ -1293,6 +1327,7 @@ static const struct net_device_ops tulip
|
|
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -251,7 +251,7 @@
|
|
|
|
|
const struct pci_device_id early_486_chipsets[] = {
|
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) },
|
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) },
|
|
|
|
|
@@ -1471,6 +1506,8 @@ static int tulip_init_one(struct pci_dev
|
|
|
|
|
@@ -1470,6 +1505,8 @@ static int tulip_init_one(struct pci_dev
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
tp->pdev = pdev;
|
|
|
|
@ -260,7 +260,7 @@
|
|
|
|
|
tp->base_addr = ioaddr;
|
|
|
|
|
tp->revision = pdev->revision;
|
|
|
|
|
tp->csr0 = csr0;
|
|
|
|
|
@@ -1801,6 +1838,7 @@ err_out_free_netdev:
|
|
|
|
|
@@ -1800,6 +1837,7 @@ err_out_free_netdev:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -268,7 +268,7 @@
|
|
|
|
|
/* set the registers according to the given wolopts */
|
|
|
|
|
static void tulip_set_wolopts (struct pci_dev *pdev, u32 wolopts)
|
|
|
|
|
{
|
|
|
|
|
@@ -1829,6 +1867,7 @@ static void tulip_set_wolopts (struct pc
|
|
|
|
|
@@ -1828,6 +1866,7 @@ static void tulip_set_wolopts (struct pc
|
|
|
|
|
iowrite32(tmp, ioaddr + CSR13);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -276,7 +276,7 @@
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
|
|
|
|
|
|
|
|
@@ -1943,6 +1982,7 @@ static void tulip_remove_one(struct pci_
|
|
|
|
|
@@ -1942,6 +1981,7 @@ static void tulip_remove_one(struct pci_
|
|
|
|
|
|
|
|
|
|
/* pci_power_off (pdev, -1); */
|
|
|
|
|
}
|
|
|
|
@ -284,7 +284,7 @@
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
|
|
|
/*
|
|
|
|
|
@@ -1964,7 +2004,8 @@ static void poll_tulip (struct net_devic
|
|
|
|
|
@@ -1963,7 +2003,8 @@ static void poll_tulip (struct net_devic
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -294,7 +294,7 @@
|
|
|
|
|
.name = DRV_NAME,
|
|
|
|
|
.id_table = tulip_pci_tbl,
|
|
|
|
|
.probe = tulip_init_one,
|
|
|
|
|
@@ -1974,10 +2015,12 @@ static struct pci_driver tulip_driver =
|
|
|
|
|
@@ -1973,10 +2014,12 @@ static struct pci_driver tulip_driver =
|
|
|
|
|
.resume = tulip_resume,
|
|
|
|
|
#endif /* CONFIG_PM */
|
|
|
|
|
};
|
|
|
|
@ -307,7 +307,7 @@
|
|
|
|
|
#ifdef MODULE
|
|
|
|
|
pr_info("%s", version);
|
|
|
|
|
#endif
|
|
|
|
|
@@ -1987,13 +2030,18 @@ static int __init tulip_init (void)
|
|
|
|
|
@@ -1992,13 +2035,18 @@ static int __init tulip_init (void)
|
|
|
|
|
tulip_max_interrupt_work = max_interrupt_work;
|
|
|
|
|
|
|
|
|
|
/* probe for and init boards */
|
|
|
|
|