public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Belay <ambx1@neo.rr.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PnP Fixes for 2.6.0-test9
Date: Sun, 16 Nov 2003 00:27:47 +0000	[thread overview]
Message-ID: <20031116002747.GE13220@neo.rr.com> (raw)
In-Reply-To: <20031116002620.GB13220@neo.rr.com>

# --------------------------------------------
# 03/11/15	ambx1@neo.rr.com	1.1450
# [BUG][PATCH] isapnp does not detect some cards
# 
# From: Paul L. Rogers <rogerspl@datasync.com>
# 
# Plug and Play Cards (Tested only one at a time.  One ISA slot):
#               NCI1000 NewCom  33.6KifxC  ISA PnP Data/Fax Modem
#               ADP1542 Adaptec AHA-1542CP ISA PnP SCSI Host Adapter
# 
# Problem Description:
# The Linux ISA PnP subsystem assumes that the checksum of the
# Vendor ID and the Serial Number returned by a PnP card in
# the Config state is valid.  However, the Plug and Play ISA
# Specification (Version 1.0a) found at
# http://www.nondot.org/sabre/os/files/PlugNPlay/PNP-ISA-v1.0a.pdf,
# states in Section 4.5 that when a card enters the Config state
# directly from the Sleep state and the 9-byte serial identifier
# is read, the checksum byte is not valid.
# 
# While some cards do return a valid checksum in this case
# (ADP1542), others do not (NCI1000) and thus are not detected
# since isapnp_build_device_list requires that the computed
# checksum match the checksum returned by the card.
# 
# Workaround:
# Continue using the isapnp utility instead of the kernel PnP support.
# 
# Proposed solution:
# The attached patch removes checksum related tests from
# isapnp_build_device_list and instead relies on the behavior
# documented in Section 6.1 of the PnP ISA Specification that
# specifies that Bit[7] of Vendor ID Byte 0 must be 0 to
# determine if the selected CSN is returning valid data.
# 
# A longer term solution would be for isapnp_build_device_list to
# only access CSNs that were assigned during the Isolation process.
# --------------------------------------------
#
diff -Nru a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
--- a/drivers/pnp/isapnp/core.c	Sun Nov 16 00:24:55 2003
+++ b/drivers/pnp/isapnp/core.c	Sun Nov 16 00:24:55 2003
@@ -890,11 +890,9 @@
 			header[4], header[5], header[6], header[7], header[8]);
 		printk(KERN_DEBUG "checksum = 0x%x\n", checksum);
 #endif
-		/* 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 */
+		/* Per Section 6.1 of the Plug and Play ISA Specification (Version 1.0a), */
+		/* Bit[7] of Vendor ID Byte 0 must be 0 */
+		if (header[0] & 0x80)	/* not valid CSN */
 			continue;
 		if ((card = isapnp_alloc(sizeof(struct pnp_card))) == NULL)
 			continue;

      parent reply	other threads:[~2003-11-16  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-16  0:26 [PATCH] PnP Fixes for 2.6.0-test9 Adam Belay
2003-11-16  0:26 ` Adam Belay
2003-11-16  0:27 ` Adam Belay
2003-11-16  0:27 ` Adam Belay [this message]

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=20031116002747.GE13220@neo.rr.com \
    --to=ambx1@neo.rr.com \
    --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