Re: [PATCH net-next v7 3/5] net: rnpgbe: Add basic mbx ops support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 22, 2025 at 04:41:48AM +0000, Parthiban.Veerasooran@xxxxxxxxxxxxx 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.





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux