scsi: qedf: Print fcport information on wait for upload timeout
authorSaurav Kashyap <skashyap@marvell.com>
Mon, 22 Apr 2019 05:44:59 +0000 (22:44 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 29 Apr 2019 12:34:09 +0000 (08:34 -0400)
Log fcport for which upload failed.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_main.c

index 1de2b18dd96a7504053b9eff87e612eb7ef64e10..ffe536e6e0e403ce7a7b29f8837bbd0753351bd6 100644 (file)
@@ -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);