diff options
Diffstat (limited to 'drivers/ide/pci/serverworks.c')
-rw-r--r-- | drivers/ide/pci/serverworks.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index e9bd269547bb..877c09bf4829 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -164,25 +164,12 @@ static void svwks_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
164 | ultra_timing &= ~(0x0F << (4*unit)); | 164 | ultra_timing &= ~(0x0F << (4*unit)); |
165 | ultra_enable &= ~(0x01 << drive->dn); | 165 | ultra_enable &= ~(0x01 << drive->dn); |
166 | 166 | ||
167 | switch(speed) { | 167 | if (speed >= XFER_UDMA_0) { |
168 | case XFER_MW_DMA_2: | 168 | dma_timing |= dma_modes[2]; |
169 | case XFER_MW_DMA_1: | 169 | ultra_timing |= (udma_modes[speed - XFER_UDMA_0] << (4 * unit)); |
170 | case XFER_MW_DMA_0: | 170 | ultra_enable |= (0x01 << drive->dn); |
171 | dma_timing |= dma_modes[speed - XFER_MW_DMA_0]; | 171 | } else if (speed >= XFER_MW_DMA_0) |
172 | break; | 172 | dma_timing |= dma_modes[speed - XFER_MW_DMA_0]; |
173 | |||
174 | case XFER_UDMA_5: | ||
175 | case XFER_UDMA_4: | ||
176 | case XFER_UDMA_3: | ||
177 | case XFER_UDMA_2: | ||
178 | case XFER_UDMA_1: | ||
179 | case XFER_UDMA_0: | ||
180 | dma_timing |= dma_modes[2]; | ||
181 | ultra_timing |= ((udma_modes[speed - XFER_UDMA_0]) << (4*unit)); | ||
182 | ultra_enable |= (0x01 << drive->dn); | ||
183 | default: | ||
184 | break; | ||
185 | } | ||
186 | 173 | ||
187 | pci_write_config_byte(dev, drive_pci2[drive->dn], dma_timing); | 174 | pci_write_config_byte(dev, drive_pci2[drive->dn], dma_timing); |
188 | pci_write_config_byte(dev, (0x56|hwif->channel), ultra_timing); | 175 | pci_write_config_byte(dev, (0x56|hwif->channel), ultra_timing); |