mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivian Wang <wangruikang@iscas.ac.cn>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	Jakub Kicinski <kuba@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@gentoo.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>, Vivian Wang <uwu@dram.page>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Junhui Liu <junhui.liu@pigmoral.tech>,
	Simon Horman <horms@kernel.org>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 2/5] net: spacemit: Add K1 Ethernet MAC
Date: Tue, 12 Aug 2025 18:57:42 +0800	[thread overview]
Message-ID: <0c894603-08dc-4dcd-a866-0a1d121cdb89@iscas.ac.cn> (raw)
In-Reply-To: <ac9cce0b-d29e-499b-8a86-28979cd12fb5@lunn.ch>

On 8/12/25 11:45, Andrew Lunn wrote:

>> +static void emac_get_pause_stats(struct net_device *dev,
>> +				 struct ethtool_pause_stats *pause_stats)
>> +{
>> +	struct emac_priv *priv = netdev_priv(dev);
>> +	struct emac_hw_tx_stats *tx_stats;
>> +	struct emac_hw_rx_stats *rx_stats;
>> +
>> +	tx_stats = &priv->tx_stats;
>> +	rx_stats = &priv->rx_stats;
>> +
>> +	scoped_guard(spinlock_irqsave, &priv->stats_lock) {
>> +		emac_stats_update(priv);
>> +
>> +		pause_stats->tx_pause_frames = tx_stats->tx_pause_pkts;
>> +		pause_stats->rx_pause_frames = rx_stats->rx_pause_pkts;
>> +	}
>> +}
> You have pause statistics, but not actual configuration of pause.
>
>> +static void emac_adjust_link(struct net_device *dev)
>> +{
>> +	struct emac_priv *priv = netdev_priv(dev);
>> +	struct phy_device *phydev = dev->phydev;
>> +	u32 ctrl;
> Normally the adjust_link callback you configure the hardware with the
> result of pause negotiation.

Thanks for the tip, I will fix emac_adjust_link next version.

>> +/* Called when net interface is brought up. */
>> +static int emac_open(struct net_device *ndev)
>> +{
>> +	struct emac_priv *priv = netdev_priv(ndev);
>> +	struct device *dev = &priv->pdev->dev;
>> +
>> +	int ret;
> Extra blank line.

Oops. I will fix next version.

Thanks,
Vivian "dramforever" Wang

>
>     Andrew
>
> ---
> pw-bot: cr


  reply	other threads:[~2025-08-12 10:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12  2:02 [PATCH net-next v5 0/5] Add Ethernet MAC support for SpacemiT K1 Vivian Wang
2025-08-12  2:02 ` [PATCH net-next v5 1/5] dt-bindings: net: Add " Vivian Wang
2025-08-12  2:02 ` [PATCH net-next v5 2/5] net: spacemit: Add K1 Ethernet MAC Vivian Wang
2025-08-12  2:17   ` Andrew Lunn
2025-08-12  3:10     ` Vivian Wang
2025-08-12  3:45   ` Andrew Lunn
2025-08-12 10:57     ` Vivian Wang [this message]
2025-08-12  2:02 ` [PATCH net-next v5 3/5] riscv: dts: spacemit: Add Ethernet support for K1 Vivian Wang
2025-08-12  2:02 ` [PATCH net-next v5 4/5] riscv: dts: spacemit: Add Ethernet support for BPI-F3 Vivian Wang
2025-08-13 13:34   ` Hendrik Hamerlinck
2025-08-20 17:55     ` Vivian Wang
2025-08-12  2:02 ` [PATCH net-next v5 5/5] riscv: dts: spacemit: Add Ethernet support for Jupiter Vivian Wang

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=0c894603-08dc-4dcd-a866-0a1d121cdb89@iscas.ac.cn \
    --to=wangruikang@iscas.ac.cn \
    --cc=alex@ghiti.fr \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@gentoo.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=junhui.liu@pigmoral.tech \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=uwu@dram.page \
    --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®