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>
**/
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;
if (time_after(jiffies, timeout))
break;
- mdelay(1);
+ msleep(20);
} while (!ready);
beiscsi_log(phba, KERN_ERR,