mmc: dw_mmc: make sure of clearing HLE interrupt
Subsystems (2)
PATCH 2/2 mmc: dw_mmc: make sure of clearing HLE interrupt
Even though HLE interrupt is enabled, there is no touch. This patch clears HLE interrupt which is not unhandled.
--- drivers/mmc/host/dw_mmc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
drivers/mmc/host/dw_mmc.c +11 -0
@@ -1009,6 +1009,11 @@ static void dw_mci_tasklet_func(unsigned long priv) state = host->state; data = host->data; +if (host->cmd_status &SDMMC_INT_HLE ) { +dev_err (host->dev,"hardware locked write error\n" ); + goto unlock; + } + do { prev_state = state;
@@ -1577,6 +1582,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)if (!pending)break ; +if (pending &SDMMC_INT_HLE ) { +mci_writel (host,RINTSTS ,SDMMC_INT_HLE ); + host->cmd_status = pending; +tasklet_schedule (&host->tasklet); + } +if (pending &DW_MCI_CMD_ERROR_FLAGS ) {mci_writel (host,RINTSTS ,DW_MCI_CMD_ERROR_FLAGS ); host->cmd_status = pending;
Signature · 1 line
1.7.0.4
Hi,
Quoted 2 lines · Seungwon Jeon
Even though HLE interrupt is enabled, there is no touch. This patch clears HLE interrupt which is not unhandled.
It's not entirely clear from this description what the patch is trying to do. I presume from the patch you're trying to say something like:
"Even though the HLE interrupt is enabled, it isn't handled, so handle the HLE interrupt by printing an error message."
According to the TRM though, in the section Error Handling (HLE is also mentioned elsewhere):
Quoted 4 lines
Hardware locked error – Set when the
DWC_mobile_storagecannot load a command issued by
software. When software sets thestart_cmdbit in the CMD register, theDWC_mobile_storagetries to load the command. If the command buffer is already filled with a command, this error is raised. The software then has to reload the command.
So it sounds like the last command should be reloaded (either on interrupt or the interrupt status should be checked after starting a command). Is this done elsewhere already?
Cheers
James
Quoted 36 lines
Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)drivers/mmc/host/dw_mmc.c +11
-0@@ -1009,6 +1009,11 @@ static void dw_mci_tasklet_func(unsigned long priv) state = host->state; data = host->data; +if (host->cmd_status &SDMMC_INT_HLE ) { +dev_err (host->dev,"hardware locked write error\n" ); + goto unlock; + } + do { prev_state = state;@@ -1577,6 +1582,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)if (!pending)break ; +if (pending &SDMMC_INT_HLE ) { +mci_writel (host,RINTSTS ,SDMMC_INT_HLE ); + host->cmd_status = pending; +tasklet_schedule (&host->tasklet); + } +if (pending &DW_MCI_CMD_ERROR_FLAGS ) {mci_writel (host,RINTSTS ,DW_MCI_CMD_ERROR_FLAGS ); host->cmd_status = pending;
Hi James,
Quoted 10 lines · James Hogan
Hi,
Quoted 2 lines · Seungwon Jeon
Even though HLE interrupt is enabled, there is no touch. This patch clears HLE interrupt which is not unhandled.
It's not entirely clear from this description what the patch is trying to do. I presume from the patch you're trying to say something like:
"Even though the HLE interrupt is enabled, it isn't handled, so handle the HLE interrupt by printing an error message."
Currently, there is no code to clean the HLE interrupt, when it happens. So, interrupt will signaled permanently and then system is affected badly. The purpose of this patch to prevent this. Printing an message is just to inform error.
Quoted 11 lines
According to the TRM though, in the section Error Handling (HLE is also mentioned elsewhere):
Quoted 4 lines
Hardware locked error – Set when the
DWC_mobile_storagecannot load a command issued by
software. When software sets thestart_cmdbit in the CMD register, theDWC_mobile_storagetries to load the command. If the command buffer is already filled with a command, this error is raised. The software then has to reload the command.So it sounds like the last command should be reloaded (either on interrupt or the interrupt status should be checked after starting a command). Is this done elsewhere already?
I didn't see that for normal command.
We need to investigate about HLE case more. It's difficult to meet HLE. For this, I think this patch is effective at least.
If you have any good idea, please let me know.
Thanks,
Seungwon Jeon
Quoted 45 lines
Cheers
JamesQuoted 26 lines
Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)drivers/mmc/host/dw_mmc.c +5
-0@@ -1009,6 +1009,11 @@ static void dw_mci_tasklet_func(unsigned long priv) state = host->state; data = host->data; +if (host->cmd_status &SDMMC_INT_HLE ) { +dev_err (host->dev,"hardware locked write error\n" ); + goto unlock; + } + do { prev_state = state;@@ -1577,6 +1582,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)if (!pending)break ;drivers/mmc/host/dw_mmc.c static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) · line 1593
Quoted 10 lines
drivers/mmc/host/dw_mmc.c +6
-0+if (pending &SDMMC_INT_HLE ) { +mci_writel (host,RINTSTS ,SDMMC_INT_HLE ); + host->cmd_status = pending; +tasklet_schedule (&host->tasklet); + } +if (pending &DW_MCI_CMD_ERROR_FLAGS ) {mci_writel (host,RINTSTS ,DW_MCI_CMD_ERROR_FLAGS ); host->cmd_status = pending;--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
2012/11/29 Seungwon Jeon <[email protected]>:
Quoted 25 lines
Hi James,
Quoted 10 lines · James Hogan
Hi,
Quoted 2 lines · Seungwon Jeon
Even though HLE interrupt is enabled, there is no touch. This patch clears HLE interrupt which is not unhandled.
It's not entirely clear from this description what the patch is trying to do. I presume from the patch you're trying to say something like:
"Even though the HLE interrupt is enabled, it isn't handled, so handle the HLE interrupt by printing an error message."Currently, there is no code to clean the HLE interrupt, when it happens. So, interrupt will signaled permanently and then system is affected badly. The purpose of this patch to prevent this. Printing an message is just to inform error.
Quoted 8 lines
According to the TRM though, in the section Error Handling (HLE is also mentioned elsewhere):
Quoted 4 lines
Hardware locked error – Set when the
DWC_mobile_storagecannot load a command issued by
software. When software sets thestart_cmdbit in the CMD register, theDWC_mobile_storagetries to load the command. If the command buffer is already filled with a command, this error is raised. The software then has to reload the command.
Quoted 7 lines
Quoted 3 lines
So it sounds like the last command should be reloaded (either on interrupt or the interrupt status should be checked after starting a command). Is this done elsewhere already?
I didn't see that for normal command.
We need to investigate about HLE case more. It's difficult to meet HLE. For this, I think this patch is effective at least.
If you have any good idea, please let me know.
As mentioned at spec, if raised HLE when buffer is already filled with a command and try to load the other command,
how about the clear the buffer and reload the command?
If we need to consider others, i will also think this problem.
Best Regards,
Jaehoon Chung
Quoted 53 lines
Thanks,
Seungwon JeonQuoted 30 lines
Cheers
JamesQuoted 26 lines
Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)drivers/mmc/host/dw_mmc.c +5
-0@@ -1009,6 +1009,11 @@ static void dw_mci_tasklet_func(unsigned long priv) state = host->state; data = host->data; +if (host->cmd_status &SDMMC_INT_HLE ) { +dev_err (host->dev,"hardware locked write error\n" ); + goto unlock; + } + do { prev_state = state;@@ -1577,6 +1582,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)if (!pending)break ;Quoted 15 lines
drivers/mmc/host/dw_mmc.c static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) · line 1593
Quoted 10 lines
drivers/mmc/host/dw_mmc.c +6
-0+if (pending &SDMMC_INT_HLE ) { +mci_writel (host,RINTSTS ,SDMMC_INT_HLE ); + host->cmd_status = pending; +tasklet_schedule (&host->tasklet); + } +if (pending &DW_MCI_CMD_ERROR_FLAGS ) {mci_writel (host,RINTSTS ,DW_MCI_CMD_ERROR_FLAGS ); host->cmd_status = pending;--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 29 lines · Jae hoon Chung
2012/11/29 Seungwon Jeon <[email protected]>:
Quoted 28 lines
Hi James,
Quoted 10 lines · James Hogan
Hi,
Quoted 2 lines · Seungwon Jeon
Even though HLE interrupt is enabled, there is no touch. This patch clears HLE interrupt which is not unhandled.
It's not entirely clear from this description what the patch is trying to do. I presume from the patch you're trying to say something like:
"Even though the HLE interrupt is enabled, it isn't handled, so handle the HLE interrupt by printing an error message."Currently, there is no code to clean the HLE interrupt, when it happens. So, interrupt will signaled permanently and then system is affected badly. The purpose of this patch to prevent this. Printing an message is just to inform error.
Quoted 11 lines
According to the TRM though, in the section Error Handling (HLE is also mentioned elsewhere):
Quoted 4 lines
Hardware locked error – Set when the
DWC_mobile_storagecannot load a command issued by
software. When software sets thestart_cmdbit in the CMD register, theDWC_mobile_storagetries to load the command. If the command buffer is already filled with a command, this error is raised. The software then has to reload the command.So it sounds like the last command should be reloaded (either on interrupt or the interrupt status should be checked after starting a command). Is this done elsewhere already?
Quoted 8 lines
Quoted 4 lines
I didn't see that for normal command.
We need to investigate about HLE case more. It's difficult to meet HLE. For this, I think this patch is effective at least.
If you have any good idea, please let me know.As mentioned at spec, if raised HLE when buffer is already filled with a command and try to load the other command,
how about the clear the buffer and reload the command?
If we need to consider others, i will also think this problem.
I focused to clear unhanded interrupt in this patch. Do you mean retry for command after clearing HLE? I think HLE seems not happen during normal command actually. We may need to check the happening route of HLE. Please let me know if you have other opinion.
Thanks,
Seungwon Jeon
Quoted 56 lines
Best Regards,
Jaehoon ChungQuoted 53 lines
Thanks,
Seungwon JeonQuoted 30 lines
Cheers
JamesQuoted 26 lines
Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)drivers/mmc/host/dw_mmc.c +5
-0@@ -1009,6 +1009,11 @@ static void dw_mci_tasklet_func(unsigned long priv) state = host->state; data = host->data; +if (host->cmd_status &SDMMC_INT_HLE ) { +dev_err (host->dev,"hardware locked write error\n" ); + goto unlock; + } + do { prev_state = state;@@ -1577,6 +1582,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)if (!pending)break ;Quoted 15 lines
drivers/mmc/host/dw_mmc.c static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) · line 1593
Quoted 10 lines
drivers/mmc/host/dw_mmc.c +6
-0+if (pending &SDMMC_INT_HLE ) { +mci_writel (host,RINTSTS ,SDMMC_INT_HLE ); + host->cmd_status = pending; +tasklet_schedule (&host->tasklet); + } +if (pending &DW_MCI_CMD_ERROR_FLAGS ) {mci_writel (host,RINTSTS ,DW_MCI_CMD_ERROR_FLAGS ); host->cmd_status = pending;--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html