Skip to contentSkip to conversation

mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

PATCH ALIM AKHTAR 4 participants 6 messages Oct 7, 2013 – Nov 27, 2013 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi Jaeohoon,
Thanks for quick review.

Quoted 34 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 17:36 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi, Alim.

Quoted 26 lines · ALIM AKHTAR
Quoted 26 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 13:34 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Quoted 18 lines · ALIM AKHTAR

Hi Jaehoon,

Quoted 3 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)

Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi Alim,

Quoted 7 lines · alim akhtar

From: Alim Akhtar

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling. Could some command or data be lost?

No, Data and command will not be lost as they are not send out.

Maybe it needs to discuss how recovery the command/data, when HLE interrupt is occured. I want to know, do you have the recovery method when HLE interrupt is occured?

As you mentioned, this patch controlled the HLE error and can't send the any command/data. Patch like this had already posted at mailing list.

Can you point to the link?

Quoted 1 line

But we also need to control after occurred the HLE.

Well, dw_mmc controller document just say "The software then has to reload the command" to recover from HLE.

Quoted 2 lines

In SD-card's case, card can be inserted/removed. but in case of eMMC, can't it. It should be maintained the hardware lock status.

HLE is independent of emmc/sd slot and handling should be the same. Insert/removal is one way to simulate HLE, this is how I found this. Are you suggesting to check for INT_STATUE for emmc and handle it in case of HLE?

Quoted 30 lines
Quoted 30 lines

Best Regards,
Jaehoon Chung

Quoted 27 lines
Quoted 27 lines
Quoted 27 lines

Best Regards,
Jaehoon Chung

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar
---
  drivers/mmc/host/dw_mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
  SDMMC_INT_HTO | SDMMC_INT_SBE  | \
  SDMMC_INT_EBE)
  #define DW_MCI_CMD_ERROR_FLAGS (SDMMC_INT_RTO | SDMMC_INT_RCRC | \
- SDMMC_INT_RESP_ERR)
+ SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
  #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \
  DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
  #define DW_MCI_SEND_STATUS 1

N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±šg"žØ^n‡r¡ö¦zË?ëh™¨è­Ú&¢ø®G«?éh®(­éšŽŠÝ¢j"?ú¶m§ÿï?êäz¹Þ–Šàþf£¢·hšˆ§~ˆmml==

#1 lore raw

Hi Jaeohoon,

Quoted 44 lines · ALIM AKHTAR

Hi Jaeohoon,
Thanks for quick review.

Quoted 34 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 17:36 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi, Alim.

Quoted 26 lines · ALIM AKHTAR
Quoted 26 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 13:34 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Quoted 18 lines · ALIM AKHTAR

Hi Jaehoon,

Quoted 3 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)

Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi Alim,

Quoted 7 lines · alim akhtar

From: Alim Akhtar

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling. Could some command or data be lost?

No, Data and command will not be lost as they are not send out.

Maybe it needs to discuss how recovery the command/data, when HLE interrupt is occured. I want to know, do you have the recovery method when HLE interrupt is occured?

As you mentioned, this patch controlled the HLE error and can't send the any command/data. Patch like this had already posted at mailing list.

Quoted 8 lines

Can you point to the link?

Quoted 1 line

But we also need to control after occurred the HLE.

Well, dw_mmc controller document just say "The software then has to reload the command" to recover from HLE.

Quoted 2 lines

In SD-card's case, card can be inserted/removed. but in case of eMMC, can't it. It should be maintained the hardware lock status.

HLE is independent of emmc/sd slot and handling should be the same. Insert/removal is one way to simulate HLE, this is how I found this. Are you suggesting to check for INT_STATUE for emmc and handle it in case of HLE?

Let me know if you have any other comments/ suggestions on this. Thanks!!

Quoted 29 lines
Quoted 29 lines
Quoted 29 lines

Best Regards,
Jaehoon Chung

Quoted 26 lines
Quoted 26 lines
Quoted 26 lines

Best Regards,
Jaehoon Chung

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar
---
  drivers/mmc/host/dw_mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
  SDMMC_INT_HTO | SDMMC_INT_SBE  | \
  SDMMC_INT_EBE)
  #define DW_MCI_CMD_ERROR_FLAGS (SDMMC_INT_RTO | SDMMC_INT_RCRC | \
