aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-iops.c18
-rw-r--r--drivers/ide/ide-taskfile.c6
-rw-r--r--include/linux/ide.h1
3 files changed, 5 insertions, 20 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 09069da22749..99fe50e941be 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -627,24 +627,6 @@ int ide_ata66_check (ide_drive_t *drive, ide_task_t *args)
627 return 0; 627 return 0;
628} 628}
629 629
630/*
631 * Backside of HDIO_DRIVE_CMD call of SETFEATURES_XFER.
632 * 1 : Safe to update drive->id DMA registers.
633 * 0 : OOPs not allowed.
634 */
635int set_transfer (ide_drive_t *drive, ide_task_t *args)
636{
637 if (args->tf.command == WIN_SETFEATURES &&
638 args->tf.nsect >= XFER_SW_DMA_0 &&
639 args->tf.feature == SETFEATURES_XFER &&
640 (drive->id->dma_ultra ||
641 drive->id->dma_mword ||
642 drive->id->dma_1word))
643 return 1;
644
645 return 0;
646}
647
648#ifdef CONFIG_BLK_DEV_IDEDMA 630#ifdef CONFIG_BLK_DEV_IDEDMA
649static u8 ide_auto_reduce_xfer (ide_drive_t *drive) 631static u8 ide_auto_reduce_xfer (ide_drive_t *drive)
650{ 632{
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 16a9a581d089..bf72b6d9f685 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -755,6 +755,7 @@ int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
755 u8 args[4], xfer_rate = 0; 755 u8 args[4], xfer_rate = 0;
756 ide_task_t tfargs; 756 ide_task_t tfargs;
757 struct ide_taskfile *tf = &tfargs.tf; 757 struct ide_taskfile *tf = &tfargs.tf;
758 struct hd_driveid *id = drive->id;
758 759
759 if (NULL == (void *) arg) { 760 if (NULL == (void *) arg) {
760 struct request rq; 761 struct request rq;
@@ -792,7 +793,10 @@ int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
792 return -ENOMEM; 793 return -ENOMEM;
793 } 794 }
794 795
795 if (set_transfer(drive, &tfargs)) { 796 if (tf->command == WIN_SETFEATURES &&
797 tf->feature == SETFEATURES_XFER &&
798 tf->nsect >= XFER_SW_DMA_0 &&
799 (id->dma_ultra || id->dma_mword || id->dma_1word)) {
796 xfer_rate = args[1]; 800 xfer_rate = args[1];
797 if (ide_ata66_check(drive, &tfargs)) 801 if (ide_ata66_check(drive, &tfargs))
798 goto abort; 802 goto abort;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index e2048d2ca64c..b41eb7d12cd2 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -991,7 +991,6 @@ extern int ide_driveid_update(ide_drive_t *);
991extern int ide_ata66_check(ide_drive_t *, ide_task_t *); 991extern int ide_ata66_check(ide_drive_t *, ide_task_t *);
992extern int ide_config_drive_speed(ide_drive_t *, u8); 992extern int ide_config_drive_speed(ide_drive_t *, u8);
993extern u8 eighty_ninty_three (ide_drive_t *); 993extern u8 eighty_ninty_three (ide_drive_t *);
994extern int set_transfer(ide_drive_t *, ide_task_t *);
995extern int taskfile_lib_get_identify(ide_drive_t *drive, u8 *); 994extern int taskfile_lib_get_identify(ide_drive_t *drive, u8 *);
996 995
997extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout); 996extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout);