From: Jitendra Bhivare Date: Fri, 19 Aug 2016 09:50:00 +0000 (+0530) Subject: scsi: be2iscsi: Reduce driver load/unload time X-Git-Tag: v4.1.12-98.0.20170517_2143~42^2~79 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=386c24f6a1c15ec203c8778033022fc8a2099f98;p=users%2Fjedix%2Flinux-maple.git scsi: be2iscsi: Reduce driver load/unload time Orabug: 25655127 Driver takes significant time to load 1m:20s and unload 40s. Checkpatch script threw warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt To eliminate this warning msleep(1) was replaced with msleep(20) before submitting. msleep(20) in init and uninit path for creation and destroying of number of WRBQs, CQs, and EQs is adding to load/unload time. Replace msleep with schedule_timeout_uninterruptible of 1ms as its enough in most cases. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Ethan Zhao Signed-off-by: Dhaval Giani --- diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 60487069e3e60..d9e2cbdaeda6a 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -655,7 +655,8 @@ static int be_mbox_db_ready_poll(struct be_ctrl_info *ctrl) if (time_after(jiffies, timeout)) break; - msleep(20); + /* 1ms sleep is enough in most cases */ + schedule_timeout_uninterruptible(msecs_to_jiffies(1)); } while (!ready); beiscsi_log(phba, KERN_ERR,