Skip to contentSkip to conversation

mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE)

PATCH In review [email protected] 3 participants 4 messages Aug 2, 2013

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

PATCH 1/1 mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE)

From: Dinh Nguyen <[email protected]>

The Handle the Hardware Locked Write Error(HLE) was getting triggered intermittently on the SOCFPGA platform. But since the driver did not have a mechanism to handle this interrupt, it was stuck in the ISR.

Clear the HLE interrupt when it gets triggered.

Cc Doug Anderson <[email protected]>
Cc Jaehoon Chung <[email protected]>
Cc James Hogan <[email protected]>
Cc Seungwon Jeon <[email protected]>
Cc Chris Ball <[email protected]>
---
 drivers/mmc/host/dw_mmc.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/dw_mmc.c +3 -0
index ee5f167..ef30bec 100644
@@ -1664,6 +1664,9 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
 			queue_work(host->card_workqueue, &host->card_work);
 		}
 
+		if (pending & SDMMC_INT_HLE)
+			mci_writel(host, RINTSTS, SDMMC_INT_HLE);
+
 		/* Handle SDIO Interrupts */
 		for (i = 0; i < host->num_slots; i++) {
 			struct dw_mci_slot *slot = host->slot[i];
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

You can refer to Seungwon's patch.

https://patchwork.kernel.org/patch/1814991/

Best Regards,
Jaehoon Chung

Quoted 33 lines · On 08/02/2013 12:50 PM, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

The Handle the Hardware Locked Write Error(HLE) was getting triggered intermittently on the SOCFPGA platform. But since the driver did not have a mechanism to handle this interrupt, it was stuck in the ISR.

Clear the HLE interrupt when it gets triggered.

Cc Doug Anderson <[email protected]>
Cc Jaehoon Chung <[email protected]>
Cc James Hogan <[email protected]>
Cc Seungwon Jeon <[email protected]>
Cc Chris Ball <[email protected]>
---
 drivers/mmc/host/dw_mmc.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/dw_mmc.c +3 -0
index ee5f167..ef30bec 100644
@@ -1664,6 +1664,9 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
 			queue_work(host->card_workqueue, &host->card_work);
 		}
 
+		if (pending & SDMMC_INT_HLE)
+			mci_writel(host, RINTSTS, SDMMC_INT_HLE);
+
 		/* Handle SDIO Interrupts */
 		for (i = 0; i < host->num_slots; i++) {
 			struct dw_mci_slot *slot = host->slot[i];
#2 lore raw

Hi Jaehoon,

Quoted 3 lines · Jaehoon Chung

You can refer to Seungwon's patch.

https://patchwork.kernel.org/patch/1814991/

Thanks alot for the referral. It appears that this exactly what I'm seeing on the SOCFPGA platform. The command buffer is already filled with a command when software sets the start_bit.

Wonder what happened to Senugwon's patch? I would think that the driver should at least clear the HLE interrupt when it is triggered?

Thanks,
Dinh

Quoted 39 lines

Best Regards,
Jaehoon Chung

Quoted 33 lines · On 08/02/2013 12:50 PM, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

The Handle the Hardware Locked Write Error(HLE) was getting triggered intermittently on the SOCFPGA platform. But since the driver did not have a mechanism to handle this interrupt, it was stuck in the ISR.

Clear the HLE interrupt when it gets triggered.

Cc Doug Anderson <[email protected]>
Cc Jaehoon Chung <[email protected]>
Cc James Hogan <[email protected]>
Cc Seungwon Jeon <[email protected]>
Cc Chris Ball <[email protected]>
---
 drivers/mmc/host/dw_mmc.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/dw_mmc.c +3 -0
index ee5f167..ef30bec 100644
@@ -1664,6 +1664,9 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
 			queue_work(host->card_workqueue, &host->card_work);
 		}
 
+		if (pending & SDMMC_INT_HLE)
+			mci_writel(host, RINTSTS, SDMMC_INT_HLE);
+
 		/* Handle SDIO Interrupts */
 		for (i = 0; i < host->num_slots; i++) {
 			struct dw_mci_slot *slot = host->slot[i];
maintainer
#3 lore raw
Quoted 10 lines · Dinh Nguyen

Hi Jaehoon,

Quoted 3 lines · Jaehoon Chung

You can refer to Seungwon's patch.

https://patchwork.kernel.org/patch/1814991/

Thanks alot for the referral. It appears that this exactly what I'm seeing on the SOCFPGA platform. The command buffer is already filled with a command when software sets the start_bit.

Right, HLE is triggered when the command buffer is filled fully. Previously command is waiting for completing, ongoing next command..and next.. Then i found the HLE interrupt is triggered.

Quoted 3 lines

Wonder what happened to Senugwon's patch? I would think that the driver should at least clear the HLE interrupt when it is triggered?

I known that Seungwon's patch is just noticed the HLE interrupt. We need to discuss how clear the HLE interrupt.
In my case, reset the fifo and resend the command that didn't complete. if you have any other idea, let me share.

Best Regards,
Jaehoon Chung

Quoted 47 lines

Thanks,
Dinh

Quoted 31 lines

Best Regards,
Jaehoon Chung

Quoted 26 lines · On 08/02/2013 12:50 PM, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

The Handle the Hardware Locked Write Error(HLE) was getting triggered intermittently on the SOCFPGA platform. But since the driver did not have a mechanism to handle this interrupt, it was stuck in the ISR.

Clear the HLE interrupt when it gets triggered.

Cc Doug Anderson <[email protected]>
Cc Jaehoon Chung <[email protected]>
Cc James Hogan <[email protected]>
Cc Seungwon Jeon <[email protected]>
Cc Chris Ball <[email protected]>
---
 drivers/mmc/host/dw_mmc.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/dw_mmc.c +0 -0
index ee5f167..ef30bec 100644
@@ -1664,6 +1664,9 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
 			queue_work(host->card_workqueue, &host->card_work);
 		}
 
Quoted 8 lines

drivers/mmc/host/dw_mmc.c static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) · line 1672

Quoted 7 lines
drivers/mmc/host/dw_mmc.c +3 -0
+		if (pending & SDMMC_INT_HLE)
+			mci_writel(host, RINTSTS, SDMMC_INT_HLE);
+
 		/* Handle SDIO Interrupts */
 		for (i = 0; i < host->num_slots; i++) {
 			struct dw_mci_slot *slot = host->slot[i];

--
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