Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1288578ybg; Fri, 18 Oct 2019 15:16:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxww0SRvB7RQEF4nFWeKVTqAN7quLkSpcHB/VYOZM/jph18MNNCXOF2DgA/WYtEXSnNwJjT X-Received: by 2002:aa7:c24d:: with SMTP id y13mr12322239edo.186.1571437007578; Fri, 18 Oct 2019 15:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571437007; cv=none; d=google.com; s=arc-20160816; b=jXhzfAIXNs1gOFotEnj1UxdkY+Pwdy+0vYjqLIrA1E8u7wBjkQK3f8eLk8Kpwo6EMf PFTWGs9EMZCGmfFJcP4pA2k2gS4A1f7tAEHu1++4FFTHtM08EP7MS0okUPD3f9BmjfHQ TsdIw0mxV6nmuJTEu4wc8UJorQryD+TB6PDSUw+fdug+J/uxxYz8PcC7geAjWvDTvF21 M1f8oDFICBtoNy2l3Tejlk2Vt0DiZYVp7erbUQfZ1pr2zXXxpu11trXq3T8DuiQulrfj F2s9y5TbZLGYV/oL+580lsPaI0c5yQyHYyE6CvUtmgRb+EHITS3QDn5dscEuZzRBwjPh KpPQ== 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=/kc+SMypV+pC805s4yI+AQvbHp3a7EeT/I+X+XRBtGo=; b=qAp8LfDt8SvjkSvSi+E1JE8FFtW4Zj0B4pJE9N4+gVTlBK/7TTZKuaAKXfe3ybMmhY 0ywmFC8rwFyopnKJ+JFg9rOlzBr/fFgO80tA48e7RDaxGCzzHRq68dURfk7GqxEUj6qQ mlsVvAuYt16Bwf6WR4Fjkdo15mj1TI8Oh62w97c1QgmVIAQvy+nWc8wlYv2ktuLCiYob R7bSEfPI512hZREJAu1DGk3puj6pGtYFGUYfZdpLAWSxjUnrxngFrpjfYQvgyxXh78en c6enLIqmkrKlVZ4MV4qzHFZe4SoCTW62pLIg5EfWdkxb3nFT+Kp75QB9FiSpE6fPH2cT qzqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pAQ5G7XD; 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 l8si4133467ejc.404.2019.10.18.15.16.24; Fri, 18 Oct 2019 15:16:47 -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=pAQ5G7XD; 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 S2394338AbfJQTdQ (ORCPT + 99 others); Thu, 17 Oct 2019 15:33:16 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:40433 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436526AbfJQTdK (ORCPT ); Thu, 17 Oct 2019 15:33:10 -0400 Received: by mail-oi1-f196.google.com with SMTP id k9so3173687oib.7; Thu, 17 Oct 2019 12:33:08 -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=/kc+SMypV+pC805s4yI+AQvbHp3a7EeT/I+X+XRBtGo=; b=pAQ5G7XDzcnZ/mp1uMSL9Sa/CRRBV+JqURcKMNDrTCP1l6yAAaab6lNJ7P+3WNWwBT s9UT4QrGTI/fsMkySKe6ieUXUkMxMpL+88GxZEjvEUkuDYl6fSaM1bC+4UfSweWaCTRt /EEHjn7rmsSufZDEbjktWqnrHB4ERKbixYGH81upSwt7beq/kZVBRNE6KvzWWvYqkoeA ESUJOhDFBaJ4tnmUuabA6HVXFN2jgQv8BTBCKqimyXhF+k65avR0yL7UT9dFdKIiHdjF wa7VRxvcTEwHZUe1jVQxcj7NEn8dlAQEj2/WRCLSlaMkKiqSVEqSRzOaAqEGBbaZpHqB R0kA== 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=/kc+SMypV+pC805s4yI+AQvbHp3a7EeT/I+X+XRBtGo=; b=EEiHusxyjkxXQPIQm5AJV1/WX0/+jukSQ+MmAjQ4MHgvJVg3VuP7pV0ocF6nX7lSGO daCoDeXHmyIpy9DvCWoCMLPyapgYFv/GMhyk2d6YRir8/HE6C8/VDrSIGXCmNQsmyVFG Sj9BrA52pee/YV5fqKgUELIaDP7hsXBSIWVTp3ik/CQkM/RU520lEVHyYIG4tx4wRrJ0 zh58qxPwxFxdWCUsjnSfDEy1KElD6eJ+lj7j7jkc9hihTFS8oNQFBDF2jrSgeMJmO7oN XpSlHhFI4s3MWCKFlKIkV29qxmmoJtXmEPVRh3yZ3Xd1IYrkoniFXC9EjKrPrVD/FvNp DJFw== X-Gm-Message-State: APjAAAU7fuxZX+MK6LlIwxvPE01hc+axdui2bvBzhlijXeAuqW0xuVvl Zr40byohiGSH4RiIk00rpFo= X-Received: by 2002:aca:5d8a:: with SMTP id r132mr4480225oib.119.1571340788316; Thu, 17 Oct 2019 12:33:08 -0700 (PDT) Received: from localhost.localdomain ([143.166.81.254]) by smtp.gmail.com with ESMTPSA id z12sm823273oth.71.2019.10.17.12.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 12:33:07 -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 v3 3/3] PCI: pciehp: Add dmi table for in-band presence disabled Date: Thu, 17 Oct 2019 15:32:56 -0400 Message-Id: <20191017193256.3636-4-stuart.w.hayes@gmail.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20191017193256.3636-1-stuart.w.hayes@gmail.com> References: <20191017193256.3636-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 02eb811a014f..4d377a2a62ce 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_OEM_STRING, "Dell System"), + }, + }, + {} +}; + static inline struct pci_dev *ctrl_dev(struct controller *ctrl) { return ctrl->pcie->port; @@ -895,6 +906,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