patch-2.2.16 linux/drivers/block/ide-disk.c

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

diff -urN v2.2.15/linux/drivers/block/ide-disk.c linux/drivers/block/ide-disk.c
@@ -94,8 +94,11 @@
 	 * The ATA spec tells large drives to return
 	 * C/H/S = 16383/16/63 independent of their size.
 	 * Some drives can be jumpered to use 15 heads instead of 16.
+	 * Some drives can be jumpered to use 4092 cyls instead of 16383.
 	 */
-	if (id->cyls == 16383 && id->sectors == 63 &&
+	if ((id->cyls == 16383
+	     || (id->cyls == 4092 && id->cur_cyls == 16383)) &&
+	    id->sectors == 63 &&
 	    (id->heads == 15 || id->heads == 16) &&
 	    id->lba_capacity >= 16383*63*id->heads)
 		return 1;
@@ -138,7 +141,7 @@
 			return ide_error(drive, "read_intr", stat);
 		}
 		/* no data yet, so wait for another interrupt */
-		ide_set_handler(drive, &read_intr, WAIT_CMD);
+		ide_set_handler(drive, &read_intr, WAIT_CMD, NULL);
 		return ide_started;
 	}
 #endif
@@ -167,7 +170,7 @@
 	if (i > 0) {
 		if (msect)
 			goto read_next;
-		ide_set_handler (drive, &read_intr, WAIT_CMD);
+		ide_set_handler (drive, &read_intr, WAIT_CMD, NULL);
 		return ide_started;
 	}
 	return ide_stopped;
@@ -201,7 +204,7 @@
 				ide_end_request(1, hwgroup);
 			if (i > 0) {
 				idedisk_output_data (drive, rq->buffer, SECTOR_WORDS);
-				ide_set_handler (drive, &write_intr, WAIT_CMD);
+				ide_set_handler (drive, &write_intr, WAIT_CMD, NULL);
 				return ide_started;
 			}
 			return ide_stopped;
@@ -309,7 +312,7 @@
 			if (rq->nr_sectors) {
 				if (ide_multwrite(drive, drive->mult_count))
 					return ide_stopped;
-				ide_set_handler (drive, &multwrite_intr, WAIT_CMD);
+				ide_set_handler (drive, &multwrite_intr, WAIT_CMD, NULL);
 				return ide_started;
 			}
 		} else {
@@ -432,7 +435,7 @@
 		if (drive->using_dma && !(HWIF(drive)->dmaproc(ide_dma_read, drive)))
 			return ide_started;
 #endif /* CONFIG_BLK_DEV_IDEDMA */
-		ide_set_handler(drive, &read_intr, WAIT_CMD);
+		ide_set_handler(drive, &read_intr, WAIT_CMD, NULL);
 		OUT_BYTE(drive->mult_count ? WIN_MULTREAD : WIN_READ, IDE_COMMAND_REG);
 		return ide_started;
 	}
@@ -462,7 +465,7 @@
 			 * Except when you get an error it seems...
 			 */
 			hwgroup->wrq = *rq; /* scratchpad */
-			ide_set_handler (drive, &multwrite_intr, WAIT_CMD);
+			ide_set_handler (drive, &multwrite_intr, WAIT_CMD, NULL);
 			if (ide_multwrite(drive, drive->mult_count)) {
 				unsigned long flags;
 				spin_lock_irqsave(&io_request_lock, flags);
@@ -472,7 +475,7 @@
 				return ide_stopped;
 			}
 		} else {
-			ide_set_handler (drive, &write_intr, WAIT_CMD);
+			ide_set_handler (drive, &write_intr, WAIT_CMD, NULL);
 			idedisk_output_data(drive, rq->buffer, SECTOR_WORDS);
 		}
 		return ide_started;

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