Merge tag 'mmc-fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC fixes from Chris Ball: "Two small regression fixes: - sdhci-s3c: Fix runtime PM regression against 3.7-rc1 - sh-mmcif: Fix oops against 3.6" * tag 'mmc-fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: sh-mmcif: avoid oops on spurious interrupts (second try) Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts" mmc: sdhci-s3c: fix missing clock for gpio card-detect
This commit is contained in:
@@ -373,18 +373,25 @@ static struct sdhci_ops sdhci_s3c_ops = {
|
||||
static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
|
||||
{
|
||||
struct sdhci_host *host = platform_get_drvdata(dev);
|
||||
struct sdhci_s3c *sc = sdhci_priv(host);
|
||||
unsigned long flags;
|
||||
|
||||
if (host) {
|
||||
spin_lock_irqsave(&host->lock, flags);
|
||||
if (state) {
|
||||
dev_dbg(&dev->dev, "card inserted.\n");
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
clk_prepare_enable(sc->clk_io);
|
||||
#endif
|
||||
host->flags &= ~SDHCI_DEVICE_DEAD;
|
||||
host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
|
||||
} else {
|
||||
dev_dbg(&dev->dev, "card removed.\n");
|
||||
host->flags |= SDHCI_DEVICE_DEAD;
|
||||
host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
clk_disable_unprepare(sc->clk_io);
|
||||
#endif
|
||||
}
|
||||
tasklet_schedule(&host->card_tasklet);
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
|
@@ -1104,7 +1104,6 @@ static irqreturn_t sh_mmcif_irqt(int irq, void *dev_id)
|
||||
{
|
||||
struct sh_mmcif_host *host = dev_id;
|
||||
struct mmc_request *mrq = host->mrq;
|
||||
struct mmc_data *data = mrq->data;
|
||||
|
||||
cancel_delayed_work_sync(&host->timeout_work);
|
||||
|
||||
@@ -1152,13 +1151,14 @@ static irqreturn_t sh_mmcif_irqt(int irq, void *dev_id)
|
||||
case MMCIF_WAIT_FOR_READ_END:
|
||||
case MMCIF_WAIT_FOR_WRITE_END:
|
||||
if (host->sd_error)
|
||||
data->error = sh_mmcif_error_manage(host);
|
||||
mrq->data->error = sh_mmcif_error_manage(host);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
||||
if (host->wait_for != MMCIF_WAIT_FOR_STOP) {
|
||||
struct mmc_data *data = mrq->data;
|
||||
if (!mrq->cmd->error && data && !data->error)
|
||||
data->bytes_xfered =
|
||||
data->blocks * data->blksz;
|
||||
@@ -1231,10 +1231,6 @@ static irqreturn_t sh_mmcif_intr(int irq, void *dev_id)
|
||||
host->sd_error = true;
|
||||
dev_dbg(&host->pd->dev, "int err state = %08x\n", state);
|
||||
}
|
||||
if (host->state == STATE_IDLE) {
|
||||
dev_info(&host->pd->dev, "Spurious IRQ status 0x%x", state);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
if (state & ~(INT_CMD12RBE | INT_CMD12CRE)) {
|
||||
if (!host->dma_active)
|
||||
return IRQ_WAKE_THREAD;
|
||||
|
Reference in New Issue
Block a user