From owner-freebsd-current Mon Jul 21 12:02:44 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA03716 for current-outgoing; Mon, 21 Jul 1997 12:02:44 -0700 (PDT) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id MAA03706 for ; Mon, 21 Jul 1997 12:02:37 -0700 (PDT) Received: from rover.village.org [127.0.0.1] by rover.village.org with esmtp (Exim 1.60 #1) id 0wqNiO-0001wO-00; Mon, 21 Jul 1997 13:01:48 -0600 To: "Jordan K. Hubbard" Subject: Re: I am contemplating the following change... Cc: Mikael Karpberg , kuku@gilberto.physik.rwth-aachen.de (Christoph Kukulies), current@freebsd.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> Date: Mon, 21 Jul 1997 13:01:48 -0600 From: Warner Losh Message-Id: Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.