On 14.08.2024 05:19, Kalesh Anakkur Purayil wrote:
On Mon, Aug 12, 2024 at 3:52 PM Dawid Osuchowski
<[email protected]> wrote:
@@ -7568,11 +7570,13 @@ static void ice_update_pf_netdev_link(struct ice_pf *pf)
ice_get_link_status(pf->vsi[i]->port_info, &link_up);
if (link_up) {
+ netif_device_attach(pf->vsi[i]->netdev);
netif_carrier_on(pf->vsi[i]->netdev);
netif_tx_wake_all_queues(pf->vsi[i]->netdev);
} else {
netif_carrier_off(pf->vsi[i]->netdev);
netif_tx_stop_all_queues(pf->vsi[i]->netdev);
+ netif_device_detach(pf->vsi[i]->netdev);
[Kalesh] Is there any reason to attach back the netdev only if link is
up? IMO, you should attach the device back irrespective of physical
link status. In ice_prepare_for_reset(), you are detaching the device
unconditionally.
I may be missing something here.
Hey Kalesh,
I think you are right, it is a mistake on my end. I have already sent a
v2 but without this change. I just tested if this works with the attach
irrespective of link status and it also resolves the reported issue that
the patch is supposed to fix and doesn't introduce any regression that I
am aware of. I will forward your concern to the v2 thread and will post
a v3 with the change.
--Dawid
}
}
}
--
2.44.0
--
Regards,
Kalesh A P