aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index bea5e13ee36..8afce4ceea3 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -205,6 +205,21 @@ int ide_dma_enable (ide_drive_t *drive)
EXPORT_SYMBOL(ide_dma_enable);
+int ide_use_fast_pio(ide_drive_t *drive)
+{
+ struct hd_driveid *id = drive->id;
+
+ if ((id->capability & 1) && drive->autodma)
+ return 1;
+
+ if ((id->capability & 8) || (id->field_valid & 2))
+ return 1;
+
+ return 0;
+}
+
+EXPORT_SYMBOL_GPL(ide_use_fast_pio);
+
/*
* Standard (generic) timings for PIO modes, from ATA2 specification.
* These timings are for access to the IDE data port register *only*.