NetBSD Problem Report #40524

From www@NetBSD.org  Sat Jan 31 06:25:23 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 0BCEF63BC01
	for <gnats-bugs@gnats.netbsd.org>; Sat, 31 Jan 2009 06:25:23 +0000 (UTC)
Message-Id: <20090131062522.ACD0063B879@narn.NetBSD.org>
Date: Sat, 31 Jan 2009 06:25:22 +0000 (UTC)
From: andrew.daugherity@gmail.com
Reply-To: andrew.daugherity@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [patch] Missing EISA device ID in ep(4) driver
X-Send-Pr-Version: www-1.0

>Number:         40524
>Category:       kern
>Synopsis:       [patch] Missing EISA device ID in ep(4) driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 31 06:30:01 +0000 2009
>Closed-Date:    Sun May 17 18:33:34 +0000 2009
>Last-Modified:  Sun May 17 18:33:34 +0000 2009
>Originator:     Andrew Daugherity
>Release:        3.0
>Organization:
>Environment:
NetBSD 3.0.0_STABLE (INSTALL_CPQ) #0: Tue May 23 08:38:21 CDT 2006
        root@aragorn:/usr/obj/sys/arch/i386/compile/INSTALL_CPQ
>Description:
With a 3Com 3C509 ISA card set to EISA-mode by the 3Com DOS configuration utility, it shows up on the EISA bus.  The problem is that the ep(4) driver in NetBSD doesn't claim the EISA ID for the card I had (TCM5090).

Here's part of a dmesg from a NetBSD 3.0 INSTALL kernel:
====
NetBSD 3.0 (INSTALL) #0: Mon Dec 19 01:33:26 UTC 2005
        builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/i386/20051218
2024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/INSTALL
total memory = 143 MB
avail memory = 131 MB
BIOS32 rev. 0 found at 0xfffef000
BIOS32 entry point outside allowable range
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium (P54C) (586-class), 90.22 MHz, id 0x524
cpu0: features 1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
vendor 0x0e11 product 0x1000 (miscellaneous prehistoric, revision 0x01) at pci0
dev 0 function 0 not configured
pcn0 at pci0 dev 11 function 0: AMD PCnet-PCI Ethernet
pcn0: unable to map device registers
pcscp0 at pci0 dev 12 function 0: vendor 0x1022 product 0x2020
pcscp0: interrupting at irq 15
pcscp0: AM53C974, 40MHz, SCSI ID 7
scsibus0 at pcscp0: 8 targets, 8 luns per target
vga1 at pci0 dev 13 function 0: vendor 0x102b product 0x0519 (rev. 0x01)
wsdisplay0 at vga1 kbdmux 1
wsmux1: connecting to wsdisplay0
rtk0 at pci0 dev 14 function 0: D-Link Systems DFE 530TX+
rtk0: interrupting at irq 11
rtk0: Ethernet address 00:40:05:36:b0:dd
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000000, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pceb0 at pci0 dev 15 function 0
pceb0: vendor 0x0e11 product 0x0001 (rev. 0x03)
eisa0 at pceb0
device TCM5090 at eisa0 slot 2 not configured
====
Checking the CVS logs, the ID list in sys/dev/eisa/if_ep_eisa.c has not changed since 3.0, so the problem still exists in HEAD.
>How-To-Repeat:
Boot NetBSD with a certain model 3C509 in EISA mode, and watch it fail to be identified:
device TCM5090 at eisa0 slot 2 not configured

