Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp327519ybn; Tue, 1 Oct 2019 21:55:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZn3Mk5SLdKNOxMF/Jf5DhCYdTIrtHQsC9OnGs8N7d4XM9b1vvZqbFJm5tmayA77LmsIHE X-Received: by 2002:a50:baa5:: with SMTP id x34mr1876671ede.148.1569992139787; Tue, 01 Oct 2019 21:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569992139; cv=none; d=google.com; s=arc-20160816; b=DA8lZ7T88qar76OjuJzeLTNi0/oseu6t+B17dDwqP0eJYfG/2jEbndj7Ym6Bl7Haic dI/gYyrsF39SFycNOHwyVvbdH0NqNrZxhCAt8Njb3x7YF+bWFUjZ2L3EIcnojB+QB0uP zQum5ckIFO+cz0O7/JcjV2hjIVbRYgqI7NLe1OQ56UdsgD8XQe1QfblCZ2760lGJwVAW OJArrK7hfsll9toVV3ukrmS0VgPKfcpbIIjQVuVB1KBU9BX8wA4UPMN7GqkJhxFN8TkL CzIiEc2U4R5C/vvmqWHqbEVrb9CitE5vzlo+jDenEwZtgiWyWicJOVT9KQ6b9Q1fIYVC F8Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=UuDNbF2gV+LyjceU1ngZXA4KGi6dXJs2jlZxsWh+OEI=; b=XtKlOoffP3TORg+2Z4fhyQv8GeHRx+KYn0Yme7b5farERUrYFgTWFAuIP9gYGFE4L9 tspWeYUw9mVS00yTb4AIiTmJ49mCVkm1rKNK7dOkfHTW7dddT0fDeQ5qV9YSGjDweGz3 +TyUkWUatioiXrCCHSuyMhnpZxkSSH2lpk0GeWKaijkc3C/Obik1CBrCLONCdquUmA93 FydPPIj6VEEHK30l0gPZfMCo7j98EWkSJJ2Sc4yu0TFN11W2pcF1b/8Jz3BPX8v29wZv njzCVOpl6/vuztkFu0p4vnFtzQDsyzGGWaFQ0r3l9Iqw4Wz2sHvGCevQfuXVyWxhwZzI 1W1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hUhiEEan; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21si6785596ejd.118.2019.10.01.21.55.15; Tue, 01 Oct 2019 21:55:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hUhiEEan; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbfJAVOp (ORCPT + 99 others); Tue, 1 Oct 2019 17:14:45 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:44013 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727605AbfJAVOm (ORCPT ); Tue, 1 Oct 2019 17:14:42 -0400 Received: by mail-oi1-f195.google.com with SMTP id t84so15763461oih.10; Tue, 01 Oct 2019 14:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UuDNbF2gV+LyjceU1ngZXA4KGi6dXJs2jlZxsWh+OEI=; b=hUhiEEan53w6H4qCylahOlh68Y/6FTlzXiyUXL38GW2ImrNRlt85H5bsyoTypqcFPC tZoV2eLEzT5JhF0LGucRd2IB7gyXRisY89ojgTvPKvaVVd5NY0QLu4LPjZmyT2g4blkX JXcVsQD0R6XFLo0mHao90lPSTX8KBhb43JjPTeEi5bayheyYk03d13q+Mog4XbH1bZEe /Pf7ipEzL0V9wzJ3gTkEZyEW9F6VxEm3wahswlsBHctZh9Z/b4OhSe7FmqnnRoCzxKH7 2gOdo5HsFIcYpX/SJWkXLJTQDsUqHPu1c5o9bsRyfGiAugfuuQ3/4Ly4JTC1Qwa3P2t9 maMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UuDNbF2gV+LyjceU1ngZXA4KGi6dXJs2jlZxsWh+OEI=; b=Xigc6/xmRMDT4PdfvQ8Q/6ZPOIopZrx55gfG/xWpwwuZAXex3wTdYmJwvNWOumeIqM 5eQzLBz526tHx2qXWbGJOVgkHndbgfjUJHLuYzUpNZlV6c7PQxa6F6JoMFI5ogxeIJ2v fl6f4AdTVYOyy3CYTe2aN1wBUOAapO7c0GCRYPSz9dnKI2flny0k+A4jnpM4IRfbmPx1 TZwuyvKLNHh6q2RFqyv/smN4Cq/aLsfzjMnndimt68DTfPvXfoieJJTVCLREF0mnC25w ThfqZRaF5r6yEkqD3YyDAEULy4b2w2sGII6mvhESHHyGppTSeZq4NdPbw5O/Sn/6XM2G 7Q4w== X-Gm-Message-State: APjAAAWM4lmqFyc9hK2w/TvTxOrndOEmL5qlONXUB0ee0QHHwBG/cuon F58VPIvMNfSjBRhTLEd/qUU= X-Received: by 2002:aca:538a:: with SMTP id h132mr58946oib.66.1569964481652; Tue, 01 Oct 2019 14:14:41 -0700 (PDT) Received: from localhost.localdomain ([143.166.81.254]) by smtp.gmail.com with ESMTPSA id o23sm5220073ote.67.2019.10.01.14.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 14:14:41 -0700 (PDT) From: Stuart Hayes To: Bjorn Helgaas Cc: Austin Bolen , keith.busch@intel.com, Alexandru Gagniuc , "Rafael J . Wysocki" , Mika Westerberg , Andy Shevchenko , "Gustavo A . R . Silva" , Sinan Kaya , Oza Pawandeep , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, Stuart Hayes Subject: [PATCH 3/3] PCI: pciehp: Add dmi table for in-band presence disabled Date: Tue, 1 Oct 2019 17:14:19 -0400 Message-Id: <20191001211419.11245-4-stuart.w.hayes@gmail.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20191001211419.11245-1-stuart.w.hayes@gmail.com> References: <20191001211419.11245-1-stuart.w.hayes@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some systems have in-band presence detection disabled for hot-plug PCI slots, but do not report this in the slot capabilities 2 (SLTCAP2) register. On these systems, presence detect can become active well after the link is reported to be active, which can cause the slots to be disabled after a device is connected. Add a dmi table to flag these systems as having in-band presence disabled. Signed-off-by: Stuart Hayes --- drivers/pci/hotplug/pciehp_hpc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 1282641c6458..1dd01e752587 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -14,6 +14,7 @@ #define dev_fmt(fmt) "pciehp: " fmt +#include #include #include #include @@ -26,6 +27,16 @@ #include "../pci.h" #include "pciehp.h" +static const struct dmi_system_id inband_presence_disabled_dmi_table[] = { + { + .ident = "Dell System", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + }, + }, + {} +}; + static inline struct pci_dev *ctrl_dev(struct controller *ctrl) { return ctrl->pcie->port; @@ -898,6 +909,9 @@ struct controller *pcie_init(struct pcie_device *dev) ctrl->inband_presence_disabled = 1; } + if (dmi_first_match(inband_presence_disabled_dmi_table)) + ctrl->inband_presence_disabled = 1; + /* * If empty slot's power status is on, turn power off. The IRQ isn't * requested yet, so avoid triggering a notification with this command. -- 2.18.1