be2iscsi: Set mbox timeout to 30s
authorJitendra Bhivare <jitendra.bhivare@avagotech.com>
Wed, 20 Jan 2016 08:40:49 +0000 (14:10 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
FW recommended timeout for all mbox command is 30s.  Use msleep instead
mdelay to relinquish CPU when polling for mbox completion.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_cmds.c

index db0314985e7296fe40d76e79ae27b5eb6fcd6a26..f93ab6d937f4675e5e43a59e6a5f487838354727 100644 (file)
@@ -590,7 +590,8 @@ int be_mcc_notify_wait(struct beiscsi_hba *phba, unsigned int tag)
  **/
 static int be_mbox_db_ready_wait(struct be_ctrl_info *ctrl)
 {
-#define BEISCSI_MBX_RDY_BIT_TIMEOUT    12000   /* 12sec */
+       /* wait 30s for generic non-flash MBOX operation */
+#define BEISCSI_MBX_RDY_BIT_TIMEOUT    30000
        void __iomem *db = ctrl->db + MPU_MAILBOX_DB_OFFSET;
        struct beiscsi_hba *phba = pci_get_drvdata(ctrl->pdev);
        unsigned long timeout;
@@ -615,7 +616,7 @@ static int be_mbox_db_ready_wait(struct be_ctrl_info *ctrl)
 
                if (time_after(jiffies, timeout))
                        break;
-               mdelay(1);
+               msleep(20);
        } while (!ready);
 
        beiscsi_log(phba, KERN_ERR,