- SDMMC_INT_RESP_ERR)
+ SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
  #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \
  DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
  #define DW_MCI_SEND_STATUS 1
Signature · 2 lines
Regards,
Alim
#2 lore raw

Hi Seungwon/ Jaehoon,
I can see there are at least three patches which address HLE (Hardware Lock Error) in dw_mmc driver.

https://patchwork.kernel.org/patch/1814991/
http://www.spinics.net/lists/linux-mmc/msg21459.html
and third one is my patch
http://news.gmane.org/gmane.linux.kernel.mmc/cutoff=23010

Can we have some conclusion about how to handle HLE?

Thanks!!!

Quoted 92 lines · Alim Akhtar

Hi Jaeohoon,

Quoted 44 lines · ALIM AKHTAR

Hi Jaeohoon,
Thanks for quick review.

Quoted 34 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 17:36 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi, Alim.

Quoted 26 lines · ALIM AKHTAR
Quoted 26 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 13:34 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Quoted 18 lines · ALIM AKHTAR

Hi Jaehoon,

Quoted 3 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)

Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi Alim,

Quoted 7 lines · alim akhtar

From: Alim Akhtar

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling. Could some command or data be lost?

No, Data and command will not be lost as they are not send out.

Maybe it needs to discuss how recovery the command/data, when HLE interrupt is occured. I want to know, do you have the recovery method when HLE interrupt is occured?

As you mentioned, this patch controlled the HLE error and can't send the any command/data. Patch like this had already posted at mailing list.

Quoted 8 lines

Can you point to the link?

Quoted 1 line

But we also need to control after occurred the HLE.

Well, dw_mmc controller document just say "The software then has to reload the command" to recover from HLE.

Quoted 2 lines

In SD-card's case, card can be inserted/removed. but in case of eMMC, can't it. It should be maintained the hardware lock status.

HLE is independent of emmc/sd slot and handling should be the same. Insert/removal is one way to simulate HLE, this is how I found this. Are you suggesting to check for INT_STATUE for emmc and handle it in case of HLE?

Let me know if you have any other comments/ suggestions on this. Thanks!!

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines

Best Regards,
Jaehoon Chung

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

Best Regards,
Jaehoon Chung

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar
---
  drivers/mmc/host/dw_mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/host/dw_mmc.c +0 -0
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/mmc/host/dw_mmc.c line 50

Quoted 8 lines
drivers/mmc/host/dw_mmc.c +1 -1
  SDMMC_INT_HTO | SDMMC_INT_SBE  | \
  SDMMC_INT_EBE)
  #define DW_MCI_CMD_ERROR_FLAGS (SDMMC_INT_RTO | SDMMC_INT_RCRC | \
- SDMMC_INT_RESP_ERR)
+ SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
  #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \
  DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
  #define DW_MCI_SEND_STATUS 1

--
Regards,
Alim

Signature · 2 lines
Regards,
Alim
#3 lore raw

Dear, Alim,

Well, I'm not sure that this patch is correct.
But as you mentioned, we need to decide how control the HLE.

I will check the HLE on this weekend. Thanks for your effort.

Best Regards,
Jaehoon Chung

Quoted 109 lines · Alim Akhtar

Hi Seungwon/ Jaehoon,
I can see there are at least three patches which address HLE (Hardware Lock Error) in dw_mmc driver.

https://patchwork.kernel.org/patch/1814991/
http://www.spinics.net/lists/linux-mmc/msg21459.html
and third one is my patch
http://news.gmane.org/gmane.linux.kernel.mmc/cutoff=23010

Can we have some conclusion about how to handle HLE?

Thanks!!!

Quoted 92 lines · Alim Akhtar

Hi Jaeohoon,

Quoted 44 lines · ALIM AKHTAR

Hi Jaeohoon,
Thanks for quick review.

Quoted 34 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 17:36 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi, Alim.

Quoted 26 lines · ALIM AKHTAR
Quoted 26 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 13:34 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Quoted 18 lines · ALIM AKHTAR

Hi Jaehoon,

Quoted 3 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)

Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi Alim,

Quoted 7 lines · alim akhtar

From: Alim Akhtar

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling. Could some command or data be lost?

No, Data and command will not be lost as they are not send out.

Maybe it needs to discuss how recovery the command/data, when HLE interrupt is occured. I want to know, do you have the recovery method when HLE interrupt is occured?

