Skip to contentSkip to conversation

ahci_xgene: add errata workaround for ATA_CMD_SMART

PATCH New Mark Salter 1 participant 1 message Jul 17, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ahci_xgene: add errata workaround for ATA_CMD_SMART

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.

---
 drivers/ata/ahci_xgene.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ata/ahci_xgene.c +2 -1
index ee3a365..f9431b4 100644
@@ -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);
Signature · 1 line
1.8.3.1