linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards
@ 2020-05-26 15:43 Pali Rohár
  2020-05-26 15:43 ` [PATCH 2/2] mmc: core: Export device/vendor ids from Common CIS " Pali Rohár
  2020-05-27  7:34 ` [PATCH " Ulf Hansson
  0 siblings, 2 replies; 10+ messages in thread
From: Pali Rohár @ 2020-05-26 15:43 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc, linux-kernel, Marek Behún

SDIO non-combo cards are not handled by mmc_block driver and do not have
accessible CID register which is used for MMC_NAME= construction.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
---
 drivers/mmc/core/bus.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 74de3f2dd..103eea7cd 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -93,15 +93,20 @@ mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
 			return retval;
 	}
 
-	retval = add_uevent_var(env, "MMC_NAME=%s", mmc_card_name(card));
-	if (retval)
-		return retval;
-
-	/*
-	 * Request the mmc_block device.  Note: that this is a direct request
-	 * for the module it carries no information as to what is inserted.
-	 */
-	retval = add_uevent_var(env, "MODALIAS=mmc:block");
+	if (card->type != MMC_TYPE_SDIO) {
+		retval = add_uevent_var(env, "MMC_NAME=%s", mmc_card_name(card));
+		if (retval)
+			return retval;
+
+		/*
+		 * Request the mmc_block device.
+		 * Note: that this is a direct request for the module it carries
+		 * no information as to what is inserted.
+		 */
+		retval = add_uevent_var(env, "MODALIAS=mmc:block");
+		if (retval)
+			return retval;
+	}
 
 	return retval;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-05-28 10:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 15:43 [PATCH 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards Pali Rohár
2020-05-26 15:43 ` [PATCH 2/2] mmc: core: Export device/vendor ids from Common CIS " Pali Rohár
2020-05-27  7:39   ` Ulf Hansson
2020-05-27  8:00     ` Pali Rohár
2020-05-27  8:13       ` Ulf Hansson
2020-05-27 11:08   ` [PATCH v2 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block " Pali Rohár
2020-05-27 11:08     ` [PATCH v2 2/2] mmc: core: Export device/vendor ids from Common CIS " Pali Rohár
2020-05-28 10:14       ` Ulf Hansson
2020-05-28 10:14     ` [PATCH v2 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block " Ulf Hansson
2020-05-27  7:34 ` [PATCH " Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).