| 5385f1e1 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Clean ethtool header of PSE structures
Remove PSE-specific structures from the ethtool header to improve code modularity, maintain independent headers, and reduce incremental build time
net: pse-pd: Clean ethtool header of PSE structures
Remove PSE-specific structures from the ethtool header to improve code modularity, maintain independent headers, and reduce incremental build time.
Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 4640a1f0 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Remove is_enabled callback from drivers
The is_enabled callback is now redundant as the admin_state can be obtained directly from the driver and provides the same information.
To simpl
net: pse-pd: Remove is_enabled callback from drivers
The is_enabled callback is now redundant as the admin_state can be obtained directly from the driver and provides the same information.
To simplify functionality, the core will handle this internally, making the is_enabled callback unnecessary at the driver level. Remove the callback from all drivers.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 3e9dbfec | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Split ethtool_get_status into multiple callbacks
The ethtool_get_status callback currently handles all status and PSE information within a single function. This approach has two key dra
net: pse-pd: Split ethtool_get_status into multiple callbacks
The ethtool_get_status callback currently handles all status and PSE information within a single function. This approach has two key drawbacks:
1. If the core requires some information for purposes other than ethtool_get_status, redundant code will be needed to fetch the same data from the driver (like is_enabled).
2. Drivers currently have access to all information passed to ethtool. New variables will soon be added to ethtool status, such as PSE ID, power domain IDs, and budget evaluation strategies, which are meant to be managed solely by the core. Drivers should not have the ability to modify these variables.
To resolve these issues, ethtool_get_status has been split into multiple callbacks, with each handling a specific piece of information required by ethtool or the core.
Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| e0a5e2bb | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Use power limit at driver side instead of current limit
The regulator framework uses current limits, but the PSE standard and known PSE controllers rely on power limits. Instead of conv
net: pse-pd: Use power limit at driver side instead of current limit
The regulator framework uses current limits, but the PSE standard and known PSE controllers rely on power limits. Instead of converting current to power within each driver, perform the conversion in the PSE core. This avoids redundancy in driver implementation and aligns better with the standard, simplifying driver development.
Remove at the same time the _pse_ethtool_get_status() function which is not needed anymore.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 6e56a6d4 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Add power limit check
Checking only the current limit is not sufficient. According to the standard, voltage can reach up to 57V and current up to 1.92A, which exceeds the power limit de
net: pse-pd: Add power limit check
Checking only the current limit is not sufficient. According to the standard, voltage can reach up to 57V and current up to 1.92A, which exceeds the power limit described in the standard (99.9W). Add a power limit check to prevent this.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| d83e1376 | 17-Apr-2024 |
Kory Maincent (Dent Project) <[email protected]> |
net: pse-pd: Use regulator framework within PSE framework
Integrate the regulator framework to the PSE framework for enhanced access to features such as voltage, power measurement, and limits, which
net: pse-pd: Use regulator framework within PSE framework
Integrate the regulator framework to the PSE framework for enhanced access to features such as voltage, power measurement, and limits, which are akin to regulators. Additionally, PSE features like port priorities could potentially enhance the regulator framework. Note that this integration introduces some implementation complexity, including wrapper callbacks, but the potential benefits make it worthwhile.
Regulator are using enable counter with specific behavior. Two calls to regulator_disable will trigger kernel warnings. If the counter exceeds one, regulator_disable call won't disable the PSE PI. These behavior isn't suitable for PSE control. Added a boolean 'enabled' state to prevent multiple calls to regulator_enable/disable. These calls will only be called from PSE framework as it won't have any regulator children, therefore no mutex are needed to safeguards this boolean.
regulator_get needs the consumer device pointer. Use PSE as regulator provider and consumer device until we have RJ45 ports represented in the Kernel.
Signed-off-by: Kory Maincent <[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 ...
|
| 47e0dd53 | 17-Apr-2024 |
Kory Maincent (Dent Project) <[email protected]> |
net: pse-pd: Introduce PSE types enumeration
Introduce an enumeration to define PSE types (C33 or PoDL), utilizing a bitfield for potential future support of both types. Include 'pse_get_types' help
net: pse-pd: Introduce PSE types enumeration
Introduce an enumeration to define PSE types (C33 or PoDL), utilizing a bitfield for potential future support of both types. Include 'pse_get_types' helper for external access to PSE type info.
Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 18ff0bcd | 03-Oct-2022 |
Oleksij Rempel <[email protected]> |
ethtool: add interface to interact with Ethernet Power Equipment
Add interface to support Power Sourcing Equipment. At current step it provides generic way to address all variants of PSE devices as
ethtool: add interface to interact with Ethernet Power Equipment
Add interface to support Power Sourcing Equipment. At current step it provides generic way to address all variants of PSE devices as defined in IEEE 802.3-2018 but support only objects specified for IEEE 802.3-2018 104.4 PoDL Power Sourcing Equipment (PSE).
Currently supported and mandatory objects are: IEEE 802.3-2018 30.15.1.1.3 aPoDLPSEPowerDetectionStatus IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState IEEE 802.3-2018 30.15.1.2.1 acPoDLPSEAdminControl
This is minimal interface needed to control PSE on each separate ethernet port but it provides not all mandatory objects specified in IEEE 802.3-2018.
Since "PoDL PSE" and "PSE" have similar names, but some different values I decide to not merge them and keep separate naming schema. This should allow as to be as close to IEEE 802.3 spec as possible and avoid name conflicts in the future.
This implementation is connected to PHYs instead of MACs because PSE auto classification can potentially interfere with PHY auto negotiation. So, may be some extra PHY related initialization will be needed.
With WIP version of ethtools interaction with PSE capable link looks as following:
$ ip l ... 5: t1l1@eth0: <BROADCAST,MULTICAST> .. ...
$ ethtool --show-pse t1l1 PSE attributs for t1l1: PoDL PSE Admin State: disabled PoDL PSE Power Detection Status: disabled
$ ethtool --set-pse t1l1 podl-pse-admin-control enable $ ethtool --show-pse t1l1 PSE attributs for t1l1: PoDL PSE Admin State: enabled PoDL PSE Power Detection Status: delivering power
Signed-off-by: kernel test robot <[email protected]> Signed-off-by: Oleksij Rempel <[email protected]> Reviewed-by: Bagas Sanjaya <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|