From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 942234E4306; Wed, 30 Sep 2026 16:37:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790786232; cv=none; b=fu4yVwexKmq6jZAf30HvvUypnGEI5HfkE6JXp1YtU07Wab+zNQXofj5BZdrn8dDgH5e6W6zvbuAVriHAXPqgAEsARGOGxfeG20E6RVvb1+gtgtfJHsk2aRNZWhRhWHZcOm+VgMyjSSBDm4teM8q+ChYd8NZmlC7+czklOTKfRSE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790786232; c=relaxed/simple; bh=5DLlyHceBpz7RNffp4qhKbuGXC6y6Si9ar88CCQXoEk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SjmHZPujG3qdt3NVaabIx/8rsE6wp4DkifxaJ/5Lj/m8u9TnQQdEs+ffnBHPN537sTyiU1FW0793pfX1OeOvSG7uSqiS34EzGp17SE+Ega4ZkfLAObXhm2BtYLzoqM6HQRxO9FcVQTtjSsOvKDa0ldnoPZho3nGyEB/aWU0fm3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=E2zJ5qoO; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="E2zJ5qoO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB16B1F00893; Wed, 30 Sep 2026 16:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790786231; bh=RTbpc7XjpxaC40+PERCSbpMzbOQtuc6/qEy3ndD6Ip4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=E2zJ5qoOLvK88z7M7rku/jrkdrAXfiqQqG1Cy/kkpr/7aNY+jSHU89n8peeRJ/z2R NtiVYNswth7PqbEWxgHFj55Sh7G2/gStPQy1Z41uW+Ca1428vlIwEVKTazNRWMWPFI 6ex3blEGLyR5XxxNKLvSOlQX3Eido2NzsggowPaU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Maillard , Ulf Hansson Subject: [PATCH 6.1 733/982] mmc: rtsx_pci_sdmmc: ignore broken write-protect on ThinkPad X260 Date: Wed, 30 Sep 2026 17:24:29 +0200 Message-ID: <20260930152432.499571448@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152416.775402466@linuxfoundation.org> References: <20260930152416.775402466@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Maillard commit 9c182bc5d7817437a7d04ab96133f9191846d93d upstream. The Realtek RTS522A card reader in the Lenovo ThinkPad X260 (subsystem 17aa:504a) incorrectly reports inserted SD cards as write-protected. This causes the MMC core to expose the card as read-only: mmcblk0: mmc0:aaaa SN256 238 GiB (ro) and /sys/block/mmcblk0/ro reports 1. Setting MMC_CAP2_NO_WRITE_PROTECT makes the card writable again. Limit the quirk to the affected Lenovo subsystem. Assisted-by: ChatGPT:GPT-5.6 Sol Signed-off-by: Florian Maillard Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/rtsx_pci_sdmmc.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1488,6 +1488,11 @@ static void realtek_init_host(struct rea mmc->caps = mmc->caps | MMC_CAP_AGGRESSIVE_PM; mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE | MMC_CAP2_NO_SDIO; + + if (pcr->pci->device == 0x522a && + pcr->pci->subsystem_vendor == PCI_VENDOR_ID_LENOVO && + pcr->pci->subsystem_device == 0x504a) + mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT; mmc->max_current_330 = 400; mmc->max_current_180 = 800; mmc->ops = &realtek_pci_sdmmc_ops;