From patchwork Tue Jul 11 15:25:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9834967 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.web.codeaurora.org (Postfix) with ESMTP id 8A5BA60393 for ; Tue, 11 Jul 2017 15:25:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BAD227FB7 for ; Tue, 11 Jul 2017 15:25:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F9652821F; Tue, 11 Jul 2017 15:25:44 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 132D5283DA for ; Tue, 11 Jul 2017 15:25:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933065AbdGKPZm (ORCPT ); Tue, 11 Jul 2017 11:25:42 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55320 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932456AbdGKPZl (ORCPT ); Tue, 11 Jul 2017 11:25:41 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B65D1611BD; Tue, 11 Jul 2017 15:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1499786740; bh=C5DB1qkFEXNSAC6DhlTdzYAjQB8jeuIj9uuhoFDLdNQ=; h=From:To:Cc:Subject:Date:From; b=cc8kgNSCJuqTs6pNN6PGFgtJl9XvtTfJxipfmK9ps/32hsr8VMWnMvdYwORtfg9gN a/iiagHE8DuuDwsm5/ke3Hwy/+ikQFaoeBX0YV2HymJ6P7Jc2MpDyM4hQWw7zxPbYR N76vEAfGnLoASU4Tq6uYieNYuQp94NseoUC3lNqI= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3F1BA611BD; Tue, 11 Jul 2017 15:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1499786740; bh=C5DB1qkFEXNSAC6DhlTdzYAjQB8jeuIj9uuhoFDLdNQ=; h=From:To:Cc:Subject:Date:From; b=cc8kgNSCJuqTs6pNN6PGFgtJl9XvtTfJxipfmK9ps/32hsr8VMWnMvdYwORtfg9gN a/iiagHE8DuuDwsm5/ke3Hwy/+ikQFaoeBX0YV2HymJ6P7Jc2MpDyM4hQWw7zxPbYR N76vEAfGnLoASU4Tq6uYieNYuQp94NseoUC3lNqI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3F1BA611BD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org, wim.ten.have@oracle.com Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Bjorn Helgaas , linux-kernel@vger.kernel.org Subject: [PATCH V3 1/2] PCI: Add Extended Tags quirk for Broadcom HT2100 Root Port Date: Tue, 11 Jul 2017 11:25:33 -0400 Message-Id: <1499786735-25782-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.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 All PCIe devices are expected to be able to handle 8-bit tags. 'commit 60db3a4d8cc9 ("PCI: Enable PCIe Extended Tags if supported")' enabled extended tags for all devices based on the spec direction. The Broadcom HT2100 seems to be having issues with handling 8-bit tags. Mark it as broken. Reported-by: Wim ten Have Link: https://bugzilla.redhat.com/show_bug.cgi?id=1467674 Fixes: 60db3a4d8cc9 ("PCI: Enable PCIe Extended Tags if supported") Signed-off-by: Sinan Kaya --- drivers/pci/quirks.c | 12 ++++++++++++ include/linux/pci.h | 1 + 2 files changed, 13 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 085fb78..073d5dd 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4664,3 +4664,15 @@ static void quirk_intel_no_flr(struct pci_dev *dev) } DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_no_flr); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_no_flr); + +static void quirk_exttags_completer(struct pci_dev *pdev) +{ + /* This device cannot handle 256 tags as a completer */ + pdev->broken_exttags_completer = 1; +} +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0140, + quirk_exttags_completer); +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0142, + quirk_exttags_completer); +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0144, + quirk_exttags_completer); diff --git a/include/linux/pci.h b/include/linux/pci.h index 8039f9f..0b9f42d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -376,6 +376,7 @@ struct pci_dev { unsigned int irq_managed:1; unsigned int has_secondary_link:1; unsigned int non_compliant_bars:1; /* broken BARs; ignore them */ + unsigned int broken_exttags_completer:1; pci_dev_flags_t dev_flags; atomic_t enable_cnt; /* pci_enable_device has been called */