From patchwork Mon Apr 15 13:59:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Fomichev X-Patchwork-Id: 10900873 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B9E1922 for ; Mon, 15 Apr 2019 13:59:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34CAA288B9 for ; Mon, 15 Apr 2019 13:59:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2913228956; Mon, 15 Apr 2019 13:59:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBEF4288BA for ; Mon, 15 Apr 2019 13:59:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726696AbfDON7I (ORCPT ); Mon, 15 Apr 2019 09:59:08 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40441 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbfDON7I (ORCPT ); Mon, 15 Apr 2019 09:59:08 -0400 Received: by mail-lj1-f195.google.com with SMTP id q66so660690ljq.7 for ; Mon, 15 Apr 2019 06:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=Q4ugAoDO17MT2mmfTySVpH5yxtA1dZ4+ttIrvtNTygo=; b=OuEkJW31C8uY8Z8dDq7rm4QTKgV0lf+0/JJSWB/L4LOI7lBCSCvRZxAmmziDso/0dU nDyzm/FiZne/btHqzc9YNMaE3qWdW91ZTXB0E5STqQqxyfHiHcl70MpmC+ceHB+fDm9n tGAhKS1NjeRKXAIgtsJiQumS2ZfALZzzgyfF8nlVoQIM/bp7vVmbcsHbpwRTd5IhPTFo FS+Dcb/MM1yMxDN34aUoTybRW34z67gHhhwrp+wP8cSLXMitTMFBbkVNqlvcLrQ1by9Z 3SULrhjJ0mGUTFyIA1OcuGwyj7vePFDBpu+FrTJWP6dN7FWJ+TJr7pnU27Y4w8vmDbez 7L5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=Q4ugAoDO17MT2mmfTySVpH5yxtA1dZ4+ttIrvtNTygo=; b=pV410VErzn1H3CF0sum9avU9EattwE8GTslADPxwc6GwwNs7W+jXk7FRz30UyrC0cH tTnD0T2Xj6NeqTpFwG3RD8/vI/kGsn6xxv1ujur2EXFJ7y5SOPnQ6Vwcnvxfz+yNBg+P fuHU5BJetSTnN3sQG7ZOoM8abhrcBOLzSsqKn/2HPM1ma4mIQgjI4moaMGwO+rDRRUYI G2I4K3S8gyj2XUuLssvco5tMBWtqWE/+gPHQyZIkBWz/H+WTEpnoZ9yof3PpHsj76eVi eyChtuu6mC0WE06b0zPbfpK1btpzR6OnHH6YxCaWDE5z5zMP/hQYNlZLQq4/qzEOMTDF 4OmQ== X-Gm-Message-State: APjAAAUGfG0nIGVI2Utg768RIaumYOm8BozxL3bIkLEQr6bSdUp5nEX0 6xaY506lp0F07Kqmp/PlKlyUUjDpQgOXmPLz X-Google-Smtp-Source: APXvYqwHlXmzeQgJHtdyMK2KdGoW7MrPXZuIGcbFNJshcwnhZmWqsJs7+nsPKz67uIKEkNJqHmdMDg== X-Received: by 2002:a2e:9585:: with SMTP id w5mr1781647ljh.132.1555336745708; Mon, 15 Apr 2019 06:59:05 -0700 (PDT) Received: from localhost ([89.207.88.249]) by smtp.gmail.com with ESMTPSA id n12sm2961779lfk.60.2019.04.15.06.59.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Apr 2019 06:59:04 -0700 (PDT) Date: Mon, 15 Apr 2019 16:59:03 +0300 From: Alexander Fomichev To: linux-pci@vger.kernel.org Cc: Bjorn Helgaas , linux@yadro.com Subject: [PATCH RESEND] PCI: disable runtime PM for PLX switches Message-ID: <20190415135903.wiyw34faiezdnbbs@yadro.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20180716 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PLX switches have an issue that their internal registers become inaccessible when runtime PM is enabled. Therefore PLX service tools can't communicate with the hardware. A kernel option "pcie_port_pm=off" can be used as a workaround. But it affects all the devices. So this solution is to add PLX switch devices to the quirk list for disabling runtime PM only for them. --- drivers/pci/quirks.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index a59ad09..8ea99aa 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2923,6 +2923,17 @@ static void quirk_hotplug_bridge(struct pci_dev *dev) dev->is_hotplug_bridge = 1; } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge); +/* + * Disable runtime PM for PLX Draco (1,2), Capella (1,2) series PCIe switches + * to prevent service tools from failing to access hardware registers. + */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x8712, quirk_hotplug_bridge); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x8733, quirk_hotplug_bridge); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x8734, quirk_hotplug_bridge); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x8780, quirk_hotplug_bridge); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x8796, quirk_hotplug_bridge); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x9781, quirk_hotplug_bridge); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PLX, 0x9797, quirk_hotplug_bridge); /* * This is a quirk for the Ricoh MMC controller found as a part of some