Skip to contentSkip to conversation

ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests

PATCH In review Bartlomiej Zolnierkiewicz 1 participant 1 message Dec 9, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 19/20 ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests

Based on the earlier work by Tejun Heo.

There should be no functionality changes caused by this patch.

---
 drivers/ide/ide-iops.c     |    4 +-
 drivers/ide/ide-taskfile.c |   63 ++++++++++++++++++++++-----------------------
 2 files changed, 33 insertions(+), 34 deletions(-)
drivers/ide/ide-iops.c +2 -2
Index: b/drivers/ide/ide-iops.c
===================================================================
@@ -619,7 +619,7 @@ no_80w:
 int ide_ata66_check (ide_drive_t *drive, ide_task_t *args)
 {
 	if (args->tf.command == WIN_SETFEATURES &&
-	    args->tf.lbal > XFER_UDMA_2 &&
+	    args->tf.nsect > XFER_UDMA_2 &&
 	    args->tf.feature == SETFEATURES_XFER) {
 		if (eighty_ninty_three(drive) == 0) {
 			printk(KERN_WARNING "%s: UDMA speeds >UDMA33 cannot "
@@ -639,7 +639,7 @@ int ide_ata66_check (ide_drive_t *drive,
 int set_transfer (ide_drive_t *drive, ide_task_t *args)
 {
 	if (args->tf.command == WIN_SETFEATURES &&
-	    args->tf.lbal >= XFER_SW_DMA_0 &&
+	    args->tf.nsect >= XFER_SW_DMA_0 &&
 	    args->tf.feature == SETFEATURES_XFER &&
 	    (drive->id->dma_ultra ||
 	     drive->id->dma_mword ||
drivers/ide/ide-taskfile.c +31 -32

95 lines not on this page · raw message