Skip to contentSkip to conversation

mmc: eMMC BKOPS status handling lock for non urgent case

DISCUSSION Markus Niebel 2 participants 5 messages Aug 29, 2014 – Sep 15, 2014 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hello,

experimenting with the current BKOPS code we found, that when triggering from BKOPS_LEVEL 1, the status stored with mmc_card_set_doing_bkops is never reset preventing BKOPS from working.

Since I'm not an expert in the mmc subsystem I ask for a hint where to look for completion and implement proper status reset.

Thanks in advance

Markus Niebel

#1 lore raw

Hi, Markus

Sorry for replying too late.

Quoted 4 lines · Markus Niebel

Hello,

experimenting with the current BKOPS code we found, that when triggering from BKOPS_LEVEL 1, the status stored with mmc_card_set_doing_bkops is never reset preventing BKOPS from working.

In now, bkops is working for upper case than LEVEL_2 (urgent case). Patch of LEVEL_1's case has sent at mailing, maybe you can found it.

Quoted 3 lines

Since I'm not an expert in the mmc subsystem I ask for a hint where to look for completion and implement proper status reset.

Could you explain to me more?

Best Regards,
Jaehoon Chung

Quoted 5 lines

Thanks in advance

Markus Niebel

#2 lore raw

Hello Jaehoon Chung

Am 03.09.2014 03:47, wrote Jaehoon Chung:

Quoted 11 lines

Hi, Markus

Sorry for replying too late.

Quoted 4 lines · Markus Niebel

Hello,

experimenting with the current BKOPS code we found, that when triggering from BKOPS_LEVEL 1, the status stored with mmc_card_set_doing_bkops is never reset preventing BKOPS from working.

In now, bkops is working for upper case than LEVEL_2 (urgent case). Patch of LEVEL_1's case has sent at mailing, maybe you can found it.

I will look for it.

Quoted 6 lines
Quoted 4 lines

Since I'm not an expert in the mmc subsystem I ask for a hint where to look for completion and implement proper status reset.

Could you explain to me more?

If starting BKOPS with BKOPS_LEVEL 1 a switch (CMD6) without wait for completion (status polling) is issued an a status variable is set. I did'nt find a place where this status is reset.

Quoted 9 lines

Best Regards,
Jaehoon Chung

Quoted 5 lines

Thanks in advance

Markus Niebel

Best Regards,
Markus Niebel

#3 lore raw

Hi,

Quoted 19 lines · Markus Niebel

Hello Jaehoon Chung

Am 03.09.2014 03:47, wrote Jaehoon Chung:

Quoted 11 lines

Hi, Markus

Sorry for replying too late.

Quoted 4 lines · Markus Niebel

Hello,

experimenting with the current BKOPS code we found, that when triggering from BKOPS_LEVEL 1, the status stored with mmc_card_set_doing_bkops is never reset preventing BKOPS from working.

In now, bkops is working for upper case than LEVEL_2 (urgent case). Patch of LEVEL_1's case has sent at mailing, maybe you can found it.

I will look for it.

Quoted 2 lines
Quoted 2 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Since I'm not an expert in the mmc subsystem I ask for a hint where to look for completion and implement proper status reset.

Could you explain to me more?

If starting BKOPS with BKOPS_LEVEL 1 a switch (CMD6) without wait for completion (status polling) is issued an a status variable is set. I did'nt find a place where this status is reset.

You means when BKOPS_LEVEL_1 is set, this status didn't reset anywhere, right? I didn't know why this value needs to reset.
Before starting BKOPS, always read the bkops-status from card's ext_csd register. Then it should be re-assigned to the new status value.

we didn't refer to bkops-status for starting bkops or not.

Best Regards,
Jaehoon Chung

Quoted 14 lines
Quoted 10 lines

Best Regards,
Jaehoon Chung

Quoted 5 lines

Thanks in advance

Markus Niebel

Best Regards,
Markus Niebel

#4 lore raw

Hello,
Am 12.09.2014 um 04:45 schrieb Jaehoon Chung:

Quoted 24 lines

Hi,

Quoted 13 lines · Markus Niebel

Hello Jaehoon Chung

Quoted 6 lines
Quoted 4 lines

Hello,

experimenting with the current BKOPS code we found, that when triggering from BKOPS_LEVEL 1, the status stored with mmc_card_set_doing_bkops is never reset preventing BKOPS from working.

In now, bkops is working for upper case than LEVEL_2 (urgent case). Patch of LEVEL_1's case has sent at mailing, maybe you can found it.

I will look for it.

Quoted 2 lines
Quoted 2 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Since I'm not an expert in the mmc subsystem I ask for a hint where to look for completion and implement proper status reset.

Could you explain to me more?

If starting BKOPS with BKOPS_LEVEL 1 a switch (CMD6) without wait for completion (status polling) is issued an a status variable is set. I did'nt find a place where this status is reset.

Quoted 7 lines

You means when BKOPS_LEVEL_1 is set, this status didn't reset anywhere, right? I didn't know why this value needs to reset.
Before starting BKOPS, always read the bkops-status from card's ext_csd register. Then it should be re-assigned to the new status value.

we didn't refer to bkops-status for starting bkops or not.

in drivers/mmc/core/core.c:

void mmc_start_bkops(struct mmc_card *card, bool from_exception)

a driver internal status is checked with mmc_card_doing_bkops(card) and in case the state is set nothing will be done

At the end of the function the state is set with mmc_card_set_doing_bkops(card) for the non urgent case

The state is only reset from mmc_stop_bkops which is only called from _mmc_suspend

Quoted 2 lines

Best Regards,
Jaehoon Chung

Best Regards,
Markus Niebel