From: Mark Salter msalter@redhat.com
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 --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c index 0f8538f..062cd2a 100644 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c @@ -137,7 +137,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);