mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
emulex/benet: correct command version selection in be_cmd_get_stats()
[ Upstream commit edb888d29748cee674006a52e544925dacc7728e ] 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. Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Link: https://patch.msgid.link/20250519141731.691136-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
aa588740e3
commit
c5ea7c6d0a
1 changed files with 1 additions and 1 deletions
|
|
@ -1608,7 +1608,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue