* [DPDK/ethdev Bug 1581] net/txgbe: duplicate legs of if statement
@ 2024-11-15 5:05 bugzilla
0 siblings, 0 replies; only message in thread
From: bugzilla @ 2024-11-15 5:05 UTC (permalink / raw)
To: dev
[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1581
Bug ID: 1581
Summary: net/txgbe: duplicate legs of if statement
Product: DPDK
Version: 24.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: major
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: stephen@networkplumber.org
Target Milestone: ---
This bug is reported here:
https://pvs-studio.com/en/blog/posts/cpp/1183/
V523 The 'then' statement is equivalent to the 'else' statement. bnx2x.c 1633
static s32 txgbe_read_phy_if(struct txgbe_hw *hw)
{
....
if (!hw->phy.phy_semaphore_mask) {
if (hw->bus.lan_id)
hw->phy.phy_semaphore_mask = TXGBE_MNGSEM_SWPHY;
else
hw->phy.phy_semaphore_mask = TXGBE_MNGSEM_SWPHY;
}
return 0;
}
Looking at the Linux kernel driver this mask looks messed up.
In Linux driver possible values are
ethernet/wangxun/libwx/wx_type.h:#define WX_MNG_SWFW_SYNC_SW_MB BIT(2)
ethernet/wangxun/libwx/wx_type.h:#define WX_MNG_SWFW_SYNC_SW_FLASH BIT(3)
But in DPDK it is always using a different value.
#define TXGBE_MNGSEM_SWPHY MS(0, 0x1)
Looks like with wrong mask the SW/FW sync never works!
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 3331 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-15 5:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-15 5:05 [DPDK/ethdev Bug 1581] net/txgbe: duplicate legs of if statement bugzilla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).