From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) (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 C9A2421CC4F for ; Mon, 1 Dec 2025 10:03:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=176.9.242.62 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764583437; cv=none; b=pmQ5bfkOlfio7hrCwByH0azw7EwUNXp1oj8Hzbi9CuCG9n+ODMOocmif8xTSTxySTYqocG1ensfaeDmBL63XtPtliWguCbIHWfd0Yj21wmLAuYp4MyMaYjw5MuV6kwJzytA4X+hSFt7au4WTsLnKDqw0Xvn5ApsGze/KosRcZaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764583437; c=relaxed/simple; bh=Nozt1h71bbS35XfJBzehHCcoJ0IRMYMJlqiLsJVm4dw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NxLWKFQ2KOn6Bgee1BK2JJ/oDPkuj0hn8hIM3qoNpKO8XkWMYBeCEOGo5rg37SpggAviR9RlEE35IzVdruaIi7JhPainK7/IoATLVNQsf942t+MYnxnOE4JXmFNdpd+2QgyWOx0i9b6PaHWAmDZ1Q+Siwe0SMvAJerq+KwMeYAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=none smtp.mailfrom=h08.hostsharing.net; arc=none smtp.client-ip=176.9.242.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "*.hostsharing.net", Issuer "GlobalSign GCC R6 AlphaSSL CA 2025" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 547A92C0601E; Mon, 1 Dec 2025 11:03:46 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1343D1E6DF; Mon, 1 Dec 2025 11:03:46 +0100 (CET) Date: Mon, 1 Dec 2025 11:03:46 +0100 From: Lukas Wunner To: "guanghui.fgh" Cc: Bjorn Helgaas , linux-pci , kanie , alikernel-developer , Ilpo =?iso-8859-1?Q?J=E4rvinen?= Subject: Re: [PATCH] PCI: Fix PCIe SBR dev/link wait error Message-ID: References: <20251124104502.777141-1-guanghuifeng@linux.alibaba.com> <20251124235858.GA2726643@bhelgaas> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Nov 25, 2025 at 02:20:10PM +0800, guanghui.fgh wrote: > After __pci_reset_slot/__pci_reset_bus calls > pci_bridge_wait_for_secondary_bus, the device will be restored via > pci_dev_restore. However, when a multifunction PCIe device is connected, > executing pci_bridge_wait_for_secondary_bus only guarantees the restoration > of a random device. For other devices that are still restoring, executing > pci_dev_restore cannot restore the device state normally, resulting in > errors or even device offline. PCIe is point-to-point, i.e. at the two ends of a link there's only a single physical device. So if there are multiple pci_dev's on a bus, they're additional functions or VFs of the same physical device. The expectation is that if the first device on the bus is accessible, all other functions of the same physical device are accessible as well. That's why we only wait for the first device to become accessible. It seems highly unusual that the different functions of the same physical device require different delays until they're accessible. I don't think we can accept such a sweeping change wholesale without more details, so please share what the topology looks like (lspci -tv), what devices are involved (lspci -vvv) and which device requires extra wait time for some of its functions. Thanks, Lukas