staging: mt7621-mmc: Do not BUG() if mrq set in msdc_ops_request

Currently the code BUG()'s, if host->mrq is set at the beginning of
msdc_ops_request. This shoould normally not happen, but it is not that
critical, because the critical sections are protected by a spin lock
and in the worst case, some commands to the card are lost, so it is
sufficient to just WARN_ON().

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christian Lütke-Stetzkamp 2018-04-29 19:32:34 +02:00 committed by Greg Kroah-Hartman
parent ec7375d1f5
commit eafda89222
1 changed files with 1 additions and 4 deletions

View File

@ -1716,10 +1716,7 @@ static void msdc_ops_request(struct mmc_host *mmc, struct mmc_request *mrq)
u32 ticks = 0, opcode = 0, sizes = 0, bRx = 0; u32 ticks = 0, opcode = 0, sizes = 0, bRx = 0;
#endif /* end of --- */ #endif /* end of --- */
if (host->mrq) { WARN_ON(host->mrq);
ERR_MSG("XXX host->mrq<0x%.8x>", (int)host->mrq);
BUG();
}
if (!is_card_present(host) || host->power_mode == MMC_POWER_OFF) { if (!is_card_present(host) || host->power_mode == MMC_POWER_OFF) {
ERR_MSG("cmd<%d> card<%d> power<%d>", mrq->cmd->opcode, is_card_present(host), host->power_mode); ERR_MSG("cmd<%d> card<%d> power<%d>", mrq->cmd->opcode, is_card_present(host), host->power_mode);