]> git.hungrycats.org Git - linux/commitdiff
[PATCH] QLogic ISP2x00: remove needless busyloop
authorAndrew Morton <akpm@osdl.org>
Fri, 24 Sep 2004 04:47:39 +0000 (00:47 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 24 Sep 2004 04:47:39 +0000 (00:47 -0400)
From: Bjorn Helgaas <bjorn.helgaas@hp.com>

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 <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/qlogicfc.c

index ef1fdfdc30ee10b422420ae80ddcee44e0ea0f3c..3a192e3c911b4d220ea50e33f17aab1d9b2ec97d 100644 (file)
@@ -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