patch-2.3.26 linux/drivers/block/pdc4030.c

Next file: linux/drivers/block/trm290.c
Previous file: linux/drivers/block/loop.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.25/linux/drivers/block/pdc4030.c linux/drivers/block/pdc4030.c
@@ -162,7 +162,6 @@
 	if (!hwif) return 0;
 
 	drive = &hwif->drives[0];
-	drive->timeout = HZ/100;
 	hwif2 = &ide_hwifs[hwif->index+1];
 	if (hwif->chipset == ide_pdc4030) /* we've already been found ! */
 		return 1;
@@ -309,9 +308,6 @@
 	unsigned int sectors_left, sectors_avail, nsect;
 	struct request *rq;
 
-	/* reset timeout */
-	drive->timeout = HZ/100;
-	
 	if (!OK_STAT(stat=GET_STAT(),DATA_READY,BAD_R_STAT)) {
 		ide_error(drive, "promise_read_intr", stat);
 		return;
@@ -366,8 +362,7 @@
 		if (stat & DRQ_STAT)
 			goto read_again;
 		if (stat & BUSY_STAT) {
-			drive->timeout = WAIT_CMD;
-			ide_set_handler (drive, &promise_read_intr);
+			ide_set_handler (drive, &promise_read_intr, WAIT_CMD, NULL);
 #ifdef DEBUG_READ
 			printk(KERN_DEBUG "%s: promise_read: waiting for"
 			       "interrupt\n", drive->name);
@@ -396,7 +391,7 @@
 
 	if (GET_STAT() & BUSY_STAT) {
 		if (time_before(jiffies, hwgroup->poll_timeout)) {
-			ide_set_handler(drive, &promise_complete_pollfunc);
+			ide_set_handler(drive, &promise_complete_pollfunc, HZ/100, NULL);
 			return; /* continue polling... */
 		}
 		hwgroup->poll_timeout = 0;
@@ -425,7 +420,7 @@
 
 	if (IN_BYTE(IDE_NSECTOR_REG) != 0) {
 		if (time_before(jiffies, hwgroup->poll_timeout)) {
-			ide_set_handler (drive, &promise_write_pollfunc);
+			ide_set_handler (drive, &promise_write_pollfunc, HZ/100, NULL);
 			return; /* continue polling... */
 		}
 		hwgroup->poll_timeout = 0;
@@ -439,7 +434,7 @@
 	 */
 	ide_multwrite(drive, 4);
 	hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE;
-	ide_set_handler(drive, &promise_complete_pollfunc);
+	ide_set_handler(drive, &promise_complete_pollfunc, HZ/100, NULL);
 #ifdef DEBUG_WRITE
 	printk(KERN_DEBUG "%s: Done last 4 sectors - status = %02x\n",
 		drive->name, GET_STAT());
@@ -472,7 +467,7 @@
 	if (rq->nr_sectors > 4) {
 		ide_multwrite(drive, rq->nr_sectors - 4);
 		hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE;
-		ide_set_handler (drive, &promise_write_pollfunc);
+		ide_set_handler (drive, &promise_write_pollfunc, HZ/100, NULL);
 	} else {
 	/*
 	 * There are 4 or fewer sectors to transfer, do them all in one go
@@ -480,7 +475,7 @@
 	 */
 		ide_multwrite(drive, rq->nr_sectors);
 		hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE;
-		ide_set_handler(drive, &promise_complete_pollfunc);
+		ide_set_handler(drive, &promise_complete_pollfunc, HZ/100, NULL);
 #ifdef DEBUG_WRITE
 		printk(KERN_DEBUG "%s: promise_write: <= 4 sectors, "
 			"status = %02x\n", drive->name, GET_STAT());
@@ -523,8 +518,7 @@
 				printk(KERN_DEBUG "%s: read: waiting for "
 				                  "interrupt\n", drive->name);
 #endif
-				drive->timeout = WAIT_CMD;
-				ide_set_handler(drive, &promise_read_intr);
+				ide_set_handler(drive, &promise_read_intr, WAIT_CMD, NULL);
 				return;
 			}
 			udelay(1);

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