linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver.
       [not found] ` <1420453305-15986-3-git-send-email-stripathi@apm.com>
@ 2015-01-05 13:30   ` Tejun Heo
  2015-01-05 13:59     ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2015-01-05 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 05, 2015 at 03:51:45PM +0530, Suman Tripathi wrote:
> Due to H/W errata, the controller is unable to save the PMP
> field fetched from command header before sending the H2D FIS.
> When the device returns the PMP port field in the D2H FIS, there is
> a mismatch and results in command completion failure. The workaround
> is to write the pmp value to PxFBS.DEV field before issuing any command
> to PMP.
> 
> Signed-off-by: Suman Tripathi <stripathi@apm.com>

Applied 1-2 to libata/for-3.20.

Thanks.

-- 
tejun

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

* [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver.
  2015-01-05 13:30   ` [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver Tejun Heo
@ 2015-01-05 13:59     ` Tejun Heo
  2015-01-05 14:03       ` Suman Tripathi
  0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2015-01-05 13:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 05, 2015 at 08:30:05AM -0500, Tejun Heo wrote:
> On Mon, Jan 05, 2015 at 03:51:45PM +0530, Suman Tripathi wrote:
> > Due to H/W errata, the controller is unable to save the PMP
> > field fetched from command header before sending the H2D FIS.
> > When the device returns the PMP port field in the D2H FIS, there is
> > a mismatch and results in command completion failure. The workaround
> > is to write the pmp value to PxFBS.DEV field before issuing any command
> > to PMP.
> > 
> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
> 
> Applied 1-2 to libata/for-3.20.

Reverted due to conflicts with the endian fix patches.  Please rebase
these two on top of them.

Thanks.

-- 
tejun

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

* [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver.
  2015-01-05 13:59     ` Tejun Heo
@ 2015-01-05 14:03       ` Suman Tripathi
  2015-01-05 14:05         ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: Suman Tripathi @ 2015-01-05 14:03 UTC (permalink / raw)
  To: linux-arm-kernel

Reverted due to conflicts with the endian fix patches.  Please rebase
these two on top of them.

Will do that .. I should have wait for the endian patch getting
accepted. Sorry for that.

On Mon, Jan 5, 2015 at 7:29 PM, Tejun Heo <tj@kernel.org> wrote:
> On Mon, Jan 05, 2015 at 08:30:05AM -0500, Tejun Heo wrote:
>> On Mon, Jan 05, 2015 at 03:51:45PM +0530, Suman Tripathi wrote:
>> > Due to H/W errata, the controller is unable to save the PMP
>> > field fetched from command header before sending the H2D FIS.
>> > When the device returns the PMP port field in the D2H FIS, there is
>> > a mismatch and results in command completion failure. The workaround
>> > is to write the pmp value to PxFBS.DEV field before issuing any command
>> > to PMP.
>> >
>> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
>>
>> Applied 1-2 to libata/for-3.20.
>
> Reverted due to conflicts with the endian fix patches.  Please rebase
> these two on top of them.
>
> Thanks.
>
> --
> tejun



-- 
Thanks,
with regards,
Suman Tripathi
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and contains information
that is confidential and proprietary to Applied Micro Circuits Corporation or its subsidiaries. 
It is to be used solely for the purpose of furthering the parties' business relationship. 
All unauthorized review, use, disclosure or distribution is prohibited. 
If you are not the intended recipient, please contact the sender by reply e-mail 
and destroy all copies of the original message.

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

* [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver.
  2015-01-05 14:03       ` Suman Tripathi
@ 2015-01-05 14:05         ` Tejun Heo
  0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2015-01-05 14:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 05, 2015 at 07:33:06PM +0530, Suman Tripathi wrote:
> Reverted due to conflicts with the endian fix patches.  Please rebase
> these two on top of them.
> 
> Will do that .. I should have wait for the endian patch getting
> accepted. Sorry for that.

Ooh, please don't be sorry.  It's completely fine.  These things
happen.

Thanks.

-- 
tejun

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

* [PATCH 1/2] ahci_xgene: Fix the xgene_ahci_restart_engine function to support Port Multiplier for APM X-Gene SoC AHCI SATA host controller driver.
       [not found] ` <1420453305-15986-2-git-send-email-stripathi@apm.com>
@ 2015-01-05 14:50   ` Sergei Shtylyov
  0 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2015-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 1/5/2015 1:21 PM, Suman Tripathi wrote:

    Your patch summary seems too long.

> This patch implements the function xgene_ahci_poll_reg_val to poll
> PxCI for multiple IDENTIFY DEVICE commands to finish before
> restarting the DMA engine in case of Port Multiplier.

> Signed-off-by: Suman Tripathi <stripathi@apm.com>
> ---
>   drivers/ata/ahci_xgene.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 54 insertions(+), 2 deletions(-)

> diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
> index 0f8538f..2180223 100644
> --- a/drivers/ata/ahci_xgene.c
> +++ b/drivers/ata/ahci_xgene.c
> @@ -105,17 +105,69 @@ static int xgene_ahci_init_memram(struct xgene_ahci_context *ctx)
>   }
>
>   /**
> + * xgene_ahci_poll_reg_val- Poll a register on a specific value.
> + * @ap : ATA port of interest.
> + * @reg : Register of interest.
> + * @val : Value to be attained.
> + * @interval : waiting interval for polling.
> + * @timeout : timeout for achieving the value.
> + */
> +static int xgene_ahci_poll_reg_val(struct ata_port *ap,
> +				   void __iomem *reg, unsigned
> +				   int val, unsigned long interval,
> +				   unsigned long timeout)
> +{
> +	unsigned long deadline;
> +	unsigned int tmp;
> +
> +	tmp = ioread32(reg);
> +	deadline = ata_deadline(jiffies, timeout);
> +
> +	while ((tmp != val) && (time_before(jiffies, deadline))) {

    Parens around the operands of && are not needed, especially around the 
right one.

> +		ata_msleep(ap, interval);
> +		tmp = ioread32(reg);
> +	}
> +
> +	return tmp;
> +}
> +
> +/**
>    * xgene_ahci_restart_engine - Restart the dma engine.
>    * @ap : ATA port of interest
>    *
> - * Restarts the dma engine inside the controller.
> + * Waits for completion of multiple commands and restarts
> + * the DMA engine inside the controller.
>    */
>   static int xgene_ahci_restart_engine(struct ata_port *ap)
>   {
>   	struct ahci_host_priv *hpriv = ap->host->private_data;
> +	struct ahci_port_priv *pp = ap->private_data;
> +	void __iomem *port_mmio = ahci_port_base(ap);
> +	u32 fbs;
> +
> +	/*
> +	 * In case of PMP multiple IDENTIFY DEVICE commands can be
> +	 * issued inside PxCI. So need to poll PxCI for the
> +	 * completion of outstanding IDENTIFY DEVICE commands before
> +	 * we restart the DMA engine.
> +	 */
> +	if (xgene_ahci_poll_reg_val(ap, port_mmio +
> +				    PORT_CMD_ISSUE, 0x0, 1, 100))
> +		  return -EBUSY;
>
>   	ahci_stop_engine(ap);
>   	ahci_start_fis_rx(ap);
> +
> +	/*
> +	 * Enable the PxFBS.FBS_EN bit as it
> +	 * gets cleared due to stop engine.

    s/stop/stopping the/.

[...]

MBR, Sergei

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

end of thread, other threads:[~2015-01-05 14:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1420453305-15986-1-git-send-email-stripathi@apm.com>
     [not found] ` <1420453305-15986-3-git-send-email-stripathi@apm.com>
2015-01-05 13:30   ` [PATCH 2/2] ahci_xgene: Implement the workaround to support PMP enumeration and discovery for APM X-Gene SoC AHCI SATA Host Controller driver Tejun Heo
2015-01-05 13:59     ` Tejun Heo
2015-01-05 14:03       ` Suman Tripathi
2015-01-05 14:05         ` Tejun Heo
     [not found] ` <1420453305-15986-2-git-send-email-stripathi@apm.com>
2015-01-05 14:50   ` [PATCH 1/2] ahci_xgene: Fix the xgene_ahci_restart_engine function to support Port Multiplier for APM X-Gene SoC AHCI SATA host controller driver 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).