Commit 4b9b7fab authored by Chad Dupuis's avatar Chad Dupuis Committed by Martin K. Petersen

scsi: qedf: Improve firmware debug dump handling

Get all firmware debug data instead of just a grc dump.
Signed-off-by: default avatarChad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f9a4a7f2
...@@ -367,6 +367,7 @@ struct qedf_ctx { ...@@ -367,6 +367,7 @@ struct qedf_ctx {
#define QEDF_IO_WORK_MIN 64 #define QEDF_IO_WORK_MIN 64
mempool_t *io_mempool; mempool_t *io_mempool;
struct workqueue_struct *dpc_wq; struct workqueue_struct *dpc_wq;
struct delayed_work grcdump_work;
u32 slow_sge_ios; u32 slow_sge_ios;
u32 fast_sge_ios; u32 fast_sge_ios;
...@@ -499,6 +500,7 @@ extern void qedf_process_seq_cleanup_compl(struct qedf_ctx *qedf, ...@@ -499,6 +500,7 @@ extern void qedf_process_seq_cleanup_compl(struct qedf_ctx *qedf,
struct fcoe_cqe *cqe, struct qedf_ioreq *io_req); struct fcoe_cqe *cqe, struct qedf_ioreq *io_req);
extern int qedf_send_flogi(struct qedf_ctx *qedf); extern int qedf_send_flogi(struct qedf_ctx *qedf);
extern void qedf_fp_io_handler(struct work_struct *work); extern void qedf_fp_io_handler(struct work_struct *work);
extern void qedf_wq_grcdump(struct work_struct *work);
#define FCOE_WORD_TO_BYTE 4 #define FCOE_WORD_TO_BYTE 4
#define QEDF_MAX_TASK_NUM 0xFFFF #define QEDF_MAX_TASK_NUM 0xFFFF
......
...@@ -147,7 +147,7 @@ qedf_get_grc_dump(struct qed_dev *cdev, const struct qed_common_ops *common, ...@@ -147,7 +147,7 @@ qedf_get_grc_dump(struct qed_dev *cdev, const struct qed_common_ops *common,
if (!*buf) if (!*buf)
return -EINVAL; return -EINVAL;
return common->dbg_grc(cdev, *buf, grcsize); return common->dbg_all_data(cdev, *buf);
} }
void void
......
...@@ -3008,6 +3008,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) ...@@ -3008,6 +3008,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
qedf->link_update_wq = create_workqueue(host_buf); qedf->link_update_wq = create_workqueue(host_buf);
INIT_DELAYED_WORK(&qedf->link_update, qedf_handle_link_update); INIT_DELAYED_WORK(&qedf->link_update, qedf_handle_link_update);
INIT_DELAYED_WORK(&qedf->link_recovery, qedf_link_recovery); INIT_DELAYED_WORK(&qedf->link_recovery, qedf_link_recovery);
INIT_DELAYED_WORK(&qedf->grcdump_work, qedf_wq_grcdump);
qedf->fipvlan_retries = qedf_fipvlan_retries; qedf->fipvlan_retries = qedf_fipvlan_retries;
/* Set a default prio in case DCBX doesn't converge */ /* Set a default prio in case DCBX doesn't converge */
qedf->prio = QEDF_DEFAULT_PRIO; qedf->prio = QEDF_DEFAULT_PRIO;
...@@ -3240,7 +3241,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) ...@@ -3240,7 +3241,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
* unload process. * unload process.
*/ */
if (mode != QEDF_MODE_RECOVERY) { if (mode != QEDF_MODE_RECOVERY) {
qedf->grcdump_size = qed_ops->common->dbg_grc_size(qedf->cdev); qedf->grcdump_size =
qed_ops->common->dbg_all_data_size(qedf->cdev);
if (qedf->grcdump_size) { if (qedf->grcdump_size) {
rc = qedf_alloc_grc_dump_buf(&qedf->grcdump, rc = qedf_alloc_grc_dump_buf(&qedf->grcdump,
qedf->grcdump_size); qedf->grcdump_size);
...@@ -3424,6 +3426,15 @@ static void qedf_remove(struct pci_dev *pdev) ...@@ -3424,6 +3426,15 @@ static void qedf_remove(struct pci_dev *pdev)
__qedf_remove(pdev, QEDF_MODE_NORMAL); __qedf_remove(pdev, QEDF_MODE_NORMAL);
} }
void qedf_wq_grcdump(struct work_struct *work)
{
struct qedf_ctx *qedf =
container_of(work, struct qedf_ctx, grcdump_work.work);
QEDF_ERR(&(qedf->dbg_ctx), "Collecting GRC dump.\n");
qedf_capture_grc_dump(qedf);
}
/* /*
* Module Init/Remove * Module Init/Remove
*/ */
......
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