* [PATCH v3 0/2] ahci_xgene: Bug fixes in APM X-Gene Soc AHCI SATA controller driver.
@ 2014-12-29 3:22 Suman Tripathi
2014-12-29 3:22 ` [PATCH v3 1/2] ahci_xgene: Fix the endianess issue in APM X-Gene SoC " Suman Tripathi
2014-12-29 3:22 ` [PATCH v3 2/2] ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command Suman Tripathi
0 siblings, 2 replies; 4+ messages in thread
From: Suman Tripathi @ 2014-12-29 3:22 UTC (permalink / raw)
To: olof, tj, arnd
Cc: linux-scsi, linux-ide, devicetree, linux-arm-kernel, mlangsdo,
jcm, patches, Suman Tripathi
These patches address the following two issues :
1. Endianess issue with xgene_read_id function.
2. ATAPI device enumeration failure with ATA_CMD_PACKET PIO mode command.
Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
Suman Tripathi (2):
ahci_xgene: Fix the endianess issue in APM X-Gene SoC AHCI SATA
controller driver.
ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET
PIO mode command.
drivers/ata/ahci_xgene.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--
1.8.2.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] ahci_xgene: Fix the endianess issue in APM X-Gene SoC AHCI SATA controller driver.
2014-12-29 3:22 [PATCH v3 0/2] ahci_xgene: Bug fixes in APM X-Gene Soc AHCI SATA controller driver Suman Tripathi
@ 2014-12-29 3:22 ` Suman Tripathi
2014-12-29 3:22 ` [PATCH v3 2/2] ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command Suman Tripathi
1 sibling, 0 replies; 4+ messages in thread
From: Suman Tripathi @ 2014-12-29 3:22 UTC (permalink / raw)
To: olof, tj, arnd
Cc: linux-scsi, linux-ide, devicetree, linux-arm-kernel, mlangsdo,
jcm, patches, Suman Tripathi
This patch fixes the big endian mode issue with function
xgene_ahci_read_id.
Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
drivers/ata/ahci_xgene.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 0f8538f..0ffd3c9 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -188,7 +188,7 @@ static unsigned int xgene_ahci_read_id(struct ata_device *dev,
*
* Clear reserved bit 8 (DEVSLP bit) as we don't support DEVSLP
*/
- id[ATA_ID_FEATURE_SUPP] &= ~(1 << 8);
+ id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
return 0;
}
--
1.8.2.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command.
2014-12-29 3:22 [PATCH v3 0/2] ahci_xgene: Bug fixes in APM X-Gene Soc AHCI SATA controller driver Suman Tripathi
2014-12-29 3:22 ` [PATCH v3 1/2] ahci_xgene: Fix the endianess issue in APM X-Gene SoC " Suman Tripathi
@ 2014-12-29 3:22 ` Suman Tripathi
2015-01-05 14:03 ` Tejun Heo
1 sibling, 1 reply; 4+ messages in thread
From: Suman Tripathi @ 2014-12-29 3:22 UTC (permalink / raw)
To: olof, tj, arnd
Cc: linux-scsi, linux-ide, devicetree, linux-arm-kernel, mlangsdo,
jcm, patches, Suman Tripathi
This patch addresses the issue with ATA_CMD_PACKET pio mode
command for enumeration and device detection with ATAPI devices.
The X-Gene AHCI controller has an errata in which it cannot clear
the BSY bit after the PIO setup FIS. The dma state machine enters
CMFatalErrorUpdate state and locks up.
Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
drivers/ata/ahci_xgene.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 0ffd3c9..d332161 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -125,10 +125,11 @@ static int xgene_ahci_restart_engine(struct ata_port *ap)
* xgene_ahci_qc_issue - Issue commands to the device
* @qc: Command to issue
*
- * Due to Hardware errata for IDENTIFY DEVICE command, the controller cannot
- * clear the BSY bit after receiving the PIO setup FIS. This results in the dma
- * state machine goes into the CMFatalErrorUpdate state and locks up. By
- * restarting the dma engine, it removes the controller out of lock up state.
+ * Due to Hardware errata for IDENTIFY DEVICE command and PACKET
+ * command of ATAPI protocol set, the controller cannot clear the BSY bit
+ * after receiving the PIO setup FIS. This results in the DMA state machine
+ * going into the CMFatalErrorUpdate state and locks up. By restarting the
+ * DMA engine, it removes the controller out of lock up state.
*/
static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
{
@@ -137,7 +138,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_PACKET)))
xgene_ahci_restart_engine(ap);
rc = ahci_qc_issue(qc);
--
1.8.2.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command.
2014-12-29 3:22 ` [PATCH v3 2/2] ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command Suman Tripathi
@ 2015-01-05 14:03 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2015-01-05 14:03 UTC (permalink / raw)
To: Suman Tripathi
Cc: olof, arnd, linux-scsi, linux-ide, devicetree, linux-arm-kernel,
mlangsdo, jcm, patches
On Mon, Dec 29, 2014 at 08:52:47AM +0530, Suman Tripathi wrote:
> This patch addresses the issue with ATA_CMD_PACKET pio mode
> command for enumeration and device detection with ATAPI devices.
> The X-Gene AHCI controller has an errata in which it cannot clear
> the BSY bit after the PIO setup FIS. The dma state machine enters
> CMFatalErrorUpdate state and locks up.
>
> Signed-off-by: Suman Tripathi <stripathi@apm.com>
Ah, you already posted the updated versions. Applied these instead.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-05 14:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-29 3:22 [PATCH v3 0/2] ahci_xgene: Bug fixes in APM X-Gene Soc AHCI SATA controller driver Suman Tripathi
2014-12-29 3:22 ` [PATCH v3 1/2] ahci_xgene: Fix the endianess issue in APM X-Gene SoC " Suman Tripathi
2014-12-29 3:22 ` [PATCH v3 2/2] ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command Suman Tripathi
2015-01-05 14:03 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).