From ab443ba4b0faf8456f5bb48515bc9bae1aea8f2b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 15 Apr 2005 13:54:44 +0000 Subject: [PATCH] Don't verify checksum except after serial isolation --- src/drivers/bus/isapnp.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/drivers/bus/isapnp.c b/src/drivers/bus/isapnp.c index bc4174d2..b911cfc8 100644 --- a/src/drivers/bus/isapnp.c +++ b/src/drivers/bus/isapnp.c @@ -374,18 +374,15 @@ static int fill_isapnp_device ( struct isapnp_device *isapnp ) { isapnp_send_key (); isapnp_wake ( isapnp->csn ); - /* Read the identifier and verify the checksum. Allow - * checksum = 0 to cope with cards that just generate the - * checksum using the LFSR during serial isolation. + /* Read the identifier. Do *not* verify the checksum, because + * the PnP ISA spec explicitly states in section 4.5 that the + * checksum is invalid except when read via the serial + * isolation protocol. (This is presumably to allow for lazy + * card designers who implement the checksum using the LFSR + * only and can't be bothered to write the same value into the + * EPROM). */ isapnp_peek ( identifier.bytes, sizeof ( identifier ) ); - if ( ( identifier.checksum != 0 ) && - ( identifier.checksum != isapnp_checksum ( &identifier ) ) ) { - DBG ( "ISAPnP invalid checksum on CSN %hhx " - "(is %hhx, should be %hhx)\n", isapnp->csn, - identifier.checksum, isapnp_checksum ( &identifier ) ); - return 0; - } /* Read information from identifier structure */ isapnp->vendor_id = identifier.vendor_id;