Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 1997 13:01:48 -0600
From:      Warner Losh <imp@rover.village.org>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        Mikael Karpberg <karpen@ocean.campus.luth.se>, kuku@gilberto.physik.rwth-aachen.de (Christoph Kukulies), current@freebsd.org
Subject:   Re: I am contemplating the following change... 
Message-ID:  <E0wqNiO-0001wO-00@rover.village.org>
In-Reply-To: Your message of "Mon, 21 Jul 1997 10:44:11 PDT." <28734.869507051@time.cdrom.com> 
References:  <28734.869507051@time.cdrom.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <28734.869507051@time.cdrom.com> "Jordan K. Hubbard" writes:
: If, on the other hand, you didn't even show them an ethernet card as
: an option, nor did they see a probe message for it at boot time, it's
: be a strong indication to them that they need to go fix this problem
: first.  When the ed1: timeout problems happen, by contrast, they
: typically write to us since it's not a failure they understand.

Looking at the driver, the following chipsets seem to support auto
detection of interrupts.  I've some patches that I'll test tonight to
see if I can add a sanity check when things aren't the same.  I may
have missed some in some of the other code paths.

	WD8003W
	WD8003EB
	WD8013W
	WD8013EP
	WD8013WC
	WD8013EPC
	WD8013EBP
	SMC8216T
	SMC8216C
	SMC8216BT

I don't know how many cards this covers, but it does look to be a fair
number.  There is code in the ed driver now to autoconfig the
interrupt on these cards.  There is not code to detect that you've set
an interrupt incorrectly (which looked like 3 lines to add in two
places, add another 10 lines for tables needed for good error
reporting).  I think that this would be a worthwhile addition to the
kernel, assuming that it proves to be correct.

Warner

P.S.  Here's what I have right now, but it is untested as yet.  I
haven't compiled it even.

Index: if_ed.c
===================================================================
RCS file: /home/imp/FreeBSD/CVS/src/sys/i386/isa/if_ed.c,v
retrieving revision 1.116
diff -u -r1.116 if_ed.c
--- if_ed.c	1997/03/24 11:32:39	1.116
+++ if_ed.c	1997/07/21 18:46:02
@@ -666,6 +666,9 @@
 		 */
 		if (isa_dev->id_irq <= 0)
 			isa_dev->id_irq = ed_intr_mask[iptr];
+		else if (isa_dev->id_irq != ed_intr_mask[iptr])
+			printf("ed%d: Warning: interrupt mismatch\n",
+				isa_dev->id_unit);
 
 		/*
 		 * Enable the interrupt.
@@ -687,6 +690,9 @@
 		 */
 		if (isa_dev->id_irq <= 0)
 			isa_dev->id_irq = ed_790_intr_mask[iptr];
+		else if (isa_dev->id_irq != ed_790_intr_mask[iptr])
+			printf("ed%d: Warning: interrupt mismatch\n",
+				isa_dev->id_unit);
 
 		/*
 		 * Enable interrupts.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0wqNiO-0001wO-00>