aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/forcedeth.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 1e691024868f..f165ae973985 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -91,6 +91,8 @@
91 * per-packet flags. 91 * per-packet flags.
92 * 0.39: 18 Jul 2005: Add 64bit descriptor support. 92 * 0.39: 18 Jul 2005: Add 64bit descriptor support.
93 * 0.40: 19 Jul 2005: Add support for mac address change. 93 * 0.40: 19 Jul 2005: Add support for mac address change.
94 * 0.41: 30 Jul 2005: Write back original MAC in nv_close instead
95 * of nv_remove
94 * 96 *
95 * Known bugs: 97 * Known bugs:
96 * We suspect that on some hardware no TX done interrupts are generated. 98 * We suspect that on some hardware no TX done interrupts are generated.
@@ -102,7 +104,7 @@
102 * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few 104 * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
103 * superfluous timer interrupts from the nic. 105 * superfluous timer interrupts from the nic.
104 */ 106 */
105#define FORCEDETH_VERSION "0.40" 107#define FORCEDETH_VERSION "0.41"
106#define DRV_NAME "forcedeth" 108#define DRV_NAME "forcedeth"
107 109
108#include <linux/module.h> 110#include <linux/module.h>
@@ -2230,6 +2232,12 @@ static int nv_close(struct net_device *dev)
2230 if (np->wolenabled) 2232 if (np->wolenabled)
2231 nv_start_rx(dev); 2233 nv_start_rx(dev);
2232 2234
2235 /* special op: write back the misordered MAC address - otherwise
2236 * the next nv_probe would see a wrong address.
2237 */
2238 writel(np->orig_mac[0], base + NvRegMacAddrA);
2239 writel(np->orig_mac[1], base + NvRegMacAddrB);
2240
2233 /* FIXME: power down nic */ 2241 /* FIXME: power down nic */
2234 2242
2235 return 0; 2243 return 0;
@@ -2482,16 +2490,9 @@ static void __devexit nv_remove(struct pci_dev *pci_dev)
2482{ 2490{
2483 struct net_device *dev = pci_get_drvdata(pci_dev); 2491 struct net_device *dev = pci_get_drvdata(pci_dev);
2484 struct fe_priv *np = get_nvpriv(dev); 2492 struct fe_priv *np = get_nvpriv(dev);
2485 u8 __iomem *base = get_hwbase(dev);
2486 2493
2487 unregister_netdev(dev); 2494 unregister_netdev(dev);
2488 2495
2489 /* special op: write back the misordered MAC address - otherwise
2490 * the next nv_probe would see a wrong address.
2491 */
2492 writel(np->orig_mac[0], base + NvRegMacAddrA);
2493 writel(np->orig_mac[1], base + NvRegMacAddrB);
2494
2495 /* free all structures */ 2496 /* free all structures */
2496 if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) 2497 if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2)
2497 pci_free_consistent(np->pci_dev, sizeof(struct ring_desc) * (RX_RING + TX_RING), np->rx_ring.orig, np->ring_addr); 2498 pci_free_consistent(np->pci_dev, sizeof(struct ring_desc) * (RX_RING + TX_RING), np->rx_ring.orig, np->ring_addr);