--- zzzz-none-000/linux-4.1.52/drivers/mmc/host/sdhci.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/drivers/mmc/host/sdhci.c 2022-03-02 11:37:13.000000000 +0000 @@ -1031,6 +1031,12 @@ WARN_ON(host->cmd); +#if defined(CONFIG_BCM_KF_MISC_BACKPORTS) + /* Force R1b response onto all STOP commands */ + if ((host->quirks2 & SDHCI_QUIRK2_STOP_WITH_TC) && + cmd->opcode == MMC_STOP_TRANSMISSION) + cmd->flags |= MMC_RSP_BUSY; +#endif /* Wait max 10 ms */ timeout = 10; @@ -2426,10 +2432,18 @@ /* The controller does not support the end-of-busy IRQ, * fall through and take the SDHCI_INT_RESPONSE */ +#if defined(CONFIG_BCM_KF_MISC_BACKPORTS) + /* All STOP commands will have R1b responses forced on them + * therefore any spurious TC before/after CC will be automatically + * handled in sdhci_data_irq + */ + } +#else } else if ((host->quirks2 & SDHCI_QUIRK2_STOP_WITH_TC) && host->cmd->opcode == MMC_STOP_TRANSMISSION && !host->data) { *mask &= ~SDHCI_INT_DATA_END; } +#endif if (intmask & SDHCI_INT_RESPONSE) sdhci_finish_command(host);