From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) (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 D253A345CCE for ; Fri, 17 Jul 2026 02:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784256114; cv=none; b=QK7K4loPdxeFdj+JXD67B7Aw+wahl5CdoxnLar8X/+Dtvs3nOahpJpToFnVf3x3Ff2uko1P+def/uq6nWbO3OwPFBwoXw/57C7sj3WilLbB/mzSTFhmUdPUwXEXTxsNNKfvC0qAWow4Weh083bdgNs2WsUyqeicKEn1CcIf+dmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784256114; c=relaxed/simple; bh=DDh2GgbdI5RQMq7gxZncAkacOeotdu9Fzy33SzeLtQY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=IppfadO8cdsitofpekHcdu9l9jc/jTdUEsHT+vGzBDhP77NMdd7YJP0URMQPL/jGFT7maORSEF9joIppKacTAsMCZGpEZe81Z6czUSApBEmr78XtovR5MMTqhdt8MV5dr0Dvp9+g76fz7ivBeRL2TuMdsfxyLSMrKjsDhWncLro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--tarunsahu.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=orv+ecfv; arc=none smtp.client-ip=209.85.218.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--tarunsahu.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="orv+ecfv" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-c15fed5653eso365628366b.2 for ; Thu, 16 Jul 2026 19:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784256109; x=1784860909; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=j3nhX204PbzOZptNzEwfrJ1tihihmuj8AGndCLVcQhw=; b=orv+ecfvKYOj/yUJ9oD4U8h51O7yL9kYoEFD77GjnYHcrC7r1TX+pEyEgIjl/W1uc8 ypb7qUSt3+iIF3/wK7fNZnYYyhJH8i6q+LtNOx5XnM3RGFbWPdwlSZmaO7bJx3QJY5yz wsMW3wukE8obNz901dtKRSneP+3WIsg6OtooP9O0Dxru+VfNgu5tERuzWp+bRVjNl2eN 7aoepUmCqPU6qUNXGZIrup5xpUyWsqMYEvcd++EkZRwxSb7sAhyLcx801cRrRzhf+KLI H6UG7CR8j+raBCBpuuylPQTpZebyvbXQ40JUSFzPgG4iuw1e4XNdnl3OQScgIR/xikKU nWgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784256109; x=1784860909; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=j3nhX204PbzOZptNzEwfrJ1tihihmuj8AGndCLVcQhw=; b=NeCTqdI2cM93n2sGLuxfK+3t7+JE+fxSvy/0qhCNQ8yPJFIEm5se99WBmKRqjesex3 Gg9/mSh3w0yy0wWqV5PmqxO2dD+sC+/+CsAHAd+q3XKIz/eIFUc9fu9+GmMihhxjpp48 gnK1WF8UOle0n8lZT93gtOSLADG+V21jf0UgvPNVWFf02LtfkMm4L9sN7BplXyYG66zT 1CrUf3KdTWncWmZr3ycLooRArlnOxijUclrIEmtiniRrkR1PykYBZQzGl3AItGi2EyQN R68MyRzqUzUwPRSHyiCtITFOlRDlsFNV7F1bYe9zMSUiTB/zKx6WXeIzwV42Ejj3oNbG rtog== X-Forwarded-Encrypted: i=1; AHgh+RrrLk0xbkqlqqP69/Cx9L3hqNq6xm6Ok1tDi4z8udCdpXwi2Iwtvet4VQvESRKrx/VLpTh0kRwD0Uiq2Ew=@vger.kernel.org X-Gm-Message-State: AOJu0Yzr6/KOtjjJaQPpLrddG9cpbcgI4braeNx5avOwbqopsgi0vpZS oYP2RGxBN5hr2puGSeZeuXO/xdqMniE6fUBNj1RGRNX5aw3eNbqbQ59Gzn8p8HVLyouZXPk4NtA Ti26wYTRDKTaN3kGO6w== X-Received: from ejfr10.prod.google.com ([2002:a17:906:3d6a:b0:c12:5875:9cda]) (user=tarunsahu job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:7203:b0:bed:19af:f89a with SMTP id a640c23a62f3a-c16b46caa65mr21546866b.7.1784256108367; Thu, 16 Jul 2026 19:41:48 -0700 (PDT) Date: Thu, 16 Jul 2026 23:04:10 +0000 In-Reply-To: <20260716230411.2767394-1-tarunsahu@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260716230411.2767394-1-tarunsahu@google.com> X-Mailer: git-send-email 2.55.0.229.g6434b31f56-goog Message-ID: <20260716230411.2767394-7-tarunsahu@google.com> Subject: [PATCH v19 6/7] PCI: Enable async shutdown support From: Tarun Sahu To: Shuah Khan , Danilo Krummrich , Bjorn Helgaas , Greg Kroah-Hartman , "Martin K. Petersen" , "James E.J. Bottomley" , Jonathan Corbet , "Rafael J. Wysocki" Cc: bvanassche@acm.org, john.g.garry@oracle.com, mlombard@redhat.com, loberman@redhat.com, mclapinski@google.com, dmatlack@google.com, driver-core@lists.linux.dev, linux-pci@vger.kernel.org, Pasha Tatashin , jordanrichards@google.com, souravsgl@google.com, stuart.w.hayes@gmail.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, emilne@redhat.com, jmeneghi@redhat.com, linux-scsi@vger.kernel.org, David Jeffery Content-Type: text/plain; charset="UTF-8" From: David Jeffery Like its async suspend support, allow PCI device shutdown to be performed asynchronously to reduce shutdown time. Signed-off-by: David Jeffery Signed-off-by: Stuart Hayes Tested-by: Laurence Oberman Reviewed-by: Martin K. Petersen Reviewed-by: Pasha Tatashin Reviewed-by: Bjorn Helgaas --- drivers/pci/probe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index dd0abbc63e18..af2381446406 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1046,6 +1046,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) bus->bridge = get_device(&bridge->dev); device_enable_async_suspend(bus->bridge); + dev_set_async_shutdown(bus->bridge); pci_set_bus_of_node(bus); pci_set_bus_msi_domain(bus); if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev) && @@ -2748,6 +2749,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) pci_reassigndev_resource_alignment(dev); pci_init_capabilities(dev); + dev_set_async_shutdown(&dev->dev); /* * Add the device to our list of discovered devices -- 2.55.0.229.g6434b31f56-goog