Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5008951rdb; Tue, 12 Dec 2023 16:36:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhsWjmdBsMSFP/aJSx90stII932WfYz8e2GaRVREVRJ0uIfoULBdXDR9znZA89fC6JDmcq X-Received: by 2002:a17:902:ab83:b0:1d0:6ffd:e2ef with SMTP id f3-20020a170902ab8300b001d06ffde2efmr6829422plr.137.1702427815323; Tue, 12 Dec 2023 16:36:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702427815; cv=none; d=google.com; s=arc-20160816; b=DTPLsDe4YBpd+ehZSLfCPTTBHL7+PI7kAFVcd2YyBuoioBHyC85kkPQXnXNbEaxPHR vIlsVB0LH2mGL/3wiUs0DU2gpQd6hzAGvRKoUBo3ePqJeb+nyAvcxrRWaGSkZu5mYOvS cbU5y8k1dX+zWxeW5WJfi4ONY8uv2azh7HKPGOIQaA9y4IQ0GaInSAme2rjGgWEorJzm hTH7hizQZAPbe+VC1hUmAHbOTDI7xUj9ubnMGzfVoGrGg69y0Y3Nb/BY6JK/MMiXy4B/ wqMGqv+TJertaAsNInzof29VUyIJ1K4sK4yX5berGuNbNPMcIXuv21RHCSnhJRp7wpYH vSug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RJN1x0PpbDfzaXjRksok/XhqhYBzo5gWu/iFT+Gwn1A=; fh=TXeuV5/wcpXTj7sVtU8LbAE1OfyC4N1uBVOdDk4O9CI=; b=lZ4uovkd8nFy01vrjawuc3CNg8DaWwmn9lKnwNIJ9E8389N3WWUckAGh6l3ZuyPGLb Qjbe0Eru8mcSBVhV94wvFnQPRN2mA10tirjC/m4hsH7abWSTdYBVk+D9PRQroCb+poGO AnfGKQEbr8a2O+Sb8Wu+pUhE9JDvPOC3wrLrzyZLXAoKMQ3a4ntuRMUt6yTOYZ96853J +D/2Usj6JQKxHBiznx8glUUyx4W+FXDDFsR1/V3WCaD3hOOpYH1u4SpsZQjilRTDYLUU vSGNIizYdbZYm0lBzqPaAzb2uWjG2etlZeZ1dor2WmWfxjjKSO+e7YPaGw+1OFaVqtRg XqcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Jok+/0PS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id z17-20020a170903019100b001d0ab464f3bsi8732181plg.345.2023.12.12.16.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 16:36:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Jok+/0PS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D30A68048F0F; Tue, 12 Dec 2023 16:36:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377887AbjLMAg0 (ORCPT + 99 others); Tue, 12 Dec 2023 19:36:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377847AbjLMAgY (ORCPT ); Tue, 12 Dec 2023 19:36:24 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8091FD2 for ; Tue, 12 Dec 2023 16:36:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702427788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJN1x0PpbDfzaXjRksok/XhqhYBzo5gWu/iFT+Gwn1A=; b=Jok+/0PSXJCzqyfOFTLnQE82MrZtzYpPcJFZVKdKE6Zn08+tMKFeVj4zq0NmlnxCk+fUu3 cOY2qGBiY4p1R8pMIUjYOLkA6ldiSwdU9i9sRZljD8quc25IMaC8qxGn9DWaJJtD8Kg3ip gxywIrTMG37wWVSXuvwHu5rgdRr+zcQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-330-Beyvy5vgNBWaG3HruKRyLg-1; Tue, 12 Dec 2023 19:36:21 -0500 X-MC-Unique: Beyvy5vgNBWaG3HruKRyLg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A17D0185A782; Wed, 13 Dec 2023 00:36:18 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq2.redhat.com (dell-r430-03.lab.eng.brq2.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7BBFE1121306; Wed, 13 Dec 2023 00:36:16 +0000 (UTC) From: Igor Mammedov To: linux-kernel@vger.kernel.org Cc: Dongli Zhang , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, imammedo@redhat.com, mst@redhat.com, rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com, mika.westerberg@linux.intel.com, boris.ostrovsky@oracle.com, joe.jin@oracle.com, stable@vger.kernel.org, Fiona Ebner , Thomas Lamprecht Subject: [RFC 0/2] PCI: acpiphp: workaround race between hotplug and SCSI_SCAN_ASYNC job Date: Wed, 13 Dec 2023 01:36:12 +0100 Message-Id: <20231213003614.1648343-1-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 16:36:53 -0800 (PST) Hacks to mask a race between HBA scan job and bridge re-configuration(s) during hotplug. I don't like it a bit but it something that could be done quickly and solves problems that were reported. Other options to discuss/possibly more invasive: 1: make sure pci_assign_unassigned_bridge_resources() doesn't reconfigure bridge if it's not necessary. 2. make SCSI_SCAN_ASYNC job wait till hotplug is finished for all slots on the bridge or somehow restart the job if it fails 3. any other ideas? 1st reported: https://lore.kernel.org/r/9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com CC: Dongli Zhang CC: linux-acpi@vger.kernel.org CC: linux-pci@vger.kernel.org CC: imammedo@redhat.com CC: mst@redhat.com CC: rafael@kernel.org CC: lenb@kernel.org CC: bhelgaas@google.com CC: mika.westerberg@linux.intel.com CC: boris.ostrovsky@oracle.com CC: joe.jin@oracle.com CC: stable@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: Fiona Ebner CC: Thomas Lamprecht Igor Mammedov (2): PCI: acpiphp: enable slot only if it hasn't been enabled already PCI: acpiphp: slowdown hotplug if hotplugging multiple devices at a time drivers/pci/hotplug/acpiphp_glue.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.39.3