From owner-cvs-src-old@FreeBSD.ORG  Tue Nov  2 20:07:18 2010
Return-Path: <owner-cvs-src-old@FreeBSD.ORG>
Delivered-To: cvs-src-old@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6E3EF1065695
	for <cvs-src-old@freebsd.org>; Tue,  2 Nov 2010 20:07:18 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from repoman.freebsd.org (repoman.freebsd.org
	[IPv6:2001:4f8:fff6::29])
	by mx1.freebsd.org (Postfix) with ESMTP id 409698FC20
	for <cvs-src-old@freebsd.org>; Tue,  2 Nov 2010 20:07:18 +0000 (UTC)
Received: from repoman.freebsd.org (localhost [127.0.0.1])
	by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oA2K7IYU099929
	for <cvs-src-old@freebsd.org>; Tue, 2 Nov 2010 20:07:18 GMT
	(envelope-from marius@repoman.freebsd.org)
Received: (from svn2cvs@localhost)
	by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oA2K7Ipj099928
	for cvs-src-old@freebsd.org; Tue, 2 Nov 2010 20:07:18 GMT
	(envelope-from marius@repoman.freebsd.org)
Message-Id: <201011022007.oA2K7Ipj099928@repoman.freebsd.org>
X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to
	marius@repoman.freebsd.org using -f
From: Marius Strobl <marius@FreeBSD.org>
Date: Tue, 2 Nov 2010 20:06:46 +0000 (UTC)
To: cvs-src-old@freebsd.org
X-FreeBSD-CVS-Branch: RELENG_8
Subject: cvs commit: src/sys/dev/mii mii.c mii.h miivar.h
 src/sys/modules/mii Makefile
X-BeenThere: cvs-src-old@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: **OBSOLETE** CVS commit messages for the src tree
	<cvs-src-old.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src-old>,
	<mailto:cvs-src-old-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/cvs-src-old>
List-Post: <mailto:cvs-src-old@freebsd.org>
List-Help: <mailto:cvs-src-old-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src-old>,
	<mailto:cvs-src-old-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Nov 2010 20:07:18 -0000

marius      2010-11-02 20:06:46 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_8)
    sys/dev/mii          mii.c mii.h miivar.h 
    sys/modules/mii      Makefile 
  Log:
  SVN rev 214684 on 2010-11-02 20:06:46Z by marius
  
  MFC: r213878
  
  Add a NetBSD-compatible mii_attach(), which is intended to eventually
  replace mii_phy_probe() altogether. Compared to the latter the advantages
  of mii_attach() are:
  - intended to be called multiple times in order to attach PHYs in multiple
    passes (f.e. in order to only use sub-ranges of the 0 to MII_NPHY - 1
    range)
  - being able to pass along the capability mask from the NIC to the PHY
    drivers
  - being able to specify at which address (phyloc) to probe for a PHY
    (instead of always probing at all addresses from 0 to MII_NPHY - 1)
  - being able to specify which PHY instance (offloc) to attach
  - being able to pass along MIIF_* flags from the NIC to the PHY drivers
    (f.e. as required to indicated to the PHY drivers that flow control is
    supported by the NIC driver, which actually is the motivation for this
    change).
  
  While at it, I used the opportunity to get rid of some hacks in mii(4)
  like miibus_probe() generally doing work besides sheer probing and the
  "EVIL HACK" (which will vanish entirely along with mii_phy_probe()) by
  passing the struct ifnet pointer via an argument of mii_attach() as well
  as to fix some resource leaks in mii(4) in case something fails.
  Commits which will update the PHY drivers to honor the MII flags passed
  down from the NIC drivers and take advantage of mii_attach() to get rid
  of certain types of hacks in NIC and PHY drivers as well as a conversion
  of the remaining uses of mii_phy_probe() will follow shortly.
  
  Reviewed by:    jhb, yongari
  Obtained from:  NetBSD (partially)
  
  Revision   Changes    Path
  1.31.2.6   +212 -86   src/sys/dev/mii/mii.c
  1.5.22.3   +4 -2      src/sys/dev/mii/mii.h
  1.21.10.3  +39 -11    src/sys/dev/mii/miivar.h
  1.36.2.2   +2 -1      src/sys/modules/mii/Makefile