Commit 843bd7db authored by Arjun Vynipadath's avatar Arjun Vynipadath Committed by David S. Miller

cxgb4: Setup FW queues before registering netdev

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: 0fbc81b3 ('chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's')
Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2db95690
...@@ -841,8 +841,6 @@ static int setup_fw_sge_queues(struct adapter *adap) ...@@ -841,8 +841,6 @@ static int setup_fw_sge_queues(struct adapter *adap)
err = t4_sge_alloc_rxq(adap, &s->fw_evtq, true, adap->port[0], err = t4_sge_alloc_rxq(adap, &s->fw_evtq, true, adap->port[0],
adap->msi_idx, NULL, fwevtq_handler, NULL, -1); adap->msi_idx, NULL, fwevtq_handler, NULL, -1);
if (err)
t4_free_sge_resources(adap);
return err; return err;
} }
...@@ -5739,6 +5737,13 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5739,6 +5737,13 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err) if (err)
goto out_free_dev; 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 * 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 * registration we do not fail the whole card but rather proceed only
...@@ -5787,10 +5792,10 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5787,10 +5792,10 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
cxgb4_ptp_init(adapter); cxgb4_ptp_init(adapter);
print_adapter_info(adapter); print_adapter_info(adapter);
setup_fw_sge_queues(adapter);
return 0; return 0;
out_free_dev: out_free_dev:
t4_free_sge_resources(adapter);
free_some_resources(adapter); free_some_resources(adapter);
if (adapter->flags & USING_MSIX) if (adapter->flags & USING_MSIX)
free_msix_info(adapter); free_msix_info(adapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment