Patch "mmc: mtk-sd: Fix MMC_CAP2_CRYPTO flag setting" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mmc: mtk-sd: Fix MMC_CAP2_CRYPTO flag setting

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mmc-mtk-sd-fix-mmc_cap2_crypto-flag-setting.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1b6c03bbcd2070bcf7afdb9019bb429088c1237b
Author: Andy-ld Lu <andy-ld.lu@xxxxxxxxxxxx>
Date:   Mon Nov 11 16:49:31 2024 +0800

    mmc: mtk-sd: Fix MMC_CAP2_CRYPTO flag setting
    
    [ Upstream commit 2508925fb346661bad9f50b497d7ac7d0b6085d0 ]
    
    Currently, the MMC_CAP2_CRYPTO flag is set by default for eMMC hosts.
    However, this flag should not be set for hosts that do not support inline
    encryption.
    
    The 'crypto' clock, as described in the documentation, is used for data
    encryption and decryption. Therefore, only hosts that are configured with
    this 'crypto' clock should have the MMC_CAP2_CRYPTO flag set.
    
    Fixes: 7b438d0377fb ("mmc: mtk-sd: add Inline Crypto Engine clock control")
    Fixes: ed299eda8fbb ("mmc: mtk-sd: fix devm_clk_get_optional usage")
    Signed-off-by: Andy-ld Lu <andy-ld.lu@xxxxxxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx
    Message-ID: <20241111085039.26527-1-andy-ld.lu@xxxxxxxxxxxx>
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 83e7291481861..813bc20cfb5a6 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2774,7 +2774,8 @@ static int msdc_drv_probe(struct platform_device *pdev)
 		host->crypto_clk = devm_clk_get_optional(&pdev->dev, "crypto");
 		if (IS_ERR(host->crypto_clk))
 			return PTR_ERR(host->crypto_clk);
-		mmc->caps2 |= MMC_CAP2_CRYPTO;
+		else if (host->crypto_clk)
+			mmc->caps2 |= MMC_CAP2_CRYPTO;
 	}
 
 	host->irq = platform_get_irq(pdev, 0);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux