]ata: Fix the dma state machine lockup for APM X-Gene SoC
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
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
PATCH v3 1/2 libahci: Implement the function ahci_restart_engine to restart the port dma engine.
In reply to Suman TripathiThis 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
@@ -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
@@ -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
PATCH v3 1/2 libahci: Implement the function ahci_restart_engine to restart the port dma engine.
In reply to Suman TripathiThis 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
@@ -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
@@ -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
v3 cover ]ata: Fix the dma state machine lockup for APM X-Gene SoC
In reply to Suman TripathiHi Suman,
Quoted 9 lines · Suman Tripathi
Signed-off-by Loc Ho <[email protected]>Signed-off-by Suman Tripathi <[email protected]>---
Suman Tripathi (2):
libahci: Implement the functionahci_restart_engineto 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!
Thanks,
Signature · 1 line
Ming Lei