[BUG? KERNEL 2.6.34-rc5-git5] pccard_validate_cis WARN_ON error

Komuro komurojun-mbn at nifty.com
Tue May 4 03:53:05 EDT 2010


Hi,

The first time "pccardctl reset" ,the device sometimes works.
but after the second time "pccardctl reset", the device does not work.

I think the patch below does not solve this problem.

By the way, "pccardctl reset" is equal to 
"pccardctl suspend" + "pccardctl resume"?


>> 
>> >> 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)) {

Best Regards
Komuro




More information about the linux-pcmcia mailing list