From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEAF247799F; Fri, 7 Aug 2026 15:46:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117585; cv=none; b=Cd0ijuOGcXPMRIED5BTj8zmMKE8DCkDad687XnKFx6YTcIc3F1oA4FxtCFt2ERwpceHVxwtpcXlrvEXBf01wAdncj1T2GaUpIDBMl9w+XsovsHOoE0e8jphb1ZfPFFQ/hrm8LD4qdCvNQzpNStQBMWnX9zmC+SoEsMb4SeiVIXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117585; c=relaxed/simple; bh=YFxHZBIwwQEgyy9mksv0k2OJwFTHESyq14BedLl2rQY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nXyos0sE0JZfbURF0PqBkuVTtRy57LUX2IhyP9h9N23sI8NP/7Uwlqe+YVmkPRpASuAWWx3nglXMlSQW67/vX8I412Zg6f4oSKZ68IEA5XnMtbr6vGsfTvpBBPgjBp1G6Uz+/ueXEz0XZundbl6yf2iOwM+CjW5unzz4+brlbPU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vsEpzEdJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vsEpzEdJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 605CF1F000E9; Fri, 7 Aug 2026 15:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786117583; bh=avxu9bAXH63tbajjmSw5BWxVFqNAXoEVY4XgNl5axqc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vsEpzEdJ40EOVINhrnpKNF/1Q99qZhH9q3x/SPYdypA4XQvkeTHS6AkKZzqu9FS9A w4LTUIH78A8F+6XleLXtreLS2aaslwJa+enDU746Hjhsn4scuIp6BQqwL5aw5l4mqi O1zn+69CQ+WkTjGA82h8Du0IStXCplFJReivB8Ks= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kohei Enju , Aleksandr Loktionov , Przemek Kitszel , Aaron Ma , Alexander Nowlin , Tony Nguyen Subject: [PATCH 7.1 353/438] ice: wait for reset completion in ice_resume() Date: Fri, 7 Aug 2026 16:39:09 +0200 Message-ID: <20260807143435.496485299@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143428.008222056@linuxfoundation.org> References: <20260807143428.008222056@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aaron Ma commit c2816d613f388814d27bc9fd6dbd931a88056e19 upstream. 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. Fixes: 769c500dcc1e ("ice: Add advanced power mgmt for WoL") Cc: stable@vger.kernel.org Reviewed-by: Kohei Enju Reviewed-by: Aleksandr Loktionov Reviewed-by: Przemek Kitszel Signed-off-by: Aaron Ma Tested-by: Alexander Nowlin Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ice/ice_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -5637,6 +5637,16 @@ static int ice_resume(struct device *dev /* Restart the service task */ mod_timer(&pf->serv_tmr, round_jiffies(jiffies + pf->serv_tmr_period)); + /* Best-effort wait for the scheduled reset to finish so that the + * device is operational before returning. Without this, userspace + * (e.g. NetworkManager) may try to open the net device while the + * asynchronous reset is still in progress, hitting -EBUSY. + */ + ret = ice_wait_for_reset(pf, secs_to_jiffies(10)); + if (ret) + dev_err(dev, "Wait for reset timed out (10s) during resume: %d\n", + ret); + return 0; }