As you mentioned, this patch controlled the HLE error and can't send the any command/data. Patch like this had already posted at mailing list.

Quoted 8 lines

Can you point to the link?

Quoted 1 line

But we also need to control after occurred the HLE.

Well, dw_mmc controller document just say "The software then has to reload the command" to recover from HLE.

Quoted 2 lines

In SD-card's case, card can be inserted/removed. but in case of eMMC, can't it. It should be maintained the hardware lock status.

HLE is independent of emmc/sd slot and handling should be the same. Insert/removal is one way to simulate HLE, this is how I found this. Are you suggesting to check for INT_STATUE for emmc and handle it in case of HLE?

Let me know if you have any other comments/ suggestions on this. Thanks!!

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines

Best Regards,
Jaehoon Chung

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

Best Regards,
Jaehoon Chung

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar
---
  drivers/mmc/host/dw_mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/host/dw_mmc.c +0 -0
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/mmc/host/dw_mmc.c line 50

Quoted 8 lines
drivers/mmc/host/dw_mmc.c +1 -1
  SDMMC_INT_HTO | SDMMC_INT_SBE  | \
  SDMMC_INT_EBE)
  #define DW_MCI_CMD_ERROR_FLAGS (SDMMC_INT_RTO | SDMMC_INT_RCRC | \
- SDMMC_INT_RESP_ERR)
+ SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
  #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \
  DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
  #define DW_MCI_SEND_STATUS 1

--
Regards,
Alim

#4 lore raw
Quoted 6 lines · Jaehoon Chung

Dear, Alim,

Well, I'm not sure that this patch is correct.
But as you mentioned, we need to decide how control the HLE.

I will check the HLE on this weekend. Thanks for your effort.

Thank you for remind.
HLE should be cleared at least although it needs to be handled more properly. I agree on that now.

Your patch is below?
https://patchwork.kernel.org/patch/2981661/

I think it's simple and good way.
It would be better to add error message when happened.

Thanks,
Seungwon Jeon

Quoted 120 lines

Best Regards,
Jaehoon Chung

Quoted 9 lines · Alim Akhtar

Hi Seungwon/ Jaehoon,
I can see there are at least three patches which address HLE (Hardware Lock Error) in dw_mmc driver.

https://patchwork.kernel.org/patch/1814991/
http://www.spinics.net/lists/linux-mmc/msg21459.html
and third one is my patch
http://news.gmane.org/gmane.linux.kernel.mmc/cutoff=23010

Quoted 55 lines

Can we have some conclusion about how to handle HLE?

Thanks!!!

Quoted 50 lines · Alim Akhtar

Hi Jaeohoon,

Quoted 47 lines · ALIM AKHTAR

Hi Jaeohoon,
Thanks for quick review.

Quoted 34 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 17:36 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi, Alim.

Quoted 26 lines · ALIM AKHTAR
Quoted 26 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 13:34 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Quoted 18 lines · ALIM AKHTAR

Hi Jaehoon,

Quoted 3 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)

Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi Alim,

Quoted 7 lines · alim akhtar

From: Alim Akhtar

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling. Could some command or data be lost?

No, Data and command will not be lost as they are not send out.

Maybe it needs to discuss how recovery the command/data, when HLE interrupt is occured. I want to know, do you have the recovery method when HLE interrupt is occured?

As you mentioned, this patch controlled the HLE error and can't send the any command/data. Patch like this had already posted at mailing list.

Can you point to the link?

Quoted 1 line

But we also need to control after occurred the HLE.

Well, dw_mmc controller document just say "The software then has to reload the command" to recover

from HLE.

Quoted 34 lines
Quoted 34 lines
Quoted 5 lines
Quoted 2 lines

In SD-card's case, card can be inserted/removed. but in case of eMMC, can't it. It should be maintained the hardware lock status.

HLE is independent of emmc/sd slot and handling should be the same. Insert/removal is one way to simulate HLE, this is how I found this. Are you suggesting to check for INT_STATUE for emmc and handle it in case of HLE?

Let me know if you have any other comments/ suggestions on this. Thanks!!

Quoted 25 lines
Quoted 25 lines
Quoted 25 lines

Best Regards,
Jaehoon Chung

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines

Best Regards,
Jaehoon Chung

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar
---
  drivers/mmc/host/dw_mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +0 -1
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
  SDMMC_INT_HTO | SDMMC_INT_SBE  | \
  SDMMC_INT_EBE)
  #define DW_MCI_CMD_ERROR_FLAGS (SDMMC_INT_RTO | SDMMC_INT_RCRC | \
