From ad456c186af4da1ca0676ec60b6afeb52116ee27 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 24 Sep 2004 00:47:39 -0400 Subject: [PATCH] [PATCH] QLogic ISP2x00: remove needless busyloop From: Bjorn Helgaas There's no need to wait for an isp2x00 to recognize a fabric if there's no isp2x00. Probably nobody will notice the unnecessary slowdown on real hardware, but it's a significant delay on a simulator. Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/qlogicfc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c index ef1fdfdc30ee1..3a192e3c911b4 100644 --- a/drivers/scsi/qlogicfc.c +++ b/drivers/scsi/qlogicfc.c @@ -815,9 +815,11 @@ int isp2x00_detect(Scsi_Host_Template * tmpt) some time before recognizing it is attached to a fabric */ #if ISP2x00_FABRIC - for (wait_time = jiffies + 5 * HZ; time_before(jiffies, wait_time);) { - barrier(); - cpu_relax(); + if (hosts) { + for (wait_time = jiffies + 5 * HZ; time_before(jiffies, wait_time);) { + barrier(); + cpu_relax(); + } } #endif -- 2.53.0