Merge branch 'fixes' into misc
这个提交包含在:
@@ -526,7 +526,8 @@ struct fip_vlan {
|
||||
#define QEDF_WRITE (1 << 0)
|
||||
#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
|
||||
|
@@ -489,7 +489,7 @@ static void qedf_srr_compl(struct qedf_els_cb_arg *cb_arg)
|
||||
|
||||
/* If a SRR times out, simply free resources */
|
||||
if (srr_req->event == QEDF_IOREQ_EV_ELS_TMO)
|
||||
goto out_free;
|
||||
goto out_put;
|
||||
|
||||
/* Normalize response data into struct fc_frame */
|
||||
mp_req = &(srr_req->mp_req);
|
||||
@@ -501,7 +501,7 @@ static void qedf_srr_compl(struct qedf_els_cb_arg *cb_arg)
|
||||
if (!fp) {
|
||||
QEDF_ERR(&(qedf->dbg_ctx),
|
||||
"fc_frame_alloc failure.\n");
|
||||
goto out_free;
|
||||
goto out_put;
|
||||
}
|
||||
|
||||
/* Copy frame header from firmware into fp */
|
||||
@@ -526,9 +526,10 @@ static void qedf_srr_compl(struct qedf_els_cb_arg *cb_arg)
|
||||
}
|
||||
|
||||
fc_frame_free(fp);
|
||||
out_free:
|
||||
out_put:
|
||||
/* Put reference for original command since SRR completed */
|
||||
kref_put(&orig_io_req->refcount, qedf_release_cmd);
|
||||
out_free:
|
||||
kfree(cb_arg);
|
||||
}
|
||||
|
||||
@@ -780,7 +781,7 @@ static void qedf_rec_compl(struct qedf_els_cb_arg *cb_arg)
|
||||
|
||||
/* If a REC times out, free resources */
|
||||
if (rec_req->event == QEDF_IOREQ_EV_ELS_TMO)
|
||||
goto out_free;
|
||||
goto out_put;
|
||||
|
||||
/* Normalize response data into struct fc_frame */
|
||||
mp_req = &(rec_req->mp_req);
|
||||
@@ -792,7 +793,7 @@ static void qedf_rec_compl(struct qedf_els_cb_arg *cb_arg)
|
||||
if (!fp) {
|
||||
QEDF_ERR(&(qedf->dbg_ctx),
|
||||
"fc_frame_alloc failure.\n");
|
||||
goto out_free;
|
||||
goto out_put;
|
||||
}
|
||||
|
||||
/* Copy frame header from firmware into fp */
|
||||
@@ -884,9 +885,10 @@ static void qedf_rec_compl(struct qedf_els_cb_arg *cb_arg)
|
||||
|
||||
out_free_frame:
|
||||
fc_frame_free(fp);
|
||||
out_free:
|
||||
out_put:
|
||||
/* Put reference for original command since REC completed */
|
||||
kref_put(&orig_io_req->refcount, qedf_release_cmd);
|
||||
out_free:
|
||||
kfree(cb_arg);
|
||||
}
|
||||
|
||||
|
@@ -2797,11 +2797,9 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx *qedf)
|
||||
* we allocation is the minimum off:
|
||||
*
|
||||
* Number of CPUs
|
||||
* Number of MSI-X vectors
|
||||
* Max number allocated in hardware (QEDF_MAX_NUM_CQS)
|
||||
* Number allocated by qed for our PCI function
|
||||
*/
|
||||
qedf->num_queues = min((unsigned int)QEDF_MAX_NUM_CQS,
|
||||
num_online_cpus());
|
||||
qedf->num_queues = MIN_NUM_CPUS_MSIX(qedf);
|
||||
|
||||
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "Number of CQs is %d.\n",
|
||||
qedf->num_queues);
|
||||
@@ -2999,6 +2997,13 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
|
||||
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
|
||||
* order should be
|
||||
* slowpath_start
|
||||
@@ -3014,13 +3019,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
|
||||
}
|
||||
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 */
|
||||
qedf->bdq_primary_prod = qedf->dev_info.primary_dbq_rq_addr;
|
||||
qedf->bdq_secondary_prod = qedf->dev_info.secondary_bdq_rq_addr;
|
||||
|
在新工单中引用
屏蔽一个用户