From: "Pali Rohár" <pali@kernel.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
"Marek Behún" <marek.behun@nic.cz>
Subject: [PATCH 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards
Date: Tue, 26 May 2020 17:43:33 +0200 [thread overview]
Message-ID: <20200526154334.21222-1-pali@kernel.org> (raw)
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
next reply other threads:[~2020-05-26 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 15:43 Pali Rohár [this message]
2020-05-26 15:43 ` [PATCH 2/2] mmc: core: Export device/vendor ids from Common CIS for SDIO cards 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200526154334.21222-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=marek.behun@nic.cz \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).