Skip to contentSkip to conversation

scsi: Fix bad use of udelay in atp870u.c

PATCH New Martin Michlmayr 1 participant 1 message Sep 30, 2008 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: Fix bad use of udelay in atp870u.c

The ACARD driver calls udelay() with a value > 2000, which leads to to the following compilation error on ARM:
ERROR: "__bad_udelay" [drivers/scsi/atp870u.ko] undefined! make[1]: *** [__modpost] Error 1
Fix this by using a combination of mdelay and udelay.

drivers/scsi/atp870u.c +2 -1
@@ -1171,7 +1171,8 @@ wait_io1:
 	outw(val, tmport);
 	outb(2, 0x80);
 TCM_SYNC:
-	udelay(0x800);
+	mdelay(2);
+	udelay(48);
 	if ((inb(tmport) & 0x80) == 0x00) {	/* bsy ? */
 		outw(0, tmport--);
 		outb(0, tmport);
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/