diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-28 17:44:41 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-28 17:44:41 -0400 |
commit | 22cdd6cedc93653a95965191e65a30619234a640 (patch) | |
tree | 0335b5d38d13b45a029b3fcda9d1cf6915766bbc /drivers/ide | |
parent | 9f87abe892f899f19df8d472f937ee955cd6264b (diff) |
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>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-iops.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index daa23b19440e..60e3048a25f1 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -227,11 +227,11 @@ static void ide_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
227 | * of the sector count register location, with interrupts disabled | 227 | * of the sector count register location, with interrupts disabled |
228 | * to ensure that the reads all happen together. | 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); | 232 | (void)inb(port); |
233 | (void) HWIF(drive)->INB(port); | 233 | (void)inb(port); |
234 | (void) HWIF(drive)->INB(port); | 234 | (void)inb(port); |
235 | } | 235 | } |
236 | 236 | ||
237 | /* | 237 | /* |
@@ -255,9 +255,9 @@ static void ata_input_data(ide_drive_t *drive, struct request *rq, | |||
255 | if (io_32bit) { | 255 | if (io_32bit) { |
256 | unsigned long uninitialized_var(flags); | 256 | unsigned long uninitialized_var(flags); |
257 | 257 | ||
258 | if (io_32bit & 2) { | 258 | if ((io_32bit & 2) && !mmio) { |
259 | local_irq_save(flags); | 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 | if (mmio) | 263 | if (mmio) |
@@ -265,7 +265,7 @@ static void ata_input_data(ide_drive_t *drive, struct request *rq, | |||
265 | else | 265 | else |
266 | insl(data_addr, buf, len / 4); | 266 | insl(data_addr, buf, len / 4); |
267 | 267 | ||
268 | if (io_32bit & 2) | 268 | if ((io_32bit & 2) && !mmio) |
269 | local_irq_restore(flags); | 269 | local_irq_restore(flags); |
270 | 270 | ||
271 | if ((len & 3) >= 2) { | 271 | if ((len & 3) >= 2) { |
@@ -298,9 +298,9 @@ static void ata_output_data(ide_drive_t *drive, struct request *rq, | |||
298 | if (io_32bit) { | 298 | if (io_32bit) { |
299 | unsigned long uninitialized_var(flags); | 299 | unsigned long uninitialized_var(flags); |
300 | 300 | ||
301 | if (io_32bit & 2) { | 301 | if ((io_32bit & 2) && !mmio) { |
302 | local_irq_save(flags); | 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 | if (mmio) | 306 | if (mmio) |
@@ -308,7 +308,7 @@ static void ata_output_data(ide_drive_t *drive, struct request *rq, | |||
308 | else | 308 | else |
309 | outsl(data_addr, buf, len / 4); | 309 | outsl(data_addr, buf, len / 4); |
310 | 310 | ||
311 | if (io_32bit & 2) | 311 | if ((io_32bit & 2) && !mmio) |
312 | local_irq_restore(flags); | 312 | local_irq_restore(flags); |
313 | 313 | ||
314 | if ((len & 3) >= 2) { | 314 | if ((len & 3) >= 2) { |