aic7xxx: ahd_delay() fix
Subsystems (2)
PATCH 15/15 aic7xxx: ahd_delay() fix
From: Denis Vlasenko <[email protected]>
ahd_delay() isn't delaying for as long as it should - each time around the allegedly 1024-usec loop it actually delays for something less than that, depending upon the value of the incoming arg.
Signed-off-by Denis Vlasenko <[email protected]>
Cc James Bottomley <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/aic7xxx/aic79xx_osm_o.c | 6 ++++-- drivers/scsi/aic7xxx/aic7xxx_osm_o.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/scsi/aic7xxx/aic79xx_osm_o.c renamed from drivers/scsi/aic7xxx/aic79xx_osm_o.c~aic7xxx-ahd_delay-fix +4 -2
@@ -28,9 +28,11 @@ ahd_delay(long usec)* multi-millisecond waits. Wait at most * 1024us per call. */ +udelay (usec &1023 ); + usec >>=10 ;while (usec >0 ) { -udelay (usec %1024 ); - usec -=1024 ; +udelay (1024 ); + usec--; } }
drivers/scsi/aic7xxx/aic7xxx_osm_o.c renamed from drivers/scsi/aic7xxx/aic7xxx_osm_o.c~aic7xxx-ahd_delay-fix +4 -2
@@ -14,9 +14,11 @@ ahc_delay(long usec)* multi-millisecond waits. Wait at most * 1024us per call. */ +udelay (usec &1023 ); + usec >>=10 ;while (usec >0 ) { -udelay (usec %1024 ); - usec -=1024 ; +udelay (1024 ); + usec--; } }
_