From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f54.google.com (mail-dl1-f54.google.com [74.125.82.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5096E14B950 for ; Tue, 10 Feb 2026 01:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770686232; cv=none; b=FNKwrfKcdBzLXhLR3YPvFAE+3VIDyKQ4LD4qw5biq21Q1lQtfT4MwH0LAGWZjKVOMwatdf66uCe0VX+KVVH7vQzeiF/i6bujLwYXqzZqMPJlhwnCUxls3kb/xBZmpMJF6AGwoWpq3VqgqeaAyzKIxFlXK376wpjH/NQe4p2ySl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770686232; c=relaxed/simple; bh=gCyHz5YH3rkfmkuzZmj0n9TsGnwIlm/bBPk5+K4C4g8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X3LPwa07efqQLjS796G30TRDZW+1Dnj1FDre8RhjHiB9C5rsYWFMWsRqXCppeBmceVQrYEI5BeCMIIUfPGC/urojp29f5POlsgmw+2QeOJ5XhHNPq3qGViYouYCh1fOBxcUsgKNntDLoohhlW844W9EU404Xh/IOXd+d4mSx0oQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Uaqqv2MQ; arc=none smtp.client-ip=74.125.82.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Uaqqv2MQ" Received: by mail-dl1-f54.google.com with SMTP id a92af1059eb24-1270adc5121so366107c88.0 for ; Mon, 09 Feb 2026 17:17:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1770686230; x=1771291030; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PKD/fyGImes3SEWgyhsAok+Gf9yh097jwYeFYhWa3NU=; b=Uaqqv2MQK3n4GbUMHijiw4RylPhmY6X/okfHboYAhT3/m76xRoeEjAiH0xTSkPvgyp celDR00zJjXBVnB9VCrhj/ZtE9K2VW7CTbLTGUwfBKJJfpuBZbgwU2VpWrItS/tqiPL7 o++0wIObAbrpfvHyLEB9WRKbM/BtVIbscVBQg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770686230; x=1771291030; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PKD/fyGImes3SEWgyhsAok+Gf9yh097jwYeFYhWa3NU=; b=WcmQ1clslV907BoOyyPgJFg4X2w2FPmfu1TMqJZYyy5NXobc13MSMdUjDBvjvX/F/3 SQucMCSvOEnwRkwjpeJ90kSIuzkCgJMeZmKNqHvnaVSmBJk0RSaUd8ZC5O1qo7dCU8v8 2EhGJF+nmDt5vpcRmgoax5nOrF9BqSv3U/GmbHWmxW46zU4Ghj96skW4HKFnxjMwAUTl l3F8+6LPXmbfMy4z/WBLBe1mSMmzGehpZsiHM0WWkkqKt6pd6PWm0zPJn44pl1MQdPEt lov9B+euJbeDzWLMCQtU9VVru5ufvCS6GYwCSTn+ws0YoO7q4W4neESuLR5FC0bVOUqa AFxw== X-Forwarded-Encrypted: i=1; AJvYcCWcLx9pqoCX6JvvvyY1pq2h+7dAuMxfASI5UuDnOB2Rvnvpm2xR7XaQ7f7cabv590kA4p6nU0d4zAkymoU=@vger.kernel.org X-Gm-Message-State: AOJu0YyStaj1+UDvsufu6KK6hmlLvN42utj69fWoHP9+1DS+5Q8c8S3t IKCu4FIkxjBex+21DxHQzj0AV9dygUEvgZ+SyKARh8Z3WpHicii06Tia6QvPg7tYCgFPpsCAaPU C8XQ= X-Gm-Gg: AZuq6aLgRo080RvJq3uks84eeuWhFxZ+vt/GtuZp6QVHYgk9kog1cWDIT22ANuVQgAY tErl4NNb4foQlqb7eqQAK/ok+nvqdDAbyNnNXRVDvkg2u+1jd9h7M5t1bSMHLMFhoJrs61kLGI3 KRkS3HkVNwgrj/90zAPteBX1kEOddojZEP9NDaaI7N1rzRKm6oCir3B04orK77sPCKcaKoEOD9M rWpGYSpDyCzkUzkQzK15IW7BHZxf4U076B2d1AddGxYjqrPYLyCOcCUXQNqb8kgCBcXxT/K/BSo rG9llgA46Cr0oeoXfSfRe67DS863zZ/z/5DOMBfXkSrX4q02E03OtnTjSc/55ncemOXh4e7D6yP z7334bLEl0rGg1I6lgZjkcbuq/UnxrcZB0N0kGnN4U4UZjGGRWBoO05k6t6UdeLXQNV8WwHzTab l7TVOA1Lo+pqqafeDJvoyBrPtCFpHTC9xoQLIWYbJpZVgR6n7NDw== X-Received: by 2002:a05:7022:60a0:b0:119:e56b:98ab with SMTP id a92af1059eb24-12703fe635cmr6926735c88.18.1770686230336; Mon, 09 Feb 2026 17:17:10 -0800 (PST) Received: from localhost ([2a00:79e0:2e7c:8:b8b8:83d8:d937:b0f8]) by smtp.gmail.com with UTF8SMTPSA id a92af1059eb24-127041d9c91sm11159286c88.2.2026.02.09.17.17.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Feb 2026 17:17:09 -0800 (PST) Date: Mon, 9 Feb 2026 17:17:08 -0800 From: Brian Norris To: Lukas Wunner Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: Re: [PATCH] PCI/portdrv: Allow probing even without child services Message-ID: References: <20260109152013.1.I5fd5d83f518681b3949d8ab2f16ba8244fd3e774@changeid> Precedence: bulk X-Mailing-List: linux-kernel@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: (Sorry for some delay. Other priorities take over sometimes...) On Thu, Jan 15, 2026 at 09:44:40AM +0100, Lukas Wunner wrote: > I note that pcie_portdrv_remove() calls pci_disable_device() > unconditionally. You may need an extra struct with an extra flag > to remember whether pci_disable_device() needs to be called on remove. Note that pci_enable_device() and pci_set_master() are separate operations. With the proposed change, we may undo the latter, but not the former. So remove() will still need to call pci_disable_device(), which automatically handles clearing the master bit if needed, without extra state tracking. So I don't see the problem here. At any rate, I've sent v2 that I think addresses everything. Feel free to tell me I'm wrong there if needed :) Brian P.S. This whole concern is likely for naught if the port actually has a device at the other end, since pci_enable_bridge() will set the master bit anyway.