From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 1581] net/txgbe: duplicate legs of if statement
Date: Fri, 15 Nov 2024 05:05:07 +0000 [thread overview]
Message-ID: <bug-1581-3@http.bugs.dpdk.org/> (raw)
[-- 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 --]
reply other threads:[~2024-11-15 5:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-1581-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox