Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319560pxb; Mon, 20 Sep 2021 18:42:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7t9xXwV0CEityCC8nwefUEu6Jcpc2dy0p1icG61UmZRcVCkbyXs29lX4oAQ6BjwoBR2Lj X-Received: by 2002:a5e:a916:: with SMTP id c22mr13155381iod.211.1632188567173; Mon, 20 Sep 2021 18:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188567; cv=none; d=google.com; s=arc-20160816; b=vTIatx/GuMjQLEx2LBkTwDLGGJ1dCcFg/0X4rT9Up89iKZ8lMYKZJH/J9d2WtSS+8V zCn3GT3c3POo7t8WTHVZ/P79mw0OgoVBKjl9vTorcp6r9BE7+XoPFIvSEGi8PPwy8XBF 9YmfuN3x1XNPXOJK7T9ofxpOCgm8cQn34ed0XGvYBHAI7LkFPU2vDkbcWryW6MxO5a8u OdEctZRmNFM0Ykzuexo8axxfp6vWjVMRR0GqA6pQx/NAiTfSwfzBIwlGRoFp8r5j1QbM tXZOAFF7IUnqhRlCrQ0YYrA3bMq5fGMdWMCvtPjQTC9k8ziDU4ExTknFf2oOK1V80VHT OJGw== 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=HNwBqgy1LF/5ZHiEgdgj/UEzRmgD20qp2RIfJxDGYzY=; b=wToZl2pcYTDvIWuNm2HHl8kjQjD8VXzHiQtOZbwHEdJKN8hAzAO59i74pp+9qfQ7IO wytctJRnAGYe/ytZv65SeNvyiPAGQdLRR/55wH4oxz+psjnOsNA9IMluIE2nXpHPRHxP kBE/ApGMDI/mKN6rSwGau+4+izvr3nPUNiZTFCsmlo+NgGMUDTdwrAPeYRKf2SKJgdpp i3OKi9uK0X6uNnv3T7+mEq84lymPykN9G6QbkszhjXfMgqywJB1LLlkJ0eG1cudDv0W4 20kn79SHCX6W9Xa7d4E0dD2tWMQW+K7zvJ2bH8vTAsvYi3Sfw68Nz2GY3wNOFDDhbrhu e2dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gVB5u0Yz; 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 h22si6184137ior.72.2021.09.20.18.42.36; Mon, 20 Sep 2021 18:42:47 -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=gVB5u0Yz; 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 S243155AbhITQvX (ORCPT + 99 others); Mon, 20 Sep 2021 12:51:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:36690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240786AbhITQtd (ORCPT ); Mon, 20 Sep 2021 12:49:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 84DC461264; Mon, 20 Sep 2021 16:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156487; bh=2xMlWFHiXOi120R/jSPT9RMjHQNRuLCblCgFLo8tWIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gVB5u0YzSXSwnLqBXSShk+qCP2qsqhF2dlphEKKvIuRQdAg8oZM68X41B2tL+SVUV Y4CZ+N2GRLIukJxFeP6cLpJWjwuCduTWarK8akZvJJoVufdKal7bBKNOve9GZT6uOR ahVtwi6eOjx01HUyP9avuu3blvVAKLu2SdqhEU8M= 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 4.4 081/133] PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported Date: Mon, 20 Sep 2021 18:42:39 +0200 Message-Id: <20210920163915.292942521@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 @@ -2921,6 +2921,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 errata with read completion * coalescing (which is enabled by default on some BIOSes) and MPS of 256B.