Re: [PATCH net 1/4] ice: wait for reset completion in ice_resume()
From: Aaron Ma <hidden>
Date: 2026-07-07 09:35:43
Also in:
stable
On Tue, Jul 7, 2026 at 4:28 PM Paolo Abeni [off-list ref] wrote:
On 6/30/26 11:43 PM, Tony Nguyen wrote:quoted
From: Aaron Ma <redacted> ice_resume() schedules an asynchronous PF reset and returns immediately. The reset runs later in ice_service_task(). If userspace tries to bring up the net device before the reset finishes, ice_open() fails with -EBUSY: ice_resume() ice_schedule_reset() # sets ICE_PFR_REQ, returns ... ice_open() ice_is_reset_in_progress() # ICE_PFR_REQ still set, -EBUSY ... ice_service_task() ice_do_reset() ice_rebuild() # clears ICE_PFR_REQ, too late Reproduced on E800 series NICs during suspend/resume with irdma enabled, where the aux device probe widens the race window. ice 0000:81:00.0: can't open net device while reset is in progress Add a best-effort wait (10s timeout, matching ice_devlink_info_get()) for the reset to complete before returning from ice_resume(). In practice the reset completes in ~300ms.Would not be better to (eventually) wait in ice_open()? Why? AFAICS that would be also more consistent with i.e. the current wait in ice_devlink_info_get(). Otherwise why don't consolidate all the wait at resume time and remove the other one in ice_devlink_info_get()?
Hi Paolo, ice_open() is where the failure is observed, but it is not what creates this race. ice_resume() schedules a PFR and returns success before that reset/rebuild has completed, so userspace can call open immediately after resume and hit -EBUSY. Waiting in ice_resume() keeps the fix scoped to the PM path and to the reset initiated by resume. Moving the wait into ice_open() would change all opens during any reset from immediate -EBUSY to sleeping, and ndo_open runs under RTNL. The devlink wait should stay because ice_devlink_info_get() is reached by DEVLINK_CMD_INFO_GET userspace requests and reads device/FW state. That path still needs protection from resets unrelated to PM resume. Aaron
/P