mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
cxgb4: Setup FW queues before registering netdev
[ Upstream commit843bd7db79] When NetworkManager is enabled, there are chances that interface up is called even before probe completes. This means we have not yet allocated the FW sge queues, hence rest of ingress queue allocation wont be proper. Fix this by calling setup_fw_sge_queues() before register_netdev(). Fixes:0fbc81b3ad('chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's') Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e63ff84eb0
commit
79ad08dae9
@@ -836,8 +836,6 @@ static int setup_fw_sge_queues(struct adapter *adap)
|
||||
|
||||
err = t4_sge_alloc_rxq(adap, &s->fw_evtq, true, adap->port[0],
|
||||
adap->msi_idx, NULL, fwevtq_handler, NULL, -1);
|
||||
if (err)
|
||||
t4_free_sge_resources(adap);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -4940,6 +4938,13 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (err)
|
||||
goto out_free_dev;
|
||||
|
||||
err = setup_fw_sge_queues(adapter);
|
||||
if (err) {
|
||||
dev_err(adapter->pdev_dev,
|
||||
"FW sge queue allocation failed, err %d", err);
|
||||
goto out_free_dev;
|
||||
}
|
||||
|
||||
/*
|
||||
* The card is now ready to go. If any errors occur during device
|
||||
* registration we do not fail the whole card but rather proceed only
|
||||
@@ -4983,7 +4988,6 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
}
|
||||
|
||||
print_adapter_info(adapter);
|
||||
setup_fw_sge_queues(adapter);
|
||||
return 0;
|
||||
|
||||
sriov:
|
||||
@@ -5035,6 +5039,7 @@ sriov:
|
||||
#endif
|
||||
|
||||
out_free_dev:
|
||||
t4_free_sge_resources(adapter);
|
||||
free_some_resources(adapter);
|
||||
if (adapter->flags & USING_MSIX)
|
||||
free_msix_info(adapter);
|
||||
|
||||
Reference in New Issue
Block a user