aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/pci/sis5513.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/sis5513.c')
-rw-r--r--drivers/ide/pci/sis5513.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index e71552e64ae..4fff663a643 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -670,23 +670,15 @@ static int config_chipset_for_dma (ide_drive_t *drive)
static int sis5513_config_xfer_rate(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
- struct hd_driveid *id = drive->id;
config_art_rwp_pio(drive, 5);
drive->init_speed = 0;
- if (id && (id->capability & 1) && drive->autodma) {
+ if (ide_use_dma(drive) && config_chipset_for_dma(drive))
+ return hwif->ide_dma_on(drive);
- if (ide_use_dma(drive)) {
- if (config_chipset_for_dma(drive))
- return hwif->ide_dma_on(drive);
- }
-
- goto fast_ata_pio;
-
- } else if ((id->capability & 8) || (id->field_valid & 2)) {
-fast_ata_pio:
+ if (ide_use_fast_pio(drive)) {
sis5513_tune_drive(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}