diff mbox series

[10/12] qedf: Print fcport information on wait for upload timeout.

Message ID 20190422054501.3224-11-skashyap@marvell.com (mailing list archive)
State Mainlined
Commit 7fa4142d8bdc7a6255844ba2edfcca4f28805ab4
Headers show
Series qedf: Changes to log messages | expand

Commit Message

Saurav Kashyap April 22, 2019, 5:44 a.m. UTC
- Log fcport for which upload failed.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
---
 drivers/scsi/qedf/qedf_main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 1de2b18..ffe536e 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -786,11 +786,13 @@  static int qedf_eh_device_reset(struct scsi_cmnd *sc_cmd)
 bool qedf_wait_for_upload(struct qedf_ctx *qedf)
 {
 	struct qedf_rport *fcport = NULL;
+	int wait_cnt = 120;
 
-	while (1) {
+	while (wait_cnt--) {
 		if (atomic_read(&qedf->num_offloads))
-			QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC,
-			    "Waiting for all uploads to complete.\n");
+			QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_DISC,
+				  "Waiting for all uploads to complete num_offloads = 0x%x.\n",
+				  atomic_read(&qedf->num_offloads));
 		else
 			return true;
 		msleep(500);