|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7 |
|
| #
0d60fd50 |
| 12-Mar-2025 |
Gerhard Engleder <[email protected]> |
net: phy: Support speed selection for PHY loopback
phy_loopback() leaves it to the PHY driver to select the speed of the loopback mode. Thus, the speed of the loopback mode depends on the PHY driver
net: phy: Support speed selection for PHY loopback
phy_loopback() leaves it to the PHY driver to select the speed of the loopback mode. Thus, the speed of the loopback mode depends on the PHY driver in use.
Add support for speed selection to phy_loopback() to enable loopback with defined speeds. Ensure that link up is signaled if speed changes as speed is not allowed to change during link up. Link down and up is necessary for a new speed.
Signed-off-by: Gerhard Engleder <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc6 |
|
| #
fc81e257 |
| 07-Mar-2025 |
Maxime Chevallier <[email protected]> |
net: phy: phy_caps: Allow looking-up link caps based on speed and duplex
As the link_caps array is efficient for <speed,duplex> lookups, implement a function for speed/duplex lookups that matches a
net: phy: phy_caps: Allow looking-up link caps based on speed and duplex
As the link_caps array is efficient for <speed,duplex> lookups, implement a function for speed/duplex lookups that matches a given mask. This replicates to some extent the phy_lookup_settings() behaviour, matching full link_capabilities instead of a single linkmode.
phy.c's phy_santize_settings() and phylink's phylink_ethtool_ksettings_set() performs such lookup using the phy_settings table, but are only interested in the actual speed/duplex that were matched, rathet than the individual linkmode.
Similar to phy_lookup_settings(), the newly introduced phy_caps_lookup() will run through the link_caps[] array by descending speed/duplex order.
If the link_capabilities for a given <speed/duplex> tuple intersects the passed linkmodes, we consider that a match.
Similar to phy_lookup_settings(), we also allow passing an 'exact' boolean, allowing non-exact match. Here, we MUST always match the linkmodes mask, but we allow matching on lower speed settings.
Signed-off-by: Maxime Chevallier <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
87b22ce3 |
| 07-Mar-2025 |
Maxime Chevallier <[email protected]> |
net: phy: phy_caps: Introduce phy_caps_valid
With the link_capabilities array, it's trivial to validate a given mask againts a <speed, duplex> tuple. Create a helper for that purpose, and use it to
net: phy: phy_caps: Introduce phy_caps_valid
With the link_capabilities array, it's trivial to validate a given mask againts a <speed, duplex> tuple. Create a helper for that purpose, and use it to replace a phy_settings lookup in phy_check_valid();
Signed-off-by: Maxime Chevallier <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
8c8c4a87 |
| 07-Mar-2025 |
Maxime Chevallier <[email protected]> |
net: phy: phy_caps: Move phy_speeds to phy_caps
Use the newly introduced link_capabilities array to derive the list of possible speeds when given a combination of linkmodes. As link_capabilities is
net: phy: phy_caps: Move phy_speeds to phy_caps
Use the newly introduced link_capabilities array to derive the list of possible speeds when given a combination of linkmodes. As link_capabilities is indexed by speed, we don't have to iterate the whole phy_settings array.
Signed-off-by: Maxime Chevallier <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc5, v6.14-rc4 |
|
| #
a3e51d47 |
| 22-Feb-2025 |
Heiner Kallweit <[email protected]> |
net: phy: add phylib-internal.h
This patch is a starting point for moving phylib-internal declarations to a private header file.
Signed-off-by: Heiner Kallweit <[email protected]> Link: https://
net: phy: add phylib-internal.h
This patch is a starting point for moving phylib-internal declarations to a private header file.
Signed-off-by: Heiner Kallweit <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc3 |
|
| #
809265fe |
| 16-Feb-2025 |
Heiner Kallweit <[email protected]> |
net: phy: c45: remove local advertisement parameter from genphy_c45_eee_is_active
After the last user has gone, we can remove the local advertisement parameter from genphy_c45_eee_is_active.
Signed
net: phy: c45: remove local advertisement parameter from genphy_c45_eee_is_active
After the last user has gone, we can remove the local advertisement parameter from genphy_c45_eee_is_active.
Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
6b2edfba |
| 13-Feb-2025 |
Heiner Kallweit <[email protected]> |
net: phy: remove helper phy_is_internal
Helper phy_is_internal() is just used in two places phylib-internally. So let's remove it from the API.
Signed-off-by: Heiner Kallweit <[email protected]>
net: phy: remove helper phy_is_internal
Helper phy_is_internal() is just used in two places phylib-internally. So let's remove it from the API.
Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Mateusz Polchlopek <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
ef6249e3 |
| 13-Feb-2025 |
Heiner Kallweit <[email protected]> |
net: phy: stop exporting phy_queue_state_machine
phy_queue_state_machine() isn't used outside phy.c, so stop exporting it.
Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Mateusz
net: phy: stop exporting phy_queue_state_machine
phy_queue_state_machine() isn't used outside phy.c, so stop exporting it.
Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Mateusz Polchlopek <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
8bf47e4d |
| 10-Feb-2025 |
Oleksij Rempel <[email protected]> |
net: phy: Add support for driver-specific next update time
Introduce the `phy_get_next_update_time` function to allow PHY drivers to dynamically determine the time (in jiffies) until the next state
net: phy: Add support for driver-specific next update time
Introduce the `phy_get_next_update_time` function to allow PHY drivers to dynamically determine the time (in jiffies) until the next state update event. This enables more flexible and adaptive polling intervals based on the link state or other conditions.
Signed-off-by: Oleksij Rempel <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc2, v6.14-rc1, v6.13 |
|
| #
a00e0d34 |
| 15-Jan-2025 |
Russell King (Oracle) <[email protected]> |
net: phy: add support for querying PHY clock stop capability
Add support for querying whether the PHY allows the transmit xMII clock to be stopped while in LPI mode. This will be used by phylink to
net: phy: add support for querying PHY clock stop capability
Add support for querying whether the PHY allows the transmit xMII clock to be stopped while in LPI mode. This will be used by phylink to pass to the MAC driver so it can configure the generation of the xMII clock appropriately.
Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7 |
|
| #
f2bc1c26 |
| 10-Jan-2025 |
Oleksij Rempel <[email protected]> |
net: phy: introduce optional polling interface for PHY statistics
Add an optional polling interface for PHY statistics to simplify driver implementation.
Signed-off-by: Oleksij Rempel <o.rempel@pen
net: phy: introduce optional polling interface for PHY statistics
Add an optional polling interface for PHY statistics to simplify driver implementation.
Signed-off-by: Oleksij Rempel <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
b7a2c1fe |
| 10-Jan-2025 |
Jakub Kicinski <[email protected]> |
net: ethtool: plumb PHY stats to PHY drivers
Introduce support for standardized PHY statistics reporting in ethtool by extending the PHYLIB framework. Add the functions phy_ethtool_get_phy_stats() a
net: ethtool: plumb PHY stats to PHY drivers
Introduce support for standardized PHY statistics reporting in ethtool by extending the PHYLIB framework. Add the functions phy_ethtool_get_phy_stats() and phy_ethtool_get_link_ext_stats() to provide a consistent interface for retrieving PHY-level and link-specific statistics. These functions are used within the ethtool implementation to avoid direct access to the phy_device structure outside of the PHYLIB framework.
A new structure, ethtool_phy_stats, is introduced to standardize PHY statistics such as packet counts, byte counts, and error counters. Drivers are updated to include callbacks for retrieving PHY and link-specific statistics, ensuring values are explicitly set only for supported fields, initialized with ETHTOOL_STAT_NOT_SET to avoid ambiguity.
Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Oleksij Rempel <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
cf337105 |
| 08-Jan-2025 |
Russell King (Oracle) <[email protected]> |
net: phy: add configuration of rx clock stop mode
Add a function to allow configuration of the PCS's clock stop enable bit, used to configure whether the xMII receive clock can be stopped during LPI
net: phy: add configuration of rx clock stop mode
Add a function to allow configuration of the PCS's clock stop enable bit, used to configure whether the xMII receive clock can be stopped during LPI mode.
Reviewed-by: Andrew Lunn <[email protected]> Tested-by: Choong Yong Liang <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2 |
|
| #
f899c594 |
| 05-Dec-2024 |
Russell King (Oracle) <[email protected]> |
net: phy: update phy_ethtool_get_eee() documentation
Update the phy_ethtool_get_eee() documentation to make it clear that all members of struct ethtool_keee are written by this function.
keee.suppo
net: phy: update phy_ethtool_get_eee() documentation
Update the phy_ethtool_get_eee() documentation to make it clear that all members of struct ethtool_keee are written by this function.
keee.supported, keee.advertised, keee.lp_advertised and keee.eee_active are all written by genphy_c45_ethtool_get_eee().
keee.tx_lpi_timer, keee.tx_lpi_enabled and keee.eee_enabled are all written by eeecfg_to_eee().
Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
8f1c7160 |
| 05-Dec-2024 |
Russell King (Oracle) <[email protected]> |
net: phy: remove genphy_c45_eee_is_active()'s is_enabled arg
All callers to genphy_c45_eee_is_active() now pass NULL as the is_enabled argument, which means we never use the value computed in this f
net: phy: remove genphy_c45_eee_is_active()'s is_enabled arg
All callers to genphy_c45_eee_is_active() now pass NULL as the is_enabled argument, which means we never use the value computed in this function. Remove the argument and clean up this function.
Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Heiner Kallweit <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
5d58a890 |
| 03-Dec-2024 |
Russell King (Oracle) <[email protected]> |
net: phy: add phy_config_inband()
Add a method to configure the PHY's in-band mode.
Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link:
net: phy: add phy_config_inband()
Add a method to configure the PHY's in-band mode.
Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
b4c7698d |
| 03-Dec-2024 |
Russell King (Oracle) <[email protected]> |
net: phy: add phy_inband_caps()
Add a method to query the PHY's in-band capabilities for a PHY interface mode.
Where the interface mode does not have in-band capability, or the PHY driver has not b
net: phy: add phy_inband_caps()
Add a method to query the PHY's in-band capabilities for a PHY interface mode.
Where the interface mode does not have in-band capability, or the PHY driver has not been updated to return this information, then phy_inband_caps() should return zero. Otherwise, PHY drivers will return a value consisting of the following flags:
LINK_INBAND_DISABLE indicates that the hardware does not support in-band signalling, or can have in-band signalling configured via software to be disabled.
LINK_INBAND_ENABLE indicates that the hardware will use in-band signalling, or can have in-band signalling configured via software to be enabled.
LINK_INBAND_BYPASS indicates that the hardware has the ability to bypass in-band signalling when enabled after a timeout if the link partner does not respond to its in-band signalling.
This reports the PHY capabilities for the particular interface mode, not the current configuration.
Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc1 |
|
| #
e2668c34 |
| 23-Nov-2024 |
Russell King (Oracle) <[email protected]> |
net: phy: fix phy_ethtool_set_eee() incorrectly enabling LPI
When phy_ethtool_set_eee_noneg() detects a change in the LPI parameters, it attempts to update phylib state and trigger the link to cycle
net: phy: fix phy_ethtool_set_eee() incorrectly enabling LPI
When phy_ethtool_set_eee_noneg() detects a change in the LPI parameters, it attempts to update phylib state and trigger the link to cycle so the MAC sees the updated parameters.
However, in doing so, it sets phydev->enable_tx_lpi depending on whether the EEE configuration allows the MAC to generate LPI without taking into account the result of negotiation.
This can be demonstrated with a 1000base-T FD interface by:
# ethtool --set-eee eno0 advertise 8 # cause EEE to be not negotiated # ethtool --set-eee eno0 tx-lpi off # ethtool --set-eee eno0 tx-lpi on
This results in being true, despite EEE not having been negotiated and: # ethtool --show-eee eno0 EEE status: enabled - inactive Tx LPI: 250 (us) Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full
Fix this by keeping track of whether EEE was negotiated via a new eee_active member in struct phy_device, and include this state in the decision whether phydev->enable_tx_lpi should be set.
Fixes: 3e43b903da04 ("net: phy: Immediately call adjust_link if only tx_lpi_enabled changes") Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.12 |
|
| #
f26a29a0 |
| 16-Nov-2024 |
Heiner Kallweit <[email protected]> |
net: phy: ensure that genphy_c45_an_config_eee_aneg() sees new value of phydev->eee_cfg.eee_enabled
This is a follow-up to 41ffcd95015f ("net: phy: fix phylib's dual eee_enabled") and resolves an is
net: phy: ensure that genphy_c45_an_config_eee_aneg() sees new value of phydev->eee_cfg.eee_enabled
This is a follow-up to 41ffcd95015f ("net: phy: fix phylib's dual eee_enabled") and resolves an issue with genphy_c45_an_config_eee_aneg() (called from genphy_c45_ethtool_set_eee) not seeing the new value of phydev->eee_cfg.eee_enabled.
Fixes: 49168d1980e2 ("net: phy: Add phy_support_eee() indicating MAC support EEE") Signed-off-by: Heiner Kallweit <[email protected]> Reported-by: Choong Yong Liang <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7 |
|
| #
569bf6d4 |
| 03-Sep-2024 |
Niklas Söderlund <[email protected]> |
net: phy: Check for read errors in SIOCGMIIREG
When reading registers from the PHY using the SIOCGMIIREG IOCTL any errors returned from either mdiobus_read() or mdiobus_c45_read() are ignored, and p
net: phy: Check for read errors in SIOCGMIIREG
When reading registers from the PHY using the SIOCGMIIREG IOCTL any errors returned from either mdiobus_read() or mdiobus_c45_read() are ignored, and parts of the returned error is passed as the register value back to user-space.
For example, if mdiobus_c45_read() is used with a bus that do not implement the read_c45() callback -EOPNOTSUPP is returned. This is however directly stored in mii_data->val_out and returned as the registers content. As val_out is a u16 the error code is truncated and returned as a plausible register value.
Fix this by first checking the return value for errors before returning it as the register content.
Before this patch,
# phytool read eth0/0:1/0 0xffa1
After this change,
$ phytool read eth0/0:1/0 error: phy_read (-95)
Signed-off-by: Niklas Söderlund <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Yoshihiro Shimoda <[email protected]> Tested-by: Yoshihiro Shimoda <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc6, v6.11-rc5 |
|
| #
d4c89767 |
| 21-Aug-2024 |
Divya Koppera <[email protected]> |
net: phy: Add phy library support to check supported list when autoneg is enabled
Adds support in phy library to accept autoneg configuration only when feature is enabled in supported list.
Signed-
net: phy: Add phy library support to check supported list when autoneg is enabled
Adds support in phy library to accept autoneg configuration only when feature is enabled in supported list.
Signed-off-by: Divya Koppera <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6 |
|
| #
3ebbd9f6 |
| 27-Jun-2024 |
Edward Cree <[email protected]> |
net: move ethtool-related netdev state into its own struct
net_dev->ethtool is a pointer to new struct ethtool_netdev_state, which currently contains only the wol_enabled field.
Suggested-by: Jaku
net: move ethtool-related netdev state into its own struct
net_dev->ethtool is a pointer to new struct ethtool_netdev_state, which currently contains only the wol_enabled field.
Suggested-by: Jakub Kicinski <[email protected]> Signed-off-by: Edward Cree <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Link: https://patch.msgid.link/293a562278371de7534ed1eb17531838ca090633.1719502239.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8 |
|
| #
c786459f |
| 07-Mar-2024 |
Heiner Kallweit <[email protected]> |
net: phy: simplify a check in phy_check_link_status
Handling case err == 0 in the other branch allows to simplify the code. In addition I assume in "err & phydev->eee_cfg.tx_lpi_enabled" it should h
net: phy: simplify a check in phy_check_link_status
Handling case err == 0 in the other branch allows to simplify the code. In addition I assume in "err & phydev->eee_cfg.tx_lpi_enabled" it should have been a logical and operator. It works as expected also with the bitwise and, but using a bitwise and with a bool value looks ugly to me.
Signed-off-by: Heiner Kallweit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc7 |
|
| #
3e43b903 |
| 02-Mar-2024 |
Andrew Lunn <[email protected]> |
net: phy: Immediately call adjust_link if only tx_lpi_enabled changes
The MAC driver changes its EEE hardware configuration in its adjust_link callback. This is called when auto-neg completes. Disab
net: phy: Immediately call adjust_link if only tx_lpi_enabled changes
The MAC driver changes its EEE hardware configuration in its adjust_link callback. This is called when auto-neg completes. Disabling EEE via eee_enabled false will trigger an autoneg, and as a result the adjust_link callback will be called with phydev->enable_tx_lpi set to false. Similarly, eee_enabled set to true and with a change of advertised link modes will result in a new autoneg, and a call the adjust_link call.
If set_eee is called with only a change to tx_lpi_enabled which does not trigger an auto-neg, it is necessary to call the adjust_link callback so that the MAC is reconfigured to take this change into account.
When setting phydev->enable_tx_lpi, take both eee_enabled and tx_lpi_enabled into account, so the MAC drivers just needs to act on phydev->enable_tx_lpi and not the whole EEE configuration. The same check should be done for tx_lpi_timer too.
Signed-off-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Oleksij Rempel <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
fe0d4fd9 |
| 02-Mar-2024 |
Andrew Lunn <[email protected]> |
net: phy: Keep track of EEE configuration
Have phylib keep track of the EEE configuration. This simplifies the MAC drivers, in that they don't need to store it.
Future patches to phylib will also m
net: phy: Keep track of EEE configuration
Have phylib keep track of the EEE configuration. This simplifies the MAC drivers, in that they don't need to store it.
Future patches to phylib will also make use of this information to further simplify the MAC drivers.
Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Oleksij Rempel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|