lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ebb67ccd-b3a1-4ffa-abec-585ee5acad84@dan.merillat.org>
Date: Tue, 9 Jul 2024 07:17:55 -0400
From: Dan Merillat <git@....merillat.org>
To: Krzysztof Olędzki <ole@....pl>,
 Ido Schimmel <idosch@...dia.com>, Andrew Lunn <andrew@...n.ch>,
 Michal Kubecek <mkubecek@...e.cz>
Cc: Moshe Shemesh <moshe@...dia.com>,
 "netdev@...r.kernel.org" <netdev@...r.kernel.org>, tariqt@...dia.com,
 Dan Merillat <git@....merillat.org>
Subject: Re: [PATCH] net/mlx4: Add support for EEPROM high pages query for
 QSFP/QSFP+/QSFP28

On 7/7/24 11:41 PM, Krzysztof Olędzki wrote:
> Enable reading additional EEPROM information from high pages such as
> thresholds and alarms on QSFP/QSFP+/QSFP28 modules.
> 
> The fix is similar to a708fb7b1f8dcc7a8ed949839958cd5d812dd939 but given
> all the required logic already exists in mlx4_qsfp_eeprom_params_set()
> only s/_LEN/MAX_LEN/ is needed.
> ---
>  drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> index 619e1c3ef7f9..aca968b4dc15 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -2055,20 +2055,20 @@ static int mlx4_en_get_module_info(struct net_device *dev,
>  	switch (data[0] /* identifier */) {
>  	case MLX4_MODULE_ID_QSFP:
>  		modinfo->type = ETH_MODULE_SFF_8436;
> -		modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
> +		modinfo->eeprom_len = ETH_MODULE_SFF_8436_MAX_LEN;
>  		break;
>  	case MLX4_MODULE_ID_QSFP_PLUS:
>  		if (data[1] >= 0x3) { /* revision id */
>  			modinfo->type = ETH_MODULE_SFF_8636;
> -			modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN;
> +			modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
>  		} else {
>  			modinfo->type = ETH_MODULE_SFF_8436;
> -			modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
> +			modinfo->eeprom_len = ETH_MODULE_SFF_8436_MAX_LEN;
>  		}
>  		break;
>  	case MLX4_MODULE_ID_QSFP28:
>  		modinfo->type = ETH_MODULE_SFF_8636;
> -		modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN;
> +		modinfo->eeprom_len = ETH_MODULE_SFF_8636_MAX_LEN;
>  		break;
>  	case MLX4_MODULE_ID_SFP:
>  		modinfo->type = ETH_MODULE_SFF_8472;

Patched this into kernel 6.9.8 and I now get the alarm/warning data from this module as expected when reverting to stock ethtool 6.9.  I tested on a ConnectX3-Pro.
Thanks for the fast turnaround!

Tested-By: Dan Merillat <git@....merillat.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