Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp770100pxb; Tue, 5 Apr 2022 22:34:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv3RhXg/VEdm2udNiFJarynRlkzwaes8Q1sltZ2Sg09TAu9pTndFlqBXe4mt5+OWSqOLTH X-Received: by 2002:a17:90b:1a87:b0:1c7:3d66:8cb with SMTP id ng7-20020a17090b1a8700b001c73d6608cbmr8132418pjb.142.1649223288082; Tue, 05 Apr 2022 22:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649223288; cv=none; d=google.com; s=arc-20160816; b=n51dN73hIDsYuSZkdGCySrwjP9muIS0lMzugn34Z7dP05cMnBoZ/h0xb8KB3lD2uwz A3wQJZfcALaSOBKcIqvqVUyf3PFwfG+COgSOhPo7MNwTBFK6QISa9pLHNkw5jZx7El8A lqmHNvdB6Piml7ave/8YFKcvKNMiekkQA4YnIaflVGiP1CE2t35k+WsqXrWDD/hjFMSv Kz19ljPybVrO96QzegrYrB5oW+ohZZ7E4dsxPsyPFvFY+bekR7JMWqgX5/DxAo//p/AT Lnr0LiBdCWJeRwJCZ6UxspAruKnOpsl5mCM2ul+d7M+F2ZSsXxnGK2yvnwymkNd6mT6b nWtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NlZ5v/G5ppgxXLX9KDKEVYJw/SIpBjh2WI7aYPhYyMw=; b=CSAgg4z9tYgw/MJnmXEszjruhOoqlZxqHTVZ0JKzQfiEUpheX8M++ARn4w+2sGlJ8T 5WcKWcLl5LGWT1p/PYw2p5d4jHneg5LMza8zksXWhCmiIC+TPu5wVcA4ujK9DvAr3ubh v0Y66IXCKN39YzD8UV1JhX2uK/VUayBIQ6ygWQhK1oVkypJzCWPf2TrpxlsRy62E7Bo/ XB34oROOkt/NUGSLypWovA1sJ1fclI5gZErYZ7DRN7SYAGkebP7dMQxGInASxGv03g+P hjPo6CzpsGTq15K12NoJUqzZpuQeP7sA3BwUISYfNvvn+2nRhm4YtGd8bUj8RVFPNML0 Dm6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=d3qnT3qQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bm14-20020a656e8e000000b0039abdececf5si1914970pgb.871.2022.04.05.22.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=d3qnT3qQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1A9F3C8C36; Tue, 5 Apr 2022 21:19:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1838162AbiDFAu3 (ORCPT + 99 others); Tue, 5 Apr 2022 20:50:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349348AbiDEJtl (ORCPT ); Tue, 5 Apr 2022 05:49:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C2A7645F; Tue, 5 Apr 2022 02:44:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 14A396164D; Tue, 5 Apr 2022 09:44:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CE36C385A2; Tue, 5 Apr 2022 09:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151859; bh=IUboqo4iJ3n7otCQXs7prFXc0z51J73FM0eOCExijfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d3qnT3qQZCZishpst/TqlzrOvkXA63bi2d79PnAvM2qMQ3y10ImW+vuv8p2fGaDPi YsNskDCSM0TfnN60aLv4ro3unhBSvWdAfGPFF2/++W7AvZTww+qtKvLon3yMRgW2hY k0ICwtwhjxTLeNQ4Og2nhpUyl5q0rQRPgzpHVsCI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mick Lorain , Bjorn Helgaas , Sasha Levin Subject: [PATCH 5.15 566/913] PCI: Avoid broken MSI on SB600 USB devices Date: Tue, 5 Apr 2022 09:27:08 +0200 Message-Id: <20220405070356.810084675@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas [ Upstream commit 63cd736f449445edcd7f0bcc7d84453e9beec0aa ] Some ATI SB600 USB adapters advertise MSI, but if INTx is disabled by setting PCI_COMMAND_INTX_DISABLE, MSI doesn't work either. The PCI/PCIe specs do not require software to set PCI_COMMAND_INTX_DISABLE when enabling MSI, but Linux has done that for many years. Mick reported that 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices") broke these devices. Prior to 306c54d0edb6, they used INTx. Starting with 306c54d0edb6, they use MSI, and and the fact that Linux sets PCI_COMMAND_INTX_DISABLE means both INTx and MSI are disabled on these devices. Avoid this SB600 defect by disabling MSI so we use INTx as before. Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices") Link: https://lore.kernel.org/r/20220321183446.1108325-1-helgaas@kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=215690 Link: https://lore.kernel.org/all/PxIByDyBRcsbpcmVhGSNDFAoUcMmb78ctXCkw6fbpx25TGlCHvA6SJjjFkNr1FfQZMntYPTNyvEnblxzAZ8a6jP9ddLpKeCN6Chi_2FuexU=@protonmail.com/ Link: https://lore.kernel.org/r/20220314101448.90074-1-andriy.shevchenko@linux.intel.com BugLink: https://lore.kernel.org/all/20200702143045.23429-1-andriy.shevchenko@linux.intel.com/ Reported-by: Mick Lorain Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/quirks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e7cd8b504535..4893b1e82403 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1811,6 +1811,18 @@ static void quirk_alder_ioapic(struct pci_dev *pdev) DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic); #endif +static void quirk_no_msi(struct pci_dev *dev) +{ + pci_info(dev, "avoiding MSI to work around a hardware defect\n"); + dev->no_msi = 1; +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4386, quirk_no_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4387, quirk_no_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4388, quirk_no_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4389, quirk_no_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x438a, quirk_no_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x438b, quirk_no_msi); + static void quirk_pcie_mch(struct pci_dev *pdev) { pdev->no_msi = 1; -- 2.34.1