scsi: qedf: Limit number of CQs
FCOE offloading failed with:
[qed_sp_fcoe_func_start:150(sp-0-3b:00.02)]Cannot satisfy CQ amount. CQs
requested 8, CQs available 6. Aborting function start
[qed_fcoe_start:821()]Failed to start fcoe
[__qedf_probe:3041]:6: Cannot start FCoE function.
The reason is a newly introduced check in the qed main part. This change
also provides the information about how many CQs are available, so we
simply limit the number of requested CQs..
Fixes: 3c5da94278
("qed: Share additional information with qedf")
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
f9f22a8691
commit
722477c4f2
|
@ -528,7 +528,8 @@ struct fip_vlan {
|
||||||
#define QEDF_WRITE (1 << 0)
|
#define QEDF_WRITE (1 << 0)
|
||||||
#define MAX_FIBRE_LUNS 0xffffffff
|
#define MAX_FIBRE_LUNS 0xffffffff
|
||||||
|
|
||||||
#define QEDF_MAX_NUM_CQS 8
|
#define MIN_NUM_CPUS_MSIX(x) min_t(u32, x->dev_info.num_cqs, \
|
||||||
|
num_online_cpus())
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PCI function probe defines
|
* PCI function probe defines
|
||||||
|
|
|
@ -2760,11 +2760,9 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx *qedf)
|
||||||
* we allocation is the minimum off:
|
* we allocation is the minimum off:
|
||||||
*
|
*
|
||||||
* Number of CPUs
|
* Number of CPUs
|
||||||
* Number of MSI-X vectors
|
* Number allocated by qed for our PCI function
|
||||||
* Max number allocated in hardware (QEDF_MAX_NUM_CQS)
|
|
||||||
*/
|
*/
|
||||||
qedf->num_queues = min((unsigned int)QEDF_MAX_NUM_CQS,
|
qedf->num_queues = MIN_NUM_CPUS_MSIX(qedf);
|
||||||
num_online_cpus());
|
|
||||||
|
|
||||||
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "Number of CQs is %d.\n",
|
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "Number of CQs is %d.\n",
|
||||||
qedf->num_queues);
|
qedf->num_queues);
|
||||||
|
@ -2962,6 +2960,13 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Learn information crucial for qedf to progress */
|
||||||
|
rc = qed_ops->fill_dev_info(qedf->cdev, &qedf->dev_info);
|
||||||
|
if (rc) {
|
||||||
|
QEDF_ERR(&(qedf->dbg_ctx), "Failed to dev info.\n");
|
||||||
|
goto err1;
|
||||||
|
}
|
||||||
|
|
||||||
/* queue allocation code should come here
|
/* queue allocation code should come here
|
||||||
* order should be
|
* order should be
|
||||||
* slowpath_start
|
* slowpath_start
|
||||||
|
@ -2977,13 +2982,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
|
||||||
}
|
}
|
||||||
qed_ops->common->update_pf_params(qedf->cdev, &qedf->pf_params);
|
qed_ops->common->update_pf_params(qedf->cdev, &qedf->pf_params);
|
||||||
|
|
||||||
/* Learn information crucial for qedf to progress */
|
|
||||||
rc = qed_ops->fill_dev_info(qedf->cdev, &qedf->dev_info);
|
|
||||||
if (rc) {
|
|
||||||
QEDF_ERR(&(qedf->dbg_ctx), "Failed to dev info.\n");
|
|
||||||
goto err1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Record BDQ producer doorbell addresses */
|
/* Record BDQ producer doorbell addresses */
|
||||||
qedf->bdq_primary_prod = qedf->dev_info.primary_dbq_rq_addr;
|
qedf->bdq_primary_prod = qedf->dev_info.primary_dbq_rq_addr;
|
||||||
qedf->bdq_secondary_prod = qedf->dev_info.secondary_bdq_rq_addr;
|
qedf->bdq_secondary_prod = qedf->dev_info.secondary_bdq_rq_addr;
|
||||||
|
|
Loading…
Reference in New Issue