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=-7.0 required=3.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable 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 4936AC74A59 for ; Thu, 11 Jul 2019 14:56:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F7C421537 for ; Thu, 11 Jul 2019 14:56:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="OhIRWfBB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728995AbfGKO4b (ORCPT ); Thu, 11 Jul 2019 10:56:31 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:20350 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727612AbfGKO4a (ORCPT ); Thu, 11 Jul 2019 10:56:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1562856989; x=1594392989; h=from:to:cc:message-id:in-reply-to:references: mime-version:subject:resent-from:resent-cc:date: content-transfer-encoding; bh=BCr5Yc2wbFQgla5KsFED8zxIpe+V2ROGG18PCPvrJsk=; b=OhIRWfBB+Hc+A7r+pXnx0ceVcE2JfVstlHSBRyNYfhWJo1CqYfGIyrvG bv3/nUNY4JBqjJZ5Gk69wmAONSWN0iIOOodBOVKSyFAJJ18EGQzURDg97 frYpkQU56FBOxXNHdAOmKYFA/gy/kkQm/3IxkiE3jYeOPcYXJpd1Z65y7 8=; X-IronPort-AV: E=Sophos;i="5.62,478,1554768000"; d="scan'208";a="810658870" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2c-168cbb73.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 11 Jul 2019 14:56:29 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2c-168cbb73.us-west-2.amazon.com (Postfix) with ESMTPS id A1616A2296; Thu, 11 Jul 2019 14:56:28 +0000 (UTC) Received: from EX13D01UWB002.ant.amazon.com (10.43.161.136) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 11 Jul 2019 14:56:28 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13d01UWB002.ant.amazon.com (10.43.161.136) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 11 Jul 2019 14:56:27 +0000 Received: from u9ff250417f405e.ant.amazon.com (10.107.0.52) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 11 Jul 2019 14:56:26 +0000 Received: from EX13D13UWB002.ant.amazon.com (10.43.161.21) by EX13D13UWA001.ant.amazon.com (10.43.160.136) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Mailbox Transport; Wed, 10 Jul 2019 16:45:41 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D13UWB002.ant.amazon.com (10.43.161.21) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 10 Jul 2019 16:45:41 +0000 Received: from email-inbound-relay-2a-e7be2041.us-west-2.amazon.com (10.124.125.2) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 10 Jul 2019 16:45:40 +0000 Received: by email-inbound-relay-2a-e7be2041.us-west-2.amazon.com (Postfix) id 6B831A230D; Wed, 10 Jul 2019 16:45:40 +0000 (UTC) Received: from u9ff250417f405e.ant.amazon.com (pdx2-ws-svc-lb17-vlan3.amazon.com [10.247.140.70]) by email-inbound-relay-2a-e7be2041.us-west-2.amazon.com (Postfix) with ESMTPS id 9F401A216A; Wed, 10 Jul 2019 16:45:39 +0000 (UTC) Received: from u9ff250417f405e.ant.amazon.com (localhost [127.0.0.1]) by u9ff250417f405e.ant.amazon.com (8.15.2/8.15.2/Debian-10) with ESMTP id x6AGjZGT021662; Wed, 10 Jul 2019 19:45:35 +0300 Received: (from jonnyc@localhost) by u9ff250417f405e.ant.amazon.com (8.15.2/8.15.2/Submit) id x6AGjYKu021629; Wed, 10 Jul 2019 19:45:34 +0300 From: Jonathan Chocron To: , , , , , CC: , , , , , , , , , , , Message-ID: <20190710164519.17883-5-jonnyc@amazon.com> In-Reply-To: <20190710164519.17883-1-jonnyc@amazon.com> References: <20190710164519.17883-1-jonnyc@amazon.com> Content-Type: text/plain MIME-Version: 1.0 Subject: [PATCH 4/8] PCI: Add quirk to disable MSI support for Amazon's Annapurna Labs host bridge Date: Thu, 11 Jul 2019 17:56:25 +0300 X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some platforms, the host bridge exposes an MSI-X capability but doesn't actually support it. This causes a crash during initialization by the pcieport driver, since it tries to configure the MSI-X capability. Signed-off-by: Jonathan Chocron --- drivers/pci/quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 11850b030637..0fb70d755977 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2925,6 +2925,14 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, 0x10= a1, quirk_msi_intx_disable_qca_bug); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, 0xe091, quirk_msi_intx_disable_qca_bug); + +static void quirk_al_msi_disable(struct pci_dev *dev) +{ + dev->no_msi =3D 1; + dev_warn(&dev->dev, "Annapurna Labs pcie quirk - disabling MSI\n"); +} +DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, + PCI_CLASS_BRIDGE_PCI, 8, quirk_al_msi_disable); #endif /* CONFIG_PCI_MSI */ =20 /* --=20 2.17.1