Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 2010 22:01:40 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/mii mii.c mii.h miivar.h src/sys/modules/mii Makefile
Message-ID:  <201010142202.o9EM26S6034304@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marius      2010-10-14 22:01:40 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/mii          mii.c mii.h miivar.h 
    sys/modules/mii      Makefile 
  Log:
  SVN rev 213878 on 2010-10-14 22:01:40Z by marius
  
  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.38      +212 -86   src/sys/dev/mii/mii.c
  1.7       +4 -2      src/sys/dev/mii/mii.h
  1.23      +39 -11    src/sys/dev/mii/miivar.h
  1.37      +2 -1      src/sys/modules/mii/Makefile



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010142202.o9EM26S6034304>