public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Alexander <grelk@galexander.org>
To: linux-kernel@vger.kernel.org
Cc: ossman@cendio.se
Subject: [PATCH] mmc, kernel 4.0.5, SDIO power management error message
Date: Mon, 8 Jun 2015 09:27:43 -0400	[thread overview]
Message-ID: <20150608132743.GD15825@galexander.org> (raw)

On suspend, SDIO (MMC) power management fails and removes a card
("mmc2: card 0001 removed") if any of the card's functions don't support
power management.  Then nothing ever resumes it, so the card is lost
forever.  With this patch, it will also provide a useful error message
("btsdio mmc2:0001:3: pre_suspend failed (driver has no PM)").  This will
save hours of diagnostic effort for anyone whose SDIO cards disappear on
suspend.

--- drivers/mmc/core/sdio.c.orig	2015-06-06 11:21:22.000000000 -0400
+++ drivers/mmc/core/sdio.c	2015-06-08 09:21:00.000000000 -0400
@@ -918,6 +918,8 @@
 			const struct dev_pm_ops *pmops = func->dev.driver->pm;
 			if (!pmops || !pmops->suspend || !pmops->resume) {
 				/* force removal of entire card in that case */
+				dev_err(&func->dev, "pre_suspend failed "
+					"(driver has no PM)\n");
 				err = -ENOSYS;
 				break;
 			}

                 reply	other threads:[~2015-06-08 13:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150608132743.GD15825@galexander.org \
    --to=grelk@galexander.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ossman@cendio.se \
    /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