From: "Jiawen Wu" <jiawenwu@trustnetic•com>
To: "'Simon Horman'" <horms@kernel•org>
Cc: <andrew+netdev@lunn•ch>, <davem@davemloft•net>,
<edumazet@google•com>, <kuba@kernel•org>, <pabeni@redhat•com>,
<linux@armlinux•org.uk>, <netdev@vger•kernel.org>,
<mengyuanlou@net-swift•com>
Subject: RE: [PATCH net-next 1/2] net: txgbe: Add basic support for new AML devices
Date: Mon, 13 Jan 2025 09:59:34 +0800 [thread overview]
Message-ID: <051401db655e$cb1c91e0$6155b5a0$@trustnetic.com> (raw)
In-Reply-To: <20250110120357.GD7706@kernel.org>
On Fri, Jan 10, 2025 8:04 PM, Simon Horman wrote:
> On Fri, Jan 10, 2025 at 04:42:48PM +0800, Jiawen Wu wrote:
> > There is a new 25/10 Gigabit Ethernet device.
> >
> > To support basic functions, PHYLINK is temporarily skipped as it is
> > intended to implement these configurations in the firmware. And the
> > associated link IRQ is also skipped.
> >
> > And Implement the new SW-FW interaction interface, which use 64 Byte
> > message buffer.
> >
> > Signed-off-by: Jiawen Wu <jiawenwu@trustnetic•com>
>
> ...
>
> > @@ -2719,7 +2730,7 @@ int wx_set_features(struct net_device *netdev, netdev_features_t features)
> >
> > netdev->features = features;
> >
> > - if (wx->mac.type == wx_mac_sp && changed & NETIF_F_HW_VLAN_CTAG_RX)
> > + if (changed & NETIF_F_HW_VLAN_CTAG_RX && wx->do_reset)
> > wx->do_reset(netdev);
>
> Hi Jiawen Wu,
>
> Here it is assumed that wx->do_reset may be NULL. But there is an existing
> call to wx->do_reset(), near the end of this function, that is not
> conditional on wx->do_reset being non-NULL. This does not seem consistent.
>
> Flagged by Smatch.
That is conditional on WX_FLAG_FDIR_CAPABLE, which is set by txgbe (SP/AML).
Its condition is the same as wx->do_reset being non-NULL.
if (!(test_bit(WX_FLAG_FDIR_CAPABLE, wx->flags)))
return 0;
For ease of reading, I'll add "if (wx->do_reset)" near the end of this function.
prev parent reply other threads:[~2025-01-13 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 8:42 [PATCH net-next 1/2] net: txgbe: Add basic support for new AML devices Jiawen Wu
2025-01-10 8:42 ` [PATCH net-next 2/2] net: wangxun: Replace the judgement of MAC type with flags Jiawen Wu
2025-01-10 12:03 ` [PATCH net-next 1/2] net: txgbe: Add basic support for new AML devices Simon Horman
2025-01-13 1:59 ` Jiawen Wu [this message]
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='051401db655e$cb1c91e0$6155b5a0$@trustnetic.com' \
--to=jiawenwu@trustnetic$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=mengyuanlou@net-swift$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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