Subject: Re: [PATCH net-next v11 4/7] net: tn40xx: add basic Tx handling

From: Jakub Kicinski <[email-masked]>
Date: Tue, 18 Jun 2024 18:50:00 -0700

On Tue, 18 Jun 2024 14:16:05 +0900 FUJITA Tomonori wrote:
> + * As our benchmarks shows, it adds 1.5 Gbit/sec to NIS's throughput.

nit: NIC's

> +static int tn40_start_xmit(struct sk_buff *skb, struct net_device *ndev)

return type should be netdev_tx_t ?

> +	netif_trans_update(ndev);

I don't think you need to call this, core sets the trans time
all by itself

> +static void tn40_link_changed(struct tn40_priv *priv)
> +{
> +	u32 link = tn40_read_reg(priv,
> +				 TN40_REG_MAC_LNK_STAT) & TN40_MAC_LINK_STAT;
> +
> +	netdev_dbg(priv->ndev, "link changed %u\n", link);

shouldn't this call netif_carrier_on / off?

> +		mdelay(100);

there are 3 more mdelays in the driver, all seem like candidates for
being msleep