Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2565666lkm; Mon, 20 Sep 2021 18:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2lcwVZecoYibhlcF2p6cuJqcwiJMW4loRFzFOvCTAqj8F77qj7nItny4XtxelKJhsiSis X-Received: by 2002:a6b:6b03:: with SMTP id g3mr13484002ioc.218.1632189037194; Mon, 20 Sep 2021 18:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632189037; cv=none; d=google.com; s=arc-20160816; b=YUT6CwgTgDsZD/lWrbu0NE4lYB30U6lM9+UgBwCtGVtghExEVyeGZXZ3ESLQWWNrR+ HkZMhSnCjJnZRSl3Ohq+GmFWahehBOsAuWDF2CmB9lvjnkggQinb9o58T7vVwlbgCmUX kMVEwy7bSg2fYpGCfNe032ljhTH+T1Mb1FHnMv2ubbr7ym9xivqTzcbw0QjZDjbuAEmf 4BaH9BKdXRSxKVptA/g2T4PK0KxmEbpRdjIxbD5bh4Vzmc+7tDMRV+ZK5zhZB45nIppq RjZDsfacLsM7mv70WYLxeMEiVycuwH1sKoLFEpBeDm1BJmfUbkQ0ALZgZFkleGCiLWNa gYwg== 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=QQ/hVfZO5JCiIoyeY/JKFhqhWkVijn04glDeZJ47NyY=; b=vgNgdYZXYAdTJMK6WEK/I5YztxR7evT0fKyewxij9dB2M3BlxoNarkyVFajpvYmuFU 84TIYTB6HUEER6FW9AS4K3SG5Ho5PtrP14du90S1WslBtvGLjhUHJEWbo8LBt7WrsMLp 0k9JZZUSAh+/juUPct0SJcfokrxpoLV4tWb42IV8htpK30Gst0KiXD4Z2t2JAusQpvD7 wCIvIcUlrc578wZE+jtP03t53pYzudlJy0oeMcBsfJ0dysJT6JXT5CPbcYzdiINFRbqd bAShqQcE1WQq4RYNxjvfY0OjniyNsG2OiAC0m3+RpMrp1A5zBlxswRn6UjnGwBQffXZV EHCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=obVHflFm; 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=pass (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 g13si6926273ila.118.2021.09.20.18.50.26; Mon, 20 Sep 2021 18:50:37 -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=@linuxfoundation.org header.s=korg header.b=obVHflFm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358461AbhITSGp (ORCPT + 99 others); Mon, 20 Sep 2021 14:06:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:57188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356703AbhITSBG (ORCPT ); Mon, 20 Sep 2021 14:01:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 838CE63229; Mon, 20 Sep 2021 17:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158163; bh=llqVRZepbp//01/uit09MPR+SKYoDSxTzpVAjo+o9ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obVHflFmBd+/CbpUZ0OhUAao5Hg1vzL9a+ULx+FtnAm2TCy0EByrWYlisaLAYB0w+ 8igR7wwWSbg4punjRQRFOwf/8EsEi1pxjqAHSRePNIeF4ROXGLcurB3gGrKR0I4BhW v8p/UALpS+p2q4Xe4Al/RcGhaWp8+EAd1BAg5zEQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?R=C3=B6tti?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Bjorn Helgaas , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 5.4 030/260] PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported Date: Mon, 20 Sep 2021 18:40:48 +0200 Message-Id: <20210920163932.145817688@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Behún commit b12d93e9958e028856cbcb061b6e64728ca07755 upstream. The ASMedia ASM1062 SATA controller advertises Max_Payload_Size_Supported of 512, but in fact it cannot handle incoming TLPs with payload size of 512. We discovered this issue on PCIe controllers capable of MPS = 512 (Aardvark and DesignWare), where the issue presents itself as an External Abort. Bjorn Helgaas says: Probably ASM1062 reports a Malformed TLP error when it receives a data payload of 512 bytes, and Aardvark, DesignWare, etc convert this to an arm64 External Abort. [1] To avoid this problem, limit the ASM1062 Max Payload Size Supported to 256 bytes, so we set the Max Payload Size of devices that may send TLPs to the ASM1062 to 256 or less. [1] https://lore.kernel.org/linux-pci/20210601170907.GA1949035@bjorn-Precision-5520/ BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212695 Link: https://lore.kernel.org/r/20210624171418.27194-2-kabel@kernel.org Reported-by: Rötti Signed-off-by: Marek Behún Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Reviewed-by: Pali Rohár Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3252,6 +3252,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SO PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1, fixup_mpss_256); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLARFLARE, PCI_DEVICE_ID_SOLARFLARE_SFC4000B, fixup_mpss_256); +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ASMEDIA, 0x0612, fixup_mpss_256); /* * Intel 5000 and 5100 Memory controllers have an erratum with read completion