[BNX2]: Fix race conditions when calling register_netdev().
authorMichael Chan <mchan@broadcom.com>
Thu, 3 May 2007 20:20:19 +0000 (13:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2007 20:20:19 +0000 (13:20 -0700)
commit1b2f922f6869eb13dadfe1ba3f8337bd42e50a2e
treeab6f02ff18a01b80501aa7b0dda70be64fb2e0e5
parent40453c839fdbf86738256cae1c9c1ebe55645d4a
[BNX2]: Fix race conditions when calling register_netdev().

Hot-plug scripts can call bnx2_open() as soon as register_netdev() is
called in bnx2_init_one().  We need to call pci_set_drvdata() and
setup everything before calling register_netdev(). netif_carrier_off()
also needs to be moved to bnx2_open() to avoid race conditions with
the irq.

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