* [PATCH] emulex/benet: correct command version selection in be_cmd_get_stats()
@ 2025-05-19 14:17 Alok Tiwari
2025-05-22 3:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Alok Tiwari @ 2025-05-19 14:17 UTC (permalink / raw)
To: ajit.khaparde, sriharsha.basavapatna, somnath.kotur,
andrew+netdev, davem, edumazet, kuba, pabeni, netdev
Cc: alok.a.tiwari, linux-kernel, darren.kenny
Logic here always sets hdr->version to 2 if it is not a BE3 or Lancer chip,
even if it is BE2. Use 'else if' to prevent multiple assignments, setting
version 0 for BE2, version 1 for BE3 and Lancer, and version 2 for others.
Fixes potential incorrect version setting when BE2_chip and
BE3_chip/lancer_chip checks could both be true.
Fixes: 61000861e860 ("be2net: Call version 2 of GET_STATS ioctl for Skyhawk-R")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 51b8377edd1d..a89aa4ac0a06 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -1609,7 +1609,7 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd)
/* version 1 of the cmd is not supported only by BE2 */
if (BE2_chip(adapter))
hdr->version = 0;
- if (BE3_chip(adapter) || lancer_chip(adapter))
+ else if (BE3_chip(adapter) || lancer_chip(adapter))
hdr->version = 1;
else
hdr->version = 2;
--
2.47.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] emulex/benet: correct command version selection in be_cmd_get_stats()
2025-05-19 14:17 [PATCH] emulex/benet: correct command version selection in be_cmd_get_stats() Alok Tiwari
@ 2025-05-22 3:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-22 3:50 UTC (permalink / raw)
To: ALOK TIWARI
Cc: ajit.khaparde, sriharsha.basavapatna, somnath.kotur,
andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, darren.kenny
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 19 May 2025 07:17:19 -0700 you wrote:
> Logic here always sets hdr->version to 2 if it is not a BE3 or Lancer chip,
> even if it is BE2. Use 'else if' to prevent multiple assignments, setting
> version 0 for BE2, version 1 for BE3 and Lancer, and version 2 for others.
> Fixes potential incorrect version setting when BE2_chip and
> BE3_chip/lancer_chip checks could both be true.
>
> Fixes: 61000861e860 ("be2net: Call version 2 of GET_STATS ioctl for Skyhawk-R")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
>
> [...]
Here is the summary with links:
- emulex/benet: correct command version selection in be_cmd_get_stats()
https://git.kernel.org/netdev/net-next/c/edb888d29748
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] 2+ messages in thread
end of thread, other threads:[~2025-05-22 3:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-19 14:17 [PATCH] emulex/benet: correct command version selection in be_cmd_get_stats() Alok Tiwari
2025-05-22 3:50 ` 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
all inboxes | Powered by JetHome®