aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r--drivers/ide/ide-iops.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index e17a9ee120ea..bb9693dabe41 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -303,9 +303,6 @@ void default_hwif_transport(ide_hwif_t *hwif)
303 hwif->atapi_output_bytes = atapi_output_bytes; 303 hwif->atapi_output_bytes = atapi_output_bytes;
304} 304}
305 305
306/*
307 * Beginning of Taskfile OPCODE Library and feature sets.
308 */
309void ide_fix_driveid (struct hd_driveid *id) 306void ide_fix_driveid (struct hd_driveid *id)
310{ 307{
311#ifndef __LITTLE_ENDIAN 308#ifndef __LITTLE_ENDIAN
@@ -592,6 +589,9 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list);
592static const struct drive_list_entry ivb_list[] = { 589static const struct drive_list_entry ivb_list[] = {
593 { "QUANTUM FIREBALLlct10 05" , "A03.0900" }, 590 { "QUANTUM FIREBALLlct10 05" , "A03.0900" },
594 { "TSSTcorp CDDVDW SH-S202J" , "SB00" }, 591 { "TSSTcorp CDDVDW SH-S202J" , "SB00" },
592 { "TSSTcorp CDDVDW SH-S202J" , "SB01" },
593 { "TSSTcorp CDDVDW SH-S202N" , "SB00" },
594 { "TSSTcorp CDDVDW SH-S202N" , "SB01" },
595 { NULL , NULL } 595 { NULL , NULL }
596}; 596};
597 597
@@ -612,12 +612,12 @@ u8 eighty_ninty_three (ide_drive_t *drive)
612 printk(KERN_DEBUG "%s: skipping word 93 validity check\n", 612 printk(KERN_DEBUG "%s: skipping word 93 validity check\n",
613 drive->name); 613 drive->name);
614 614
615 if (ide_dev_is_sata(id) && !ivb)
616 return 1;
617
615 if (hwif->cbl != ATA_CBL_PATA80 && !ivb) 618 if (hwif->cbl != ATA_CBL_PATA80 && !ivb)
616 goto no_80w; 619 goto no_80w;
617 620
618 if (ide_dev_is_sata(id))
619 return 1;
620
621 /* 621 /*
622 * FIXME: 622 * FIXME:
623 * - force bit13 (80c cable present) check also for !ivb devices 623 * - force bit13 (80c cable present) check also for !ivb devices
@@ -748,6 +748,9 @@ int ide_driveid_update(ide_drive_t *drive)
748 drive->id->dma_1word = id->dma_1word; 748 drive->id->dma_1word = id->dma_1word;
749 /* anything more ? */ 749 /* anything more ? */
750 kfree(id); 750 kfree(id);
751
752 if (drive->using_dma && ide_id_dma_bug(drive))
753 ide_dma_off(drive);
751 } 754 }
752 755
753 return 1; 756 return 1;
@@ -756,7 +759,7 @@ int ide_driveid_update(ide_drive_t *drive)
756int ide_config_drive_speed(ide_drive_t *drive, u8 speed) 759int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
757{ 760{
758 ide_hwif_t *hwif = drive->hwif; 761 ide_hwif_t *hwif = drive->hwif;
759 int error; 762 int error = 0;
760 u8 stat; 763 u8 stat;
761 764
762// while (HWGROUP(drive)->busy) 765// while (HWGROUP(drive)->busy)
@@ -767,6 +770,10 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
767 hwif->dma_host_off(drive); 770 hwif->dma_host_off(drive);
768#endif 771#endif
769 772
773 /* Skip setting PIO flow-control modes on pre-EIDE drives */
774 if ((speed & 0xf8) == XFER_PIO_0 && !(drive->id->capability & 0x08))
775 goto skip;
776
770 /* 777 /*
771 * Don't use ide_wait_cmd here - it will 778 * Don't use ide_wait_cmd here - it will
772 * attempt to set_geometry and recalibrate, 779 * attempt to set_geometry and recalibrate,
@@ -814,6 +821,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
814 drive->id->dma_mword &= ~0x0F00; 821 drive->id->dma_mword &= ~0x0F00;
815 drive->id->dma_1word &= ~0x0F00; 822 drive->id->dma_1word &= ~0x0F00;
816 823
824 skip:
817#ifdef CONFIG_BLK_DEV_IDEDMA 825#ifdef CONFIG_BLK_DEV_IDEDMA
818 if (speed >= XFER_SW_DMA_0) 826 if (speed >= XFER_SW_DMA_0)
819 hwif->dma_host_on(drive); 827 hwif->dma_host_on(drive);