mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: perex@suse.cz
Cc: Jens.Toerring@physik.fu-berlin.de, linux-kernel@vger.kernel.org
Subject: possible bug in 2.5.39 ISA PnP patch
Date: Thu, 3 Oct 2002 10:53:35 +0200	[thread overview]
Message-ID: <15772.1423.291413.372141@kim.it.uu.se> (raw)

On 2002-09-27 11:16:04, Jaroslav Kysela wrote:
>	the read port (RDP) of ISA PnP cards must be set only when card is 
>in the isolation phase. Bellow is a patch to follow the ISA PnP 
>specification. Please, apply.
>...
>diff -Nru a/drivers/pnp/isapnp.c b/drivers/pnp/isapnp.c
>--- a/drivers/pnp/isapnp.c	Fri Sep 27 13:13:51 2002
>+++ b/drivers/pnp/isapnp.c	Fri Sep 27 13:13:51 2002
>@@ -1048,11 +1048,19 @@
> 	isapnp_wait();
> 	isapnp_key();
> 	isapnp_wake(csn);
>-#if 1	/* to avoid malfunction when the isapnptools package is used */
>-	isapnp_set_rdp();
>-	udelay(1000);	/* delay 1000us */
>-	write_address(0x01);
>-	udelay(1000);	/* delay 1000us */
>+#if 1
>+	/* to avoid malfunction when the isapnptools package is used */
>+	/* we must set RDP to our value again */
>+	/* it is possible to set RDP only in the isolation phase */ 
>+	/*   Jens Thoms Toerring <Jens.Toerring@physik.fu-berlin.de> */
>+	isapnp_write_byte(0x02, 0x04);	/* clear CSN of card */
>+	mdelay(2);			/* is this necessary? */
>+	isapnp_wake(csn);		/* bring card into sleep state */
>+	isapnp_wake(0);			/* bring card into isolation state */
>+	isapnp_set_rdp();		/* reset the RDP port */
>+	udelay(1000);			/* delay 1000us */
>+	isapnp_write_byte(0x06, csn);	/* reset CSN to previous value */
>+	udelay(250);			/* is this necessary? */
> #endif
> 	if (logdev >= 0)
> 		isapnp_device(logdev);

Linus included this patch in 2.5.39. Unfortunately, it causes
my ISA PnP cards to malfunction:
- My 3c509(b?) combo TP/BNC Ethernet card stops working completely.
  The kernel thinks the NIC is up, but the leds on its segment aren't
  lit and no traffic can be generated.
  Backing out this patch, or disabling ISAPNP, makes it work again.
- My ESS sound card is a multi-function device. With this patch, some
  sub-devices get bogus resources listed in /proc/isapnp, as if the
  data is all-bits-one. Backing out this patch solves the problem.

I have several other ISA PnP card at another location, but I won't be
able to test them until Saturday.

I can't comment on whether the new code in the patch correctly implements
the specification or not, but something's definitely wrong here. Do you
have any evidence of cards that malfunctioned with the old code?

Also, the comment "to avoid malfunction when the isapnptools package is used"
strikes me a bit strange. Why use isapnptools if the kernel has ISAPNP=y ?
Is that actually supposed to work?

/Mikael

             reply	other threads:[~2002-10-03  8:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03  8:53 Mikael Pettersson [this message]
2002-10-03  9:19 ` Jaroslav Kysela
2002-10-03 14:16 ` Jens Thoms Toerring

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=15772.1423.291413.372141@kim.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=Jens.Toerring@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@suse.cz \
    /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®