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 316A62E7BD6; Mon, 17 Aug 2026 15:22:27 +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=1786980148; cv=none; b=u6ZMlDuI6qIJONokNSOcPGkvCFnmypF7TJmjXU11sHivmPzsjBQQG19oZaiB9eTIheT1Wvo9tub+XOD8lqJXVNoLcXWbi0wk9dmYTI9aYq/qNZkCFCTgxh0gWODJBUEoFXNEmHltHLHoAHxGRabkBYlSfCVikF9EG23YRYLwUy4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786980148; c=relaxed/simple; bh=B9e8viNFhnF4+Oo7vLZjQ7PwHdIEu2YcwwQtUWL+zUM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aVXuASHRhMwIlZAm99+Xb4f87KwzrINDTjtj/1l0vGSNqbFbngLBkMVfvldB+NzgmDGvrz5KdPE/ReM+g66J1iPHdb1SuCjN+S+WI4LODXUYAB5nPe9aD2Bv9xLKlstvqAvZBOGz2Z5WrGrcdRLUw6NJrr/C+9QMeuh/mBj12Gk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qxC8b6dW; 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="qxC8b6dW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 940171F000E9; Mon, 17 Aug 2026 15:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786980147; bh=hVlPJO33r6YNPWI5B6nI++UrdAOReTvtiOE+6uQbGlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qxC8b6dWJmlS8AUDsJDlLGy114NPdcC3HPxyXA9vsjg2Hqp6I/bgvYujEn+NcZ4vx gFihohJ4wmA25D5v/l76s75iC7iQN+D5h1Bc05X+XAMl0ttJmrY2MH3brfsGXddXbg RGRSBb92qTcyLrgZFCM3l5gS0WyiD6Ocmle8pFoE= 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 6.1 445/609] ice: wait for reset completion in ice_resume() Date: Mon, 17 Aug 2026 15:32:21 +0200 Message-ID: <20260817132558.967384727@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132543.039278408@linuxfoundation.org> References: <20260817132543.039278408@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 6.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 @@ -5369,6 +5369,16 @@ static int __maybe_unused ice_resume(str /* 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; } #endif /* CONFIG_PM */