Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "mmc: rtsx: reset power state on suspend"

This reverts commit eac85fbd0867c25ac517f58fae401d65c627edff.

This is not the correct change, so revert it for now.

Fixes: eac85fbd0867 ("mmc: rtsx: reset power state on suspend")
Cc: Matthew Schwartz <matthew.schwartz@linux.dev>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

-32
-9
drivers/misc/cardreader/rtsx_pcr.c
··· 1654 1654 struct pci_dev *pcidev = to_pci_dev(dev_d); 1655 1655 struct pcr_handle *handle = pci_get_drvdata(pcidev); 1656 1656 struct rtsx_pcr *pcr = handle->pcr; 1657 - struct rtsx_slot *slot = &pcr->slots[RTSX_SD_CARD]; 1658 1657 1659 1658 dev_dbg(&(pcidev->dev), "--> %s\n", __func__); 1660 1659 1661 1660 cancel_delayed_work_sync(&pcr->carddet_work); 1662 1661 1663 1662 mutex_lock(&pcr->pcr_mutex); 1664 - 1665 - if (slot->p_dev && slot->power_off) 1666 - slot->power_off(slot->p_dev); 1667 1663 1668 1664 rtsx_pci_power_off(pcr, HOST_ENTER_S3, false); 1669 1665 ··· 1772 1776 struct pci_dev *pcidev = to_pci_dev(device); 1773 1777 struct pcr_handle *handle = pci_get_drvdata(pcidev); 1774 1778 struct rtsx_pcr *pcr = handle->pcr; 1775 - struct rtsx_slot *slot = &pcr->slots[RTSX_SD_CARD]; 1776 1779 1777 1780 dev_dbg(device, "--> %s\n", __func__); 1778 1781 1779 1782 cancel_delayed_work_sync(&pcr->carddet_work); 1780 1783 1781 1784 mutex_lock(&pcr->pcr_mutex); 1782 - 1783 - if (slot->p_dev && slot->power_off) 1784 - slot->power_off(slot->p_dev); 1785 - 1786 1785 rtsx_pci_power_off(pcr, HOST_ENTER_S3, true); 1787 1786 1788 1787 mutex_unlock(&pcr->pcr_mutex);
-22
drivers/mmc/host/rtsx_pci_sdmmc.c
··· 47 47 }; 48 48 49 49 static int sdmmc_init_sd_express(struct mmc_host *mmc, struct mmc_ios *ios); 50 - static int sd_power_on(struct realtek_pci_sdmmc *host, unsigned char power_mode); 51 50 52 51 static inline struct device *sdmmc_dev(struct realtek_pci_sdmmc *host) 53 52 { ··· 821 822 822 823 rtsx_pci_start_run(pcr); 823 824 824 - if (host->prev_power_state == MMC_POWER_OFF) { 825 - err = sd_power_on(host, MMC_POWER_ON); 826 - if (err) { 827 - cmd->error = err; 828 - mutex_unlock(&pcr->pcr_mutex); 829 - goto finish; 830 - } 831 - } 832 - 833 825 rtsx_pci_switch_clock(pcr, host->clock, host->ssc_depth, 834 826 host->initial_mode, host->double_clk, host->vpclk); 835 827 rtsx_pci_write_register(pcr, CARD_SELECT, 0x07, SD_MOD_SEL); ··· 1481 1491 mmc_detect_change(host->mmc, 0); 1482 1492 } 1483 1493 1484 - static void rtsx_pci_sdmmc_power_off(struct platform_device *pdev) 1485 - { 1486 - struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev); 1487 - 1488 - if (!host) 1489 - return; 1490 - 1491 - host->prev_power_state = MMC_POWER_OFF; 1492 - } 1493 - 1494 1494 static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) 1495 1495 { 1496 1496 struct mmc_host *mmc; ··· 1513 1533 platform_set_drvdata(pdev, host); 1514 1534 pcr->slots[RTSX_SD_CARD].p_dev = pdev; 1515 1535 pcr->slots[RTSX_SD_CARD].card_event = rtsx_pci_sdmmc_card_event; 1516 - pcr->slots[RTSX_SD_CARD].power_off = rtsx_pci_sdmmc_power_off; 1517 1536 1518 1537 mutex_init(&host->host_mutex); 1519 1538 ··· 1544 1565 pcr = host->pcr; 1545 1566 pcr->slots[RTSX_SD_CARD].p_dev = NULL; 1546 1567 pcr->slots[RTSX_SD_CARD].card_event = NULL; 1547 - pcr->slots[RTSX_SD_CARD].power_off = NULL; 1548 1568 mmc = host->mmc; 1549 1569 1550 1570 cancel_work_sync(&host->work);
-1
include/linux/rtsx_common.h
··· 32 32 struct rtsx_slot { 33 33 struct platform_device *p_dev; 34 34 void (*card_event)(struct platform_device *p_dev); 35 - void (*power_off)(struct platform_device *p_dev); 36 35 }; 37 36 38 37 #endif