aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/slc90e66.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
commit4db90a145292327b95b03f6dcd3352327235cc36 (patch)
treec48ba5fc31e27d6fbdb8883151bdf237e7eb1920 /drivers/ide/pci/slc90e66.c
parent428c6440ef933a3d9df5adfeb2cbb3ea7ebb6a68 (diff)
ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate(). * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old, serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode methods in host drivers that don't (IDE core code guarantees that ->set_dma_mode will be called only for modes which are present in SWDMA/MWDMA/UDMA masks). While at it: * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in hpt34x/hpt366/pdc202xx_old/serverworks host driver. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/slc90e66.c')
-rw-r--r--drivers/ide/pci/slc90e66.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index eb4445b229ed..dbbb46819a2d 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -91,19 +91,9 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed)
91 pci_read_config_word(dev, 0x48, &reg48); 91 pci_read_config_word(dev, 0x48, &reg48);
92 pci_read_config_word(dev, 0x4a, &reg4a); 92 pci_read_config_word(dev, 0x4a, &reg4a);
93 93
94 switch(speed) {
95 case XFER_UDMA_4: u_speed = 4 << (drive->dn * 4); break;
96 case XFER_UDMA_3: u_speed = 3 << (drive->dn * 4); break;
97 case XFER_UDMA_2: u_speed = 2 << (drive->dn * 4); break;
98 case XFER_UDMA_1: u_speed = 1 << (drive->dn * 4); break;
99 case XFER_UDMA_0: u_speed = 0 << (drive->dn * 4); break;
100 case XFER_MW_DMA_2:
101 case XFER_MW_DMA_1:
102 case XFER_SW_DMA_2: break;
103 default: return;
104 }
105
106 if (speed >= XFER_UDMA_0) { 94 if (speed >= XFER_UDMA_0) {
95 u_speed = (speed - XFER_UDMA_0) << (drive->dn * 4);
96
107 if (!(reg48 & u_flag)) 97 if (!(reg48 & u_flag))
108 pci_write_config_word(dev, 0x48, reg48|u_flag); 98 pci_write_config_word(dev, 0x48, reg48|u_flag);
109 /* FIXME: (reg4a & a_speed) ? */ 99 /* FIXME: (reg4a & a_speed) ? */