From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6162ECE58D for ; Wed, 9 Oct 2019 20:05:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CCD9206B6 for ; Wed, 9 Oct 2019 20:05:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uK7w/WSr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731193AbfJIUFc (ORCPT ); Wed, 9 Oct 2019 16:05:32 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46557 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728804AbfJIUFc (ORCPT ); Wed, 9 Oct 2019 16:05:32 -0400 Received: by mail-ot1-f65.google.com with SMTP id 89so2808900oth.13; Wed, 09 Oct 2019 13:05:31 -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; bh=VJ6+GJRwt7B8QIB95Qkr/6HpC/9offIDxz70B65cdOw=; b=uK7w/WSrVBWqomR/LSIN609I7J7qD6S7Km8ILac0Aq/rIxOGsUVrcmzLjlwixAjahA 1/kg6qlNoEeBlzKRbWq1CoINxQOg1LnBXupGCRCJAqY+FfpfWrHdQVrMTP1P0ht16eUV FMmWf8OwLPq8yLxCABj0yHZ43xxVBw7Gudc+jiIUoDbfuBX6FJtAdYU5vbXaWyw5H09+ IN5dY/83u2vfUCZunYrbzqYlijlEwVFqZw/esA+IEJdvNcbJzBvfY9LwnBk3akQAm028 XjxQ3fqdzKiRi7Twi5h0TTUR0PrfvjnHMktdWdOMDrTNEW+u9MVTlaBP8zlKkjMdMxiA 4HSA== 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; bh=VJ6+GJRwt7B8QIB95Qkr/6HpC/9offIDxz70B65cdOw=; b=N4l8l/yP0/qU5tAZT+uGL9UHQCU+mlBxeKH8JmpcJkX+fsiBJDVwkHF5stB5Xa6k29 BKswQ0wPc/zpzJ/MP1qseptF4PhYs9RO//LgwM/JIqW9fBZy0wxYIMCPa2wFBIm7UApV DlRkuzA4JbxBlGz9Ph74myAko0yARGmuvdGUcLx6VPbaHDRWoahXjYk0wt8GwvvZJWZp /ReGkLFw0SfIkEJU7GCGD31IFVqQIUhedoSvQcxh+yiCipAnpHlhzvnbHhGSzngi/oNr MbeVU+4np7wXbAX8ITVhK/C90b3PCQ05GZTYsfTRXqjgXOcDayvdIqB10ZnFWnwRQaXU 1a9w== X-Gm-Message-State: APjAAAU0XbpQ18QhefCW5+kicQo5YcY5VDQk5EaDYq28YZlSSdSfyalk WudgQCjmtOGhJHlwwI9HgEI= X-Google-Smtp-Source: APXvYqzXjE1T9bjPweSrdrFrNEroWM2NPJm/mFEDlRApVsqKmuJpT6OAGNDKz/jge2tDwcl6//62ag== X-Received: by 2002:a9d:77d4:: with SMTP id w20mr4547780otl.148.1570651530976; Wed, 09 Oct 2019 13:05:30 -0700 (PDT) Received: from localhost.localdomain ([143.166.81.254]) by smtp.gmail.com with ESMTPSA id b5sm976883oia.20.2019.10.09.13.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 13:05:30 -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 0/3] PCI: pciehp: Do not turn off slot if presence comes up after link Date: Wed, 9 Oct 2019 16:05:20 -0400 Message-Id: <20191009200523.8436-1-stuart.w.hayes@gmail.com> X-Mailer: git-send-email 2.18.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In older PCIe specs, PDS (presence detect) would come up when the "in-band" presence detect pin connected, and would be up before DLLLA (link active). In PCIe 4.0 (as an ECN) and in PCIe 5.0, there is a new bit to show if in-band presence detection can be disabled for the slot, and another bit that disables it--and a recommendation that it should be disabled if it can be. In addition, certain OEMs disable in-band presence detection without implementing these bits. This means it is possible to get a "card present" interrupt after the link is up and the driver is loaded. This causes an erroneous removal of the device driver, followed by an immediate re-probing. This patch set defines these new bits, uses them to disable in-band presence detection if it can be, waits for PDS to go up if in-band presence detection is disabled, and adds a DMI table that will let us know if we should assume in-band presence is disabled on a system. The first two patches in this set come from a patch set that was submitted but not accepted many months ago by Alexandru Gagniuc [1]. The first is unmodified, the second has the commit message and timeout modified. [1] https://patchwork.kernel.org/cover/10909167/ [v3,0/4] PCI: pciehp: Do not turn off slot if presence comes up after link Alexandru Gagniuc (2): PCI: pciehp: Add support for disabling in-band presence PCI: pciehp: Wait for PDS if in-band presence is disabled Stuart Hayes (1): PCI: pciehp: Add dmi table for in-band presence disabled drivers/pci/hotplug/pciehp.h | 1 + drivers/pci/hotplug/pciehp_hpc.c | 45 +++++++++++++++++++++++++++++++- include/uapi/linux/pci_regs.h | 2 ++ 3 files changed, 47 insertions(+), 1 deletion(-) -- 2.18.1