On Tue, 5 Oct 2021 15:04:02 +0300 Ido Schimmel wrote:
quoted
quoted
Can't there be drivers which implement power but don't support the
mode policy?
I don't really see how. The policy is a host attribute (not module)
determining how the host configures the power mode of the module. It
always exists, but can be fixed.
Do you still think we should make the change below?
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 1b126e8b5269..a2223b685451 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -721,7 +721,7 @@ enum ethtool_stringset {
* administratively down.
*/
enum ethtool_module_power_mode_policy {
- ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH,
+ ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH = 1,
ETHTOOL_MODULE_POWER_MODE_POLICY_AUTO,
};
I read your reply again about "still need a valid bit, granted just
internal to the core". My confusion was that I thought only the valid
bit in the driver-facing API bothered you, but you actually wanted me to
remove all of them.
How about the below (compile tested)?
Yup, exactly!