public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 ethtool] cmis: Fix incorrect LSB field used for wavelength tolerance
@ 2026-03-21 15:39 Alok Tiwari
  2026-03-22  8:15 ` Danielle Ratson
  2026-03-23 22:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2026-03-21 15:39 UTC (permalink / raw)
  To: danieller, kuba, netdev, mkubecek; +Cc: alok.a.tiwari, alok.a.tiwarilinux

The wavelength tolerance calculation mistakenly uses the nominal
wavelength LSB field (CMIS_NOM_WAVELENGTH_LSB) instead of the correct
tolerance LSB field (CMIS_WAVELENGTH_TOL_LSB). This causes incorrect
values to be reported for the "Laser wavelength tolerance".

Use CMIS_NOM_WAVELENGTH_LSB -> CMIS_WAVELENGTH_TOL_LSB.
correct 0.005 nm LSB scaling for the tolerance field (per CMIS)

Fixes: 3448a2f73e77 ("cmis: Add JSON output handling to --module-info in CMIS modules")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
v1 -> v2
change 0.05 -> 0.005
---
 cmis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmis.c b/cmis.c
index 305814c..996e9eb 100644
--- a/cmis.c
+++ b/cmis.c
@@ -276,7 +276,7 @@ static void cmis_show_mit_compliance(const struct cmis_memory_map *map)
 				       "nm");
 		module_print_any_float("Laser wavelength tolerance",
 				       (((map->page_01h[CMIS_WAVELENGTH_TOL_MSB] << 8) |
-				        map->page_01h[CMIS_NOM_WAVELENGTH_LSB]) * 0.05),
+				        map->page_01h[CMIS_WAVELENGTH_TOL_LSB]) * 0.005),
 				       "nm");
 	}
 }
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH v2 ethtool] cmis: Fix incorrect LSB field used for wavelength tolerance
  2026-03-21 15:39 [PATCH v2 ethtool] cmis: Fix incorrect LSB field used for wavelength tolerance Alok Tiwari
@ 2026-03-22  8:15 ` Danielle Ratson
  2026-03-23 22:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Danielle Ratson @ 2026-03-22  8:15 UTC (permalink / raw)
  To: Alok Tiwari, kuba@kernel.org, netdev@vger.kernel.org,
	mkubecek@suse.cz
  Cc: alok.a.tiwarilinux@gmail.com

> -----Original Message-----
> From: Alok Tiwari <alok.a.tiwari@oracle.com>
> Sent: Saturday, 21 March 2026 17:39
> To: Danielle Ratson <danieller@nvidia.com>; kuba@kernel.org;
> netdev@vger.kernel.org; mkubecek@suse.cz
> Cc: alok.a.tiwari@oracle.com; alok.a.tiwarilinux@gmail.com
> Subject: [PATCH v2 ethtool] cmis: Fix incorrect LSB field used for wavelength
> tolerance
> 
> The wavelength tolerance calculation mistakenly uses the nominal wavelength
> LSB field (CMIS_NOM_WAVELENGTH_LSB) instead of the correct tolerance LSB
> field (CMIS_WAVELENGTH_TOL_LSB). This causes incorrect values to be
> reported for the "Laser wavelength tolerance".
> 
> Use CMIS_NOM_WAVELENGTH_LSB -> CMIS_WAVELENGTH_TOL_LSB.
> correct 0.005 nm LSB scaling for the tolerance field (per CMIS)
> 
> Fixes: 3448a2f73e77 ("cmis: Add JSON output handling to --module-info in CMIS
> modules")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> v1 -> v2
> change 0.05 -> 0.005
> ---

Reviewed-by: Danielle Ratson <danieller@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 ethtool] cmis: Fix incorrect LSB field used for wavelength tolerance
  2026-03-21 15:39 [PATCH v2 ethtool] cmis: Fix incorrect LSB field used for wavelength tolerance Alok Tiwari
  2026-03-22  8:15 ` Danielle Ratson
@ 2026-03-23 22:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-23 22:20 UTC (permalink / raw)
  To: ALOK TIWARI; +Cc: danieller, kuba, netdev, mkubecek, alok.a.tiwarilinux

Hello:

This patch was applied to ethtool/ethtool.git (master)
by Michal Kubecek <mkubecek@suse.cz>:

On Sat, 21 Mar 2026 08:39:02 -0700 you wrote:
> The wavelength tolerance calculation mistakenly uses the nominal
> wavelength LSB field (CMIS_NOM_WAVELENGTH_LSB) instead of the correct
> tolerance LSB field (CMIS_WAVELENGTH_TOL_LSB). This causes incorrect
> values to be reported for the "Laser wavelength tolerance".
> 
> Use CMIS_NOM_WAVELENGTH_LSB -> CMIS_WAVELENGTH_TOL_LSB.
> correct 0.005 nm LSB scaling for the tolerance field (per CMIS)
> 
> [...]

Here is the summary with links:
  - [v2,ethtool] cmis: Fix incorrect LSB field used for wavelength tolerance
    https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=40d272752bb4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-23 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-21 15:39 [PATCH v2 ethtool] cmis: Fix incorrect LSB field used for wavelength tolerance Alok Tiwari
2026-03-22  8:15 ` Danielle Ratson
2026-03-23 22:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox