hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/mmc/host/tmio_mmc_core.c
....@@ -1158,7 +1158,9 @@
11581158 tmio_mmc_reset(_host);
11591159
11601160 _host->sdcard_irq_mask = sd_ctrl_read16_and_16_as_32(_host, CTL_IRQ_MASK);
1161
- tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL);
1161
+ if (!_host->sdcard_irq_mask_all)
1162
+ _host->sdcard_irq_mask_all = TMIO_MASK_ALL;
1163
+ tmio_mmc_disable_mmc_irqs(_host, _host->sdcard_irq_mask_all);
11621164
11631165 if (_host->native_hotplug)
11641166 tmio_mmc_enable_mmc_irqs(_host,
....@@ -1212,7 +1214,7 @@
12121214 cancel_work_sync(&host->done);
12131215 cancel_delayed_work_sync(&host->delayed_reset_work);
12141216 tmio_mmc_release_dma(host);
1215
- tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
1217
+ tmio_mmc_disable_mmc_irqs(host, host->sdcard_irq_mask_all);
12161218
12171219 if (host->native_hotplug)
12181220 pm_runtime_put_noidle(&pdev->dev);
....@@ -1242,7 +1244,7 @@
12421244 {
12431245 struct tmio_mmc_host *host = dev_get_drvdata(dev);
12441246
1245
- tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
1247
+ tmio_mmc_disable_mmc_irqs(host, host->sdcard_irq_mask_all);
12461248
12471249 if (host->clk_cache)
12481250 host->set_clock(host, 0);