diff mbox

[1/3] libata: Remove excess delay in the tf_load path

Message ID 20100505092448.586.25299.stgit@localhost.localdomain
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Alan Cox May 5, 2010, 9:24 a.m. UTC
We don't need to stall and wait after loading the task file and before
issuing a command, so don't do it. This shows up on profiles and is not
needed.

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/ata/libata-sff.c |    3 ---
 drivers/ata/pata_via.c   |    2 --
 2 files changed, 0 insertions(+), 5 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Sergei Shtylyov May 5, 2010, 10:24 a.m. UTC | #1
Hello.

Alan Cox wrote:

> We don't need to stall and wait after loading the task file and before
>   

   You mean *before* loading the taskfile?

> issuing a command, so don't do it. This shows up on profiles and is not
> needed.
>   

   The same wait is in sff_irq_on() method, I doubt that it's really 
necessary as well, given that its result is always ignored...

> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
>
>  drivers/ata/libata-sff.c |    3 ---
>  drivers/ata/pata_via.c   |    2 --
>  2 files changed, 0 insertions(+), 5 deletions(-)
>
>
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index b313896..17754a7 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -579,7 +579,6 @@ void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
>  		if (ioaddr->ctl_addr)
>  			iowrite8(tf->ctl, ioaddr->ctl_addr);
>  		ap->last_ctl = tf->ctl;
> -		ata_wait_idle(ap);
>  	}
>  
>  	if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
> @@ -615,8 +614,6 @@ void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
>  		iowrite8(tf->device, ioaddr->device_addr);
>  		VPRINTK("device 0x%X\n", tf->device);
>  	}
> -
> -	ata_wait_idle(ap);
>  }
>  EXPORT_SYMBOL_GPL(ata_sff_tf_load);
>  
> diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
> index 741e7cb..87fb89e 100644
> --- a/drivers/ata/pata_via.c
> +++ b/drivers/ata/pata_via.c
> @@ -417,8 +417,6 @@ static void via_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
>  			tf->lbam,
>  			tf->lbah);
>  	}
> -
> -	ata_wait_idle(ap);
>  }
>  
>  static int via_port_start(struct ata_port *ap)
>   

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Cox May 5, 2010, 11:07 a.m. UTC | #2
On Wed, 05 May 2010 14:24:14 +0400
Sergei Shtylyov <sshtylyov@mvista.com> wrote:

> Hello.
> 
> Alan Cox wrote:
> 
> > We don't need to stall and wait after loading the task file and before
> >   
> 
>    You mean *before* loading the taskfile?

It removes the stall between loading the task file and issuing the
command. I'll make the comment clearer about the ctl one.

>    The same wait is in sff_irq_on() method, I doubt that it's really 
> necessary as well, given that its result is always ignored...

Will have a look at that as a possible follow up patch.

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik May 15, 2010, 2:25 a.m. UTC | #3
On 05/05/2010 05:24 AM, Alan Cox wrote:
> We don't need to stall and wait after loading the task file and before
> issuing a command, so don't do it. This shows up on profiles and is not
> needed.
>
> Signed-off-by: Alan Cox<alan@linux.intel.com>
> ---
>
>   drivers/ata/libata-sff.c |    3 ---
>   drivers/ata/pata_via.c   |    2 --
>   2 files changed, 0 insertions(+), 5 deletions(-)

applied


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index b313896..17754a7 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -579,7 +579,6 @@  void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
 		if (ioaddr->ctl_addr)
 			iowrite8(tf->ctl, ioaddr->ctl_addr);
 		ap->last_ctl = tf->ctl;
-		ata_wait_idle(ap);
 	}
 
 	if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
@@ -615,8 +614,6 @@  void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
 		iowrite8(tf->device, ioaddr->device_addr);
 		VPRINTK("device 0x%X\n", tf->device);
 	}
-
-	ata_wait_idle(ap);
 }
 EXPORT_SYMBOL_GPL(ata_sff_tf_load);
 
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 741e7cb..87fb89e 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -417,8 +417,6 @@  static void via_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
 			tf->lbam,
 			tf->lbah);
 	}
-
-	ata_wait_idle(ap);
 }
 
 static int via_port_start(struct ata_port *ap)