<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/dev/mii/ukphy.c, branch stable/7</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2010-11-26T19:48:27Z</updated>
<entry>
<title>MFC: r214608, r215297(partial), r215713</title>
<updated>2010-11-26T19:48:27Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-11-26T19:48:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=277197cd7ee5dde833cb2327b63aab71abbf815e'/>
<id>urn:sha1:277197cd7ee5dde833cb2327b63aab71abbf815e</id>
<content type='text'>
o Flesh out the generic IEEE 802.3 annex 31B full duplex flow control
  support in mii(4):
  - Merge generic flow control advertisement (which can be enabled by
    passing by MIIF_DOPAUSE to mii_attach(9)) and parsing support from
    NetBSD into mii_physubr.c and ukphy_subr.c. Unlike as in NetBSD,
    IFM_FLOW isn't implemented as a global option via the "don't care
    mask" but instead as a media specific option this. This has the
    following advantages:
    o allows flow control advertisement with autonegotiation to be
      turned on and off via ifconfig(8) with the default typically
      being off (though MIIF_FORCEPAUSE has been added causing flow
      control to be always advertised, allowing to easily MFC this
      changes for drivers that previously used home-grown support for
      flow control that behaved that way without breaking POLA)
    o allows to deal with PHY drivers where flow control advertisement
      with manual selection doesn't work or at least isn't implemented,
      like it's the case with brgphy(4), e1000phy(4) and ip1000phy(4),
      by setting MIIF_NOMANPAUSE
    o the available combinations of media options are readily available
      from the `ifconfig -m` output
  - Add IFM_FLOW to IFM_SHARED_OPTION_DESCRIPTIONS and IFM_ETH_RXPAUSE
    and IFM_ETH_TXPAUSE to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so
    these are understood by ifconfig(8).
o Make the master/slave support in mii(4) actually usable:
  - Change IFM_ETH_MASTER from being implemented as a global option via
    the "don't care mask" to a media specific one as it actually is only
    applicable to IFM_1000_T to date.
  - Let mii_phy_setmedia() set GTCR_MAN_MS in IFM_1000_T slave mode to
    actually configure manually selected slave mode (like we also do in
    the PHY specific implementations).
  - Add IFM_ETH_MASTER to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so it
    is understood by ifconfig(8).
o Switch bge(4), bce(4), msk(4), nfe(4) and stge(4) along with brgphy(4),
  e1000phy(4) and ip1000phy(4) to use the generic flow control support
  instead of home-grown solutions via IFM_FLAGs. This includes changing
  these PHY drivers and smcphy(4) to no longer unconditionally advertise
  support for flow control but only if the selected media has IFM_FLOW
  set (or MIIF_FORCEPAUSE is set) and implemented for these media variants,
  i.e. typically only for copper.
o Switch brgphy(4), ciphy(4), e1000phy(4) and ip1000phy(4) to report and
  set IFM_1000_T master mode via IFM_ETH_MASTER instead of via IFF_LINK0
  and some IFM_FLAGn.
o Switch brgphy(4) to add at least the the supported copper media based on
  the contents of the BMSR via mii_phy_add_media() instead of hardcoding
  them. The latter approach seems to have developed historically, besides
  causing unnecessary code duplication it was also undesirable because
  brgphy_mii_phy_auto() already based the capability advertisement on the
  contents of the BMSR though.
o Let brgphy(4) set IFM_1000_T master mode on all supported PHY and not
  just BCM5701. Apparently this was a misinterpretation of a workaround
  in the Linux tg3 driver; BCM5701 seem to require RGPHY_1000CTL_MSE and
  BRGPHY_1000CTL_MSC to be set when configuring autonegotiation but
  this doesn't mean we can't set these as well on other PHYs for manual
  media selection.
o Let ukphy_status() report IFM_1000_T master mode via IFM_ETH_MASTER so
  IFM_1000_T master mode support now is generally available with all PHY
  drivers.
o Don't let e1000phy(4) set master/slave bits for IFM_1000_SX as it's
  not applicable there.

Reviewed by:	yongari (plus additional testing)
Obtained from:	NetBSD (partially), OpenBSD (partially)

Unlike as in head, bge(4), bce(4), msk(4), nfe(4) and stge(4) are changed
to set MIIF_FORCEPAUSE in stable/7 so they continue to always advertise
support of flow control and brgphy(4), ciphy(4), e1000phy(4) as well as
ip1000phy(4) are changed to still also accept IFF_LINK0 in addition to
the master media option for setting master mode, both in order to not
violate POLA.
</content>
</entry>
<entry>
<title>MFC: r213893, r213908, r214566, r214605, r214846</title>
<updated>2010-11-07T11:12:30Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-11-07T11:12:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4aec3028843cf6e3074fa61de9a91bd59471724a'/>
<id>urn:sha1:4aec3028843cf6e3074fa61de9a91bd59471724a</id>
<content type='text'>
Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214685) to
get rid of certain hacks. For the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
  addresses; we now let mii_attach() only probe the PHY at the desired
  address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
  off from, partly even based on grabbing and using the softc of the
  parent; we now pass these flags down from the NIC to the PHY drivers
  via mii_attach(). This got us rid of all such hacks except those of
  brgphy() in combination with bce(4) and bge(4), which is way beyond
  what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

