Skip to contentSkip to conversation

* ahci_xgene: Bug fixes in APM X-Gene Soc AHCI SATA controller driver.

PATCH Superseded Suman Tripathi 4 participants 9 messages Dec 16, 2014 – Jan 6, 2015 3 messages not in the archive

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

cover * ahci_xgene: Bug fixes in APM X-Gene Soc AHCI SATA controller driver.

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.

---

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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1418748575-27301-1-git-send-email-stripathi-qTEPVZfXA3Y@public.gmane.org

#2 lore raw

PATCH 1/2 ahci_xgene: Fix the endianess issue in APM X-Gene SoC AHCI SATA controller driver.

This patch fixes the big endian mode issue with function xgene_ahci_read_id.

---
 drivers/ata/ahci_xgene.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/ahci_xgene.c +1 -1
index 0f8538f..0ffd3c9 100644
@@ -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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

PATCH 2/2 ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

In reply to a message not in the archive

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

www.spinics.net/lists/linux-ide/msg49092.html

---
 drivers/ata/ahci_xgene.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/ata/ahci_xgene.c +7 -5
index 0ffd3c9..9730907 100644
@@ -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 COMMAND 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
+ * goes 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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

PATCH 2/2 ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

Hello.

Quoted 16 lines · Suman Tripathi

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

www.spinics.net/lists/linux-ide/msg49092.html

---
  drivers/ata/ahci_xgene.c | 12 +++++++-----
  1 file changed, 7 insertions(+), 5 deletions(-)
drivers/ata/ahci_xgene.c +0 -0
index 0ffd3c9..9730907 100644

drivers/ata/ahci_xgene.c static int xgene_ahci_restart_engine(struct ata_port *ap) · line 128

Quoted 8 lines
drivers/ata/ahci_xgene.c +1 -4
@@ -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 COMMAND PACKET

Just PACKET.

drivers/ata/ahci_xgene.c static int xgene_ahci_restart_engine(struct ata_port *ap) · line 130

Quoted 2 lines
drivers/ata/ahci_xgene.c +2 -0
+ * 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

DMA.

drivers/ata/ahci_xgene.c static int xgene_ahci_restart_engine(struct ata_port *ap) · line 131

Quoted 1 line
drivers/ata/ahci_xgene.c +1 -0
+ * goes into the CMFatalErrorUpdate state and locks up. By restarting the
    s/goes/going/.

drivers/ata/ahci_xgene.c static int xgene_ahci_restart_engine(struct ata_port *ap) · line 132

Quoted 1 line
drivers/ata/ahci_xgene.c +1 -0
+ * dma engine, it removes the controller out of lock up state.

DMA again.

drivers/ata/ahci_xgene.c static int xgene_ahci_restart_engine(struct ata_port *ap) · line 135

Quoted 3 lines
drivers/ata/ahci_xgene.c +0 -0
   */
  static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)
  {

[...]

MBR, Sergei

A message that is not in the archive (sent off-list or not yet received): CAOHikRCRHPnVAziU8jwD9gGFODyt_5DpL1dm7Eb8uGA-WOfxOw@mail.gmail.com

#6 lore raw

PATCH 2/2 ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

Hello.

Quoted 3 lines · Suman Tripathi

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

Ugh, HTML... Please stick to plain text when posting to the
'vger.kernel.org' mailing lists (HTML mails are supposed to be ignored).

Quoted 33 lines

www.spinics.net/lists/linux-__ide/msg49092.html
<http://www.spinics.net/lists/linux-ide/msg49092.html>

Signed-off-by Suman Tripathi <stripathi at apm.com <mailto:[email protected]>>

---
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..9730907 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 COMMAND PACKET

Just 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

Quoted 7 lines

DMA.

+ * goes into the CMFatalErrorUpdate state and locks up. By restarting the

s/goes/going/.

[suman] : Didn't understand this. Do you mean to change to going ?

It's a 'sed' command to replace "goes" by "going" IIRC. Yes. Also,
s/locks/locking/.

Quoted 7 lines

It is already goes there.

[...]

Thanks,
with regards,
suman

MBR, Sergei

A message that is not in the archive (sent off-list or not yet received): CAOHikRAH3rrNw_+_DYx=Fc13BBQMq1Wg0zGyqrxLhNk7TSKqhw@mail.gmail.com

#8 lore raw

PATCH 2/2 ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

Hello.

Quoted 14 lines · Suman Tripathi

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

Ugh, HTML... Please stick to plain text when posting to the
'vger.kernel.org <http://vger.kernel.org/>' mailing lists (HTML mails are supposed to be ignored).

    www.spinics.net/lists/linux-____ide/msg49092.html
    <http://www.spinics.net/lists/linux-__ide/msg49092.html>
         <http://www.spinics.net/lists/__linux-ide/msg49092.html
    <http://www.spinics.net/lists/linux-ide/msg49092.html>>
Quoted 5 lines

This is something strange. I posted it in plain text only. Because when I do show original of the patch in gmail, it shows me the plaintext. Please help me out to figure the issue. I saw many other patches referred in the same way. I am sending the patch through git-send-email that sends in plain text format only,

The patch was OK, but your replies do use HTML (as well as plain text).

Quoted 8 lines

<mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>

--
Thanks,
with regards,
Suman Tripathi

MBR, Sergei

#9 lore raw

PATCH 2/2 ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

In reply to Suman Tripathi
Quoted 7 lines · Suman Tripathi

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

www.spinics.net/lists/linux-ide/msg49092.html

Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.

Thanks.

Signature · 1 line
tejun
#10 lore raw

PATCH 2/2 ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

Hi

Quoted 7 lines · Suman Tripathi

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

www.spinics.net/lists/linux-ide/msg49092.html

Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.

The patch is applied to libata/for-3.19-fixes not libata/for-3.18-fixes ??

Quoted 15 lines · Tejun Heo
Quoted 7 lines · Suman Tripathi

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

www.spinics.net/lists/linux-ide/msg49092.html

Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.

Thanks.

--
tejun

Signature · 10 lines
Thanks,
with regards,
Suman Tripathi
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and contains information
that is confidential and proprietary to Applied Micro Circuits Corporation or its subsidiaries. 
It is to be used solely for the purpose of furthering the parties' business relationship. 
All unauthorized review, use, disclosure or distribution is prohibited. 
If you are not the intended recipient, please contact the sender by reply e-mail 
and destroy all copies of the original message.
#11 lore raw

PATCH 2/2 ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_PACKET PIO mode command.

Quoted 7 lines · Suman Tripathi

Hi

Quoted 4 lines · Suman Tripathi

This patch addresses the issue with ATA_CMD_PACKET pio mode command for enumeration and device detection with ATAPI devices.It is the same issue as in patch

Quoted 7 lines
Quoted 3 lines

www.spinics.net/lists/linux-ide/msg49092.html

Applied 1-2 to libata/for-3.18-fixes w/ Sergei's suggested edits.

The patch is applied to libata/for-3.19-fixes not libata/for-3.18-fixes ??

Yeap, brainfart. libata/for-3.19-fixes is the right one.

Thanks.

Signature · 1 line
tejun