X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=target%2Flinux%2Framips%2Ffiles%2Fdrivers%2Fmmc%2Fhost%2Fmtk-mmc%2Fsd.c;fp=target%2Flinux%2Framips%2Ffiles%2Fdrivers%2Fmmc%2Fhost%2Fmtk-mmc%2Fsd.c;h=188e0155722e1b016937c2b994bf186d818964ab;hb=cd6515c2e87b85bb3796ba365db34b3c52a251d5;hp=8cbc87da3afcf3e774281c56150e92ff31634fe6;hpb=dd13add3ceed9056b0b3cce182241ba553ed07cb;p=openwrt%2F.git diff --git a/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/sd.c b/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/sd.c index 8cbc87da3a..188e015572 100644 --- a/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/sd.c +++ b/target/linux/ramips/files/drivers/mmc/host/mtk-mmc/sd.c @@ -439,6 +439,8 @@ static void msdc_tasklet_card(struct work_struct *work) inserted = (status & MSDC_PS_CDSTS) ? 0 : 1; else inserted = (status & MSDC_PS_CDSTS) ? 1 : 0; + if (host->mmc->caps & MMC_CAP_NEEDS_POLL) + inserted = 1; #if 0 change = host->card_inserted ^ inserted; @@ -1857,6 +1859,8 @@ static int msdc_ops_get_cd(struct mmc_host *mmc) present = (sdr_read32(MSDC_PS) & MSDC_PS_CDSTS) ? 0 : 1; else present = (sdr_read32(MSDC_PS) & MSDC_PS_CDSTS) ? 1 : 0; + if (host->mmc->caps & MMC_CAP_NEEDS_POLL) + present = 1; host->card_inserted = present; #endif spin_unlock_irqrestore(&host->lock, flags);