mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
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>
This commit is contained in:
parent
c03307eab6
commit
e3bc4ffb81
1 changed files with 1 additions and 1 deletions
|
@ -3019,6 +3019,7 @@ vmxnet3_probe_device(struct pci_dev *pdev,
|
||||||
netdev->watchdog_timeo = 5 * HZ;
|
netdev->watchdog_timeo = 5 * HZ;
|
||||||
|
|
||||||
INIT_WORK(&adapter->work, vmxnet3_reset_work);
|
INIT_WORK(&adapter->work, vmxnet3_reset_work);
|
||||||
|
set_bit(VMXNET3_STATE_BIT_QUIESCED, &adapter->state);
|
||||||
|
|
||||||
if (adapter->intr.type == VMXNET3_IT_MSIX) {
|
if (adapter->intr.type == VMXNET3_IT_MSIX) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -3043,7 +3044,6 @@ vmxnet3_probe_device(struct pci_dev *pdev,
|
||||||
goto err_register;
|
goto err_register;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_bit(VMXNET3_STATE_BIT_QUIESCED, &adapter->state);
|
|
||||||
vmxnet3_check_link(adapter, false);
|
vmxnet3_check_link(adapter, false);
|
||||||
atomic_inc(&devices_found);
|
atomic_inc(&devices_found);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue