From: Auke Kok Date: Fri, 1 Jun 2007 17:22:39 +0000 (-0700) Subject: e1000: disable polling before registering netdevice X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=416b5d10afdc797c21c457ade3714e8f2f75edd9;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git e1000: disable polling before registering netdevice To assure the symmetry of poll enable/disable in up/down, we should initialize the netdevice to be poll_disabled at load time. Doing this after register_netdevice leaves us open to another race, so lets move all the netif_* calls above register_netdevice so the stack starts out how we expect it to be. Signed-off-by: Auke Kok Cc: Herbert Xu Cc: Doug Chapman Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 9ec35b7a8207..cf8af928a69c 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -1142,13 +1142,16 @@ e1000_probe(struct pci_dev *pdev, !e1000_check_mng_mode(&adapter->hw)) e1000_get_hw_control(adapter); - strcpy(netdev->name, "eth%d"); - if ((err = register_netdev(netdev))) - goto err_register; - /* tell the stack to leave us alone until e1000_open() is called */ netif_carrier_off(netdev); netif_stop_queue(netdev); +#ifdef CONFIG_E1000_NAPI + netif_poll_disable(netdev); +#endif + + strcpy(netdev->name, "eth%d"); + if ((err = register_netdev(netdev))) + goto err_register; DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n");