From 3e1657c8ef53e1cd541cc1e420f3230dc075949b Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 21 May 2007 14:51:35 -0700 Subject: e1000: Don't enable polling in open() (was: e1000: assertion hit in e1000_clean(), kernel 2.6.21.1) Herbert Xu wrote: "netif_poll_enable can only be called if you've previously called netif_poll_disable. Otherwise a poll might already be in action and you may get a crash like this." Removing the call to netif_poll_enable in e1000_open should fix this issue, the only other call to netif_poll_enable is in e1000_up() which is only reached after a device reset or resume. Bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=8455 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240339 Tested by Doug Chapman Signed-off-by: Auke Kok Acked-by: Herbert Xu Signed-off-by: Jeff Garzik --- drivers/net/e1000/e1000_main.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 49be393e1c1..cbc7febe9cd 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -1431,10 +1431,6 @@ e1000_open(struct net_device *netdev) /* From here on the code is the same as e1000_up() */ clear_bit(__E1000_DOWN, &adapter->flags); -#ifdef CONFIG_E1000_NAPI - netif_poll_enable(netdev); -#endif - e1000_irq_enable(adapter); /* fire a link status change interrupt to start the watchdog */ -- cgit v1.2.3 From f1e9a4eaea5c22cfb557e58a8cd0ca3bde5160a5 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Mon, 21 May 2007 14:33:21 +0100 Subject: declance: Remove a dangling spin_unlock_irq() thingy The spin_unlock_irq() invocation in lance_start_xmit() has no matching locking request. The call is already protected by netif_tx_lock, so remove the statement. Signed-off-by: Maciej W. Rozycki Signed-off-by: Jeff Garzik --- drivers/net/declance.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/declance.c b/drivers/net/declance.c index 95d854e2295..b2577f40124 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c @@ -932,8 +932,6 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Kick the lance: transmit now */ writereg(&ll->rdp, LE_C0_INEA | LE_C0_TDMD); - spin_unlock_irq(&lp->lock); - dev->trans_start = jiffies; dev_kfree_skb(skb); -- cgit v1.2.3 From 2053ed02a62f2c66d9cb9b51aea0836a7d8dbabf Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 15 May 2007 15:29:16 -0700 Subject: Add constant for FCS/CRC length (frame check sequence) About a dozen drivers that have some form of crc checksumming or offloading use this constant, warranting a global define for it. Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- include/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 1db774cf9dc..3213f6f4aa5 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h @@ -33,6 +33,7 @@ #define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ #define ETH_DATA_LEN 1500 /* Max. octets in payload */ #define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ +#define ETH_FCS_LEN 4 /* Octets in the FCS */ /* * These are the defined Ethernet Protocol ID's. -- cgit v1.2.3