patch-2.1.122 linux/drivers/block/ide.c

Next file: linux/drivers/block/ide.h
Previous file: linux/drivers/block/ide-probe.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.121/linux/drivers/block/ide.c linux/drivers/block/ide.c
@@ -1104,6 +1104,10 @@
 			if (sleep) {
 				if (0 < (signed long)(jiffies + WAIT_MIN_SLEEP - sleep)) 
 					sleep = jiffies + WAIT_MIN_SLEEP;
+#if 1
+				if (hwgroup->timer.next || hwgroup->timer.prev)
+					printk("ide_set_handler: timer already active\n");
+#endif
 				mod_timer(&hwgroup->timer, sleep);
 			} else {
 				/* Ugly, but how can we sleep for the lock otherwise? perhaps from tq_scheduler? */
@@ -1253,7 +1257,7 @@
 	}
 	hwgroup->busy = 1;	/* should already be "1" */
 	hwgroup->handler = NULL;
-	del_timer(&hwgroup->timer);
+	del_timer(&hwgroup->timer);	/* Is this needed?? */
 	if (hwgroup->poll_timeout != 0) {	/* polling in progress? */
 		spin_unlock_irqrestore(&hwgroup->spinlock, flags);
 		handler(drive);
@@ -1265,6 +1269,10 @@
 		if (drive->waiting_for_dma) {
 			(void) hwgroup->hwif->dmaproc(ide_dma_end, drive);
 			printk("%s: timeout waiting for DMA\n", drive->name);
+	/*
+	 *  need something here for HX PIIX3 UDMA and HPT343.......AMH
+	 *  irq timeout: status=0x58 { DriveReady SeekComplete DataRequest }
+	 */
 		}
 		spin_unlock_irqrestore(&hwgroup->spinlock, flags);
 		ide_error(drive, "irq timeout", GET_STAT());

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov