[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <051401db655e$cb1c91e0$6155b5a0$@trustnetic.com>
Date: Mon, 13 Jan 2025 09:59:34 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Simon Horman'" <horms@...nel.org>
Cc: <andrew+netdev@...n.ch>,
<davem@...emloft.net>,
<edumazet@...gle.com>,
<kuba@...nel.org>,
<pabeni@...hat.com>,
<linux@...linux.org.uk>,
<netdev@...r.kernel.org>,
<mengyuanlou@...-swift.com>
Subject: RE: [PATCH net-next 1/2] net: txgbe: Add basic support for new AML devices
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@...stnetic.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.
Powered by blists - more mailing lists