diff mbox

ahci_xgene: add errata workaround for ATA_CMD_SMART

Message ID 1405618711.25580.120.camel@deneb.redhat.com
State New
Headers show

Commit Message

Mark Salter July 17, 2014, 5:38 p.m. UTC
commit 2a0bdff6b958d1b2:

 ahci_xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command.

added a workaround for X-Gene AHCI controller errata. This was done
for all ATA_CMD_ID_ATA commands. The errata also appears to affect
ATA_CMD_SMART commands as well. This was discovered when running
smartd or just smartctl -x. This patch adds a dma engine restart for
ATA_CMD_SMART commands which clears up the issues seen with smartd.

Signed-off-by: Mark Salter <msalter@redhat.com>
---
 drivers/ata/ahci_xgene.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index ee3a365..f9431b4 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -131,7 +131,8 @@  static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
 	struct xgene_ahci_context *ctx = hpriv->plat_data;
 	int rc = 0;
 
-	if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA))
+	if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA ||
+		     ctx->last_cmd[ap->port_no] == ATA_CMD_SMART))
 		xgene_ahci_restart_engine(ap);
 
 	rc = ahci_qc_issue(qc);