- SDMMC_INT_RESP_ERR)
Quoted 11 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

drivers/mmc/host/dw_mmc.c line 50

Quoted 4 lines
drivers/mmc/host/dw_mmc.c +1 -0
+ SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
  #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \
  DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
  #define DW_MCI_SEND_STATUS 1

--
Regards,
Alim

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

#5 lore raw

Hi Seungwon

Quoted 6 lines · Seungwon Jeon
Quoted 5 lines · Jaehoon Chung

Dear, Alim,

Well, I'm not sure that this patch is correct.
But as you mentioned, we need to decide how control the HLE.

Quoted 8 lines
Quoted 1 line

I will check the HLE on this weekend. Thanks for your effort.

Thank you for remind.
HLE should be cleared at least although it needs to be handled more properly. I agree on that now.

Your patch is below?
https://patchwork.kernel.org/patch/2981661/

Yes, this is the one I posted.

Quoted 3 lines

I think it's simple and good way.
It would be better to add error message when happened.

Do you mean check for HLE in interrupt handler and print error message? If so, do you want me to respin this patch?

Quoted 125 lines

Thanks,
Seungwon Jeon

Quoted 120 lines

Best Regards,
Jaehoon Chung

Quoted 9 lines · Alim Akhtar

Hi Seungwon/ Jaehoon,
I can see there are at least three patches which address HLE (Hardware Lock Error) in dw_mmc driver.

https://patchwork.kernel.org/patch/1814991/
http://www.spinics.net/lists/linux-mmc/msg21459.html
and third one is my patch
http://news.gmane.org/gmane.linux.kernel.mmc/cutoff=23010

Quoted 55 lines

Can we have some conclusion about how to handle HLE?

Thanks!!!

Quoted 50 lines · Alim Akhtar

Hi Jaeohoon,

Quoted 47 lines · ALIM AKHTAR

Hi Jaeohoon,
Thanks for quick review.

Quoted 34 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 17:36 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi, Alim.

Quoted 26 lines · ALIM AKHTAR
Quoted 26 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 07, 2013 13:34 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Quoted 18 lines · ALIM AKHTAR

Hi Jaehoon,

Quoted 3 lines

------- Original Message -------
Sender : Jaehoon Chung S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)

Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi Alim,

Quoted 7 lines · alim akhtar

From: Alim Akhtar

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling. Could some command or data be lost?

No, Data and command will not be lost as they are not send out.

Maybe it needs to discuss how recovery the command/data, when HLE interrupt is occured. I want to know, do you have the recovery method when HLE interrupt is occured?

As you mentioned, this patch controlled the HLE error and can't send the any command/data. Patch like this had already posted at mailing list.

Can you point to the link?

Quoted 1 line

But we also need to control after occurred the HLE.

Well, dw_mmc controller document just say "The software then has to reload the command" to recover

from HLE.

Quoted 34 lines
Quoted 34 lines
Quoted 5 lines
Quoted 2 lines

In SD-card's case, card can be inserted/removed. but in case of eMMC, can't it. It should be maintained the hardware lock status.

HLE is independent of emmc/sd slot and handling should be the same. Insert/removal is one way to simulate HLE, this is how I found this. Are you suggesting to check for INT_STATUE for emmc and handle it in case of HLE?

Let me know if you have any other comments/ suggestions on this. Thanks!!

Quoted 25 lines
Quoted 25 lines
Quoted 25 lines

Best Regards,
Jaehoon Chung

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines

Best Regards,
Jaehoon Chung

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar
---
  drivers/mmc/host/dw_mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +0 -1
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
  SDMMC_INT_HTO | SDMMC_INT_SBE  | \
  SDMMC_INT_EBE)
  #define DW_MCI_CMD_ERROR_FLAGS (SDMMC_INT_RTO | SDMMC_INT_RCRC | \
- SDMMC_INT_RESP_ERR)
Quoted 11 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

drivers/mmc/host/dw_mmc.c line 50

Quoted 4 lines
drivers/mmc/host/dw_mmc.c +1 -0
+ SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
  #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \
  DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
  #define DW_MCI_SEND_STATUS 1

--
Regards,
Alim

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

Signature · 2 lines
Regards,
Alim