Re: [Intel-wired-lan] [PATCH iwl-next v4 3/5] ice: migrate to netdev ops lock

From: Tony Nguyen

Date: Tue Mar 24 2026 - 13:20:58 EST




On 3/24/2026 9:56 AM, Alexander Lobakin wrote:
From: Kohei Enju <kohei@xxxxxxxx>
Date: Thu, 19 Mar 2026 03:56:19 +0900

On 03/19 02:55, Kohei Enju wrote:
On 03/18 17:35, Alexander Lobakin wrote:
Queue management ops unconditionally enable netdev locking. The same
lock is taken by default by several NAPI configuration functions,
such as napi_enable() and netif_napi_set_irq().
Request ops locking in advance and make sure we use the _locked
counterparts of those functions to avoid deadlocks, taking the lock
manually where needed (suspend/resume, queue rebuild and resets).

Hi Alexander,


Uff, sorry, I didn't notice this thread for some reason. Maybe it landed
into the IWL folder in my mail client and I haven't checked it for some
time... But I read LKML online on a daily basis and missed this reports =\

After applying this patch (3/5) along with the preceding ones on top of
net-next, I got some WARNING splats when changing the admin state
(up/down) using the ip link command. [1, 2]

Since I haven't looked into this series in detail, I'm reporting the
splats anyway.
I'm wondering why I haven't seen anyone report this type of issue up to
v3. Maybe there is something wrong with my setup or devices?

Device: Intel Corporation Ethernet Controller E810-XXV for SFP (rev 02)

Ah, I think I figured out the reason. My adapter accidentally fell into
safe mode. When the adapter is in the safe mode, netdev->queue_mgmt_ops
== NULL and netdev->request_ops_lock == false, so
netdev_assert_locked_or_invisible() complains about not holding the
netdev lock.

Setting netdev->request_ops_lock = true in the safe mode path also
worked fine for me.

---
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 9ef258d5ab48..3477c53316ba 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3519,6 +3519,7 @@ static void ice_set_ops(struct ice_vsi *vsi)

if (ice_is_safe_mode(pf)) {
netdev->netdev_ops = &ice_netdev_safe_mode_ops;
+ netdev->request_ops_lock = true;

This fix looks good to me, thanks!

ice_set_ethtool_safe_mode_ops(netdev);
return;
}

Tony, could you please pick it up to patch 3/5 when sending a new PR?

Yep, I can do that.

Thanks,
Tony