aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2007-06-01 13:22:39 -0400
committerJeff Garzik <jeff@garzik.org>2007-06-03 11:44:20 -0400
commit416b5d10afdc797c21c457ade3714e8f2f75edd9 (patch)
tree6a769397243a94916bf0e765eccd3104a3370490 /drivers/net/e1000/e1000_main.c
parent25805dcf9d83098cf5492117ad2669cd14cc9b24 (diff)
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 <auke-jan.h.kok@intel.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Doug Chapman <doug.chapman@hp.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c11
1 files changed, 7 insertions, 4 deletions
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,
1142 !e1000_check_mng_mode(&adapter->hw)) 1142 !e1000_check_mng_mode(&adapter->hw))
1143 e1000_get_hw_control(adapter); 1143 e1000_get_hw_control(adapter);
1144 1144
1145 strcpy(netdev->name, "eth%d");
1146 if ((err = register_netdev(netdev)))
1147 goto err_register;
1148
1149 /* tell the stack to leave us alone until e1000_open() is called */ 1145 /* tell the stack to leave us alone until e1000_open() is called */
1150 netif_carrier_off(netdev); 1146 netif_carrier_off(netdev);
1151 netif_stop_queue(netdev); 1147 netif_stop_queue(netdev);
1148#ifdef CONFIG_E1000_NAPI
1149 netif_poll_disable(netdev);
1150#endif
1151
1152 strcpy(netdev->name, "eth%d");
1153 if ((err = register_netdev(netdev)))
1154 goto err_register;
1152 1155
1153 DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); 1156 DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n");
1154 1157