public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE)
@ 2013-08-02  3:50 dinguyen
  2013-08-02  4:14 ` Jaehoon Chung
  0 siblings, 1 reply; 4+ messages in thread
From: dinguyen @ 2013-08-02  3:50 UTC (permalink / raw)
  To: dinh.linux, linux-mmc
  Cc: Dinh Nguyen, Doug Anderson, Jaehoon Chung, James Hogan,
	Seungwon Jeon, Chris Ball

From: Dinh Nguyen <dinguyen@altera.com>

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.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Seungwon Jeon <tgih.jun@samsung.com>
Cc: Chris Ball <cjb@laptop.org>
---
 drivers/mmc/host/dw_mmc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index ee5f167..ef30bec 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -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];
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE)
  2013-08-02  3:50 [PATCH] mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE) dinguyen
@ 2013-08-02  4:14 ` Jaehoon Chung
  2013-08-02  5:10   ` Dinh Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Jaehoon Chung @ 2013-08-02  4:14 UTC (permalink / raw)
  To: dinguyen
  Cc: dinh.linux, linux-mmc, Doug Anderson, Jaehoon Chung, James Hogan,
	Seungwon Jeon, Chris Ball

You can refer to Seungwon's patch.

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

Best Regards,
Jaehoon Chung

On 08/02/2013 12:50 PM, dinguyen@altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
> 
> 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.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> Cc: Doug Anderson <dianders@chromium.org>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Cc: James Hogan <james.hogan@imgtec.com>
> Cc: Seungwon Jeon <tgih.jun@samsung.com>
> Cc: Chris Ball <cjb@laptop.org>
> ---
>  drivers/mmc/host/dw_mmc.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index ee5f167..ef30bec 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -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];
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE)
  2013-08-02  4:14 ` Jaehoon Chung
@ 2013-08-02  5:10   ` Dinh Nguyen
  2013-08-02  5:48     ` Jaehoon Chung
  0 siblings, 1 reply; 4+ messages in thread
From: Dinh Nguyen @ 2013-08-02  5:10 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: dinguyen, linux-mmc, Doug Anderson, James Hogan, Seungwon Jeon,
	Chris Ball

Hi Jaehoon,

On 08/01/2013 11:14 PM, Jaehoon Chung wrote:
> 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
> 
> Best Regards,
> Jaehoon Chung
> 
> On 08/02/2013 12:50 PM, dinguyen@altera.com wrote:
>> From: Dinh Nguyen <dinguyen@altera.com>
>>
>> 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.
>>
>> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
>> Cc: Doug Anderson <dianders@chromium.org>
>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>> Cc: James Hogan <james.hogan@imgtec.com>
>> Cc: Seungwon Jeon <tgih.jun@samsung.com>
>> Cc: Chris Ball <cjb@laptop.org>
>> ---
>>  drivers/mmc/host/dw_mmc.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>> index ee5f167..ef30bec 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -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];
>>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE)
  2013-08-02  5:10   ` Dinh Nguyen
@ 2013-08-02  5:48     ` Jaehoon Chung
  0 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2013-08-02  5:48 UTC (permalink / raw)
  To: Dinh Nguyen
  Cc: Jaehoon Chung, dinguyen, linux-mmc, Doug Anderson, James Hogan,
	Seungwon Jeon, Chris Ball

On 08/02/2013 02:10 PM, Dinh Nguyen wrote:
> Hi Jaehoon,
> 
> On 08/01/2013 11:14 PM, Jaehoon Chung wrote:
>> 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.

> 
> 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
> 
> Thanks,
> Dinh
>>
>> Best Regards,
>> Jaehoon Chung
>>
>> On 08/02/2013 12:50 PM, dinguyen@altera.com wrote:
>>> From: Dinh Nguyen <dinguyen@altera.com>
>>>
>>> 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.
>>>
>>> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
>>> Cc: Doug Anderson <dianders@chromium.org>
>>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>>> Cc: James Hogan <james.hogan@imgtec.com>
>>> Cc: Seungwon Jeon <tgih.jun@samsung.com>
>>> Cc: Chris Ball <cjb@laptop.org>
>>> ---
>>>  drivers/mmc/host/dw_mmc.c |    3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>>> index ee5f167..ef30bec 100644
>>> --- a/drivers/mmc/host/dw_mmc.c
>>> +++ b/drivers/mmc/host/dw_mmc.c
>>> @@ -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];
>>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-02  5:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02  3:50 [PATCH] mmc: dw_mmc: Handle the Hardware Locked Write Error(HLE) dinguyen
2013-08-02  4:14 ` Jaehoon Chung
2013-08-02  5:10   ` Dinh Nguyen
2013-08-02  5:48     ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox