From: Gunther.Mayer@t-online.de (Gunther Mayer)
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: Patch(2.4.2): isapnp detect fix (wrong checksum)
Date: Fri, 16 Mar 2001 09:30:42 +0100 [thread overview]
Message-ID: <3AB1CF32.F02D33FF@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]
Hi,
this fix lets linux detect cards which don't
have a correct checksum.
These are probably common, it seems isapnptools _silently_
fixes this up !
Please apply if you like, comments welcome.
Regards, Gunther
--- linux/drivers/pnp/isapnp.c-2.4.2-orig Fri Mar 16 09:08:47 2001
+++ linux/drivers/pnp/isapnp.c Fri Mar 16 09:21:45 2001
@@ -993,10 +993,15 @@
header[4], header[5], header[6], header[7], header[8]);
printk("checksum = 0x%x\n", checksum);
#endif
- if (checksum == 0x00 || checksum != header[8]) /* not valid CSN */
+ /* Don't be strict on the checksum, here !
+ e.g. 'SCM SwapBox Plug and Play' has header[8]==0 (should be: b7)*/
+ if (header[8] == 0)
+ ;
+ else if (checksum == 0x00 || checksum != header[8]) /* not valid CSN */
continue;
if ((card = isapnp_alloc(sizeof(struct pci_bus))) == NULL)
continue;
+
card->number = csn;
card->vendor = (header[1] << 8) | header[0];
card->device = (header[3] << 8) | header[2];
[-- Attachment #2: gmdiff-242-isapnp-checksum-swapbox --]
[-- Type: application/octet-stream, Size: 774 bytes --]
--- linux/drivers/pnp/isapnp.c-2.4.2-orig Fri Mar 16 09:08:47 2001
+++ linux/drivers/pnp/isapnp.c Fri Mar 16 09:21:45 2001
@@ -993,10 +993,15 @@
header[4], header[5], header[6], header[7], header[8]);
printk("checksum = 0x%x\n", checksum);
#endif
- if (checksum == 0x00 || checksum != header[8]) /* not valid CSN */
+ /* Don't be strict on the checksum, here !
+ e.g. 'SCM SwapBox Plug and Play' has header[8]==0 (should be: b7)*/
+ if (header[8] == 0)
+ ;
+ else if (checksum == 0x00 || checksum != header[8]) /* not valid CSN */
continue;
if ((card = isapnp_alloc(sizeof(struct pci_bus))) == NULL)
continue;
+
card->number = csn;
card->vendor = (header[1] << 8) | header[0];
card->device = (header[3] << 8) | header[2];
reply other threads:[~2001-03-16 7:32 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=3AB1CF32.F02D33FF@t-online.de \
--to=gunther.mayer@t-online.de \
--cc=alan@lxorguk.ukuu.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.