2022-10-03 06:51:57 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
/*
|
|
|
|
|
// Copyright (c) 2022 Pengutronix, Oleksij Rempel <kernel@pengutronix.de>
|
|
|
|
|
*/
|
|
|
|
|
#ifndef _LINUX_PSE_CONTROLLER_H
|
|
|
|
|
#define _LINUX_PSE_CONTROLLER_H
|
|
|
|
|
|
|
|
|
|
#include <linux/list.h>
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
#include <linux/netlink.h>
|
|
|
|
|
#include <linux/kfifo.h>
|
2022-10-03 06:51:57 +00:00
|
|
|
#include <uapi/linux/ethtool.h>
|
2025-06-17 12:12:01 +00:00
|
|
|
#include <uapi/linux/ethtool_netlink_generated.h>
|
|
|
|
|
#include <linux/regulator/driver.h>
|
2022-10-03 06:51:57 +00:00
|
|
|
|
2024-07-04 08:11:59 +00:00
|
|
|
/* Maximum current in uA according to IEEE 802.3-2022 Table 145-1 */
|
|
|
|
|
#define MAX_PI_CURRENT 1920000
|
2025-01-10 09:40:22 +00:00
|
|
|
/* Maximum power in mW according to IEEE 802.3-2022 Table 145-16 */
|
|
|
|
|
#define MAX_PI_PW 99900
|
2024-07-04 08:11:59 +00:00
|
|
|
|
2025-06-17 12:12:01 +00:00
|
|
|
struct net_device;
|
2022-10-03 06:52:00 +00:00
|
|
|
struct phy_device;
|
|
|
|
|
struct pse_controller_dev;
|
2025-01-10 09:40:31 +00:00
|
|
|
struct netlink_ext_ack;
|
|
|
|
|
|
|
|
|
|
/* C33 PSE extended state and substate. */
|
|
|
|
|
struct ethtool_c33_pse_ext_state_info {
|
|
|
|
|
enum ethtool_c33_pse_ext_state c33_pse_ext_state;
|
|
|
|
|
union {
|
|
|
|
|
enum ethtool_c33_pse_ext_substate_error_condition error_condition;
|
|
|
|
|
enum ethtool_c33_pse_ext_substate_mr_pse_enable mr_pse_enable;
|
|
|
|
|
enum ethtool_c33_pse_ext_substate_option_detect_ted option_detect_ted;
|
|
|
|
|
enum ethtool_c33_pse_ext_substate_option_vport_lim option_vport_lim;
|
|
|
|
|
enum ethtool_c33_pse_ext_substate_ovld_detected ovld_detected;
|
|
|
|
|
enum ethtool_c33_pse_ext_substate_power_not_available power_not_available;
|
|
|
|
|
enum ethtool_c33_pse_ext_substate_short_detected short_detected;
|
|
|
|
|
u32 __c33_pse_ext_substate;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct ethtool_c33_pse_pw_limit_range {
|
|
|
|
|
u32 min;
|
|
|
|
|
u32 max;
|
|
|
|
|
};
|
2022-10-03 06:52:00 +00:00
|
|
|
|
2025-06-17 12:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* struct pse_irq_desc - notification sender description for IRQ based events.
|
|
|
|
|
*
|
|
|
|
|
* @name: the visible name for the IRQ
|
|
|
|
|
* @map_event: driver callback to map IRQ status into PSE devices with events.
|
|
|
|
|
*/
|
|
|
|
|
struct pse_irq_desc {
|
|
|
|
|
const char *name;
|
|
|
|
|
int (*map_event)(int irq, struct pse_controller_dev *pcdev,
|
|
|
|
|
unsigned long *notifs,
|
|
|
|
|
unsigned long *notifs_mask);
|
|
|
|
|
};
|
|
|
|
|
|
2022-10-03 06:52:00 +00:00
|
|
|
/**
|
|
|
|
|
* struct pse_control_config - PSE control/channel configuration.
|
|
|
|
|
*
|
2024-04-14 14:21:52 +00:00
|
|
|
* @podl_admin_control: set PoDL PSE admin control as described in
|
2022-10-03 06:52:00 +00:00
|
|
|
* IEEE 802.3-2018 30.15.1.2.1 acPoDLPSEAdminControl
|
2024-04-17 14:39:49 +00:00
|
|
|
* @c33_admin_control: set PSE admin control as described in
|
|
|
|
|
* IEEE 802.3-2022 30.9.1.2.1 acPSEAdminControl
|
2022-10-03 06:52:00 +00:00
|
|
|
*/
|
|
|
|
|
struct pse_control_config {
|
2024-04-14 14:21:52 +00:00
|
|
|
enum ethtool_podl_pse_admin_state podl_admin_control;
|
2024-04-17 14:39:49 +00:00
|
|
|
enum ethtool_c33_pse_admin_state c33_admin_control;
|
2022-10-03 06:52:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
2025-01-10 09:40:27 +00:00
|
|
|
* struct pse_admin_state - PSE operational state
|
|
|
|
|
*
|
|
|
|
|
* @podl_admin_state: operational state of the PoDL PSE
|
|
|
|
|
* functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState
|
|
|
|
|
* @c33_admin_state: operational state of the PSE
|
|
|
|
|
* functions. IEEE 802.3-2022 30.9.1.1.2 aPSEAdminState
|
|
|
|
|
*/
|
|
|
|
|
struct pse_admin_state {
|
|
|
|
|
enum ethtool_podl_pse_admin_state podl_admin_state;
|
|
|
|
|
enum ethtool_c33_pse_admin_state c33_admin_state;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct pse_pw_status - PSE power detection status
|
|
|
|
|
*
|
|
|
|
|
* @podl_pw_status: power detection status of the PoDL PSE.
|
|
|
|
|
* IEEE 802.3-2018 30.15.1.1.3 aPoDLPSEPowerDetectionStatus:
|
|
|
|
|
* @c33_pw_status: power detection status of the PSE.
|
|
|
|
|
* IEEE 802.3-2022 30.9.1.1.5 aPSEPowerDetectionStatus:
|
|
|
|
|
*/
|
|
|
|
|
struct pse_pw_status {
|
|
|
|
|
enum ethtool_podl_pse_pw_d_status podl_pw_status;
|
|
|
|
|
enum ethtool_c33_pse_pw_d_status c33_pw_status;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct pse_ext_state_info - PSE extended state information
|
|
|
|
|
*
|
|
|
|
|
* @c33_ext_state_info: extended state information of the PSE
|
|
|
|
|
*/
|
|
|
|
|
struct pse_ext_state_info {
|
|
|
|
|
struct ethtool_c33_pse_ext_state_info c33_ext_state_info;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct pse_pw_limit_ranges - PSE power limit configuration range
|
|
|
|
|
*
|
|
|
|
|
* @c33_pw_limit_ranges: supported power limit configuration range. The driver
|
|
|
|
|
* is in charge of the memory allocation.
|
|
|
|
|
*/
|
|
|
|
|
struct pse_pw_limit_ranges {
|
|
|
|
|
struct ethtool_c33_pse_pw_limit_range *c33_pw_limit_ranges;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct ethtool_pse_control_status - PSE control/channel status.
|
2022-10-03 06:52:00 +00:00
|
|
|
*
|
2025-06-17 12:12:04 +00:00
|
|
|
* @pw_d_id: PSE power domain index.
|
2022-10-03 06:52:00 +00:00
|
|
|
* @podl_admin_state: operational state of the PoDL PSE
|
|
|
|
|
* functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState
|
|
|
|
|
* @podl_pw_status: power detection status of the PoDL PSE.
|
|
|
|
|
* IEEE 802.3-2018 30.15.1.1.3 aPoDLPSEPowerDetectionStatus:
|
2024-04-17 14:39:49 +00:00
|
|
|
* @c33_admin_state: operational state of the PSE
|
|
|
|
|
* functions. IEEE 802.3-2022 30.9.1.1.2 aPSEAdminState
|
|
|
|
|
* @c33_pw_status: power detection status of the PSE.
|
|
|
|
|
* IEEE 802.3-2022 30.9.1.1.5 aPSEPowerDetectionStatus:
|
2024-07-04 08:11:56 +00:00
|
|
|
* @c33_pw_class: detected class of a powered PD
|
|
|
|
|
* IEEE 802.3-2022 30.9.1.1.8 aPSEPowerClassification
|
|
|
|
|
* @c33_actual_pw: power currently delivered by the PSE in mW
|
|
|
|
|
* IEEE 802.3-2022 30.9.1.1.23 aPSEActualPower
|
|
|
|
|
* @c33_ext_state_info: extended state information of the PSE
|
2024-07-04 08:11:59 +00:00
|
|
|
* @c33_avail_pw_limit: available power limit of the PSE in mW
|
|
|
|
|
* IEEE 802.3-2022 145.2.5.4 pse_avail_pwr
|
|
|
|
|
* @c33_pw_limit_ranges: supported power limit configuration range. The driver
|
2025-01-10 09:40:27 +00:00
|
|
|
* is in charge of the memory allocation
|
2024-07-04 08:11:59 +00:00
|
|
|
* @c33_pw_limit_nb_ranges: number of supported power limit configuration
|
|
|
|
|
* ranges
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
* @prio_max: max priority allowed for the c33_prio variable value.
|
|
|
|
|
* @prio: priority of the PSE. Managed by PSE core in case of static budget
|
|
|
|
|
* evaluation strategy.
|
2022-10-03 06:52:00 +00:00
|
|
|
*/
|
2025-01-10 09:40:27 +00:00
|
|
|
struct ethtool_pse_control_status {
|
2025-06-17 12:12:04 +00:00
|
|
|
u32 pw_d_id;
|
2022-10-03 06:52:00 +00:00
|
|
|
enum ethtool_podl_pse_admin_state podl_admin_state;
|
|
|
|
|
enum ethtool_podl_pse_pw_d_status podl_pw_status;
|
2024-04-17 14:39:49 +00:00
|
|
|
enum ethtool_c33_pse_admin_state c33_admin_state;
|
|
|
|
|
enum ethtool_c33_pse_pw_d_status c33_pw_status;
|
2024-07-04 08:11:56 +00:00
|
|
|
u32 c33_pw_class;
|
|
|
|
|
u32 c33_actual_pw;
|
|
|
|
|
struct ethtool_c33_pse_ext_state_info c33_ext_state_info;
|
2024-07-04 08:11:59 +00:00
|
|
|
u32 c33_avail_pw_limit;
|
|
|
|
|
struct ethtool_c33_pse_pw_limit_range *c33_pw_limit_ranges;
|
|
|
|
|
u32 c33_pw_limit_nb_ranges;
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
u32 prio_max;
|
|
|
|
|
u32 prio;
|
2022-10-03 06:52:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct pse_controller_ops - PSE controller driver callbacks
|
|
|
|
|
*
|
2025-06-20 10:02:40 +00:00
|
|
|
* @setup_pi_matrix: Setup PI matrix of the PSE controller.
|
|
|
|
|
* The PSE PIs devicetree nodes have already been parsed by
|
|
|
|
|
* of_load_pse_pis() and the pcdev->pi[x]->pairset[y].np
|
|
|
|
|
* populated. This callback should establish the
|
|
|
|
|
* relationship between the PSE controller hardware ports
|
|
|
|
|
* and the PSE Power Interfaces, either through software
|
|
|
|
|
* mapping or hardware configuration.
|
2025-01-10 09:40:27 +00:00
|
|
|
* @pi_get_admin_state: Get the operational state of the PSE PI. This ops
|
|
|
|
|
* is mandatory.
|
|
|
|
|
* @pi_get_pw_status: Get the power detection status of the PSE PI. This
|
|
|
|
|
* ops is mandatory.
|
|
|
|
|
* @pi_get_ext_state: Get the extended state of the PSE PI.
|
|
|
|
|
* @pi_get_pw_class: Get the power class of the PSE PI.
|
|
|
|
|
* @pi_get_actual_pw: Get actual power of the PSE PI in mW.
|
2024-04-17 14:39:58 +00:00
|
|
|
* @pi_enable: Configure the PSE PI as enabled.
|
|
|
|
|
* @pi_disable: Configure the PSE PI as disabled.
|
2024-07-04 08:11:59 +00:00
|
|
|
* @pi_get_voltage: Return voltage similarly to get_voltage regulator
|
2025-01-10 09:40:27 +00:00
|
|
|
* callback in uV.
|
|
|
|
|
* @pi_get_pw_limit: Get the configured power limit of the PSE PI in mW.
|
|
|
|
|
* @pi_set_pw_limit: Configure the power limit of the PSE PI in mW.
|
|
|
|
|
* @pi_get_pw_limit_ranges: Get the supported power limit configuration
|
|
|
|
|
* range. The driver is in charge of the memory
|
|
|
|
|
* allocation and should return the number of
|
|
|
|
|
* ranges.
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
* @pi_get_prio: Get the PSE PI priority.
|
|
|
|
|
* @pi_set_prio: Configure the PSE PI priority.
|
|
|
|
|
* @pi_get_pw_req: Get the power requested by a PD before enabling the PSE PI.
|
|
|
|
|
* This is only relevant when an interrupt is registered using
|
|
|
|
|
* devm_pse_irq_helper helper.
|
2022-10-03 06:52:00 +00:00
|
|
|
*/
|
|
|
|
|
struct pse_controller_ops {
|
2024-04-17 14:39:57 +00:00
|
|
|
int (*setup_pi_matrix)(struct pse_controller_dev *pcdev);
|
2025-01-10 09:40:27 +00:00
|
|
|
int (*pi_get_admin_state)(struct pse_controller_dev *pcdev, int id,
|
|
|
|
|
struct pse_admin_state *admin_state);
|
|
|
|
|
int (*pi_get_pw_status)(struct pse_controller_dev *pcdev, int id,
|
|
|
|
|
struct pse_pw_status *pw_status);
|
|
|
|
|
int (*pi_get_ext_state)(struct pse_controller_dev *pcdev, int id,
|
|
|
|
|
struct pse_ext_state_info *ext_state_info);
|
|
|
|
|
int (*pi_get_pw_class)(struct pse_controller_dev *pcdev, int id);
|
|
|
|
|
int (*pi_get_actual_pw)(struct pse_controller_dev *pcdev, int id);
|
2024-04-17 14:39:58 +00:00
|
|
|
int (*pi_enable)(struct pse_controller_dev *pcdev, int id);
|
|
|
|
|
int (*pi_disable)(struct pse_controller_dev *pcdev, int id);
|
2024-07-04 08:11:59 +00:00
|
|
|
int (*pi_get_voltage)(struct pse_controller_dev *pcdev, int id);
|
2025-01-10 09:40:26 +00:00
|
|
|
int (*pi_get_pw_limit)(struct pse_controller_dev *pcdev,
|
|
|
|
|
int id);
|
|
|
|
|
int (*pi_set_pw_limit)(struct pse_controller_dev *pcdev,
|
|
|
|
|
int id, int max_mW);
|
2025-01-10 09:40:27 +00:00
|
|
|
int (*pi_get_pw_limit_ranges)(struct pse_controller_dev *pcdev, int id,
|
|
|
|
|
struct pse_pw_limit_ranges *pw_limit_ranges);
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
int (*pi_get_prio)(struct pse_controller_dev *pcdev, int id);
|
|
|
|
|
int (*pi_set_prio)(struct pse_controller_dev *pcdev, int id,
|
|
|
|
|
unsigned int prio);
|
|
|
|
|
int (*pi_get_pw_req)(struct pse_controller_dev *pcdev, int id);
|
2022-10-03 06:52:00 +00:00
|
|
|
};
|
|
|
|
|
|
2022-10-03 06:51:57 +00:00
|
|
|
struct module;
|
|
|
|
|
struct device_node;
|
|
|
|
|
struct of_phandle_args;
|
|
|
|
|
struct pse_control;
|
2025-01-10 09:40:27 +00:00
|
|
|
struct ethtool_pse_control_status;
|
2022-10-03 06:51:57 +00:00
|
|
|
|
2024-04-17 14:39:55 +00:00
|
|
|
/* PSE PI pairset pinout can either be Alternative A or Alternative B */
|
|
|
|
|
enum pse_pi_pairset_pinout {
|
|
|
|
|
ALTERNATIVE_A,
|
|
|
|
|
ALTERNATIVE_B,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct pse_pi_pairset - PSE PI pairset entity describing the pinout
|
|
|
|
|
* alternative ant its phandle
|
|
|
|
|
*
|
|
|
|
|
* @pinout: description of the pinout alternative
|
|
|
|
|
* @np: device node pointer describing the pairset phandle
|
|
|
|
|
*/
|
|
|
|
|
struct pse_pi_pairset {
|
|
|
|
|
enum pse_pi_pairset_pinout pinout;
|
|
|
|
|
struct device_node *np;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct pse_pi - PSE PI (Power Interface) entity as described in
|
|
|
|
|
* IEEE 802.3-2022 145.2.4
|
|
|
|
|
*
|
|
|
|
|
* @pairset: table of the PSE PI pinout alternative for the two pairset
|
|
|
|
|
* @np: device node pointer of the PSE PI node
|
2024-04-17 14:39:58 +00:00
|
|
|
* @rdev: regulator represented by the PSE PI
|
|
|
|
|
* @admin_state_enabled: PI enabled state
|
2025-06-17 12:12:03 +00:00
|
|
|
* @pw_d: Power domain of the PSE PI
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
* @prio: Priority of the PSE PI. Used in static budget evaluation strategy
|
|
|
|
|
* @isr_pd_detected: PSE PI detection status managed by the interruption
|
|
|
|
|
* handler. This variable is relevant when the power enabled
|
|
|
|
|
* management is managed in software like the static
|
|
|
|
|
* budget evaluation strategy.
|
|
|
|
|
* @pw_allocated_mW: Power allocated to a PSE PI to manage power budget in
|
|
|
|
|
* static budget evaluation strategy.
|
2024-04-17 14:39:55 +00:00
|
|
|
*/
|
|
|
|
|
struct pse_pi {
|
|
|
|
|
struct pse_pi_pairset pairset[2];
|
|
|
|
|
struct device_node *np;
|
2024-04-17 14:39:58 +00:00
|
|
|
struct regulator_dev *rdev;
|
|
|
|
|
bool admin_state_enabled;
|
2025-06-17 12:12:03 +00:00
|
|
|
struct pse_power_domain *pw_d;
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
int prio;
|
|
|
|
|
bool isr_pd_detected;
|
|
|
|
|
int pw_allocated_mW;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* struct pse_ntf - PSE notification element
|
|
|
|
|
*
|
|
|
|
|
* @id: ID of the PSE control
|
|
|
|
|
* @notifs: PSE notifications to be reported
|
|
|
|
|
*/
|
|
|
|
|
struct pse_ntf {
|
|
|
|
|
int id;
|
|
|
|
|
unsigned long notifs;
|
2024-04-17 14:39:55 +00:00
|
|
|
};
|
|
|
|
|
|
2022-10-03 06:51:57 +00:00
|
|
|
/**
|
|
|
|
|
* struct pse_controller_dev - PSE controller entity that might
|
|
|
|
|
* provide multiple PSE controls
|
|
|
|
|
* @ops: a pointer to device specific struct pse_controller_ops
|
|
|
|
|
* @owner: kernel module of the PSE controller driver
|
|
|
|
|
* @list: internal list of PSE controller devices
|
|
|
|
|
* @pse_control_head: head of internal list of requested PSE controls
|
|
|
|
|
* @dev: corresponding driver model device struct
|
|
|
|
|
* @of_pse_n_cells: number of cells in PSE line specifiers
|
|
|
|
|
* @nr_lines: number of PSE controls in this controller device
|
|
|
|
|
* @lock: Mutex for serialization access to the PSE controller
|
2024-04-17 14:39:50 +00:00
|
|
|
* @types: types of the PSE controller
|
2024-04-17 14:39:55 +00:00
|
|
|
* @pi: table of PSE PIs described in this controller device
|
|
|
|
|
* @no_of_pse_pi: flag set if the pse_pis devicetree node is not used
|
2025-06-17 12:12:01 +00:00
|
|
|
* @irq: PSE interrupt
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
* @pis_prio_max: Maximum value allowed for the PSE PIs priority
|
|
|
|
|
* @supp_budget_eval_strategies: budget evaluation strategies supported
|
|
|
|
|
* by the PSE
|
|
|
|
|
* @ntf_work: workqueue for PSE notification management
|
|
|
|
|
* @ntf_fifo: PSE notifications FIFO
|
|
|
|
|
* @ntf_fifo_lock: protect @ntf_fifo writer
|
2022-10-03 06:51:57 +00:00
|
|
|
*/
|
|
|
|
|
struct pse_controller_dev {
|
|
|
|
|
const struct pse_controller_ops *ops;
|
|
|
|
|
struct module *owner;
|
|
|
|
|
struct list_head list;
|
|
|
|
|
struct list_head pse_control_head;
|
|
|
|
|
struct device *dev;
|
|
|
|
|
int of_pse_n_cells;
|
|
|
|
|
unsigned int nr_lines;
|
|
|
|
|
struct mutex lock;
|
2024-04-17 14:39:50 +00:00
|
|
|
enum ethtool_pse_types types;
|
2024-04-17 14:39:55 +00:00
|
|
|
struct pse_pi *pi;
|
|
|
|
|
bool no_of_pse_pi;
|
2025-06-17 12:12:01 +00:00
|
|
|
int irq;
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
unsigned int pis_prio_max;
|
|
|
|
|
u32 supp_budget_eval_strategies;
|
|
|
|
|
struct work_struct ntf_work;
|
|
|
|
|
DECLARE_KFIFO_PTR(ntf_fifo, struct pse_ntf);
|
|
|
|
|
spinlock_t ntf_fifo_lock; /* Protect @ntf_fifo writer */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* enum pse_budget_eval_strategies - PSE budget evaluation strategies.
|
|
|
|
|
* @PSE_BUDGET_EVAL_STRAT_DISABLED: Budget evaluation strategy disabled.
|
|
|
|
|
* @PSE_BUDGET_EVAL_STRAT_STATIC: PSE static budget evaluation strategy.
|
|
|
|
|
* Budget evaluation strategy based on the power requested during PD
|
|
|
|
|
* classification. This strategy is managed by the PSE core.
|
|
|
|
|
* @PSE_BUDGET_EVAL_STRAT_DYNAMIC: PSE dynamic budget evaluation
|
|
|
|
|
* strategy. Budget evaluation strategy based on the current consumption
|
|
|
|
|
* per ports compared to the total power budget. This mode is managed by
|
|
|
|
|
* the PSE controller.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
enum pse_budget_eval_strategies {
|
|
|
|
|
PSE_BUDGET_EVAL_STRAT_DISABLED = 1 << 0,
|
|
|
|
|
PSE_BUDGET_EVAL_STRAT_STATIC = 1 << 1,
|
|
|
|
|
PSE_BUDGET_EVAL_STRAT_DYNAMIC = 1 << 2,
|
2022-10-03 06:51:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_PSE_CONTROLLER)
|
|
|
|
|
int pse_controller_register(struct pse_controller_dev *pcdev);
|
|
|
|
|
void pse_controller_unregister(struct pse_controller_dev *pcdev);
|
|
|
|
|
struct device;
|
|
|
|
|
int devm_pse_controller_register(struct device *dev,
|
|
|
|
|
struct pse_controller_dev *pcdev);
|
2025-06-17 12:12:01 +00:00
|
|
|
int devm_pse_irq_helper(struct pse_controller_dev *pcdev, int irq,
|
|
|
|
|
int irq_flags, const struct pse_irq_desc *d);
|
2022-10-03 06:51:57 +00:00
|
|
|
|
2025-06-17 12:12:00 +00:00
|
|
|
struct pse_control *of_pse_control_get(struct device_node *node,
|
|
|
|
|
struct phy_device *phydev);
|
2022-10-03 06:51:57 +00:00
|
|
|
void pse_control_put(struct pse_control *psec);
|
|
|
|
|
|
2022-10-03 06:52:00 +00:00
|
|
|
int pse_ethtool_get_status(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
2025-01-10 09:40:27 +00:00
|
|
|
struct ethtool_pse_control_status *status);
|
2022-10-03 06:52:00 +00:00
|
|
|
int pse_ethtool_set_config(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
|
|
|
|
const struct pse_control_config *config);
|
2024-07-04 08:11:59 +00:00
|
|
|
int pse_ethtool_set_pw_limit(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
|
|
|
|
const unsigned int pw_limit);
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
int pse_ethtool_set_prio(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
|
|
|
|
unsigned int prio);
|
2022-10-03 06:52:00 +00:00
|
|
|
|
2024-04-17 14:39:50 +00:00
|
|
|
bool pse_has_podl(struct pse_control *psec);
|
|
|
|
|
bool pse_has_c33(struct pse_control *psec);
|
|
|
|
|
|
2022-10-03 06:51:57 +00:00
|
|
|
#else
|
|
|
|
|
|
2025-06-17 12:12:00 +00:00
|
|
|
static inline struct pse_control *of_pse_control_get(struct device_node *node,
|
|
|
|
|
struct phy_device *phydev)
|
2022-10-03 06:51:57 +00:00
|
|
|
{
|
|
|
|
|
return ERR_PTR(-ENOENT);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void pse_control_put(struct pse_control *psec)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-04 04:03:27 +00:00
|
|
|
static inline int pse_ethtool_get_status(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
2025-01-10 09:40:27 +00:00
|
|
|
struct ethtool_pse_control_status *status)
|
2022-10-03 06:52:00 +00:00
|
|
|
{
|
2024-06-10 08:34:26 +00:00
|
|
|
return -EOPNOTSUPP;
|
2022-10-03 06:52:00 +00:00
|
|
|
}
|
|
|
|
|
|
2022-10-04 04:03:27 +00:00
|
|
|
static inline int pse_ethtool_set_config(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
|
|
|
|
const struct pse_control_config *config)
|
2022-10-03 06:52:00 +00:00
|
|
|
{
|
2024-06-10 08:34:26 +00:00
|
|
|
return -EOPNOTSUPP;
|
2022-10-03 06:52:00 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-04 08:11:59 +00:00
|
|
|
static inline int pse_ethtool_set_pw_limit(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
|
|
|
|
const unsigned int pw_limit)
|
|
|
|
|
{
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
}
|
|
|
|
|
|
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation
strategies. Budget evaluation strategies is utilized by PSE controllers to
determine which ports to turn off first in scenarios such as power budget
exceedance.
The pis_prio_max value is used to define the maximum priority level
supported by the controller. Both the current priority and the maximum
priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies.
1. Static Method:
This method involves distributing power based on PD classification.
It’s straightforward and stable, the PSE core keeping track of the
budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which
guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices
request much more power than they actually need. As a result, the power
supply may only operate at, say, 50% capacity, which is inefficient and
wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like
Microchip have introduced dynamic power budgeting, as seen in the
PD692x0 firmware. This method monitors the current consumption per port
and subtracts it from the available power budget. When the budget is
exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be
mixed. They are hardcoded in the PSE driver itself, as no current PSE
controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-17 12:12:06 +00:00
|
|
|
static inline int pse_ethtool_set_prio(struct pse_control *psec,
|
|
|
|
|
struct netlink_ext_ack *extack,
|
|
|
|
|
unsigned int prio)
|
|
|
|
|
{
|
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-17 14:39:50 +00:00
|
|
|
static inline bool pse_has_podl(struct pse_control *psec)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline bool pse_has_c33(struct pse_control *psec)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-03 06:51:57 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|