FROMGIT: mmc: cqhci: Capture eMMC and SD card errors
Add changes to capture eMMC and SD card errors. This is useful for debug and testing. (cherry picked from commit 38def9680980e9d1eeeb4ca37937101201b6c5d7 https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git devel) Bug: 233007144 Link: https://lore.kernel.org/lkml/1652857340-6040-6-git-send-email-quic_c_sbhanu@quicinc.com/ Signed-off-by: Liangliang Lu <quic_luliang@quicinc.com> Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com> Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com> Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com> Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com> Change-Id: Ie2bfa597623523dbce17623f7ced13b8bd699e76
This commit is contained in:
committed by
Carlos Llamas
parent
232df716fb
commit
377ef18ed6
@@ -822,8 +822,15 @@ irqreturn_t cqhci_irq(struct mmc_host *mmc, u32 intmask, int cmd_error,
|
|||||||
pr_debug("%s: cqhci: IRQ status: 0x%08x\n", mmc_hostname(mmc), status);
|
pr_debug("%s: cqhci: IRQ status: 0x%08x\n", mmc_hostname(mmc), status);
|
||||||
|
|
||||||
if ((status & (CQHCI_IS_RED | CQHCI_IS_GCE | CQHCI_IS_ICCE)) ||
|
if ((status & (CQHCI_IS_RED | CQHCI_IS_GCE | CQHCI_IS_ICCE)) ||
|
||||||
cmd_error || data_error)
|
cmd_error || data_error) {
|
||||||
|
if (status & CQHCI_IS_RED)
|
||||||
|
mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_RED);
|
||||||
|
if (status & CQHCI_IS_GCE)
|
||||||
|
mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_GCE);
|
||||||
|
if (status & CQHCI_IS_ICCE)
|
||||||
|
mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_ICCE);
|
||||||
cqhci_error_irq(mmc, status, cmd_error, data_error);
|
cqhci_error_irq(mmc, status, cmd_error, data_error);
|
||||||
|
}
|
||||||
|
|
||||||
if (status & CQHCI_IS_TCC) {
|
if (status & CQHCI_IS_TCC) {
|
||||||
/* read TCN and complete the request */
|
/* read TCN and complete the request */
|
||||||
|
|||||||
Reference in New Issue
Block a user