diff options
author | Steve Hodgson <steve@purestorage.com> | 2012-08-14 17:13:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-15 15:10:42 -0700 |
commit | e3bc4ffb814c847bde7706a80d5684d12c676a8b (patch) | |
tree | aeecd25ee1e702aa2e721cf9d3f86aa7b5132128 /drivers/net/vmxnet3 | |
parent | c03307eab68d583ea6db917681afa14ed1fb3b84 (diff) | |
download | talos-op-linux-e3bc4ffb814c847bde7706a80d5684d12c676a8b.tar.gz talos-op-linux-e3bc4ffb814c847bde7706a80d5684d12c676a8b.zip |
vmxnet3: Fix race between dev_open() and register_netdev()
dev_open() can complete before register_netdev() returns.
Fix vmxnet3_probe_device() to support this.
Signed-off-by: Steve Hodgson <steve@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 93e0cfb739b8..ce9d4f2c9776 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -3019,6 +3019,7 @@ vmxnet3_probe_device(struct pci_dev *pdev, netdev->watchdog_timeo = 5 * HZ; INIT_WORK(&adapter->work, vmxnet3_reset_work); + set_bit(VMXNET3_STATE_BIT_QUIESCED, &adapter->state); if (adapter->intr.type == VMXNET3_IT_MSIX) { int i; @@ -3043,7 +3044,6 @@ vmxnet3_probe_device(struct pci_dev *pdev, goto err_register; } - set_bit(VMXNET3_STATE_BIT_QUIESCED, &adapter->state); vmxnet3_check_link(adapter, false); atomic_inc(&devices_found); return 0; |