From hmo@sep.hamburg.com  Sat Jun  9 13:44:24 2001
Return-Path: <hmo@sep.hamburg.com>
Received: from sep.hamburg.com (sep.hamburg.com [194.64.112.14])
	by hub.freebsd.org (Postfix) with ESMTP id AB52B37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  9 Jun 2001 13:44:22 -0700 (PDT)
	(envelope-from hmo@sep.hamburg.com)
Received: (from hmo@localhost)
	by sep.hamburg.com (8.11.3/8.11.3/hmo03mar01) id f59KhuB01107;
	Sat, 9 Jun 2001 22:43:56 +0200 (CEST)
	(envelope-from hmo)
Message-Id: <200106092043.f59KhuB01107@sep.hamburg.com>
Date: Sat, 9 Jun 2001 22:43:56 +0200 (CEST)
From: send-pr@oldach.net
Reply-To: send-pr@oldach.net
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: cvs commit: src/sys/pci if_pcn.c revision 1.21 resp. 1.5.2.7 breaks pcn device on HP Vectra
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         27995
>Category:       kern
>Synopsis:       [if_pcn] src/sys/pci if_pcn.c revision 1.21 resp. 1.5.2.7 breaks pcn device on HP Vectra
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 09 13:50:00 PDT 2001
>Closed-Date:    Tue Sep 13 23:07:26 GMT 2005
>Last-Modified:  Sun Feb 25 19:10:03 GMT 2007
>Originator:     Helge Oldach
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD sep.hamburg.com 4.3-STABLE FreeBSD 4.3-STABLE #0: Mon Jun 4 12:02:24 CEST 2001 toor@sep.hamburg.com:/usr/obj/usr/src/sys/HMO i386


Hewlett-Packard Vectra XA. This box has a built-in NIC with a "10" and
a "100" connector.

Copyright (c) 1992-2001 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 4.3-STABLE #0: Mon Jun  4 12:02:24 CEST 2001
    toor@sep.hamburg.com:/usr/obj/usr/src/sys/HMO
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium/P55C (165.79-MHz 586-class CPU)
  Origin = "GenuineIntel"  Id = 0x544  Stepping = 4
  Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
real memory  = 100659200 (98300K bytes)
avail memory = 92856320 (90680K bytes)
Preloaded elf kernel "kernel.old" at 0xc04f0000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc04f00ac.
Intel Pentium detected, installing workaround for F00F bug
md0: Malloc disk
apm0: <APM BIOS> on motherboard
apm: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
ncr0: <ncr 53c810 fast10 scsi> port 0xfc00-0xfcff mem 0xfedfbc00-0xfedfbcff irq 15 at device 6.0 on pci0
pci0: <Matrox MGA Millennium 2064W graphics accelerator> at 10.0 irq 11
pcn0: <AMD PCnet/PCI 10/100BaseTX> port 0xf8e0-0xf8ff mem 0xfedfb800-0xfedfb81f irq 15 at device 11.0 on pci0
pcn0: Ethernet address: 00:60:b0:7b:b6:3f
miibus0: <MII bus> on pcn0
nsphy0: <DP83840 10/100 media interface> on miibus0
nsphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
....


>Description:

The commits for these revisions properly turned on autonegotiation
handling through miibus and disabled the PHY's autonegotiation.
Unfortunately miibus autoneg handling doesn't work on this Vectra:

During device probe the nsphy says "no media present" if *anything* is
connected to either the 10 or the 100 port. Workaround: disconnect from
the hub/switch during boot. This is probably kern/25959.

Before the commit the PHY was doing autoneg. This led to the strange
effect that a 10BaseT hub on the "100" Port worked fine (but not on the
"10" port).

