From: Tejun Heo Date: Mon, 9 Feb 2015 12:54:41 +0000 (-0500) Subject: Merge branch 'for-3.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj... X-Git-Tag: v4.0-rc1~148^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b12aa1f25e1da7e23fa44f646ac46e41366cfc6c;p=linux.git Merge branch 'for-3.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata into for-3.20 09c32aaa3683 ("ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode command.") missed 3.19 release. Fold it into for-3.20. Signed-off-by: Tejun Heo --- b12aa1f25e1da7e23fa44f646ac46e41366cfc6c diff --cc drivers/ata/ahci_xgene.c index e3b8750e8e9d,f752c30477cb..2e8bb603e447 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c @@@ -198,22 -137,10 +198,23 @@@ static unsigned int xgene_ahci_qc_issue struct ahci_host_priv *hpriv = ap->host->private_data; struct xgene_ahci_context *ctx = hpriv->plat_data; int rc = 0; + u32 port_fbs; + void *port_mmio = ahci_port_base(ap); + + /* + * Write the pmp value to PxFBS.DEV + * for case of Port Mulitplier. + */ + if (ctx->class[ap->port_no] == ATA_DEV_PMP) { + port_fbs = readl(port_mmio + PORT_FBS); + port_fbs &= ~PORT_FBS_DEV_MASK; + port_fbs |= qc->dev->link->pmp << PORT_FBS_DEV_OFFSET; + writel(port_fbs, port_mmio + PORT_FBS); + } if (unlikely((ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA) || - (ctx->last_cmd[ap->port_no] == ATA_CMD_PACKET))) + (ctx->last_cmd[ap->port_no] == ATA_CMD_PACKET) || + (ctx->last_cmd[ap->port_no] == ATA_CMD_SMART))) xgene_ahci_restart_engine(ap); rc = ahci_qc_issue(qc);