linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Dave <kilroyd@googlemail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-pcmcia@lists.infradead.org,
	orinoco-devel@lists.sourceforge.net,
	linux-wireless@vger.kernel.org,
	Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [Orinoco-devel] 2.6.28-rc2: new PCMCIA device instance after resume - orinoco can't download firmware
Date: Thu, 30 Oct 2008 21:39:36 +0300	[thread overview]
Message-ID: <200810302139.37864.arvidjaar@mail.ru> (raw)
In-Reply-To: <4909F9BC.3050306@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2229 bytes --]

On Thursday 30 October 2008, Dave wrote:
> After much faffing about, I managed to bisect this. In retrospect the
> above hint (thanks Russell) and a code inspection ought to have made the
> bug obvious. The offending commit is:
> 
> commit 1168386aa7d850ead2ae135d5a7949a592c6e9a0
> pcmcia: deprecate CS_OUT_OF_RESOURCE
> 
> in which the following change is made (among others):
> 
> @@ -352,7 +352,9 @@ int verify_cis_cache(struct pcmcia_socket *s)
> 
>         buf = kmalloc(256, GFP_KERNEL);
>         if (buf == NULL)
> -               return -1;
> +               dev_printk(KERN_WARNING, &s->dev,
> +                          "no memory for verifying CIS\n");
> +               return -ENOMEM;
>         list_for_each_entry(cis, &s->cis_cache, node) {
>                 int len = cis->len;
> 

Oh, my ... I have been looking over this dozens of times ... it just
proves how addictive to bisecting in place of proper debugging we became :(
Dave, thank you!

Rafael, this falls in obvious "regression with patches" case I think.

Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>


> 
> The attached patch should fix things.
> 
> Regards,
> 
> Dave.
> ---
> pcmcia: Actually verify against the cached CIS
> 
> Commit 1168386aa7d850ead2ae135d5a7949a592c6e9a0 introduced a printk into
> a single line if without adding braces, resulting in PCMCIA devices
> being added as new on resume.
> 
> Add the necessary braces.
> 
> Reported by: Andrey Borzenkov <arvidjaar@mail.ru>
> Signed-off by: David Kilroy <kilroyd@gmail.com>
> ---
> diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
> index 8d37768..91a00ec 100644
> --- a/drivers/pcmcia/cistpl.c
> +++ b/drivers/pcmcia/cistpl.c
> @@ -351,10 +351,12 @@ int verify_cis_cache(struct pcmcia_socket *s)
>         char *buf;
> 
>         buf = kmalloc(256, GFP_KERNEL);
> -       if (buf == NULL)
> +       if (buf == NULL) {
>                 dev_printk(KERN_WARNING, &s->dev,
>                            "no memory for verifying CIS\n");
>                 return -ENOMEM;
> +       }
> +
>         list_for_each_entry(cis, &s->cis_cache, node) {
>                 int len = cis->len;
> 
> 
> 
> 



[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-10-30 18:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 19:19 2.6.28-rc2: new PCMCIA device instance after resume - orinoco can't download firmware Andrey Borzenkov
2008-10-29  0:42 ` Dominik Brodowski
2008-10-29  3:43   ` Andrey Borzenkov
2008-10-29 12:18     ` Rafael J. Wysocki
2008-10-29 15:19       ` Andrey Borzenkov
2008-10-29 18:49         ` [Orinoco-devel] " Dave
2008-10-29 20:43           ` Rafael J. Wysocki
2008-10-29 20:53             ` Dave
2008-10-29 21:34               ` Rafael J. Wysocki
2008-10-29 21:51               ` Russell King
2008-10-30 18:15                 ` Dave
2008-10-30 18:39                   ` Andrey Borzenkov [this message]
2008-10-30 22:46                     ` Rafael J. Wysocki
2008-10-29  0:49 ` Dave

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=200810302139.37864.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=kilroyd@googlemail.com \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=orinoco-devel@lists.sourceforge.net \
    --cc=rjw@sisk.pl \
    /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).