From: castet.matthieu@free.fr
To: linux-kernel@vger.kernel.org
Subject: [PATCH] pnpbios parser bugfix
Date: Thu, 2 Sep 2004 10:14:30 +0200 [thread overview]
Message-ID: <1094112869.4136d66600691@imp4-q.free.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
hi,
this patch fix a pnpbios problem with independant
resource(http://bugzilla.kernel.org/show_bug.cgi?id=3295) :
the old code assume that they are given at the beggining (before any
SMALL_TAG_STARTDEP entry), but in some case there are found after
SMALL_TAG_ENDDEP entry.
tag : 6 SMALL_TAG_STARTDEP
tag : 8 SMALL_TAG_PORT
tag : 6 SMALL_TAG_STARTDEP
tag : 8 SMALL_TAG_PORT
tag : 7 SMALL_TAG_ENDDEP
tag : 4 SMALL_TAG_IRQ <-- independant resource
tag : f SMALL_TAG_END
Matthieu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pnp1.patch --]
[-- Type: text/x-patch; name="pnp1.patch", Size: 924 bytes --]
--- linux/drivers/pnp/pnpbios/rsparser.c 2004-06-16 07:19:13.000000000 +0200
+++ linux-2.6.9/drivers/pnp/pnpbios/rsparser.c 2004-09-02 09:59:53.000000000 +0200
@@ -346,12 +346,12 @@
{
unsigned int len, tag;
int priority = 0;
- struct pnp_option *option;
+ struct pnp_option *option, *option_independent;
if (!p)
return NULL;
- option = pnp_register_independent_option(dev);
+ option_independent = option = pnp_register_independent_option(dev);
if (!option)
return NULL;
@@ -428,9 +428,14 @@
case SMALL_TAG_ENDDEP:
if (len != 0)
goto len_err;
+ if (option_independent == option)
+ printk(KERN_WARNING "PnPBIOS: Missing SMALL_TAG_STARTDEP tag\n");
+ option = option_independent;
break;
case SMALL_TAG_END:
+ if (option_independent != option)
+ printk(KERN_WARNING "PnPBIOS: Missing SMALL_TAG_ENDDEP tag\n");
p = p + 2;
return (unsigned char *)p;
break;
reply other threads:[~2004-09-02 8:14 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=1094112869.4136d66600691@imp4-q.free.fr \
--to=castet.matthieu@free.fr \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®