From patchwork Fri Nov 6 10:05:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11886701 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48580697 for ; Fri, 6 Nov 2020 10:05:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FE85221FA for ; Fri, 6 Nov 2020 10:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726734AbgKFKFc (ORCPT ); Fri, 6 Nov 2020 05:05:32 -0500 Received: from mga06.intel.com ([134.134.136.31]:9736 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbgKFKFc (ORCPT ); Fri, 6 Nov 2020 05:05:32 -0500 IronPort-SDR: fJdjecHC8ANb13nG5ofLgXK+Dxvk+gXWQQMPk+fJFbTNKwcTFatuOXZFSWZr4O8nBhMN8bdHUf Ff7sVi/CXQOg== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="231155217" X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="231155217" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 02:05:30 -0800 IronPort-SDR: HFA0Cx8Es6DEHA30ai0ln6LSYSTD4rx3dg9selNMwmVYVbfQBBwa2bi1F6ti1rEQhPoXisN+W9 yWdZH5oFOQwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="306816676" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 06 Nov 2020 02:05:28 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A7C9E252; Fri, 6 Nov 2020 12:05:26 +0200 (EET) From: Andy Shevchenko To: Bjorn Helgaas , linux-pci@vger.kernel.org, johan@kernel.org, linux-usb@vger.kernel.org Cc: Andy Shevchenko , alberto.vignani@fastwebnet.it Subject: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Date: Fri, 6 Nov 2020 12:05:25 +0200 Message-Id: <20201106100526.17726-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Pericom PCIe-USB adapter advertises MSI, but documentation says "The MSI Function is not implemented on this device." in the chapters 7.3.27, 7.3.29-7.3.31. Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices") Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf Reported-by: alberto.vignani@fastwebnet.it Signed-off-by: Andy Shevchenko --- v2: dropped confusing word (David), added ifdeffery (Ben) drivers/pci/quirks.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f70692ac79c5..e66e0cc8f99b 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5567,17 +5567,26 @@ static void pci_fixup_no_d0_pme(struct pci_dev *dev) DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x2142, pci_fixup_no_d0_pme); /* - * Device [12d8:0x400e] and [12d8:0x400f] + * Device 12d8:0x400e [OHCI] and 12d8:0x400f [EHCI] + * * These devices advertise PME# support in all power states but don't * reliably assert it. + * + * These devices advertise MSI, but documentation (PI7C9X440SL.pdf) says + * "The MSI Function is not implemented on this device." in the chapters + * 7.3.27, 7.3.29-7.3.31. */ -static void pci_fixup_no_pme(struct pci_dev *dev) +static void pci_fixup_no_msi_no_pme(struct pci_dev *dev) { +#ifdef CONFIG_PCI_MSI + pci_info(dev, "The MSI is not implemented on this device, disabling it\n"); + dev->no_msi = 1; +#endif pci_info(dev, "PME# is unreliable, disabling it\n"); dev->pme_support = 0; } -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_pme); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_pme); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_msi_no_pme); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_msi_no_pme); static void apex_pci_fixup_class(struct pci_dev *pdev) { From patchwork Fri Nov 6 10:05:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11886703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C512015E6 for ; Fri, 6 Nov 2020 10:05:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABF7F22203 for ; Fri, 6 Nov 2020 10:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgKFKFd (ORCPT ); Fri, 6 Nov 2020 05:05:33 -0500 Received: from mga06.intel.com ([134.134.136.31]:9736 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbgKFKFc (ORCPT ); Fri, 6 Nov 2020 05:05:32 -0500 IronPort-SDR: 2iGDf1lKLd42teTNk+hySL9XhVzgOXTgFgvONFLL2JX8NuBN9V6wEaXtSjwcu5VKpDK1vs3kaK C35gj/+WarYg== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="231155216" X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="231155216" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 02:05:30 -0800 IronPort-SDR: L6Qhn/Xl5hUIPtsiSEpFavtrO/9oU7kaKkPg9cfItxurbprMSc8WXnb6ZKNRCAsnoqxWgM47c/ TEPfH6FOrvPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="321545769" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 06 Nov 2020 02:05:27 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B1649A7; Fri, 6 Nov 2020 12:05:26 +0200 (EET) From: Andy Shevchenko To: Bjorn Helgaas , linux-pci@vger.kernel.org, johan@kernel.org, linux-usb@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v2 2/2] PCI: Use predefined Pericom vendor ID Date: Fri, 6 Nov 2020 12:05:26 +0200 Message-Id: <20201106100526.17726-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201106100526.17726-1-andriy.shevchenko@linux.intel.com> References: <20201106100526.17726-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Pericom has predefined vendor ID, use it instead of hard coded value. Signed-off-by: Andy Shevchenko --- v2: no changes drivers/pci/quirks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e66e0cc8f99b..11409f04023c 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2356,9 +2356,9 @@ static void quirk_enable_clear_retrain_link(struct pci_dev *dev) dev->clear_retrain_link = 1; pci_info(dev, "Enable PCIe Retrain Link quirk\n"); } -DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe110, quirk_enable_clear_retrain_link); -DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe111, quirk_enable_clear_retrain_link); -DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe130, quirk_enable_clear_retrain_link); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PERICOM, 0xe110, quirk_enable_clear_retrain_link); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PERICOM, 0xe111, quirk_enable_clear_retrain_link); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PERICOM, 0xe130, quirk_enable_clear_retrain_link); static void fixup_rev1_53c810(struct pci_dev *dev) {