Skip to contentSkip to conversation

cpu_relax(): floppy.c wait_til_ready()

PATCH In review Andreas Mohr 1 participant 1 message Jun 21, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 cpu_relax(): floppy.c wait_til_ready()

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 ;).

drivers/block/floppy.c +1 -0
diff -urN linux-2.6.17-mm1.orig/drivers/block/floppy.c linux-2.6.17-mm1.my/drivers/block/floppy.c
@@ -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);