Re: [PATCH V5 net-next 05/11] net: hibmcge: Implement some .ndo functions
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-08-29 01:39:56
Also in:
lkml
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-08-29 01:39:56
Also in:
lkml
On Tue, 27 Aug 2024 21:14:49 +0800 Jijie Shao wrote:
+static int hbg_net_open(struct net_device *dev)
+{
+ struct hbg_priv *priv = netdev_priv(dev);
+
+ if (test_and_set_bit(HBG_NIC_STATE_OPEN, &priv->state))
+ return 0;
+
+ netif_carrier_off(dev);Why clear the carrier during open? You should probably clear it once on the probe path and then on stop.
+ hbg_all_irq_enable(priv, true); + hbg_hw_mac_enable(priv, HBG_STATUS_ENABLE); + netif_start_queue(dev); + hbg_phy_start(priv); + + return 0; +}