From patchwork Tue Aug 14 23:48:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 10566183 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 2827E13B4 for ; Tue, 14 Aug 2018 23:49:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 177A42A28D for ; Tue, 14 Aug 2018 23:49:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08F232A27E; Tue, 14 Aug 2018 23:49:05 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 91EA82A27E for ; Tue, 14 Aug 2018 23:49:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728002AbeHOCig (ORCPT ); Tue, 14 Aug 2018 22:38:36 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:44132 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbeHOCig (ORCPT ); Tue, 14 Aug 2018 22:38:36 -0400 Received: by mail-qk0-f194.google.com with SMTP id v17-v6so14650626qkb.11 for ; Tue, 14 Aug 2018 16:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=GBZS6KUNKZNG8TyGLTM5sEbcR+BkEjmqN8ZUfGtdbHI=; b=DuiVtmQM9BCd+w5MCCZuW8lKxw7CGYLpkicHc9qdNZcbn2ZVRDDfdisfqLR1KF+yPH VeOskD0k15m3JbpGx/Xsyx9WgZ0H3znKGB74jpH/Ou7tirdOFFEiR+ptC9JVP2q3IJ5h Ax3YAsrzQTtO5+fMsbOZFecBBiCBeSOBdBhfSr0bUa10dguTh1cd4E/ATQ/Xxcvd2oQ4 gbokzyLb8a6cLwhjUsr4wAImO+fZllPfoMYscbizU2o5bAIx4czlCdyVXgv3Fr1JVRn6 U++8tEtsVP0wXzR0Luk3qTkjWoZCkzistR3FhoavezFYN06aWxOe5Mmh92dk6qixz7hn QNSA== 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=GBZS6KUNKZNG8TyGLTM5sEbcR+BkEjmqN8ZUfGtdbHI=; b=Shyean06AHM1aWRyg9jJh6eatFbPubbTmSiTWV5AhEdBfmI8N5qIujsDch75zAr7A6 A22L/nTAAUYYBbonQd+rkO5GLfse8B2ENF2LsnOIYRi92ItfrG5w86YHf6c7MmoRVTBV wUCsvPqA4iMeh2UHAxMq3Ocie7iLoMgkmxQ3bcteOydwDBXE9Gxo5mo1HtOhGkj4fJcE FbERK/oTDZ6ymKWRo8V5ROPZE+u8aaRiwDS9xHa0qJILP1IN1CRVpl9X1Yh1jZzGtg8Q 6JntUONcxxNepqP24LiVNbZHcPcNhmNyQ9DCciSwvO7Rm26CygalOVPx18O6z7pRiJKL oMOg== X-Gm-Message-State: AOUpUlERRD+ihtOwvb0GcaFNjf1bMrv8NfpEsSfpUe18RtZjtCM3xYQX 29GgbB4Onh3YTDaeD2Q9Kgyf1Q== X-Google-Smtp-Source: AA+uWPzzIi4GWgbOR6K9HYMdU2Ol+t3kUp8YsB6xn6+mKhXwIBmfvsrzPKQvw9ExWpaQnNAhv+CP/w== X-Received: by 2002:a37:c204:: with SMTP id i4-v6mr21578720qkm.438.1534290542235; Tue, 14 Aug 2018 16:49:02 -0700 (PDT) Received: from jkicinski-Precision-T1700.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id k38-v6sm14059554qtc.45.2018.08.14.16.49.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Aug 2018 16:49:01 -0700 (PDT) From: Jakub Kicinski To: Bjorn Helgaas Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, oss-drivers@netronome.com, Jakub Kicinski Subject: [PATCH] PCI: limit config space size for Netronome NFP5000 Date: Tue, 14 Aug 2018 16:48:50 -0700 Message-Id: <20180814234850.27447-1-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.17.1 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 Like the NFP4000 and NFP6000, the NFP5000 as an erratum where reading/ writing to PCI config space addresses above 0x600 can cause the NFP to generate PCIe completion timeouts. Limit the NFP5000's PF's config space size to 0x600 bytes as is already done for the NFP4000 and NFP6000. The NFP5000's VF is 0x6003 (PCI_DEVICE_ID_NETRONOME_NFP6000_VF), the same device ID as the NFP6000's VF. Thus, its config space is already limited by the existing use of quirk_nfp6000(). Signed-off-by: Jakub Kicinski Reviewed-by: Tony Egan --- drivers/pci/quirks.c | 1 + include/linux/pci_ids.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f439de848658..bf899184d07c 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -460,6 +460,7 @@ static void quirk_nfp6000(struct pci_dev *dev) } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP4000, quirk_nfp6000); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP6000, quirk_nfp6000); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP5000, quirk_nfp6000); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP6000_VF, quirk_nfp6000); /* On IBM Crocodile ipr SAS adapters, expand BAR to system page size */ diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 29502238e510..381fc009551d 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2541,6 +2541,7 @@ #define PCI_DEVICE_ID_NETRONOME_NFP3200 0x3200 #define PCI_DEVICE_ID_NETRONOME_NFP3240 0x3240 #define PCI_DEVICE_ID_NETRONOME_NFP4000 0x4000 +#define PCI_DEVICE_ID_NETRONOME_NFP5000 0x5000 #define PCI_DEVICE_ID_NETRONOME_NFP6000 0x6000 #define PCI_DEVICE_ID_NETRONOME_NFP6000_VF 0x6003