[PATCH -mm 3/6] cpu_relax(): floppy.c wait_til_ready()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add cpu_relax() to drivers/block/floppy.c/wait_til_ready()


Should be very useful, methinks.

Tested on 2.6.17-mm1 (load-time only, no floppy media here right now ;).

Signed-off-by: Andreas Mohr <[email protected]>


diff -urN linux-2.6.17-mm1.orig/drivers/block/floppy.c linux-2.6.17-mm1.my/drivers/block/floppy.c
--- linux-2.6.17-mm1.orig/drivers/block/floppy.c	2006-06-21 14:28:16.000000000 +0200
+++ linux-2.6.17-mm1.my/drivers/block/floppy.c	2006-06-21 18:50:37.000000000 +0200
@@ -1155,6 +1155,7 @@
 		status = fd_inb(FD_STATUS);
 		if (status & STATUS_READY)
 			return status;
+		cpu_relax();
 	}
 	if (!initialising) {
 		DPRINT("Getstatus times out (%x) on fdc %d\n", status, fdc);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux