Hi Bud,

On Tue, Mar 18, 2025 at 08:06:39AM -0700, Bud Pennington wrote:
> Hi
>
> I've attached the two files. Hopefully this is what you want. If not please
> advise me how to get what you want. Incidentally this may be machine
> specific. I tried a different card and it didn't work either but when I
> tried them in a different laptop they appearedĀ  when booted with 6.1.129-1.

Thanks for providing the logs.

While looking at those I noticed that a MCE is logged,

mce: [Hardware Error]: Machine check events logged
mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 4: a600000000020408
mce: [Hardware Error]: TSC 0 ADDR fef4c9e0
mce: [Hardware Error]: PROCESSOR 0:706a8 TIME 1742306754 SOCKET 0 APIC 0 
microcode 24

So I see the following difference, int the 6.128-1 log you have:

[    7.318288] mmc1: new ultra high speed SDR50 SDXC card at address 0001
[    7.320597] mmcblk1: mmc1:0001 00000 59.6 GiB
[    7.327986]  mmcblk1: p1
[...]
[   23.509687] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data 
may be corrupt. Please run fsck.

This does no appear in the 6.1.129 log.

The card reader is mentioned as

Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card 
Reader Controller

There is one change which is related and which is 6.1.129 applied:

        commit 93a56dbe12327e73c95ce8cd991c1335aebc8e1c
        Author: Sean Rhodes <sean@starlabs.systems>
        Date:   Tue Nov 19 08:58:15 2024 +0000

            drivers/card_reader/rtsx_usb: Restore interrupt based detection
            
            commit 235b630eda072d7e7b102ab346d6b8a2c028a772 upstream.
            
            This commit reintroduces interrupt-based card detection previously
            used in the rts5139 driver. This functionality was removed in commit
            00d8521dcd23 ("staging: remove rts5139 driver code").
            
            Reintroducing this mechanism fixes presence detection for certain 
card
            readers, which with the current driver, will taken approximately 20
            seconds to enter S3 as `mmc_rescan` has to be frozen.
            
            Fixes: 00d8521dcd23 ("staging: remove rts5139 driver code")
            Cc: sta...@vger.kernel.org
            Cc: Arnd Bergmann <a...@arndb.de>
            Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
            Signed-off-by: Sean Rhodes <sean@starlabs.systems>
            Link: 
https://lore.kernel.org/r/20241119085815.11769-1-sean@starlabs.systems
            Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

This commit was later reverted:

        commit 2397d61ee45cddb8f3bd3a3a9840ef0f0b5aa843
        Author: Christian Heusel <christ...@heusel.eu>
        Date:   Mon Feb 24 09:32:59 2025 +0100

            Revert "drivers/card_reader/rtsx_usb: Restore interrupt based 
detection"
            
            This reverts commit 235b630eda072d7e7b102ab346d6b8a2c028a772.
            
            This commit was found responsible for issues with SD card 
recognition,
            as users had to re-insert their cards in the readers and wait for a
            while. As for some people the SD card was involved in the boot 
process
            it also caused boot failures.
            
            Cc: sta...@vger.kernel.org
            Link: https://bbs.archlinux.org/viewtopic.php?id=303321
            Fixes: 235b630eda07 ("drivers/card_reader/rtsx_usb: Restore 
interrupt based detection")
            Reported-by: qf <quintafe...@tutanota.com>
            Closes: 
https://lore.kernel.org/all/1de87dfa-1e81-45b7-8dcb-ad86c21d5...@heusel.eu
            Signed-off-by: Christian Heusel <christ...@heusel.eu>
            Link: 
https://lore.kernel.org/r/20250224-revert-sdcard-patch-v1-1-d1a457fbb...@heusel.eu
            Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

The revert commit is in 6.14-rc6 and backported to 6.13.7, 6.12.19 *and*
6.1.131.

So I believe it will be fixed with the next upload, but if you can I
would appreciate if you would test a kernel build with the attached
pach, to verify it fixes your issue. How you can do that with our
simple-patching helper is documented at:
https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#id-1.6.6.4

Regards,
Salvatore
>From a55aa36d457c82e22302e77739d2c4f30d13f729 Mon Sep 17 00:00:00 2001
From: Christian Heusel <christ...@heusel.eu>
Date: Mon, 24 Feb 2025 09:32:59 +0100
Subject: [PATCH] Revert "drivers/card_reader/rtsx_usb: Restore interrupt based
 detection"

commit 2397d61ee45cddb8f3bd3a3a9840ef0f0b5aa843 upstream.

This reverts commit 235b630eda072d7e7b102ab346d6b8a2c028a772.

This commit was found responsible for issues with SD card recognition,
as users had to re-insert their cards in the readers and wait for a
while. As for some people the SD card was involved in the boot process
it also caused boot failures.

Cc: sta...@vger.kernel.org
Link: https://bbs.archlinux.org/viewtopic.php?id=303321
Fixes: 235b630eda07 ("drivers/card_reader/rtsx_usb: Restore interrupt based detection")
Reported-by: qf <quintafe...@tutanota.com>
Closes: https://lore.kernel.org/all/1de87dfa-1e81-45b7-8dcb-ad86c21d5...@heusel.eu
Signed-off-by: Christian Heusel <christ...@heusel.eu>
Link: https://lore.kernel.org/r/20250224-revert-sdcard-patch-v1-1-d1a457fbb...@heusel.eu
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 drivers/misc/cardreader/rtsx_usb.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/misc/cardreader/rtsx_usb.c b/drivers/misc/cardreader/rtsx_usb.c
index 285a748748d7..f150d8769f19 100644
--- a/drivers/misc/cardreader/rtsx_usb.c
+++ b/drivers/misc/cardreader/rtsx_usb.c
@@ -286,7 +286,6 @@ static int rtsx_usb_get_status_with_bulk(struct rtsx_ucr *ucr, u16 *status)
 int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status)
 {
 	int ret;
-	u8 interrupt_val = 0;
 	u16 *buf;
 
 	if (!status)
@@ -309,20 +308,6 @@ int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status)
 		ret = rtsx_usb_get_status_with_bulk(ucr, status);
 	}
 
-	rtsx_usb_read_register(ucr, CARD_INT_PEND, &interrupt_val);
-	/* Cross check presence with interrupts */
-	if (*status & XD_CD)
-		if (!(interrupt_val & XD_INT))
-			*status &= ~XD_CD;
-
-	if (*status & SD_CD)
-		if (!(interrupt_val & SD_INT))
-			*status &= ~SD_CD;
-
-	if (*status & MS_CD)
-		if (!(interrupt_val & MS_INT))
-			*status &= ~MS_CD;
-
 	/* usb_control_msg may return positive when success */
 	if (ret < 0)
 		return ret;
-- 
2.49.0

Reply via email to