Patch(2.4.2): isapnp detect fix (wrong checksum)

From: Gunther Mayer (Gunther.Mayer@t-online.de)
Date: Fri Mar 16 2001 - 03:30:42 EST


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];


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:08 EST