After this commit miibus is responsible for autonegotiation. This
doesn't work at all. The "10" port doesn't, and the "100" port doesn't
either. While with the hub at the "10" port the link is down (which the
hub doesn't grok, as it sees it link up), at the "100" port the link is
up but no packets get transmitted. Seems that the MII autonegotiation
stuff is broken. The pcn device is just unusable now.

>How-To-Repeat:
	
>Fix:

	
>Release-Note:
>Audit-Trail:

From: Mario Hoerich <lists@MHoerich.de>
To: freebsd-gnats-submit@FreeBSD.org, send-pr@oldach.net
Cc:  
Subject: Re: kern/27995: src/sys/pci if_pcn.c revision 1.21 resp. 1.5.2.7 breaks pcn device on HP Vectra
Date: Tue, 15 Feb 2005 01:29:58 +0100

 Hello,
 
 following up on non-closed PRs.
 
 | The commits for these revisions properly turned on autonegotiation
 | handling through miibus and disabled the PHY's autonegotiation.
 | Unfortunately miibus autoneg handling doesn't work on this Vectra:
 
 This seems rather ancient now, does that problem still persist?
 
 Regards,
 Mario
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Sep 13 23:07:06 GMT 2005 
State-Changed-Why:  
Feedback timeout (> 6 months). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=27995 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/27995: commit references a PR
Date: Tue, 28 Nov 2006 05:35:50 +0000 (UTC)

 marius      2006-11-28 01:33:18 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/pci              if_pcn.c if_pcnreg.h 
   Log:
   - Clear the PCN_MISC_ASEL bit so the media port can be actually set
     via the PCN_CSR_MODE register. Along with sys/dev/mii/nsphy.c 1.26
     this fixes the case of certain Am79c971-based HP cards and on-board
     ones in IBM machines reporting link but not actually passing any
     traffic. [1]
   - Add support for the internal 10baseT PHY, which actually is used on
     at least said HP cards (together with an external DP83840A in a
     multiple PHYs configuration). With cards that don't make use of this
     internal PHY it'll also show up in FreeBSD but not cause any harm.
     This is still missing support for multiple PHYs configuration using
     the internal 100baseTX and/or HomePNA PHYs together with external
     PHYs or multiple external PHYs though.
   - In pcn_ifmedia_upd() call pcn_reset() as otherwise the Am79C971 of
     at least said HP cards can wedge when switching from the internal
     10baseT PHY to the external PHY. This means that we need to also
     initialize and possibly start the chip again in pcn_ifmedia_upd(),
     which isn't that bad though as for setting the media port the chip
     has to be powered down or stopped anyway and unlike documented
     doesn't take effect until the next initialization.
   
   PR:             27995, 25959, 72966 (likely) [1]
   MFC after:      2 weeks
   
   Revision  Changes    Path
   1.81      +66 -12    src/sys/pci/if_pcn.c
   1.15      +8 -4      src/sys/pci/if_pcnreg.h
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/27995: commit references a PR
Date: Sun, 25 Feb 2007 19:02:08 +0000 (UTC)

 marius      2007-02-25 19:02:01 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/pci              if_pcn.c if_pcnreg.h 
   Log:
   MFC: if_pcn.c 1.76, 1.81, 1.82; if_pcnreg.h 1.15
   
   - In detach method, move if_free() after bus_teardown_intr().
   - Clear the PCN_MISC_ASEL bit so the media port can be actually set
     via the PCN_CSR_MODE register. Along with sys/dev/mii/nsphy.c 1.23.2.3
     this fixes the case of certain Am79c971-based HP cards and on-board
     ones in IBM machines reporting link but not actually passing any
     traffic. [1]
   - Add support for the internal 10baseT PHY, which actually is used on
     at least said HP cards (together with an external DP83840A in a
     multiple PHYs configuration). With cards that don't make use of this
     internal PHY it'll also show up in FreeBSD but not cause any harm.
     This is still missing support for multiple PHYs configuration using
     the internal 100baseTX and/or HomePNA PHYs together with external
     PHYs or multiple external PHYs though.
   - Allow multiple (external) PHYs with Am79C97{2,6}, which actually
     only support external PHYs (besides not connectable internal ones
     which respond at the usual addresses, but which don't hurt if we
     let them show up) and don't wedge when isolating PHYs. Actually,
     this change special cases limiting PHYs to Am79C97{3,5,8}, for
     which this driver doesn't implement swiching between the internal
     and external PHYs, yet, and Am79C971, where isolating the external
     PHY (at least in case it's a DP83840A) wedges the chip. Together
     with sys/dev/mii/acphy.c rev. 1.16.2.5 this adds support for the
     100baseFX port of AT-2700 series adaptors, which use two AC101,
     one for the copper and one for the fibre port (there might be
     variants which only use one PHY though).
   - In pcn_ifmedia_upd() call pcn_reset() as otherwise the Am79C971 of
     at least said HP cards can wedge when switching from the internal
     10baseT PHY to the external PHY. This means that we need to also
     initialize and possibly start the chip again in pcn_ifmedia_upd(),
     which isn't that bad though as for setting the media port the chip
     has to be powered down or stopped anyway and unlike documented
     doesn't take effect until the next initialization.
   - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
   
   PR:             27995, 25959, 72966 (likely) [1]
   
   Revision  Changes    Path
   1.69.2.7  +80 -15    src/sys/pci/if_pcn.c
   1.11.2.3  +8 -4      src/sys/pci/if_pcnreg.h
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
