lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CABtds-071dHPwOBYFxpGT7E9grcS0PGdK2PTYmcdWVF7sX-hkg@mail.gmail.com>
Date: Tue, 4 Nov 2025 12:02:39 -0500
from: Sean Rhodes <sean@...rlabs.systems>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/misc: rtsx_usb: add UHS/MMC capability flags

>From a7d64a86c728c8c749229272a22b95b772086911 Mon Sep 17 00:00:00 2001
From: Sean Rhodes <sean@...rlabs.systems>
Date: Tue, 4 Nov 2025 15:51:10 +0000
Subject: [PATCH 2/5] drivers/misc: rtsx_usb: add UHS/MMC capability flags

Introduce per-device flags for SDR50, DDR50 and MMC DDR support and fill
them during probe for the RTS5139/RTS5140/RTS5179 variants so the card
host drivers can gate their caps in follow-up changes.

Cc: Arnd Bergmann <arnd@...db.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ricky Wu <ricky_wu@...ltek.com>
Cc: Desnes Nunes <desnesn@...hat.com>
Cc: Christian Heusel <christian@...sel.eu>
Cc: Ulf Hansson <ulf.hansson@...aro.org>
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Sean Rhodes <sean@...rlabs.systems>
---
 drivers/misc/cardreader/rtsx_usb.c | 10 ++++++++++
 include/linux/rtsx_usb.h           |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/drivers/misc/cardreader/rtsx_usb.c
b/drivers/misc/cardreader/rtsx_usb.c
index 1830e9ed2521..f65acf4d1164 100644
--- a/drivers/misc/cardreader/rtsx_usb.c
+++ b/drivers/misc/cardreader/rtsx_usb.c
@@ -653,12 +653,22 @@ static int rtsx_usb_probe(struct usb_interface *intf,
 	mutex_init(&ucr->dev_mutex);

 	ucr->pusb_intf = intf;
+	ucr->supports_sdr50 = false;
+	ucr->supports_ddr50 = false;
+	ucr->supports_mmc_ddr = false;

 	/* initialize */
 	ret = rtsx_usb_init_chip(ucr);
 	if (ret)
 		goto out_init_fail;

+	if ((ucr->product_id == 0x0139 && ucr->package == LQFP48) ||
+	    ucr->product_id == 0x0140 || ucr->is_rts5179) {
+		ucr->supports_sdr50 = true;
+		ucr->supports_ddr50 = true;
+		ucr->supports_mmc_ddr = true;
+	}
+
 	/* initialize USB SG transfer timer */
 	timer_setup(&ucr->sg_timer, rtsx_usb_sg_timed_out, 0);

diff --git a/include/linux/rtsx_usb.h b/include/linux/rtsx_usb.h
index 276b509c03e3..54c6ea82bf43 100644
--- a/include/linux/rtsx_usb.h
+++ b/include/linux/rtsx_usb.h
@@ -48,6 +48,9 @@ struct rtsx_ucr {
 	int			package;
 	u8			ic_version;
 	bool			is_rts5179;
+	bool			supports_sdr50;
+	bool			supports_ddr50;
+	bool			supports_mmc_ddr;

 	unsigned int		cur_clk;

-- 
2.51.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