RE: [EXTERNAL] [PATCH net-next v03 1/1] hinic3: module initialization and tx/rx logic
From: Gur Stavi
Date: Wed Jan 08 2025 - 00:39:12 EST
> >+static void hinic3_link_status_change(struct net_device *netdev, bool
> >link_status_up)
> >+{
> >+ struct hinic3_nic_dev *nic_dev =3D netdev_priv(netdev);
> >+
> >+ if (!HINIC3_CHANNEL_RES_VALID(nic_dev))
> >+ return;
> >+
> >+ if (link_status_up) {
> >+ if (netif_carrier_ok(netdev))
> >+ return;
> >+
> >+ nic_dev->link_status_up =3D true;
> >+ netif_carrier_on(netdev);
> [Suman] don't we need to call netif_tx_start_all_queues as well?=20
No, netif_tx_start/stop_all_queues should be called in ndo_open/close.
Carrier status change event does not start/stop tx queues.
> >+ netdev_dbg(netdev, "Link is up\n");
> >+ } else {
> >+ if (!netif_carrier_ok(netdev))
> >+ return;
> >+
> >+ nic_dev->link_status_up =3D false;
> >+ netif_carrier_off(netdev);
> [Suman] don't we need to call netif_tx_stop_all_queues as well?
Same.
> >+ netdev_dbg(netdev, "Link is down\n");
> >+ }
> >+}
> >+