[BUG? KERNEL 2.6.34-rc5-git5] pccard_validate_cis WARN_ON error
Dominik Brodowski
linux at dominikbrodowski.net
Mon May 3 09:13:40 EDT 2010
Hey,
On Sat, May 01, 2010 at 05:23:18AM +0900, Komuro wrote:
> Hi,
>
> >> But, after "pccardctl reset", the card still does not work.
> >
> >Why is "pccardctl reset" needed in any case?
>
> When the device becomes unstable, "pccardctl reset" reset the driver.
>
>
> >It seems that the CIS is
> >different when you call "pccardctl reset" compared to what it used to be.
>
> The CIS is same. I don't change the card.
What about this patch on top of the previous one? If it still fails, dynamic
debug output would be very helpful.
Thanks & best,
Dominik
From: Dominik Brodowski <linux at dominikbrodowski.net>
Date: Mon, 3 May 2010 15:10:09 +0200
Subject: [PATCH] pcmcia: order userspace suspend and resume requests
Assert that userspace suspend and resume requests appearing
(almost) immediately are executed in the following order:
suspend, resume. This should fix "pccardctl reset".
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 75ed866..c338375 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -671,20 +671,22 @@ static int pccardd(void *__skt)
socket_remove(skt);
if (sysfs_events & PCMCIA_UEVENT_INSERT)
socket_insert(skt);
- if ((sysfs_events & PCMCIA_UEVENT_RESUME) &&
- !(skt->state & SOCKET_CARDBUS)) {
- ret = socket_resume(skt);
- if (!ret && skt->callback)
- skt->callback->resume(skt);
- }
if ((sysfs_events & PCMCIA_UEVENT_SUSPEND) &&
!(skt->state & SOCKET_CARDBUS)) {
if (skt->callback)
ret = skt->callback->suspend(skt);
else
ret = 0;
- if (!ret)
+ if (!ret) {
socket_suspend(skt);
+ msleep(100);
+ }
+ }
+ if ((sysfs_events & PCMCIA_UEVENT_RESUME) &&
+ !(skt->state & SOCKET_CARDBUS)) {
+ ret = socket_resume(skt);
+ if (!ret && skt->callback)
+ skt->callback->resume(skt);
}
if ((sysfs_events & PCMCIA_UEVENT_REQUERY) &&
!(skt->state & SOCKET_CARDBUS)) {
More information about the linux-pcmcia
mailing list