Commit 22cdd6cedc93653a95965191e65a30619234a640
1 parent
9f87abe892
Exists in
master
and in
20 other branches
ide: skip "VLB sync" if host uses MMIO
* Skip "VLB sync" in ata_{in,out}put_data() if host uses MMIO. * Use I/O ops directly in ata_vlb_sync() an drop no longer needed 'ide_drive_t *drive' argument. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Showing 1 changed file with 10 additions and 10 deletions Side-by-side Diff
drivers/ide/ide-iops.c
... | ... | @@ -227,11 +227,11 @@ |
227 | 227 | * of the sector count register location, with interrupts disabled |
228 | 228 | * to ensure that the reads all happen together. |
229 | 229 | */ |
230 | -static void ata_vlb_sync(ide_drive_t *drive, unsigned long port) | |
230 | +static void ata_vlb_sync(unsigned long port) | |
231 | 231 | { |
232 | - (void) HWIF(drive)->INB(port); | |
233 | - (void) HWIF(drive)->INB(port); | |
234 | - (void) HWIF(drive)->INB(port); | |
232 | + (void)inb(port); | |
233 | + (void)inb(port); | |
234 | + (void)inb(port); | |
235 | 235 | } |
236 | 236 | |
237 | 237 | /* |
238 | 238 | |
... | ... | @@ -255,9 +255,9 @@ |
255 | 255 | if (io_32bit) { |
256 | 256 | unsigned long uninitialized_var(flags); |
257 | 257 | |
258 | - if (io_32bit & 2) { | |
258 | + if ((io_32bit & 2) && !mmio) { | |
259 | 259 | local_irq_save(flags); |
260 | - ata_vlb_sync(drive, io_ports->nsect_addr); | |
260 | + ata_vlb_sync(io_ports->nsect_addr); | |
261 | 261 | } |
262 | 262 | |
263 | 263 | if (mmio) |
... | ... | @@ -265,7 +265,7 @@ |
265 | 265 | else |
266 | 266 | insl(data_addr, buf, len / 4); |
267 | 267 | |
268 | - if (io_32bit & 2) | |
268 | + if ((io_32bit & 2) && !mmio) | |
269 | 269 | local_irq_restore(flags); |
270 | 270 | |
271 | 271 | if ((len & 3) >= 2) { |
272 | 272 | |
... | ... | @@ -298,9 +298,9 @@ |
298 | 298 | if (io_32bit) { |
299 | 299 | unsigned long uninitialized_var(flags); |
300 | 300 | |
301 | - if (io_32bit & 2) { | |
301 | + if ((io_32bit & 2) && !mmio) { | |
302 | 302 | local_irq_save(flags); |
303 | - ata_vlb_sync(drive, io_ports->nsect_addr); | |
303 | + ata_vlb_sync(io_ports->nsect_addr); | |
304 | 304 | } |
305 | 305 | |
306 | 306 | if (mmio) |
... | ... | @@ -308,7 +308,7 @@ |
308 | 308 | else |
309 | 309 | outsl(data_addr, buf, len / 4); |
310 | 310 | |
311 | - if (io_32bit & 2) | |
311 | + if ((io_32bit & 2) && !mmio) | |
312 | 312 | local_irq_restore(flags); |
313 | 313 | |
314 | 314 | if ((len & 3) >= 2) { |