From: Jakub Kicinski <kuba@kernel.org>
To: xuanzhuo@linux.alibaba.com
Cc: Jakub Kicinski <kuba@kernel.org>,
pabeni@redhat.com, dong100@mucse.com, netdev@vger.kernel.org,
davem@davemloft.net, andrew@lunn.ch, guwen@linux.alibaba.com,
vadim.fedorenko@linux.dev, lorenzo@kernel.org,
lukas.bulwahn@redhat.com, hkallweit1@gmail.com,
edumazet@google.com, lulie@linux.alibaba.com,
andrew+netdev@lunn.ch, dust.li@linux.alibaba.com
Subject: Re: [net-next,v28,3/8] eea: probe the netdevice and create adminq
Date: Thu, 5 Mar 2026 18:44:46 -0800 [thread overview]
Message-ID: <20260306024447.566091-1-kuba@kernel.org> (raw)
In-Reply-To: <20260302024604.25354-4-xuanzhuo@linux.alibaba.com>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
eea: probe the netdevice and create adminq
Add basic driver framework for the Alibaba Elastic Ethernet Adapter(EEA).
This commit creates and registers the netdevice after PCI probe, and
initializes the admin queue to send commands to the device.
> diff --git a/drivers/net/ethernet/alibaba/eea/eea_net.c b/drivers/net/ethernet/alibaba/eea/eea_net.c
> new file mode 100644
> index 000000000000..31cb9ca5b408
> --- /dev/null
> +++ b/drivers/net/ethernet/alibaba/eea/eea_net.c
> @@ -0,0 +1,202 @@
[ ... ]
> +static int eea_netdev_init_features(struct net_device *netdev,
> + struct eea_net *enet,
> + struct eea_device *edev)
> +{
[ ... ]
> + netif_carrier_on(netdev);
> +
> +err_free:
> + kfree(cfg);
> + return err;
> +}
[ ... ]
> +int eea_net_probe(struct eea_device *edev)
> +{
> + struct eea_net *enet;
> + int err = -ENOMEM;
> +
> + enet = eea_netdev_alloc(edev, edev->rx_num);
> + if (!enet)
> + return -ENOMEM;
> +
> + err = eea_create_adminq(enet, edev->rx_num + edev->tx_num);
> + if (err)
> + goto err_free_netdev;
> +
> + err = eea_adminq_config_host_info(enet);
> + if (err)
> + goto err_reset_dev;
> +
> + err = eea_netdev_init_features(enet->netdev, enet, edev);
> + if (err)
> + goto err_reset_dev;
> +
> + err = register_netdev(enet->netdev);
> + if (err)
> + goto err_reset_dev;
> +
> + netif_carrier_off(enet->netdev);
Looking at the initialization sequence, eea_netdev_init_features() calls
netif_carrier_on() before the device is registered, then eea_net_probe()
calls netif_carrier_off() immediately after register_netdev().
This creates a brief window after registration where userspace can observe
the carrier as UP before it's set to OFF. Is the netif_carrier_on() call
in eea_netdev_init_features() necessary? The standard driver pattern is to
call netif_carrier_off() before or immediately after register_netdev(), not
to set carrier on first and then override it.
--
pw-bot: cr
next prev parent reply other threads:[~2026-03-06 2:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 2:45 [PATCH net-next v28 0/8] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor Xuan Zhuo
2026-03-02 2:45 ` [PATCH net-next v28 1/8] eea: introduce PCI framework Xuan Zhuo
2026-03-02 2:45 ` [PATCH net-next v28 2/8] eea: introduce ring and descriptor structures Xuan Zhuo
2026-03-02 2:45 ` [PATCH net-next v28 3/8] eea: probe the netdevice and create adminq Xuan Zhuo
2026-03-06 2:44 ` Jakub Kicinski [this message]
2026-03-02 2:46 ` [PATCH net-next v28 4/8] eea: create/destroy rx,tx queues for netdevice open and stop Xuan Zhuo
2026-03-05 10:16 ` Paolo Abeni
2026-03-09 8:51 ` Xuan Zhuo
2026-03-10 8:38 ` Paolo Abeni
2026-03-02 2:46 ` [PATCH net-next v28 5/8] eea: implement packet receive logic Xuan Zhuo
2026-03-02 2:46 ` [PATCH net-next v28 6/8] eea: implement packet transmit logic Xuan Zhuo
2026-03-02 2:46 ` [PATCH net-next v28 7/8] eea: introduce ethtool support Xuan Zhuo
2026-03-02 2:46 ` [PATCH net-next v28 8/8] eea: introduce callback for ndo_get_stats64 Xuan Zhuo
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=20260306024447.566091-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dong100@mucse.com \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=hkallweit1@gmail.com \
--cc=lorenzo@kernel.org \
--cc=lukas.bulwahn@redhat.com \
--cc=lulie@linux.alibaba.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/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