From owner-freebsd-bugs@FreeBSD.ORG Wed May 12 04:20:20 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECE5916A4CE for ; Wed, 12 May 2004 04:20:19 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80A1643D46 for ; Wed, 12 May 2004 04:20:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4CBKJn6018785 for ; Wed, 12 May 2004 04:20:19 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4CBKJW8018784; Wed, 12 May 2004 04:20:19 -0700 (PDT) (envelope-from gnats) Resent-Date: Wed, 12 May 2004 04:20:19 -0700 (PDT) Resent-Message-Id: <200405121120.i4CBKJW8018784@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Romanov Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A60D816A4CE for ; Wed, 12 May 2004 04:16:39 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 578C743D31 for ; Wed, 12 May 2004 04:16:39 -0700 (PDT) (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 i4CBGcGQ008601 for ; Wed, 12 May 2004 04:16:38 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i4CBGcgB008600; Wed, 12 May 2004 04:16:38 -0700 (PDT) (envelope-from nobody) Message-Id: <200405121116.i4CBGcgB008600@www.freebsd.org> Date: Wed, 12 May 2004 04:16:38 -0700 (PDT) From: Alexander Romanov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/66564: 3c920-MV00 PHY detection problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2004 11:20:20 -0000 >Number: 66564 >Category: misc >Synopsis: 3c920-MV00 PHY detection problem >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 12 04:20:19 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Alexander Romanov >Release: 5.2.1 >Organization: >Environment: FreeBSD 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #5: Wed May 12 18:03:35 MSD 2004 root@:/usr/src/sys/i386/compile/GENERIC i386 >Description: I have motherboard Albatron PX865PE Pro (2.0) with lan chip Marvell 3c920-mv00 onboard. pciconf -l says class=0x020000 card=0x4c0017f2 chip=0x920010b7 rev=0x78 hdr=0x00 xl driver recognized it as "3C905-TX Fast Etherlink XL", but complains with "no PHY found" >How-To-Repeat: Take this mobo and install freebsd, but, may be, this chip is also installed elsewhere. >Fix: Investigating this problem, I have found dirty-hack solution. 1. change if_xlreg.c to lie about pciids, to force recognize this chip as 3c920-EMB /* AR: change pci ids to force identify 3c920-MV00 as 3c920-EMB */ #define TC_DEVICEID_TORNADO_10_100BT 0x9201 #define TC_DEVICEID_TORNADO_10_100BT_920B 0x9200 /* this was before changing #define TC_DEVICEID_TORNADO_10_100BT 0x9200 #define TC_DEVICEID_TORNADO_10_100BT_920B 0x9201 :AR */ 2. add to mii_phy_probe() in mii.c printf for (i = 0; i < MII_NPHY; i++) { bmsr = MIIBUS_READREG(dev, i, MII_BMSR); /* AR: It's magic, but without this printf we can't find PHY! */ printf( "MII:%u %x\n", i, bmsr ); if (bmsr == 0 || bmsr == 0xffff || (bmsr & BMSR_MEDIAMASK) == 0) { /* Assume no PHY at this address. */ continue; } else break; } So, as I sayd before, this solution is dirty. Can you fix driver to provide clean solution ? I have driver for this card for linux, shipped on cd with mobo. May be, this driver will help ? >Release-Note: >Audit-Trail: >Unformatted: