LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2/5] ide: skip "VLB sync" if host uses MMIO
@ 2008-04-12 19:03 Bartlomiej Zolnierkiewicz
  2008-04-22 16:09 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-04-12 19:03 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel

* 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.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-iops.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Index: b/drivers/ide/ide-iops.c
===================================================================
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -227,11 +227,11 @@ static void ide_tf_read(ide_drive_t *dri
  * of the sector count register location, with interrupts disabled
  * to ensure that the reads all happen together.
  */
-static void ata_vlb_sync(ide_drive_t *drive, unsigned long port)
+static void ata_vlb_sync(unsigned long port)
 {
-	(void) HWIF(drive)->INB(port);
-	(void) HWIF(drive)->INB(port);
-	(void) HWIF(drive)->INB(port);
+	(void)inb(port);
+	(void)inb(port);
+	(void)inb(port);
 }
 
 /*
@@ -255,9 +255,9 @@ static void ata_input_data(ide_drive_t *
 	if (io_32bit) {
 		unsigned long uninitialized_var(flags);
 
-		if (io_32bit & 2) {
+		if ((io_32bit & 2) && !mmio) {
 			local_irq_save(flags);
-			ata_vlb_sync(drive, io_ports->nsect_addr);
+			ata_vlb_sync(io_ports->nsect_addr);
 		}
 
 		if (mmio)
@@ -265,7 +265,7 @@ static void ata_input_data(ide_drive_t *
 		else
 			insl(data_addr, buf, len / 4);
 
-		if (io_32bit & 2)
+		if ((io_32bit & 2) && !mmio)
 			local_irq_restore(flags);
 
 		if ((len & 3) >= 2) {
@@ -298,9 +298,9 @@ static void ata_output_data(ide_drive_t 
 	if (io_32bit) {
 		unsigned long uninitialized_var(flags);
 
-		if (io_32bit & 2) {
+		if ((io_32bit & 2) && !mmio) {
 			local_irq_save(flags);
-			ata_vlb_sync(drive, io_ports->nsect_addr);
+			ata_vlb_sync(io_ports->nsect_addr);
 		}
 
 		if (mmio)
@@ -308,7 +308,7 @@ static void ata_output_data(ide_drive_t 
 		else
 			outsl(data_addr, buf, len / 4);
 
-		if (io_32bit & 2)
+		if ((io_32bit & 2) && !mmio)
 			local_irq_restore(flags);
 
 		if ((len & 3) >= 2) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/5] ide: skip "VLB sync" if host uses MMIO
  2008-04-12 19:03 [PATCH 2/5] ide: skip "VLB sync" if host uses MMIO Bartlomiej Zolnierkiewicz
@ 2008-04-22 16:09 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2008-04-22 16:09 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

Bartlomiej Zolnierkiewicz wrote:

> * 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.

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-22 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-12 19:03 [PATCH 2/5] ide: skip "VLB sync" if host uses MMIO Bartlomiej Zolnierkiewicz
2008-04-22 16:09 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).