[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <91803970CBBEA502+20250822052511.GB1931582@nic-Precision-5820-Tower>
Date: Fri, 22 Aug 2025 13:25:11 +0800
From: Yibo Dong <dong100@...se.com>
To: Parthiban.Veerasooran@...rochip.com
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
corbet@....net, gur.stavi@...wei.com, maddy@...ux.ibm.com,
mpe@...erman.id.au, danishanwar@...com, lee@...ger.us,
gongfan1@...wei.com, lorenzo@...nel.org, geert+renesas@...der.be,
lukas.bulwahn@...hat.com, alexanderduyck@...com,
richardcochran@...il.com, kees@...nel.org, gustavoars@...nel.org,
netdev@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH net-next v7 3/5] net: rnpgbe: Add basic mbx ops support
On Fri, Aug 22, 2025 at 04:41:48AM +0000, Parthiban.Veerasooran@...rochip.com wrote:
> > +
> > +/**
> > + * mucse_check_for_msg_pf - Check to see if the fw has sent mail
> > + * @hw: pointer to the HW structure
> > + *
> > + * @return: 0 if the fw has set the Status bit or else
> > + * -EIO
> > + **/
> > +static int mucse_check_for_msg_pf(struct mucse_hw *hw)
> > +{
> > + struct mucse_mbx_info *mbx = &hw->mbx;
> > + u16 hw_req_count = 0;
> I don't think you need to assign 0 here as this variable is updated in
> the next line.
>
> Best regards,
> Parthiban V
Got it, I will update this.
> > +
> > + hw_req_count = mucse_mbx_get_fwreq(mbx);
> > + /* chip's register is reset to 0 when rc send reset
> > + * mbx command. This causes 'hw_req_count != hw->mbx.fw_req'
> > + * be TRUE before fw really reply. Driver must wait fw reset
> > + * done reply before using chip, we must check no-zero.
> > + **/
> > + if (hw_req_count != 0 && hw_req_count != hw->mbx.fw_req) {
> > + hw->mbx.stats.reqs++;
> > + return 0;
> > + }
> > +
> > + return -EIO;
> > +}
> > +
Thanks for your feedback.
Powered by blists - more mailing lists