aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sl82c105.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/sl82c105.c')
-rw-r--r--drivers/ide/pci/sl82c105.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
index 3d7759c361ff..ac1ec170fd26 100644
--- a/drivers/ide/pci/sl82c105.c
+++ b/drivers/ide/pci/sl82c105.c
@@ -159,28 +159,13 @@ static int sl82c105_tune_chipset(ide_drive_t *drive, u8 speed)
159} 159}
160 160
161/* 161/*
162 * Configure the drive for DMA.
163 */
164static int config_for_dma(ide_drive_t *drive)
165{
166 u8 speed = ide_max_dma_mode(drive);
167
168 DBG(("config_for_dma(drive:%s)\n", drive->name));
169
170 if (!speed || sl82c105_tune_chipset(drive, speed))
171 return 0;
172
173 return ide_dma_enable(drive);
174}
175
176/*
177 * Check to see if the drive and chipset are capable of DMA mode. 162 * Check to see if the drive and chipset are capable of DMA mode.
178 */ 163 */
179static int sl82c105_ide_dma_check(ide_drive_t *drive) 164static int sl82c105_ide_dma_check(ide_drive_t *drive)
180{ 165{
181 DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name)); 166 DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name));
182 167
183 if (ide_use_dma(drive) && config_for_dma(drive)) 168 if (ide_tune_dma(drive))
184 return 0; 169 return 0;
185 170
186 return -1; 171 return -1;