From patchwork Wed Jul 31 00:49:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Ol=C4=99dzki?= X-Patchwork-Id: 13747988 Received: from smtp.emenem.pl (cmyk.emenem.pl [217.79.154.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58A0D4A31; Wed, 31 Jul 2024 00:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.79.154.63 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722387046; cv=none; b=OTfsGKBKdIU45azKFYmAeBCex/m3Rg5AtoWxSBVD1sLeXb2S6BE4hT3Ku7XwXR2NM2XoFcpVoYkDjdEBAOgq9XbKFD4Zi0BWRpqU1TvqOcpzTSIx4nK4k6eGxdlhOXHktbu7wV+aA6FRhtdIIXfPpDu9CasFFb2Ao/rtcbhP31w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722387046; c=relaxed/simple; bh=crKea1BY/Y5bzrH/WetbK/4UoshvtgJfabiX2tiXG8M=; h=Message-ID:Date:MIME-Version:From:To:Subject:Content-Type; b=fWDzTtbSr3g8XUjxPfb0WSHx6cU2JzyIP9f0ZNyxeGOjS5kcIXSXYWAMaOyqnp3s2fILMQwZ3bY99ylIiwiowKyklijplc4RSjIy1COcT/VkwBJcqCFS4TMjdnpnYQyUeXlgoYucWYD9RI4w2HxwSmkKm6M5dV8lN74U4moTVbw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ans.pl; spf=none smtp.mailfrom=ans.pl; dkim=pass (1024-bit key) header.d=ans.pl header.i=@ans.pl header.b=V7z02oyS; arc=none smtp.client-ip=217.79.154.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ans.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ans.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ans.pl header.i=@ans.pl header.b="V7z02oyS" X-Virus-Scanned: amavisd-new at emenem.pl Received: from [192.168.1.10] (c-98-45-176-131.hsd1.ca.comcast.net [98.45.176.131]) (authenticated bits=0) by cmyk.emenem.pl (8.17.1.9/8.17.1.9) with ESMTPSA id 46V0nshL014346 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Wed, 31 Jul 2024 02:49:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ans.pl; s=20190507; t=1722386999; bh=XQ6htkADcL0Fn3yEmpuuTxZJ4harjK3uzRu/HLO2bUg=; h=Date:From:To:Subject; b=V7z02oySo6wQ3v96BSsCVTxGwQke3lJdK3MDfAqthrvDdM6vZLSBaoRgUQjj+gd7p 2EJXIcobkhznWEFhjMO8+0C7NEz5c6Uo24YgRzw2yBpw0ry3Imdmo9Kv9N2zd4pAtJ Gil1Z0bKSKYVb70Rh4Lm1rSugG+XNOMvQda2dbY0= Message-ID: Date: Tue, 30 Jul 2024 17:49:53 -0700 Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: =?utf-8?q?Krzysztof_Ol=C4=99dzki?= To: Tariq Toukan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "netdev@vger.kernel.org" , linux-rdma@vger.kernel.org, Dan Merillat , Moshe Shemesh , Michal Kubecek , Andrew Lunn , Ido Schimmel Subject: [PATCH v2 net-next] net/mlx4: Add support for EEPROM high pages query for QSFP/QSFP+/QSFP28 Enable reading additional EEPROM information from high pages such as thresholds and alarms on QSFP/QSFP+/QSFP28 modules. "This is similar to commit a708fb7b1f8d ("net/mlx5e: ethtool, Add support for EEPROM high pages query") but given all the required logic already exists in mlx4_qsfp_eeprom_params_set() only s/_LEN/MAX_LEN/ is needed. Tested-by: Dan Merillat Signed-off-by: Krzysztof Piotr Oledzki Reviewed-by: Ido Schimmel --- 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;