#
4dff0d0b |
| 04-Nov-2020 |
msaitoh <msaitoh@NetBSD.org> |
Fix a bug that "ifconfig xx0 media none" set LINK_STATE_UNKNOWN instead of LINK_STATE_DOWN.
XXX We should check for other PHY drivers, too.
|
#
4bdc7ccd |
| 03-Aug-2020 |
msaitoh <msaitoh@NetBSD.org> |
Rename PSSR_* to MAKPHY_PSSR_* and IGPHY_PSSR_* to avoid conflict. No functional change.
|
#
72951728 |
| 03-Aug-2020 |
msaitoh <msaitoh@NetBSD.org> |
s/MII_IGPHY_/IGPHY_/. No functional change.
|
#
e28eda5d |
| 07-Jul-2020 |
msaitoh <msaitoh@NetBSD.org> |
- Remove the waitfor argument from mii_phy_auto(). - Whitespace fix.
|
#
61b37dcb |
| 15-Mar-2020 |
thorpej <thorpej@NetBSD.org> |
Define and implement a locking protocol for the ifmedia / mii layers: - MP-safe drivers provide a mutex to ifmedia that is used to serialize access to media-related structures / hardware regsiters.
Define and implement a locking protocol for the ifmedia / mii layers: - MP-safe drivers provide a mutex to ifmedia that is used to serialize access to media-related structures / hardware regsiters. Converted drivers use the new ifmedia_init_with_lock() function for this. The new name is provided to ease the transition. - Un-converted drivers continue to call ifmedia_init(), which will supply a compatibility lock to be used instead. Several media-related entry points must be aware of this compatibility lock, and are able to acquire it recursively a limited number of times, if needed. This is a SPIN mutex with priority IPL_NET. - This same lock is used to serialize access to PHY registers and other MII-related data structures.
The PHY drivers are modified to acquire and release the lock, as needed, and assert the lock is held as a diagnostic aid.
The "usbnet" framework has had an overhaul of its internal locking protocols to fit in with the media / mii changes, and the drivers adapted.
USB wifi drivers have been changed to provide their own adaptive mutex to the ifmedia later via a new ieee80211_media_init_with_lock() function. This is required because the USB drivers need an adaptive mutex.
Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.
mcx also now calls ifmedia_init_with_lock() because it needs to also use an adaptive mutex. The mcx driver still needs to be fully converted to NET_MPSAFE.
show more ...
|
#
b2a008ad |
| 27-Nov-2019 |
msaitoh <msaitoh@NetBSD.org> |
- Simplify sc->mii_anegticks setting. Same as FreeBSD.
Don't set the default value not in the attach function. Instead, set the default value (MII_ANEGTICKS) first in the beginning of the mii
- Simplify sc->mii_anegticks setting. Same as FreeBSD.
Don't set the default value not in the attach function. Instead, set the default value (MII_ANEGTICKS) first in the beginning of the mii_phy_add_media(). The function already has the code to change the value to MII_ANEGTICKS_GIGE if it's gigabit capable.
- Remove extra pmf_device_register() call. It's done in mii_phy_add_media().
show more ...
|
#
9846d3fd |
| 25-Mar-2019 |
msaitoh <msaitoh@NetBSD.org> |
KNF. No functional change.
|
#
d23de6ff |
| 24-Feb-2019 |
christos <christos@NetBSD.org> |
use a macro to tidy up the phydesc array initialization, from FreeBSD
|
#
e746222f |
| 22-Jan-2019 |
msaitoh <msaitoh@NetBSD.org> |
Change MII PHY read/write API from:
int (*mii_readreg_t)(device_t, int, int); void (*mii_writereg_t)(device_t, int, int, int); to:
int (*mii_readreg_t)(device_t, int, int, uint16_t *); int (*mi
Change MII PHY read/write API from:
int (*mii_readreg_t)(device_t, int, int); void (*mii_writereg_t)(device_t, int, int, int); to:
int (*mii_readreg_t)(device_t, int, int, uint16_t *); int (*mii_writereg_t)(device_t, int, int, uint16_t);
Now we can test if a read/write operation failed or not by the return value.
In 802.3 spec says that the PHY shall not respond to read/write transaction to the unimplemented register(22.2.4.3). Detecting timeout can be used to check whether a register is implemented or not (if the register conforms to the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.
Note that I noticed that the following code do infinite loop in the read/wirte function. If it accesses unimplemented PHY register, it will hang. It should be fixed:
arm/at91/at91emac.c arm/ep93xx/epe.c arm/omap/omapl1x_emac.c mips/ralink/ralink_eth.c arch/powerpc/booke/dev/pq3etsec.c(read) dev/cadence/if_cemac.c <- hkenken dev/ic/lan9118.c
Tested with the following device:
axe+ukphy axe+rgephy axen+rgephy (tested by Andrius V) wm+atphy wm+ukphy wm+igphy wm+ihphy wm+makphy sk+makphy sk+brgphy sk+gentbi msk+makphy sip+icsphy sip+ukphy re+rgephy bge+brgphy bnx+brgphy gsip+gphyter rtk+rlphy fxp+inphy (tested by Andrius V) tlp+acphy ex+exphy epic+qsphy vge+ciphy (tested by Andrius V) vr+ukphy (tested by Andrius V) vte+ukphy (tested by Andrius V)
Not tested (MAC): arm:at91emac arm:cemac arm:epe arm:geminigmac arm:enet arm:cpsw arm:emac(omac) arm:emac(sunxi) arm:npe evbppc:temac macppc:bm macppc:gm mips:aumac mips:ae mips:cnmac mips:reth mips:sbmac playstation2:smap powerpc:tsec powerpc:emac(ibm4xx) sgimips:mec sparc:be sf ne(ax88190, dl10019) awge ep gem hme smsh mtd sm age alc ale bce cas et jme lii nfe pcn ste stge tl xi aue mue smsc udav url
Not tested (PHY): amhphy bmtphy dmphy etphy glxtphy ikphy iophy lxtphy nsphyter pnaphy rdcphy sqphy tlphy tqphy urlphy
show more ...
|
#
0e8e184e |
| 08-Jan-2019 |
msaitoh <msaitoh@NetBSD.org> |
Whitespace fixes. No functional change.
|
#
f3909175 |
| 06-Jul-2017 |
msaitoh <msaitoh@NetBSD.org> |
Update comment. SmartSpeed workaroud code was added in rev. 1.5. No functional change.
|
#
575a7585 |
| 07-Jul-2016 |
msaitoh <msaitoh@NetBSD.org> |
KNF. Remove extra spaces. No functional change.
|
#
48297c12 |
| 30-Oct-2015 |
msaitoh <msaitoh@NetBSD.org> |
igphy(4),ukphy(4): Set mii_mpd_* entries. wm(4): check PHY type correctly.
|
#
d304a501 |
| 24-Aug-2015 |
pooka <pooka@NetBSD.org> |
add some _KERNEL_OPT as the finishing touch
|
#
a7fbee7b |
| 16-Jun-2014 |
msaitoh <msaitoh@NetBSD.org> |
IFM_FDX and IFM_HDX use different bit, so set IFM_HDX bit if it's not full duplex. For many drivers, it recognize half duplex if IFM_FDX isn't set, but not for others. Same as {Free|Open}BSD.
|
#
261da1dd |
| 18-Oct-2012 |
msaitoh <msaitoh@NetBSD.org> |
Style fix. No functional change.
|
#
c70d45b7 |
| 07-Mar-2010 |
msaitoh <msaitoh@NetBSD.org> |
Add two workarounds for ICH8 with igp3. - Workaround for 82566 Kumeran PCS lock loss. - WOL from S5 stops working.
|
#
05b467b5 |
| 16-Dec-2009 |
msaitoh <msaitoh@NetBSD.org> |
Sync with Intel's original em driver: - Add dspcode for igp3 and use it when the EEPROM isn't available. - Add some delays. - Stop the PHY transmitter before patching the DSP code and restart it afte
Sync with Intel's original em driver: - Add dspcode for igp3 and use it when the EEPROM isn't available. - Add some delays. - Stop the PHY transmitter before patching the DSP code and restart it after wrote. - Save and restore register 0x2f5b.
show more ...
|
#
f03b8365 |
| 16-Dec-2009 |
msaitoh <msaitoh@NetBSD.org> |
Re-enable igphy's 82566 support. - Patch for the DSP code is only for 8254[17] and we have to apply the different patches between rev. 1 and rev. 2. - The workaround for analog fuse is only for
Re-enable igphy's 82566 support. - Patch for the DSP code is only for 8254[17] and we have to apply the different patches between rev. 1 and rev. 2. - The workaround for analog fuse is only for 82547 rev. 1. - The workaround for smartspeed is only for 8254[17]
see http://mail-index.netbsd.org/tech-net/2009/08/05/msg001546.html
show more ...
|
#
20115c22 |
| 06-Aug-2009 |
kml <kml@NetBSD.org> |
Later generation 82566 IGP PHYs have problems with media changes to 100Mb and 10Mb; it appears that the SmartSpeed workaround and dspcode in this PHY are aimed at earlier generation IGPs. Remove ref
Later generation 82566 IGP PHYs have problems with media changes to 100Mb and 10Mb; it appears that the SmartSpeed workaround and dspcode in this PHY are aimed at earlier generation IGPs. Remove reference to 82566s, allowing them to fall through to choose other PHYs.
show more ...
|
#
ddbd8176 |
| 17-Nov-2008 |
dyoung <dyoung@NetBSD.org> |
Reduce code duplication: most PHY drivers call mii_phy_add_media() when they attach to the device tree, so call pmf_device_register(9) once there instead of once in more than twenty drivers.
|
#
7db0e577 |
| 04-May-2008 |
xtraeme <xtraeme@NetBSD.org> |
device_t/softc split for all mii(4) devices, and other related cosmetic changes.
|
#
ce099b40 |
| 28-Apr-2008 |
martin <martin@NetBSD.org> |
Remove clause 3 and 4 from TNF licenses
|
#
cf417aad |
| 08-Apr-2008 |
cegger <cegger@NetBSD.org> |
use aprint_*_dev and device_xname
|
#
4c1d81b2 |
| 09-Dec-2007 |
jmcneill <jmcneill@NetBSD.org> |
Merge jmcneill-pm branch.
|