scsi: libsas: fix ata xfer length
[pandora-kernel.git] / drivers / scsi / atp870u.c
index 7e6eca4..59fc5a1 100644 (file)
@@ -1174,7 +1174,16 @@ wait_io1:
        outw(val, tmport);
        outb(2, 0x80);
 TCM_SYNC:
-       udelay(0x800);
+       /*
+        * The funny division into multiple delays is to accomodate
+        * arches like ARM where udelay() multiplies its argument by
+        * a large number to initialize a loop counter.  To avoid
+        * overflow, the maximum supported udelay is 2000 microseconds.
+        *
+        * XXX it would be more polite to find a way to use msleep()
+        */
+       mdelay(2);
+       udelay(48);
        if ((inb(tmport) & 0x80) == 0x00) {     /* bsy ? */
                outw(0, tmport--);
                outb(0, tmport);