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 93F3538E8A9; Fri, 7 Aug 2026 15:26:16 +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=1786116377; cv=none; b=u8DrumEHN7zqZVnw54yIFbjzubGNNBn5t7JUVIjspJVnzhiQFvzVAXWrFrVJzXQM3SU255sywZv81Fa3PTLOLOiKkTCQXadNxwnecxRqorUBqphwocS266XfkYbF6qu3ZoMnxbP2pO7aTqfDkVfcpRsvvjQCOScdw5Ch95U8KHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786116377; c=relaxed/simple; bh=pzy/Pf2+FM40Ek4cH+2aWzrVhMroqfnwomhisEsdNpk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VGre25DwQtEtEuQBljuwM5NV1INn8iqsG1GONQw4hpgDzqQkt5rHQR34t+KVYCLZqro45zJvzvOYO3FYevz1dlunQp7gqqGkIj5mmizP8sp3tV2MJmVSRpIRq3Wqf3OaiHcJcooY9s0vOxF34Dt2/nFlV9WwuTzqnP/SfzVUekw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jsgBYJPn; 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="jsgBYJPn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F11F71F000E9; Fri, 7 Aug 2026 15:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786116376; bh=CNuxKNP0k0QyWwwZV0PA5535/BmB61hafqhHktc3MCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jsgBYJPnzWyCkUntraPQSRVd4PmR5SkJBw8px/PQ4MTD0kytRybNnrpPj8CT7lwmQ Z0rZdaLp7eBsSve17btGiAD4d3tPM8Yt67BplB6Sl02S9rl47IxOyn+bCNa+/APRRV fXQs5UbE2Wyes6WGiz+Wx9mHl+NGwTStneHPB4r8= 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.6 165/261] ice: wait for reset completion in ice_resume() Date: Fri, 7 Aug 2026 16:38:42 +0200 Message-ID: <20260807143418.927561557@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143415.358597922@linuxfoundation.org> References: <20260807143415.358597922@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.6-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 @@ -5491,6 +5491,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 */