Skip to contentSkip to conversation

]ata: Fix the dma state machine lockup for APM X-Gene SoC

PATCH Superseded Suman Tripathi 2 participants 5 messages Jun 19, 2014 – Jun 20, 2014

Subsystems (2)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover ]ata: Fix the dma state machine lockup for APM X-Gene SoC

---
Suman Tripathi (2):
libahci: Implement the function ahci_restart_engine to restart the
port dma engine.
ata: Fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode
command.

 drivers/ata/ahci.h       |  2 ++
 drivers/ata/ahci_xgene.c | 70 +++++++++++++++++++++++++++++++++++++++---------
 drivers/ata/libahci.c    | 15 ++++++++++-
 3 files changed, 73 insertions(+), 14 deletions(-)

--
1.8.2.1

#1 lore raw

v3 cover ]ata: Fix the dma state machine lockup for APM X-Gene SoC

---
Suman Tripathi (2):
libahci: Implement the function ahci_restart_engine to restart the
port dma engine.
ata: Fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode
command.

 drivers/ata/ahci.h       |  2 ++
 drivers/ata/ahci_xgene.c | 70 +++++++++++++++++++++++++++++++++++++++---------
 drivers/ata/libahci.c    | 15 ++++++++++-
 3 files changed, 73 insertions(+), 14 deletions(-)

--
1.8.2.1

#2 lore raw

PATCH v3 1/2 libahci: Implement the function ahci_restart_engine to restart the port dma engine.

In reply to Suman Tripathi

This patch adds an function to restart the port dma engine.

---
 drivers/ata/ahci.h    |  1 +
 drivers/ata/libahci.c | 12 ++++++++++++
 2 files changed, 13 insertions(+)
drivers/ata/ahci.h +1 -0
index af63c75..3c1760e 100644
@@ -372,6 +372,7 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,
 
 int ahci_stop_engine(struct ata_port *ap);
 void ahci_start_engine(struct ata_port *ap);
+int ahci_restart_engine(struct ata_port *ap);
 int ahci_check_ready(struct ata_link *link);
 int ahci_kick_engine(struct ata_port *ap);
 int ahci_port_resume(struct ata_port *ap);
drivers/ata/libahci.c +12 -0
index b986145..d1c9122 100644
@@ -742,6 +742,18 @@ static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
 	return 0;
 }
 
+int ahci_restart_engine(struct ata_port *ap)
+{
+	struct ahci_host_priv *hpriv = ap->host->private_data;
+
+	ahci_stop_engine(ap);
+	ahci_start_fis_rx(ap);
+	hpriv->start_engine(ap);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(ahci_restart_engine);
+
 #ifdef CONFIG_PM
 static void ahci_power_down(struct ata_port *ap)
 {

--
1.8.2.1

#3 lore raw

PATCH v3 1/2 libahci: Implement the function ahci_restart_engine to restart the port dma engine.

In reply to Suman Tripathi

This patch adds an function to restart the port dma engine.

---
 drivers/ata/ahci.h    |  1 +
 drivers/ata/libahci.c | 12 ++++++++++++
 2 files changed, 13 insertions(+)
drivers/ata/ahci.h +1 -0
index af63c75..3c1760e 100644
@@ -372,6 +372,7 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,
 
 int ahci_stop_engine(struct ata_port *ap);
 void ahci_start_engine(struct ata_port *ap);
+int ahci_restart_engine(struct ata_port *ap);
 int ahci_check_ready(struct ata_link *link);
 int ahci_kick_engine(struct ata_port *ap);
 int ahci_port_resume(struct ata_port *ap);
drivers/ata/libahci.c +12 -0
index b986145..d1c9122 100644
@@ -742,6 +742,18 @@ static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
 	return 0;
 }
 
+int ahci_restart_engine(struct ata_port *ap)
+{
+	struct ahci_host_priv *hpriv = ap->host->private_data;
+
+	ahci_stop_engine(ap);
+	ahci_start_fis_rx(ap);
+	hpriv->start_engine(ap);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(ahci_restart_engine);
+
 #ifdef CONFIG_PM
 static void ahci_power_down(struct ata_port *ap)
 {

--
1.8.2.1

#4 lore raw

v3 cover ]ata: Fix the dma state machine lockup for APM X-Gene SoC

In reply to Suman Tripathi

Hi Suman,

Quoted 9 lines · Suman Tripathi

---
Suman Tripathi (2):
libahci: Implement the function ahci_restart_engine to restart the
port dma engine.
ata: Fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode
command.

Quoted 4 lines
 drivers/ata/ahci.h       |  2 ++
 drivers/ata/ahci_xgene.c | 70 +++++++++++++++++++++++++++++++++++++++---------
 drivers/ata/libahci.c    | 15 ++++++++++-
 3 files changed, 73 insertions(+), 14 deletions(-)

These two patches does fix boot failure on our mustang board, thanks Suman!

Reported-and-Tested-by Ming Lei <[email protected]>

Thanks,

Signature · 1 line
Ming Lei