misc/66564: 3c920-MV00 PHY detection problem

Alexander Romanov ar at apmk.ru
Wed May 12 04:20:20 PDT 2004


>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:


More information about the freebsd-bugs mailing list