Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4135953ybg; Fri, 25 Oct 2019 13:54:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz4/b834TUWsLEbvWTM5oHb4Tqz+rHKSrjAC2Bn7hs20Q1dCvuBM6msVy9ZbW0juz/cN3h X-Received: by 2002:a17:906:6ad7:: with SMTP id q23mr5267894ejs.214.1572036893098; Fri, 25 Oct 2019 13:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572036893; cv=none; d=google.com; s=arc-20160816; b=DHRMHRFKERqU0WpVBr+3dNo+XiW4amlhfdFnsyDQT9LGLvkS9qQ9SHJ7AUJHaOGueO DnX6m4ySSP1aDVRHoHbQiQdCclOIAqmqnCIIpSdg5SzkauTBgXsua5lg3GujcUvZT9+F vwcPEqeJhrmraE/N9ZVAroDtNOkXg6Z4YsO929YGlsixRrqtUjItzsx0Fmi2P3uXmDoo 1ITUMzoCulw8kgwRNdjP1HiUCgPodwB5y0XirQkOw1GVDs4AUzHv+cHL0oemaBAc9hFk pgwQ1kntiBEUk2YGRPaV4ZZdq8wpfSX/EUmisFFFi5VlUaEYq3vxAFr6rUbjK5F04Mj3 h9rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Uru6k+OjlYmJbujCOonx7cGAPN2UZ1Lm9GwnmdSDJb0=; b=QlHqjjDpB9y6y9uQojCUqdxxIaFXRycOvpK8DaJwq9m2eGx1T87Hc2xRYNKqc5F7cz nmfGRKuuIuDMrbsfqzw40yCVm38TVbvbr7RSHsuqyH8/JZqLR8fF0fKwSF+cno7yp5+C 61NfbFiK49LANyDtj0tZ0nCG29q6s5szh4T0x8syG9Wefqa8WvQWxg+402LsL1caakno xkKbw86LHANQFJld+LQzQah34X39CIfYXuFQIobjmJfSEA0fHnN4hsT4iCi0rmRycXgz mcfn9kgbciMfjmO5eskZY2RA5FEwL+ziimSXLF00FGbggZ4fcDPIF24d++TDWVezahAV Zlkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sMlwueiV; 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 e58si2248211eda.7.2019.10.25.13.54.29; Fri, 25 Oct 2019 13:54:53 -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=sMlwueiV; 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 S1726911AbfJYTSS (ORCPT + 99 others); Fri, 25 Oct 2019 15:18:18 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46491 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbfJYTSS (ORCPT ); Fri, 25 Oct 2019 15:18:18 -0400 Received: by mail-pf1-f196.google.com with SMTP id b25so2195165pfi.13; Fri, 25 Oct 2019 12:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Uru6k+OjlYmJbujCOonx7cGAPN2UZ1Lm9GwnmdSDJb0=; b=sMlwueiVMLIsHjaW604qfRIhcVkLKqoksBZrT1/1eqfUwOBtPsJXeSz3d3Xav0bCMM XC09KT0L3EfOA688bHzDcBPBU8X2NhYkut67KskS+Qn5RWj+dxcBV5QOiVQQdg3hWkhC uoKFEpr+4EoS+cEXQ1fn/ZOiSD3npr6x0pH+YPpyZDoK56ZU2IhETACFy/7FfzYCXSxd 3dJbxxL3kzG9XV5dpGZeYHJSnQ94x/DT9qjJjo7POoI2MUruQ4rcnNrsueTL80QQQ3gQ Xt5SlzJNA9LJSesy/Yoec4qHF+T28s8O6s/Vb9J4QINTli9FDvhLg2YN1mBXRo2XVswA 2PQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uru6k+OjlYmJbujCOonx7cGAPN2UZ1Lm9GwnmdSDJb0=; b=ZREzqcx0rMZIo4ZoAXLob5HF6IeLKcSwshtLDCrcF70Uzj8JR7vNJz0k9tAQ6ntOfI XHhgqBo1Ue86XoXrdObc7zJWQpVi39+4Rxefb1mJq027+dQPYrR6d6TbnuoAG4E5LBUJ 1Mq8bVH4zmmQRcIgueylD+eYN6ba3CtJ/p8qooQ7UOxobCLCE9leFXnVkMeelKv2RYS7 YGzkP5pEqQLG0TT7HFsyptAePkF/wgYR1GeozdG2QrwMG6mnVyW9+ppntxWIVFmk71Zq Uxui7t4oynZjeyM0ev30iI64dmztjEK0n9IaeaepnhDV+qznr50fOqJOAk3j9uyiSBPW E+qw== X-Gm-Message-State: APjAAAWAcQZzbIIJtlxJ6MKb1s5dY07dDEw0on3eMu7Z0zaQYVBwC7tl WDI2kiPH8qw7rk7dQ4KQtSkDz5JKBIIwZ5fqc5Q= X-Received: by 2002:a17:90a:f991:: with SMTP id cq17mr5758724pjb.30.1572031097244; Fri, 25 Oct 2019 12:18:17 -0700 (PDT) MIME-Version: 1.0 References: <20191025190047.38130-1-stuart.w.hayes@gmail.com> <20191025190047.38130-4-stuart.w.hayes@gmail.com> In-Reply-To: <20191025190047.38130-4-stuart.w.hayes@gmail.com> From: Andy Shevchenko Date: Fri, 25 Oct 2019 22:18:06 +0300 Message-ID: Subject: Re: [PATCH v4 3/3] PCI: pciehp: Add dmi table for in-band presence disabled To: Stuart Hayes Cc: Bjorn Helgaas , Austin Bolen , Keith Busch , Alexandru Gagniuc , "Rafael J . Wysocki" , Mika Westerberg , "Gustavo A . R . Silva" , Sinan Kaya , Oza Pawandeep , linux-pci@vger.kernel.org, Linux Kernel Mailing List , Lukas Wunner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 25, 2019 at 10:01 PM Stuart Hayes wrote: > > 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. > FWIW, Reviewed-by: Andy Shevchenko > Signed-off-by: Stuart Hayes > --- > v4 > add comment to dmi table > > drivers/pci/hotplug/pciehp_hpc.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c > index 02d95ab27a12..9541735bd0aa 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,24 @@ > #include "../pci.h" > #include "pciehp.h" > > +static const struct dmi_system_id inband_presence_disabled_dmi_table[] = { > + /* > + * Match all Dell systems, as some Dell systems have inband > + * presence disabled on NVMe slots (but don't support the bit to > + * report it). Setting inband presence disabled should have no > + * negative effect, except on broken hotplug slots that never > + * assert presence detect--and those will still work, they will > + * just have a bit of extra delay before being probed. > + */ > + { > + .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 +914,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 > -- With Best Regards, Andy Shevchenko