diff mbox

[1/4] ahci: Don't start command DMA engine before buffers are set

Message ID 1411484824-27265-2-git-send-email-rogerq@ti.com
State Accepted
Commit 02590aa31cc282cffafac559032981094f716fa9
Headers show

Commit Message

Roger Quadros Sept. 23, 2014, 3:07 p.m. UTC
The DMA/FIS buffers are set in ahci_port_start() which is called
after ahci_host_init(). So don't start the DMA engine here
(i.e. don't set FIS_RX)

This fixes the following error at kernel boot on OMAP platforms (e.g. DRA7x)
WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x260/0x358()
44000000.ocp:L3 Custom Error: MASTER SATA TARGET GPMC (Idle): Data Access in User mode during Functional access

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/block/ahci.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ian Campbell Oct. 5, 2014, 8:37 a.m. UTC | #1
On Tue, 2014-09-23 at 18:07 +0300, Roger Quadros wrote:
> The DMA/FIS buffers are set in ahci_port_start() which is called
> after ahci_host_init(). So don't start the DMA engine here
> (i.e. don't set FIS_RX)
> 
> This fixes the following error at kernel boot on OMAP platforms (e.g. DRA7x)
> WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x260/0x358()
> 44000000.ocp:L3 Custom Error: MASTER SATA TARGET GPMC (Idle): Data Access in User mode during Functional access
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>

FWIW this also appears to have solved an issue I've been having getting
sata working from u-boot on arndale (porting some patches from chromeos
tree). Not sure if that quite qualifies as an Ack or Tested - by...

> ---
>  drivers/block/ahci.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
> index dce99ad..a93a8e1 100644
> --- a/drivers/block/ahci.c
> +++ b/drivers/block/ahci.c
> @@ -229,7 +229,6 @@ static int ahci_host_init(struct ahci_probe_ent *probe_ent)
>  		 * already be on in the command register.
>  		 */
>  		cmd = readl(port_mmio + PORT_CMD);
> -		cmd |= PORT_CMD_FIS_RX;
>  		cmd |= PORT_CMD_SPIN_UP;
>  		writel_with_flush(cmd, port_mmio + PORT_CMD);
>
Tom Rini Oct. 10, 2014, 2:40 p.m. UTC | #2
On Tue, Sep 23, 2014 at 06:07:01PM +0300, Roger Quadros wrote:

> The DMA/FIS buffers are set in ahci_port_start() which is called
> after ahci_host_init(). So don't start the DMA engine here
> (i.e. don't set FIS_RX)
> 
> This fixes the following error at kernel boot on OMAP platforms (e.g. DRA7x)
> WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x260/0x358()
> 44000000.ocp:L3 Custom Error: MASTER SATA TARGET GPMC (Idle): Data Access in User mode during Functional access
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index dce99ad..a93a8e1 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -229,7 +229,6 @@  static int ahci_host_init(struct ahci_probe_ent *probe_ent)
 		 * already be on in the command register.
 		 */
 		cmd = readl(port_mmio + PORT_CMD);
-		cmd |= PORT_CMD_FIS_RX;
 		cmd |= PORT_CMD_SPIN_UP;
 		writel_with_flush(cmd, port_mmio + PORT_CMD);