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: Fri, 29 Aug 2025 21:48:12 +0200 [thread overview]
Message-ID: <8a76222e-8da7-4499-981f-64660e377e1c@lunn.ch> (raw)
In-Reply-To: <DB12A33105BC0233+20250829021254.GA904254@nic-Precision-5820-Tower>
> Maybe I should rename it like this?
>
> /**
> * mucse_mbx_sync_fw_by_get_capability - Try to sync driver and fw
> * @hw: pointer to the HW structure
> *
> * mucse_mbx_sync_fw_by_get_capability tries to sync driver and fw
> * by get capabitiy mbx cmd. Many retrys will do if it is failed.
> *
> * Return: 0 on success, negative errno on failure
> **/
> int mucse_mbx_sync_fw_by_get_capability(struct mucse_hw *hw)
> {
> struct hw_abilities ability = {};
> int try_cnt = 3;
> int err;
> /* It is called once in probe, if failed nothing
> * (register network) todo. Try more times to get driver
> * and firmware in sync.
> */
> do {
> err = mucse_fw_get_capability(hw, &ability);
> if (err)
> continue;
> break;
> } while (try_cnt--);
>
> if (!err)
> hw->pfvfnum = le16_to_cpu(ability.pfnum) & GENMASK_U16(7, 0);
> return err;
> }
Why so much resistance to a NOP or firmware version, something which
is not that important? Why do you want to combine getting sync and
getting the capabilities?
> fw reduce working frequency to save power if no driver is probed to this
> chip. And fw change frequency to normal after recieve insmod mbx cmd.
So why is this called ifinsmod? Why not power save? If you had called
this power save, i would not of questioned what this does, it is
pretty obvious, and other drivers probably have something
similar. Some drivers probably have something like open/close, which
do similar things. Again, i would not of asked. By not following what
other drivers are doing, you just cause problems for everybody.
So please give this a new name. Not just the function, but also the
name of the firmware op and everything else to do with this. The
firmware does not care what the driver calls it, all it sees is a
binary message format, no names.
Please also go through your driver and look at all the other names. Do
they match what other drivers use. If not, you might want to rename
them, in order to get your code merged with a lot less back and forth
with reviewers.
Andrew
next prev parent reply other threads:[~2025-08-29 19:49 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 [this message]
2025-09-01 2:08 ` Yibo Dong
2025-09-01 7:27 ` Yibo Dong
2025-09-03 0:54 ` Andrew Lunn
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=8a76222e-8da7-4499-981f-64660e377e1c@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®