aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-lib.c15
-rw-r--r--drivers/ide/pci/aec62xx.c3
-rw-r--r--drivers/ide/pci/atiixp.c3
-rw-r--r--drivers/ide/pci/cmd64x.c3
-rw-r--r--drivers/ide/pci/cs5535.c3
-rw-r--r--drivers/ide/pci/hpt34x.c3
-rw-r--r--drivers/ide/pci/hpt366.c3
-rw-r--r--drivers/ide/pci/pdc202xx_new.c3
-rw-r--r--drivers/ide/pci/pdc202xx_old.c3
-rw-r--r--drivers/ide/pci/piix.c3
-rw-r--r--drivers/ide/pci/scc_pata.c3
-rw-r--r--drivers/ide/pci/serverworks.c3
-rw-r--r--drivers/ide/pci/siimage.c3
-rw-r--r--drivers/ide/pci/sis5513.c3
-rw-r--r--drivers/ide/pci/slc90e66.c3
-rw-r--r--drivers/ide/pci/tc86c001.c3
-rw-r--r--include/linux/ide.h1
17 files changed, 15 insertions, 46 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 0e2562f0f74e..af86433baede 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -96,21 +96,6 @@ static u8 ide_rate_filter(ide_drive_t *drive, u8 speed)
96 return min(speed, mode); 96 return min(speed, mode);
97} 97}
98 98
99int ide_use_fast_pio(ide_drive_t *drive)
100{
101 struct hd_driveid *id = drive->id;
102
103 if ((id->capability & 1) && drive->autodma)
104 return 1;
105
106 if ((id->capability & 8) || (id->field_valid & 2))
107 return 1;
108
109 return 0;
110}
111
112EXPORT_SYMBOL_GPL(ide_use_fast_pio);
113
114/* 99/*
115 * Standard (generic) timings for PIO modes, from ATA2 specification. 100 * Standard (generic) timings for PIO modes, from ATA2 specification.
116 * These timings are for access to the IDE data port register *only*. 101 * These timings are for access to the IDE data port register *only*.
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index 2e82ef546007..91bf5beba5ce 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -146,8 +146,7 @@ static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)
146 if (ide_tune_dma(drive)) 146 if (ide_tune_dma(drive))
147 return 0; 147 return 0;
148 148
149 if (ide_use_fast_pio(drive)) 149 ide_set_max_pio(drive);
150 ide_set_max_pio(drive);
151 150
152 return -1; 151 return -1;
153} 152}
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index 644f4aea795a..b457df883dcb 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -171,8 +171,7 @@ static int atiixp_dma_check(ide_drive_t *drive)
171 if (ide_tune_dma(drive)) 171 if (ide_tune_dma(drive))
172 return 0; 172 return 0;
173 173
174 if (ide_use_fast_pio(drive)) 174 ide_set_max_pio(drive);
175 ide_set_max_pio(drive);
176 175
177 return -1; 176 return -1;
178} 177}
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index d50f15e34b80..52790cb6bce4 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -335,8 +335,7 @@ static int cmd64x_config_drive_for_dma (ide_drive_t *drive)
335 if (ide_tune_dma(drive)) 335 if (ide_tune_dma(drive))
336 return 0; 336 return 0;
337 337
338 if (ide_use_fast_pio(drive)) 338 ide_set_max_pio(drive);
339 ide_set_max_pio(drive);
340 339
341 return -1; 340 return -1;
342} 341}
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c
index 896cc9211bd3..2a72b4f22ddf 100644
--- a/drivers/ide/pci/cs5535.c
+++ b/drivers/ide/pci/cs5535.c
@@ -162,8 +162,7 @@ static int cs5535_dma_check(ide_drive_t *drive)
162 if (ide_tune_dma(drive)) 162 if (ide_tune_dma(drive))
163 return 0; 163 return 0;
164 164
165 if (ide_use_fast_pio(drive)) 165 ide_set_max_pio(drive);
166 ide_set_max_pio(drive);
167 166
168 return -1; 167 return -1;
169} 168}
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index bccf0667a732..69724887225c 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -85,8 +85,7 @@ static int hpt34x_config_drive_xfer_rate (ide_drive_t *drive)
85 if (ide_tune_dma(drive)) 85 if (ide_tune_dma(drive))
86 return -1; 86 return -1;
87 87
88 if (ide_use_fast_pio(drive)) 88 ide_set_max_pio(drive);
89 ide_set_max_pio(drive);
90 89
91 return -1; 90 return -1;
92} 91}
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index a8097b5476a2..992b60eeee3f 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -718,8 +718,7 @@ static int hpt366_config_drive_xfer_rate(ide_drive_t *drive)
718 if (ide_tune_dma(drive)) 718 if (ide_tune_dma(drive))
719 return 0; 719 return 0;
720 720
721 if (ide_use_fast_pio(drive)) 721 ide_set_max_pio(drive);
722 ide_set_max_pio(drive);
723 722
724 return -1; 723 return -1;
725} 724}
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index c3a751207e64..9767232e2f8a 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -228,8 +228,7 @@ static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive)
228 if (ide_tune_dma(drive)) 228 if (ide_tune_dma(drive))
229 return 0; 229 return 0;
230 230
231 if (ide_use_fast_pio(drive)) 231 ide_set_max_pio(drive);
232 ide_set_max_pio(drive);
233 232
234 return -1; 233 return -1;
235} 234}
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 9847a4ff7d40..b2c7b6e3edd5 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -184,8 +184,7 @@ static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive)
184 if (ide_tune_dma(drive)) 184 if (ide_tune_dma(drive))
185 return 0; 185 return 0;
186 186
187 if (ide_use_fast_pio(drive)) 187 ide_set_max_pio(drive);
188 ide_set_max_pio(drive);
189 188
190 return -1; 189 return -1;
191} 190}
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 4dd1b6d0acb5..dcb0701f10b5 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -267,8 +267,7 @@ static int piix_config_drive_xfer_rate (ide_drive_t *drive)
267 if (ide_tune_dma(drive)) 267 if (ide_tune_dma(drive))
268 return 0; 268 return 0;
269 269
270 if (ide_use_fast_pio(drive)) 270 ide_set_max_pio(drive);
271 ide_set_max_pio(drive);
272 271
273 return -1; 272 return -1;
274} 273}
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 67f06dd11b34..f839bdeb903b 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -299,8 +299,7 @@ static int scc_config_drive_for_dma(ide_drive_t *drive)
299 if (ide_tune_dma(drive)) 299 if (ide_tune_dma(drive))
300 return 0; 300 return 0;
301 301
302 if (ide_use_fast_pio(drive)) 302 ide_set_max_pio(drive);
303 ide_set_max_pio(drive);
304 303
305 return -1; 304 return -1;
306} 305}
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index b7076f4569a4..4666e4c1597b 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -201,8 +201,7 @@ static int svwks_config_drive_xfer_rate (ide_drive_t *drive)
201 if (ide_tune_dma(drive)) 201 if (ide_tune_dma(drive))
202 return 0; 202 return 0;
203 203
204 if (ide_use_fast_pio(drive)) 204 ide_set_max_pio(drive);
205 ide_set_max_pio(drive);
206 205
207 return -1; 206 return -1;
208} 207}
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index ce7784996d12..8be36f3b69a8 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -326,8 +326,7 @@ static int siimage_config_drive_for_dma (ide_drive_t *drive)
326 if (ide_tune_dma(drive)) 326 if (ide_tune_dma(drive))
327 return 0; 327 return 0;
328 328
329 if (ide_use_fast_pio(drive)) 329 ide_set_max_pio(drive);
330 ide_set_max_pio(drive);
331 330
332 return -1; 331 return -1;
333} 332}
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 99fe0b682724..5458c56e69b0 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -606,8 +606,7 @@ static int sis5513_config_xfer_rate(ide_drive_t *drive)
606 if (ide_tune_dma(drive)) 606 if (ide_tune_dma(drive))
607 return 0; 607 return 0;
608 608
609 if (ide_use_fast_pio(drive)) 609 ide_set_max_pio(drive);
610 ide_set_max_pio(drive);
611 610
612 return -1; 611 return -1;
613} 612}
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 38da0659ec07..41c5c571f6bd 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -135,8 +135,7 @@ static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive)
135 if (ide_tune_dma(drive)) 135 if (ide_tune_dma(drive))
136 return 0; 136 return 0;
137 137
138 if (ide_use_fast_pio(drive)) 138 ide_set_max_pio(drive);
139 ide_set_max_pio(drive);
140 139
141 return -1; 140 return -1;
142} 141}
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c
index 840415d68d38..e66e7883ebe2 100644
--- a/drivers/ide/pci/tc86c001.c
+++ b/drivers/ide/pci/tc86c001.c
@@ -167,8 +167,7 @@ static int tc86c001_config_drive_xfer_rate(ide_drive_t *drive)
167 if (ide_tune_dma(drive)) 167 if (ide_tune_dma(drive))
168 return 0; 168 return 0;
169 169
170 if (ide_use_fast_pio(drive)) 170 ide_set_max_pio(drive);
171 ide_set_max_pio(drive);
172 171
173 return -1; 172 return -1;
174} 173}
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 30a1931466a6..86c5907db2a4 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1380,7 +1380,6 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
1380extern char *ide_xfer_verbose(u8 xfer_rate); 1380extern char *ide_xfer_verbose(u8 xfer_rate);
1381extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1381extern void ide_toggle_bounce(ide_drive_t *drive, int on);
1382extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); 1382extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
1383int ide_use_fast_pio(ide_drive_t *);
1384 1383
1385static inline int ide_dev_has_iordy(struct hd_driveid *id) 1384static inline int ide_dev_has_iordy(struct hd_driveid *id)
1386{ 1385{