diff options
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 54f9639c2a8c..62ebefd6394a 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -51,8 +51,6 @@ | |||
51 | #include <asm/uaccess.h> | 51 | #include <asm/uaccess.h> |
52 | #include <asm/io.h> | 52 | #include <asm/io.h> |
53 | 53 | ||
54 | #define DEBUG_TASKFILE 0 /* unset when fixed */ | ||
55 | |||
56 | static void ata_bswap_data (void *buffer, int wcount) | 54 | static void ata_bswap_data (void *buffer, int wcount) |
57 | { | 55 | { |
58 | u16 *p = buffer; | 56 | u16 *p = buffer; |
@@ -765,9 +763,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
765 | ide_hwif_t *hwif = HWIF(drive); | 763 | ide_hwif_t *hwif = HWIF(drive); |
766 | task_struct_t *taskfile = (task_struct_t *) task->tfRegister; | 764 | task_struct_t *taskfile = (task_struct_t *) task->tfRegister; |
767 | hob_struct_t *hobfile = (hob_struct_t *) task->hobRegister; | 765 | hob_struct_t *hobfile = (hob_struct_t *) task->hobRegister; |
768 | #if DEBUG_TASKFILE | ||
769 | u8 status; | ||
770 | #endif | ||
771 | 766 | ||
772 | if (task->data_phase == TASKFILE_MULTI_IN || | 767 | if (task->data_phase == TASKFILE_MULTI_IN || |
773 | task->data_phase == TASKFILE_MULTI_OUT) { | 768 | task->data_phase == TASKFILE_MULTI_OUT) { |
@@ -778,19 +773,13 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
778 | } | 773 | } |
779 | 774 | ||
780 | /* | 775 | /* |
781 | * (ks) Check taskfile in/out flags. | 776 | * (ks) Check taskfile in flags. |
782 | * If set, then execute as it is defined. | 777 | * If set, then execute as it is defined. |
783 | * If not set, then define default settings. | 778 | * If not set, then define default settings. |
784 | * The default values are: | 779 | * The default values are: |
785 | * write and read all taskfile registers (except data) | 780 | * read all taskfile registers (except data) |
786 | * write and read the hob registers (sector,nsector,lcyl,hcyl) | 781 | * read the hob registers (sector, nsector, lcyl, hcyl) |
787 | */ | 782 | */ |
788 | if (task->tf_out_flags.all == 0) { | ||
789 | task->tf_out_flags.all = IDE_TASKFILE_STD_OUT_FLAGS; | ||
790 | if (drive->addressing == 1) | ||
791 | task->tf_out_flags.all |= (IDE_HOB_STD_OUT_FLAGS << 8); | ||
792 | } | ||
793 | |||
794 | if (task->tf_in_flags.all == 0) { | 783 | if (task->tf_in_flags.all == 0) { |
795 | task->tf_in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; | 784 | task->tf_in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; |
796 | if (drive->addressing == 1) | 785 | if (drive->addressing == 1) |
@@ -803,16 +792,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
803 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); | 792 | hwif->OUTB(drive->ctl, IDE_CONTROL_REG); |
804 | SELECT_MASK(drive, 0); | 793 | SELECT_MASK(drive, 0); |
805 | 794 | ||
806 | #if DEBUG_TASKFILE | ||
807 | status = hwif->INB(IDE_STATUS_REG); | ||
808 | if (status & 0x80) { | ||
809 | printk("flagged_taskfile -> Bad status. Status = %02x. wait 100 usec ...\n", status); | ||
810 | udelay(100); | ||
811 | status = hwif->INB(IDE_STATUS_REG); | ||
812 | printk("flagged_taskfile -> Status = %02x\n", status); | ||
813 | } | ||
814 | #endif | ||
815 | |||
816 | if (task->tf_out_flags.b.data) { | 795 | if (task->tf_out_flags.b.data) { |
817 | u16 data = taskfile->data + (hobfile->data << 8); | 796 | u16 data = taskfile->data + (hobfile->data << 8); |
818 | hwif->OUTW(data, IDE_DATA_REG); | 797 | hwif->OUTW(data, IDE_DATA_REG); |