mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Yibo Dong <dong100@mucse.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	corbet@lwn.net, gur.stavi@huawei.com, maddy@linux.ibm.com,
	mpe@ellerman.id.au, danishanwar@ti.com, lee@trager.us,
	gongfan1@huawei.com, lorenzo@kernel.org, geert+renesas@glider.be,
	Parthiban.Veerasooran@microchip.com, lukas.bulwahn@redhat.com,
	alexanderduyck@fb.com, richardcochran@gmail.com, kees@kernel.org,
	gustavoars@kernel.org, rdunlap@infradead.org,
	vadim.fedorenko@linux.dev, netdev@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH net-next v9 4/5] net: rnpgbe: Add basic mbx_fw support
Date: Wed, 3 Sep 2025 02:54:52 +0200	[thread overview]
Message-ID: <f7a9598c-fe92-4fb2-a195-ab2e6a1c085f@lunn.ch> (raw)
In-Reply-To: <1D189F224F826D6C+20250901072734.GA43225@nic-Precision-5820-Tower>

> static int mucse_mbx_get_info(struct mucse_hw *hw)
> {
>         struct mbx_fw_cmd_reply reply = {};
>         struct mbx_fw_cmd_req req = {};
>         struct hw_info info = {};
>         int err;
> 
>         build_get_fw_info_req(&req);
>         err = mucse_fw_send_cmd_wait(hw, &req, &reply);
>         if (!err) {
>                 memcpy(&info, &reply.hw_info, sizeof(struct hw_info));
>                 hw->pfvfnum = le16_to_cpu(info.pfnum) & GENMASK_U16(7, 0);
>         }
> 
>         return err;
> }
> 
> /**
>  * mucse_mbx_sync_fw - Try to sync with fw
>  * @hw: pointer to the HW structure
>  *
>  * mucse_mbx_sync_fw tries get sync to fw hw.
>  * It is only called in probe
>  *
>  * Return: 0 on success, negative errno on failure
>  **/
> int mucse_mbx_sync_fw(struct mucse_hw *hw)
> {
>         int try_cnt = 3;
>         int err;
> 
>         do {
>                 err = mucse_mbx_get_info(hw);
>                 if (err == -ETIMEDOUT)
>                         continue;
>                 break;
>         } while (try_cnt--);
> 
>         return err;
> }

This looks O.K.

     Andrew

  reply	other threads:[~2025-09-03  0:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28  2:55 [PATCH net-next v9 0/5] Add driver for 1Gbe network chips from MUCSE Dong Yibo
2025-08-28  2:55 ` [PATCH net-next v9 1/5] net: rnpgbe: Add build support for rnpgbe Dong Yibo
2025-08-28 12:51   ` Andrew Lunn
2025-09-01  8:20     ` Yibo Dong
2025-09-01  9:58       ` Vadim Fedorenko
2025-09-02  1:31         ` Yibo Dong
2025-08-28  2:55 ` [PATCH net-next v9 2/5] net: rnpgbe: Add n500/n210 chip support Dong Yibo
2025-08-28  2:55 ` [PATCH net-next v9 3/5] net: rnpgbe: Add basic mbx ops support Dong Yibo
2025-08-28  2:55 ` [PATCH net-next v9 4/5] net: rnpgbe: Add basic mbx_fw support Dong Yibo
2025-08-28 13:09   ` Andrew Lunn
2025-08-29  2:12     ` Yibo Dong
2025-08-29 19:48       ` Andrew Lunn
2025-09-01  2:08         ` Yibo Dong
2025-09-01  7:27         ` Yibo Dong
2025-09-03  0:54           ` Andrew Lunn [this message]
2025-08-28  2:55 ` [PATCH net-next v9 5/5] net: rnpgbe: Add register_netdev Dong Yibo
2025-08-28 13:20   ` Andrew Lunn
2025-08-29  2:36     ` Yibo Dong
2025-08-29 19:51       ` Andrew Lunn
2025-09-01  2:18         ` Yibo Dong
2025-08-28  5:22 ` [PATCH net-next v9 0/5] Add driver for 1Gbe network chips from MUCSE MD Danish Anwar
2025-08-28  5:36   ` Yibo Dong
2025-08-28  6:47     ` MD Danish Anwar
2025-08-28 12:57     ` Andrew Lunn

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=f7a9598c-fe92-4fb2-a195-ab2e6a1c085f@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Parthiban.Veerasooran@microchip.com \
    --cc=alexanderduyck@fb.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=dong100@mucse.com \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=gongfan1@huawei.com \
    --cc=gur.stavi@huawei.com \
    --cc=gustavoars@kernel.org \
    --cc=horms@kernel.org \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lee@trager.us \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=lukas.bulwahn@redhat.com \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /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

all inboxes | Powered by JetHome®