#
8e5d93db |
| 15-Oct-2010 |
Marius Strobl <marius@FreeBSD.org> |
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 to get rid of certain hac
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 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
show more ...
|
#
de1add1e |
| 02-Oct-2010 |
Marius Strobl <marius@FreeBSD.org> |
- 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 duplicatin
- 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->mii_anegticks, using sc->mii_anegticks instead of hardcoded values etc.
show more ...
|
#
7b9a15f7 |
| 27-Sep-2010 |
Marius Strobl <marius@FreeBSD.org> |
Use the mii_data provided via mii_attach_args and mii_pdata respectively instead of reaching out for the softc of the parent.
|
Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
028ccec4 |
| 02-Dec-2006 |
Marius Strobl <marius@FreeBSD.org> |
Some style changes to a couple of PHY drivers: - Fix some whitespace nits. - Fix some spelling in comments. - Use MII_ANEGTICKS instead of 5. - Don't define variables in nested scope. - Remove superf
Some style changes to a couple of PHY drivers: - Fix some whitespace nits. - Fix some spelling in comments. - Use MII_ANEGTICKS instead of 5. - Don't define variables in nested scope. - Remove superfluous returns at the end of void functions. - Remove unused static global rgephy_mii_model. - Remove dupe $Id$ in tdkphy(4). - Sort brgphys table.
MFC after: 2 weeks
show more ...
|
#
a35b9333 |
| 02-Dec-2006 |
Marius Strobl <marius@FreeBSD.org> |
Add a helper function mii_phy_dev_probe(), which wraps around the mii_phy_match() API and takes care of the PHY device probe based on the struct mii_phydesc array and the match return value provided.
Add a helper function mii_phy_dev_probe(), which wraps around the mii_phy_match() API and takes care of the PHY device probe based on the struct mii_phydesc array and the match return value provided. Convert PHY drivers to take advantage of mii_phy_dev_probe(), converting drivers to provide a mii_phydesc table in the first place where necessary.
Reviewed by: yongari MFC after: 2 weeks
show more ...
|
#
5358725a |
| 03-Jul-2006 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Replace hard-coded magic constants to system defined constants (BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc). There is no functional changes.
Reviewed by: oleg, scottl
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0 |
|
#
7d830ac9 |
| 30-Sep-2005 |
Warner Losh <imp@FreeBSD.org> |
Use ansi function definitions in preference to K&R to reduce diffs with NetBSD (and cause it looks cooler).
|
Revision tags: release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0 |
|
#
098ca2bd |
| 06-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
#
41ee9f1c |
| 30-May-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Add some missing <sys/module.h> includes which are masked by the one on death-row in <sys/kernel.h>
|
#
50aa1061 |
| 29-May-2004 |
Marius Strobl <marius@FreeBSD.org> |
Remove double __FBSDID and move the remaining one into a common place after the license(s) and before the driver comment (the latter only in drivers not having __FBSDID at that location).
|
Revision tags: release/4.10.0_cvs, release/4.10.0 |
|
#
9a54cbb9 |
| 03-May-2004 |
Andre Oppermann <andre@FreeBSD.org> |
Correct the phy_service() routine case MII_TICK to correctly track the falling edge of a media state change.
This is in preparation for media state change notification to the routing socket.
No obj
Correct the phy_service() routine case MII_TICK to correctly track the falling edge of a media state change.
This is in preparation for media state change notification to the routing socket.
No objections by: sam, wpaul, ru, bms Brucification by: bde
show more ...
|
Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
aad970f1 |
| 24-Aug-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Use __FBSDID(). Also some minor style cleanups.
|
Revision tags: release/5.1.0_cvs, release/5.1.0 |
|
#
8368cf8f |
| 03-Apr-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Use __FBSDID rather than rcsid[].
|
Revision tags: release/4.8.0_cvs, release/4.8.0 |
|
#
2d3ce713 |
| 19-Jan-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Remove miidevs.h and generate it from miidevs at compile time. The devlist2h.awk tool to do this has been repocopied to sys/tools/.
|
Revision tags: release/5.0.0_cvs, release/5.0.0 |
|
#
07971c41 |
| 29-Oct-2002 |
Semen Ustimenko <semenu@FreeBSD.org> |
Remove unnecessary <sys/malloc.h> include.
Submitted by: marius@alchemy.franken.de MFC after: 1 week
|
#
9c1c2e99 |
| 15-Oct-2002 |
Alfred Perlstein <alfred@FreeBSD.org> |
Put function return types on a line by themselves. Cleanup my earlier de-__P sweep and remove whitespace between function names and paramters.
|
Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
fd94424c |
| 04-May-2002 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't really do anything at the end of the day except bloat the drivers which has copy&pasted it.
|
#
279fe8d1 |
| 29-Apr-2002 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Make one generic mii_phy_detach() to replace 19 slightly different ones.
Rename mii_phy_auto_stop() mii_phy_down().
Introduce mii_down(), use it from nge. Do not indirect it to 19 identical case's
Make one generic mii_phy_detach() to replace 19 slightly different ones.
Rename mii_phy_auto_stop() mii_phy_down().
Introduce mii_down(), use it from nge. Do not indirect it to 19 identical case's in 19 switchstatements like NetBSD did.
show more ...
|
#
e51a25f8 |
| 20-Mar-2002 |
Alfred Perlstein <alfred@FreeBSD.org> |
Remove __P.
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
d9730b8b |
| 29-Sep-2001 |
Jonathan Lemon <jlemon@FreeBSD.org> |
Cleanup pass for mii drivers. . Make internal service routines static. . Use a consistent ordering of checks in MII_TICK. Do the work in the mii_phy_tick() subroutine if appropriate. .
Cleanup pass for mii drivers. . Make internal service routines static. . Use a consistent ordering of checks in MII_TICK. Do the work in the mii_phy_tick() subroutine if appropriate. . Call mii_phy_update() to trigger the callbacks.
show more ...
|
#
134c58d3 |
| 24-May-2001 |
Bill Paul <wpaul@FreeBSD.org> |
Tweak the xmphy driver a little bit based on something I learned about the built-in 1000baseX interface in the Level 1 LXT1001 chip. The Level 1 PHY comes up with the isolate bit in the control regis
Tweak the xmphy driver a little bit based on something I learned about the built-in 1000baseX interface in the Level 1 LXT1001 chip. The Level 1 PHY comes up with the isolate bit in the control register set by default, but it also has the autonegotiate bit set. When you tell the xmphy driver to select IFM_AUTO mode, it sees that the autoneg bit is already on, and thus doesn't bother updating the control register. However this means that the isolate bit is never turned off (unless you manually select 1000baseSX full or half duplex mode, which does result in the control register being modified and the ISO bit being turned off).
This subtle and unusual behavioral difference stopped me from being able to receive packets on the SMC9462TX card for several days, since isolating the PHY disconnects it from the MAC's data interface. The fix is to omit the 'is the autoneg big set?' test, since it doesn't really provide much of an optimization anyway.
This commit also updates the xmphy driver to support the Jato/Level 1 internal PHY. (I'm not sure how Jato Technologies is related to Level 1: all I know is the OUI from the PHY ID registers maps to Jato in the OUI database.) This will be used once I add the if_lge driver to support the LXT10010 chip.
show more ...
|
Revision tags: release/4.3.0_cvs, release/4.3.0 |
|
#
34da0ef1 |
| 12-Dec-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Grrrrr. That last commit was supposed to be to the head, not to -stable (even though I want the fixes in -stable anyway). I'm sure I'm going to get flamed now for committing to -stable and -current t
Grrrrr. That last commit was supposed to be to the head, not to -stable (even though I want the fixes in -stable anyway). I'm sure I'm going to get flamed now for committing to -stable and -current too quickly. *sigh*
show more ...
|
Revision tags: release/4.2.0 |
|
#
db7e3af1 |
| 15-Oct-2000 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Remove unneeded #include <machine/clock.h>
|
Revision tags: release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs |
|
#
c0d7d4d4 |
| 22-Apr-2000 |
Bill Paul <wpaul@FreeBSD.org> |
Add PHY drivers for the XMAC II's internal PHY and the Broadcom BCM5400 1000baseTX PHY. These will be used by the SysKonnect gigabit ethernet driver shortly.
|
Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
028ccec4 |
| 02-Dec-2006 |
Marius Strobl <marius@FreeBSD.org> |
Some style changes to a couple of PHY drivers: - Fix some whitespace nits. - Fix some spelling in comments. - Use MII_ANEGTICKS instead of 5. - Don't define variables in nested scope. - Remove superf
Some style changes to a couple of PHY drivers: - Fix some whitespace nits. - Fix some spelling in comments. - Use MII_ANEGTICKS instead of 5. - Don't define variables in nested scope. - Remove superfluous returns at the end of void functions. - Remove unused static global rgephy_mii_model. - Remove dupe $Id$ in tdkphy(4). - Sort brgphys table.
MFC after: 2 weeks
show more ...
|