Skip to content

Commit

Permalink
scsi: qedf: Get dev info after updating the params
Browse files Browse the repository at this point in the history
An update to pf params can change the devinfo. Get updated device
information.

[mkp: updated error message spotted by Sergei Shtylyov]

Link: https://lore.kernel.org/r/20200416084314.18851-10-skashyap@marvell.com
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Saurav Kashyap authored and Martin K. Petersen committed Apr 17, 2020
1 parent ad40f52 commit 7109cb5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/scsi/qedf/qedf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3324,6 +3324,13 @@ 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 fill dev info.\n");
goto err2;
}

/* 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;
Expand Down

0 comments on commit 7109cb5

Please sign in to comment.