This is most likely an oversight, as the other seven TCM509x IDs *are* claimed by the ep(4) driver.
>Fix:
Add the device ID to sys/dev/eisa/if_ep_eisa.c:
====
Index: if_ep_eisa.c
===================================================================
RCS file: /cvsroot/src/sys/dev/eisa/if_ep_eisa.c,v
retrieving revision 1.30
diff -u -r1.30 if_ep_eisa.c
--- if_ep_eisa.c        27 Feb 2005 00:26:59 -0000      1.30
+++ if_ep_eisa.c        29 May 2006 00:43:04 -0000
@@ -153,9 +153,10 @@
        int             eep_flags;      /* initial softc flags */
        const char      *eep_name;      /* device name */
 } ep_eisa_products[] = {
+       { "TCM5090",                    ELINK_CHIPSET_3C509,
+         0,                            EISA_PRODUCT_TCM5090 },
        { "TCM5091",                    ELINK_CHIPSET_3C509,
          0,                            EISA_PRODUCT_TCM5091 },
-
        { "TCM5092",                    ELINK_CHIPSET_3C509,
          0,                            EISA_PRODUCT_TCM5092 },
        { "TCM5093",                    ELINK_CHIPSET_3C509,
====
This patch still applies cleanly against HEAD.  I had meant to submit it a couple years ago when debugging this card on both NetBSD and OpenBSD but forgot.  (I ended up porting a fix from NetBSD over to OpenBSD -- see http://marc.info/?l=openbsd-tech&m=114902308707686&w=2 -- but I had to add the device ID to NetBSD first to see that the card worked in NetBSD).

With the device ID added, the card is identified properly and works correctly:
====
NetBSD 3.0.0_STABLE (INSTALL_CPQ) #0: Tue May 23 08:38:21 CDT 2006
        root@aragorn:/usr/obj/sys/arch/i386/compile/INSTALL_CPQ
total memory = 143 MB
avail memory = 131 MB
BIOS32 rev. 0 found at 0xfffef000
BIOS32 entry point outside allowable range
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium (P54C) (586-class), 90.21 MHz, id 0x524
cpu0: features 1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
vendor 0x0e11 product 0x1000 (miscellaneous prehistoric, revision 0x01) at pci0
dev 0 function 0 not configured
vendor 0x1022 product 0x2000 (ethernet network, revision 0x02) at pci0 dev 11 fu
nction 0 not configured
pcscp0 at pci0 dev 12 function 0: vendor 0x1022 product 0x2020
pcscp0: interrupting at irq 15
pcscp0: AM53C974, 40MHz, SCSI ID 7
scsibus0 at pcscp0: 8 targets, 8 luns per target
vga1 at pci0 dev 13 function 0: vendor 0x102b product 0x0519 (rev. 0x01)
wsdisplay0 at vga1 kbdmux 1
wsmux1: connecting to wsdisplay0
rtk0 at pci0 dev 14 function 0: D-Link Systems DFE 530TX+
rtk0: interrupting at irq 11
rtk0: Ethernet address 00:40:05:36:b0:dd
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000000, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pceb0 at pci0 dev 15 function 0
pceb0: vendor 0x0e11 product 0x0001 (rev. 0x03)
eisa0 at pceb0
ep0 at eisa0 slot 2: 3Com 3C509 Ethernet
ep0: interrupting at irq 5
ep0: address 00:a0:24:4b:e1:14, 8KB byte-wide FIFO, 5:3 Rx:Tx split
ep0: 10baseT, 10base5 (default 10baseT)
...
====

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40524 CVS commit: src/sys/dev/eisa
Date: Sat, 31 Jan 2009 13:54:10 +0000 (UTC)

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jan 31 13:54:10 UTC 2009

 Modified Files:
 	src/sys/dev/eisa: if_ep_eisa.c

 Log Message:
 Add id for 5090 variant - reported in PR kern/40524 by Andrew Daugherity.


 To generate a diff of this commit:
 cvs rdiff -r1.39 -r1.40 src/sys/dev/eisa/if_ep_eisa.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 31 Jan 2009 13:57:30 +0000
State-Changed-Why:
Commited and pullup requested, thanks!


From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40524 CVS commit: [netbsd-4] src/sys/dev/eisa
Date: Sat, 31 Jan 2009 21:46:18 +0000 (UTC)

 Module Name:	src
 Committed By:	bouyer
 Date:		Sat Jan 31 21:46:18 UTC 2009

 Modified Files:
 	src/sys/dev/eisa [netbsd-4]: if_ep_eisa.c

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #1271):
 	sys/dev/eisa/if_ep_eisa.c: revision 1.40
 Add id for 5090 variant - reported in PR kern/40524 by Andrew Daugherity.


 To generate a diff of this commit:
 cvs rdiff -r1.35 -r1.35.2.1 src/sys/dev/eisa/if_ep_eisa.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: kern-bug-people->martin
Responsible-Changed-By: jnemeth@NetBSD.org
Responsible-Changed-When: Sun, 01 Feb 2009 08:50:35 +0000
Responsible-Changed-Why:
over to the person working on it


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40524 CVS commit: [netbsd-5] src/sys/dev/eisa
Date: Mon,  2 Feb 2009 20:48:00 +0000 (UTC)

 Module Name:	src
 Committed By:	snj
 Date:		Mon Feb  2 20:48:00 UTC 2009

 Modified Files:
 	src/sys/dev/eisa [netbsd-5]: if_ep_eisa.c

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #387):
 	sys/dev/eisa/if_ep_eisa.c: revision 1.40
 Add id for 5090 variant - reported in PR kern/40524 by Andrew Daugherity.


 To generate a diff of this commit:
 cvs rdiff -r1.39 -r1.39.4.1 src/sys/dev/eisa/if_ep_eisa.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sun, 17 May 2009 18:33:34 +0000
State-Changed-Why:
Pullups have been done.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.