Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Cc: Ricky Wu <ricky_wu@realtek.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] mmc: rtsx_usb_sdmmc: Print debug-messages at power-on/off errors
Date: Tue, 10 Jun 2025 13:16:24 +0200	[thread overview]
Message-ID: <20250610111633.504366-3-ulf.hansson@linaro.org> (raw)
In-Reply-To: <20250610111633.504366-1-ulf.hansson@linaro.org>

It should be useful to know when we fail to power-on/off a card. Let's
therefore print debug-messages when this happens.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/rtsx_usb_sdmmc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 8c35cb85a9c0..c204cdeaee3e 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1023,10 +1023,14 @@ static int sd_set_power_mode(struct rtsx_usb_sdmmc *host,
 
 	if (power_mode == MMC_POWER_OFF) {
 		err = sd_power_off(host);
+		if (err)
+			dev_dbg(sdmmc_dev(host), "power-off (err = %d)\n", err);
 		pm_runtime_put_noidle(sdmmc_dev(host));
 	} else {
 		pm_runtime_get_noresume(sdmmc_dev(host));
 		err = sd_power_on(host);
+		if (err)
+			dev_dbg(sdmmc_dev(host), "power-on (err = %d)\n", err);
 	}
 
 	host->power_mode = power_mode;
-- 
2.43.0


  parent reply	other threads:[~2025-06-10 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 11:16 [PATCH 0/4] mmc: rtsx_usb_sdmmc: Improve sd_set_power_mode() Ulf Hansson
2025-06-10 11:16 ` [PATCH 1/4] mmc: rtsx_usb_sdmmc: Fix error-path in sd_set_power_mode() Ulf Hansson
2025-06-10 11:16 ` Ulf Hansson [this message]
2025-06-10 11:16 ` [PATCH 3/4] mmc: rtsx_usb_sdmmc: Convert sd_set_power_mode() into void Ulf Hansson
2025-06-10 11:16 ` [PATCH 4/4] mmc: rtsx_usb_sdmmc: Re-work the code in sd_set_power_mode() Ulf Hansson
2025-06-10 11:40 ` [PATCH 0/4] mmc: rtsx_usb_sdmmc: Improve sd_set_power_mode() Avri Altman
2025-06-17 13:56 ` Ulf Hansson
2025-06-18  2:48   ` Ricky WU
2025-06-19  2:27   ` Ricky WU
2025-06-19 11:20 ` 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=20250610111633.504366-3-ulf.hansson@linaro.org \
    --to=ulf.hansson@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ricky_wu@realtek.com \
    /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