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 3FD19314A73; Fri, 7 Aug 2026 15:12:48 +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=1786115569; cv=none; b=QaOaddYQ/3ZqJXedLg+xa9QkaVW8kE78hWqxDUVS+AVBS4aMdq57kg1Sg3mChR3NhGARHFQizQ6ZD6lop04s+fGBpIcxOh/K/cqS+xRkXcTQT0q1Ks2a8kc2q9uYu6m9T93UHEuazrJIasI/Bxb1oV/c72rHVmIHfQkZIqLJtT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786115569; c=relaxed/simple; bh=PcgQOd+JcIMQobz0/P6WTLFQjkvoJFB1hbt+ELQtt1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pVBKpHvUfQhzMcyl5rzjFykL6pPZ4XLju3EIcmTufrQSquj+mbThlZuac/Es5msJFYbEMacd/o5+7gx4lFIZZSkSnQBeHl83ADu8fJLN6HoOoNSQxeLI1fIdga2GjIKPZw7x9v7bud4stsDsAyk3rWgdrWR0407e+kQoQHmDnVw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2IhYeGe/; 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="2IhYeGe/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CF6C1F00A3A; Fri, 7 Aug 2026 15:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786115568; bh=z83mKEBzf/7a/uGgaUfCpm0Un3T4ICYUIxoJUC26JVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2IhYeGe//+cX0sMUupGCZY3ZTNzImZkwyO9M+eQgx+LS+fggaZiqbLcIdXmoyWnx4 tcbQyqHkMgt9IBwFuktIl6H17eY2gMyF7svArXy7nqbk0lAUIcRCdBAjGCxR4KepFB w9t8egigj5Jqdp7ZXaI+GsqkdvCBl2ntzyk59wt0= 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.18 285/396] ice: wait for reset completion in ice_resume() Date: Fri, 7 Aug 2026 16:37:25 +0200 Message-ID: <20260807143430.415860081@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143424.272339768@linuxfoundation.org> References: <20260807143424.272339768@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.18-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 @@ -5713,6 +5713,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; }