Reviewed by:	jhb, yongari
</content>
</entry>
<entry>
<title>MFC: r213364</title>
<updated>2010-10-24T13:39:26Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-10-24T13:39:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=079faf2109d575402f4ab1ac8c90b173bdbbbf24'/>
<id>urn:sha1:079faf2109d575402f4ab1ac8c90b173bdbbbf24</id>
<content type='text'>
- In the spirit of previous simplifications factor out the checks for a
  different PHY instance being selected and isolation out into the wrappers
  around the service methods rather than duplicating them over and over
  again (besides, a PHY driver shouldn't need to care about which instance
  it actually is).
- Centralize the check for the need to isolate a non-zero PHY instance not
  supporting isolation in mii_mediachg() and just ignore it rather than
  panicing, which should sufficient given that a) things are likely to
  just work anyway if one doesn't plug in more than one port at a time and
  b) refusing to attach in this case just leaves us in a unknown but most
  likely also not exactly correct configuration (besides several drivers
  setting MIIF_NOISOLATE didn't care about these anyway, probably due to
  setting this flag for no real reason).
- Minor fixes like removing unnecessary setting of sc-&gt;mii_anegticks,
  using sc-&gt;mii_anegticks instead of hardcoded values etc.
</content>
</entry>
<entry>
<title>MFC: r213229</title>
<updated>2010-10-17T12:30:01Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-10-17T12:30:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=127507f415ca1b93e01b87bef2934c34b2118d59'/>
<id>urn:sha1:127507f415ca1b93e01b87bef2934c34b2118d59</id>
<content type='text'>
Use the mii_data provided via mii_attach_args and mii_pdata respectively
instead of reaching out for the softc of the parent.
</content>
</entry>
<entry>
<title>MFC: r213188</title>
<updated>2010-10-17T12:16:38Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-10-17T12:16:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=dc021cae962498765e01cfbc8727bbf49754b986'/>
<id>urn:sha1:dc021cae962498765e01cfbc8727bbf49754b986</id>
<content type='text'>
- Remove clause 3 and 4 from TNF licenses.
- Remove closes 3 &amp; 4 from Manuel Bouyer's license.

Obtained from:	NetBSD
</content>
</entry>
<entry>
<title>- Don't set MIIF_NOISOLATE so ukphy(4) can be used in configurations with</title>
<updated>2007-01-20T00:52:29Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2007-01-20T00:52:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b8a5d0481a8b9ec7baff929c6d5d9f8a4d4c9970'/>
<id>urn:sha1:b8a5d0481a8b9ec7baff929c6d5d9f8a4d4c9970</id>
<content type='text'>
  multiple PHYs. In case some PHYs currently driven by ukphy(4) exhibit
  problems when isolating due to incomplete implementations or silicon bugs
  we'll need to add specific drivers for these. Looking at NetBSD and
  OpenBSD I don't expect problems here though (quite the contrary; we still
  seem to set MIIF_NOISOLATE without good reason in a bunch of PHY drivers).
- Fix a style(9) whitespace nit.
</content>
</entry>
<entry>
<title>Replace hard-coded magic constants to system defined constants</title>
<updated>2006-07-03T02:53:40Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2006-07-03T02:53:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=5358725ab4b3cc550896533c37fc6812a7f7c540'/>
<id>urn:sha1:5358725ab4b3cc550896533c37fc6812a7f7c540</id>
<content type='text'>
(BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc).
There is no functional changes.

Reviewed by:	oleg, scottl
</content>
</entry>
<entry>
<title>Use ansi function definitions in preference to K&amp;R to reduce diffs</title>
<updated>2005-09-30T19:39:27Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2005-09-30T19:39:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=7d830ac9c2ad8d1031bd9d20cc5d976ac7eebd90'/>
<id>urn:sha1:7d830ac9c2ad8d1031bd9d20cc5d976ac7eebd90</id>
<content type='text'>
with NetBSD (and cause it looks cooler).
</content>
</entry>
<entry>
<title>Start each of the license/copyright comments with /*-, minor shuffle of lines</title>
<updated>2005-01-06T01:43:34Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2005-01-06T01:43:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=098ca2bda93c701c5331d4e6aace072495b4caaa'/>
<id>urn:sha1:098ca2bda93c701c5331d4e6aace072495b4caaa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove double __FBSDID and move the remaining one into a common place after</title>
<updated>2004-05-29T18:09:10Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2004-05-29T18:09:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=50aa106108cc9a610e4bdee7c7fe614a8c425c18'/>
<id>urn:sha1:50aa106108cc9a610e4bdee7c7fe614a8c425c18</id>
<content type='text'>
the license(s) and before the driver comment (the latter only in drivers not
having __FBSDID at that location).
</content>
</entry>
</feed>
