patch-2.4.25 linux-2.4.25/drivers/ide/ide-iops.c

Next file: linux-2.4.25/drivers/ide/ide-proc.c
Previous file: linux-2.4.25/drivers/ide/Config.in
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/drivers/ide/ide-iops.c linux-2.4.25/drivers/ide/ide-iops.c
@@ -666,6 +666,15 @@
 		timeout += jiffies;
 		while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
 			if (time_after(jiffies, timeout)) {
+				/*
+				 * One last read after the timeout in case
+				 * heavy interrupt load made us not make any
+				 * progress during the timeout..
+				 */
+				stat = hwif->INB(IDE_STATUS_REG);
+				if (!(stat & BUSY_STAT))
+					break;
+
 				local_irq_restore(flags);
 				*startstop = DRIVER(drive)->error(drive, "status timeout", stat);
 				return 1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)