[{"id":3676844,"web_url":"http://patchwork.ozlabs.org/comment/3676844/","msgid":"<d3xtqtnhki7qxebbnqkwezdu3g4ln4q3l5t56ecy6k6sq2v5oe@3uwp5rsrv7ci>","list_archive_url":null,"date":"2026-04-13T16:05:16","subject":"Re: [PATCH] PCI: host-common: Request bus reassignment when not\n probe-only","submitter":{"id":78905,"url":"http://patchwork.ozlabs.org/api/people/78905/","name":"Manivannan Sadhasivam","email":"mani@kernel.org"},"content":"On Fri, Apr 10, 2026 at 07:51:24PM +0530, Ratheesh Kannoth wrote:\n> pci_host_common_init() is used by several generic ECAM host drivers.\n> After PCI core changes around pci_flags and preserve_config, these hosts\n> no longer opted into full bus number reassignment the way they did\n> before.\n> \n\nSo pci_assign_unassigned_root_bus_resources() only assigns the unclaimed\nresources, and do not reassign the bus numbers. Probably the offending commit\nconfused PCI_REASSIGN_ALL_BUS with PCI_REASSIGN_ALL_RSRC.\n\n> When PCI_PROBE_ONLY is not set, add PCI_REASSIGN_ALL_BUS so\n> pci_scan_bridge_extend() takes the reassignment path: bus numbers can be\n> assigned from firmware EA data (e.g. pci_ea_fixed_busnrs()). Skip the\n> flag in probe-only mode so existing assignments are not overridden.\n> \n> CC: Bjorn Helgaas <helgaas@kernel.org>\n> CC: Vidya Sagar <vidyas@nvidia.com>\n> Fixes: 7246a4520b4b (\"PCI: Use preserve_config in place of pci_flags\")\n> Link: https://lore.kernel.org/netdev/adcXzcz2wWJFw4d7@rkannoth-OptiPlex-7090/\n> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>\n> ---\n>  drivers/pci/controller/pci-host-common.c | 4 ++++\n>  1 file changed, 4 insertions(+)\n> \n> diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c\n> index d6258c1cffe5..860783553cca 100644\n> --- a/drivers/pci/controller/pci-host-common.c\n> +++ b/drivers/pci/controller/pci-host-common.c\n> @@ -68,6 +68,10 @@ int pci_host_common_init(struct platform_device *pdev,\n>  \tif (IS_ERR(cfg))\n>  \t\treturn PTR_ERR(cfg);\n>  \n> +\t/* Do not reassign resources if probe only */\n\nThis comment is still wrong and could be the source of confusion that lead to\nthe bug. PCI_REASSIGN_ALL_BUS only reassigns the bus number, not resources. So\nplease reword it.\n\n> +\tif (!pci_has_flag(PCI_PROBE_ONLY))\n> +\t\tpci_add_flags(PCI_REASSIGN_ALL_BUS);\n\nThis forces bus number reassignment for all platforms whose DT doesn't provide\n'linux,probe-only' property. Maybe that's OK given that this was the behavior\nbefore 7246a4520b4b. \n\n- Mani","headers":{"Return-Path":"\n <linux-pci+bounces-52439-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=V8B1y4yZ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-52439-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"V8B1y4yZ\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvXX0186Qz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 02:13:36 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id E76CD30206D0\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 16:07:04 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id BF1392EA168;\n\tMon, 13 Apr 2026 16:05:29 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BC2D2E888C;\n\tMon, 13 Apr 2026 16:05:29 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 18BB9C2BCB0;\n\tMon, 13 Apr 2026 16:05:24 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776096329; cv=none;\n b=N9ZUxzdfxv2ajMcyBNl64xfkghgA60b2JS9u2so0Lp35q+5XtxVAUxcpKC+BpUjU1STtYCAO+EfJrjNIB1Yx6Gwo7EGK6mBNzmNM2rbeluYg+s1TVBtAj94XgCuAhs/H1PwJ30eriasNAZlgEGIkOMxJ80OlhPybrJ624t2USIo=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776096329; c=relaxed/simple;\n\tbh=VC6YVG4xvB3uWGofxiLkJwCx9Wf3xHXSXBXwyzXleEM=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=Gtg2xrBM+k0Y4xvFXkr3v1ebAVQg+7GeD1A9evlRMdufYElMLdi7J1ZsDYspt/MrgOhMlHmmY8VLZNUXH1CP58ishs1sH8YjX3gSm/K+stv/TANfIUZmHVGPEZnJyZr5sdgH+X8wsI5R30VF0USsUKdiPPmT9MLuzRHnMdXmI1E=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=V8B1y4yZ; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1776096329;\n\tbh=VC6YVG4xvB3uWGofxiLkJwCx9Wf3xHXSXBXwyzXleEM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=V8B1y4yZHPpZVer24NmGLVfYVkQwgxrxXm0Nk6xI1CS6eBAXdh6hJ/7IwwQ12orTC\n\t wnzBYGDs6koLzdqCLnYIb5j5M0ubQqu6hMhO/524XuH57XXdqQ3j+kSm3e1ZsqoKTQ\n\t F0ThPnDC7ew8M34bBmx2zRe16FGg8d8MuG+9T+hvK3cTHWULdAAPxiRmH6GszB766N\n\t IDn7YZ6MPRKWLvAh/4/JVsYALVdyTgLN7NkWHNdpQARJgMbjJJpJ0QxkNyoOpm1Cud\n\t SUUlewb+v/DooQ8yb9+AZqgnwFifLJ+/jFf7KKQtn3wTGKwACjUL6fL52OA6NhCaQq\n\t J42R3DzzwavtA==","Date":"Mon, 13 Apr 2026 21:35:16 +0530","From":"Manivannan Sadhasivam <mani@kernel.org>","To":"Ratheesh Kannoth <rkannoth@marvell.com>","Cc":"linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, bhelgaas@google.com, will@kernel.org,\n lpieralisi@kernel.org,\n\tkwilczynski@kernel.org, robh@kernel.org, vidyas@nvidia.com,\n\tBjorn Helgaas <helgaas@kernel.org>","Subject":"Re: [PATCH] PCI: host-common: Request bus reassignment when not\n probe-only","Message-ID":"<d3xtqtnhki7qxebbnqkwezdu3g4ln4q3l5t56ecy6k6sq2v5oe@3uwp5rsrv7ci>","References":"<20260410142124.2673056-1-rkannoth@marvell.com>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260410142124.2673056-1-rkannoth@marvell.com>"}}]