Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1138023pxa; Thu, 20 Aug 2020 03:40:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyknuXGn14EkDATOiKDQ4HLQTdWbvcad0Jt4wrU/egzyU+bSc67J7MEtJv4REYXY9N7sz3t X-Received: by 2002:aa7:c6ce:: with SMTP id b14mr2338295eds.208.1597920045895; Thu, 20 Aug 2020 03:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597920045; cv=none; d=google.com; s=arc-20160816; b=t6H6CJjMbycbnP03EmqRvql6bCi64oB5PkvNcXU2T9r6DXUsPX+tY9qcodaD5R65Jw ZoBE56xO+b+1JncfBATSM7pn2AobCVH1biQ0PMOeMaYJW/fQxCbxQrVdUDz3uAFYC9uV D2Rr6ovHuzR45IBvbzpO+F9MZE3ewspvV792SMuZDrwlssjiCQ/MeaFkqiKFdFwcQYGO vWQQomE2j1lPMFGfgm1kyDdd3qLKWKret29imd9VWx+EoaYbOSokXGJfQSTt3JcQmK1W /7aU3m97CbZvDdllrgmMOgOLJgBV7bG5TvhGeVxrp3nmJMfdeAzYbet8Gq+VFgCFXn3m UerA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M17WyA37XiqdRbwQJ3yqWOdVzrAztn0FTtnPJqAOW5Q=; b=DV/2MxhP3hFJe656TPfPC35Vi9laStRVz7Xf2+yaLfW2Cv5JFJUSaxXLD7HW2+zG11 2cK5iyqZu1XMLP0vegc7YXc9RdHWH9sPWe3MUAqgA1x8g7T8gCzYtmmpyrJnPbMmdrbT 5J0CEe3C15ZIZqUbJ0bsYudj2DyG8tok3iB/s0mRoRf6xHIllN10RrVSqEl1Hzg2KVEK U+CVXPD9kM7Ar8m8GVwirl8LlEjbU2eDV1+1VQRcZq4zCvhvCljTt4hDD89o0GHoqnO5 VKVxlQ0zOWoN0KWBW2U7lwUIQk9ILdxL5/rHcMqwZJq9TYJlKSGIP/zH9OgXpUJKgO9e pWlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wkYyh8Ee; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx7si889793ejb.752.2020.08.20.03.40.21; Thu, 20 Aug 2020 03:40:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wkYyh8Ee; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731523AbgHTKjz (ORCPT + 99 others); Thu, 20 Aug 2020 06:39:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:40842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731380AbgHTKS1 (ORCPT ); Thu, 20 Aug 2020 06:18:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 19B33206DA; Thu, 20 Aug 2020 10:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597918706; bh=Qh9Gn1/chWCrMEag8LmYI6y/Q9IS7JpKDgajbRxLZGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wkYyh8EetP1v9RSq0gHNJFWWCZvU3++YsrBjMSiNKQ5gOQDVmBZVLqk57MvdgmtVT cZRTUAdGavndYZ1QVT9MjOthBH0j43ulBymbL988XEFi0/1gJdCxEJl+jDzrAaJphp kUWH8ltLUOyAJmqa+mVD6VmpVFYg+ZPTtSsGIWRE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Hancock , Bjorn Helgaas Subject: [PATCH 4.4 007/149] PCI/ASPM: Disable ASPM on ASMedia ASM1083/1085 PCIe-to-PCI bridge Date: Thu, 20 Aug 2020 11:21:24 +0200 Message-Id: <20200820092126.050143228@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820092125.688850368@linuxfoundation.org> References: <20200820092125.688850368@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Hancock commit b361663c5a40c8bc758b7f7f2239f7a192180e7c upstream. Recently ASPM handling was changed to allow ASPM on PCIe-to-PCI/PCI-X bridges. Unfortunately the ASMedia ASM1083/1085 PCIe to PCI bridge device doesn't seem to function properly with ASPM enabled. On an Asus PRIME H270-PRO motherboard, it causes errors like these: pcieport 0000:00:1c.0: AER: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Transmitter ID) pcieport 0000:00:1c.0: AER: device [8086:a292] error status/mask=00003000/00002000 pcieport 0000:00:1c.0: AER: [12] Timeout pcieport 0000:00:1c.0: AER: Corrected error received: 0000:00:1c.0 pcieport 0000:00:1c.0: AER: can't find device of ID00e0 In addition to flooding the kernel log, this also causes the machine to wake up immediately after suspend is initiated. The device advertises ASPM L0s and L1 support in the Link Capabilities register, but the ASMedia web page for ASM1083 [1] claims "No PCIe ASPM support". Windows 10 (build 2004) enables L0s, but it also logs correctable PCIe errors. Add a quirk to disable ASPM for this device. [1] https://www.asmedia.com.tw/eng/e_show_products.php?cate_index=169&item=114 [bhelgaas: commit log] Fixes: 66ff14e59e8a ("PCI/ASPM: Allow ASPM on links to PCIe-to-PCI/PCI-X Bridges") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=208667 Link: https://lore.kernel.org/r/20200722021803.17958-1-hancockrwd@gmail.com Signed-off-by: Robert Hancock Signed-off-by: Bjorn Helgaas Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2273,6 +2273,19 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AM DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0xa238, quirk_disable_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi); +static void quirk_disable_aspm_l0s_l1(struct pci_dev *dev) +{ + dev_info(&dev->dev, "Disabling ASPM L0s/L1\n"); + pci_disable_link_state(dev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); +} + +/* + * ASM1083/1085 PCIe-PCI bridge devices cause AER timeout errors on the + * upstream PCIe root port when ASPM is enabled. At least L0s mode is affected; + * disable both L0s and L1 for now to be safe. + */ +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l1); + /* * The APC bridge device in AMD 780 family northbridges has some random * OEM subsystem ID in its vendor ID register (erratum 18), so instead