]> git.baikalelectronics.ru Git - kernel.git/commit
[TG3]: Fix race condition when calling register_netdev().
authorMichael Chan <mchan@broadcom.com>
Mon, 18 Dec 2006 01:07:29 +0000 (17:07 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 18 Dec 2006 05:59:20 +0000 (21:59 -0800)
commit52fb3ae34bcf002b8031dc013f960393ba789870
tree59909de4a5cba3bb84ee4b09fd793af46efc0f4f
parent6e566962c37e2dc6deaa1a2b69d5b2fbcd232e49
[TG3]: Fix race condition when calling register_netdev().

Hot-plug scripts can call tg3_open() as soon as register_netdev() is
called in tg3_init_one().  We need to call pci_set_drvdata() before
register_netdev(), and netif_carrier_off() needs to be moved to
tg3_open() to avoid race conditions.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c