On 07-Jun-20 21:17, Florian Fainelli wrote:
>
>
> On 6/7/2020 7:59 AM, Amit Cohen wrote:
>> Currently, drivers can only tell whether the link is up/down using
>> LINKSTATE_GET, but no additional information is given.
>>
>> Add attributes to LINKSTATE_GET command in order to allow drivers
>> to ex
Andrew Lunn writes:
>> +/**
>> + * enum ethtool_ext_substate_cable_issue - more information in
>> + * addition to ETHTOOL_EXT_STATE_CABLE_ISSUE.
>> + */
>> +enum ethtool_ext_substate_cable_issue {
>> +ETHTOOL_EXT_SUBSTATE_UNSUPPORTED_CABLE = 1,
>> +ETHTOOL_EXT_SUBSTATE_SHORTED_CABLE,
>> +
On 6/7/2020 7:59 AM, Amit Cohen wrote:
> Currently, drivers can only tell whether the link is up/down using
> LINKSTATE_GET, but no additional information is given.
>
> Add attributes to LINKSTATE_GET command in order to allow drivers
> to expose the user more information in addition to link st
On Sun, Jun 07, 2020 at 05:59:39PM +0300, Amit Cohen wrote:
> Currently, drivers can only tell whether the link is up/down using
> LINKSTATE_GET, but no additional information is given.
>
> Add attributes to LINKSTATE_GET command in order to allow drivers
> to expose the user more information in a
> +static void linkstate_get_ext_state(struct net_device *dev,
> + struct linkstate_reply_data *data)
> +{
> + int err;
> +
> + if (!dev->ethtool_ops->get_ext_state)
> + return;
> +
> + err = dev->ethtool_ops->get_ext_state(dev,
> &data->etht
> @@ -108,6 +131,12 @@ static int linkstate_reply_size(const struct
> ethnl_req_info *req_base,
> if (data->sqi_max != -EOPNOTSUPP)
> len += nla_total_size(sizeof(u32));
>
> + if (data->ext_state_provided)
> + len += sizeof(u8); /* LINKSTATE_EXT_STATE */
> +
>
> +/**
> + * enum ethtool_ext_substate_cable_issue - more information in
> + * addition to ETHTOOL_EXT_STATE_CABLE_ISSUE.
> + */
> +enum ethtool_ext_substate_cable_issue {
> + ETHTOOL_EXT_SUBSTATE_UNSUPPORTED_CABLE = 1,
> + ETHTOOL_EXT_SUBSTATE_SHORTED_CABLE,
> +};
I'm not too happy about
Currently, drivers can only tell whether the link is up/down using
LINKSTATE_GET, but no additional information is given.
Add attributes to LINKSTATE_GET command in order to allow drivers
to expose the user more information in addition to link state to ease
the debug process, for example, reason f