From nobody@FreeBSD.org  Thu Aug  5 14:59:03 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0C1E316A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Aug 2004 14:59:03 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 099A643D1F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Aug 2004 14:59:03 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i75Ex2Mo085888
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 5 Aug 2004 14:59:02 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i75Ex20a085887;
	Thu, 5 Aug 2004 14:59:02 GMT
	(envelope-from nobody)
Message-Id: <200408051459.i75Ex20a085887@www.freebsd.org>
Date: Thu, 5 Aug 2004 14:59:02 GMT
From: Nikolaj Hansen <anh@tiscali.dk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pcn device not recognizing device
X-Send-Pr-Version: www-2.3

>Number:         70036
>Category:       i386
>Synopsis:       pcn device not recognizing device
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 05 15:00:41 GMT 2004
>Closed-Date:    Sat Jul 30 01:30:19 GMT 2005
>Last-Modified:  Sat Jul 30 01:30:19 GMT 2005
>Originator:     Nikolaj Hansen
>Release:        5.2.1-RELEASE
>Organization:
ProgressIT
>Environment:
$ uname -a
FreeBSD sauron.progressit.dk 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #4: Thu Jul 22 19:28:42 CEST 2004     root@sauron.progressit.dk:/usr/src/sys/i386/compile/MYKERNEL  i386

>Description:
Hi,

I have an older version IBM NetFinity 5000 with an AMD Lance netcard. If i try to use the pcn device the kernel panics. Probably because it correctly recognizes the card but not the chipset?

The card runs fine with the older LNC device, but it would be nice to have the features in the new driver using the DMA 32 bit and such.

Here is the output from a pciconf scan:

lnc0@pci0:9:0:  class=0x020000 card=0x20001014 chip=0x20001022 rev=0x36 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Am79C970/1/2/3/5/6 PCnet LANCE PCI Ethernet Controller'
    class    = network
    subclass = ethernet

console log panic:

..
..
..
pcn0: <AMD PCnet/PCI 10/100BaseTX> port 0x2040-0x205f mem 0xfebfdc00-0xfebfde1f
irq 11 at device 9.0 on pci0
pcn0: Eterhnet address: 00:06:29:39:61:39
miibus0: <MII bus> on pcn0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0: OUI 0x080017, model 0x0001, rev.0
ukphy0:
ifmedia_set: no match for 0x0/0xfffffff
panic: ifmedia_set
.die..
.die..
>How-To-Repeat:
I suppose not possible without the actual netcard version as mentioned above.
>Fix:
I think the HEX code for this card has to be added to the file /usr/src/sys/pci/if_pcnreg.h and the value from this to the switch command checking the NIC id in /usr/src/sys/pci/if_pcn.c      

I will be happy to test a fix on my server. I work as a systems developer so I will be able to report any further bugs and/or edit the device driver code according to your guidance.
>Release-Note:
>Audit-Trail:

From: "Simon L. Nielsen" <simon@FreeBSD.org>
To: Nikolaj Hansen <anh@tiscali.dk>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: i386/70036: pcn device not recognizing device
Date: Thu, 5 Aug 2004 17:39:46 +0200

 --mP3DRpeJDSE+ciuQ
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On 2004.08.05 14:59:02 +0000, Nikolaj Hansen wrote:
 >=20
 
 > ifmedia_set: no match for 0x0/0xfffffff
 > panic: ifmedia_set
 > .die..
 > .die..
 
 These are actually the important lines.  Please see the Developers
 Handbook on how to obtain a crash dump and send back the stack trace.
 This will (hopefully) make it possible for the kernel hackers to see
 what's going wrong.
 
 --=20
 Simon L. Nielsen
 FreeBSD Documentation Team
 
 --mP3DRpeJDSE+ciuQ
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQFBElTCh9pcDSc1mlERAlACAJ9/guX5ydH0BsRyqIjGpBwuGm4pvwCgjROD
 KwvWxmHgJ43sZag9/JpV94c=
 =FxRP
 -----END PGP SIGNATURE-----
 
 --mP3DRpeJDSE+ciuQ--
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Mon Aug 30 20:49:43 GMT 2004 
State-Changed-Why:  
Feedback (crash dump) requested. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=70036 
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Sat Jul 30 01:30:09 GMT 2005 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=70036 
>Unformatted:
