From patchwork Thu Jun 27 13:35:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 13714415 X-Patchwork-Delegate: kw@linux.com Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2077.outbound.protection.outlook.com [40.107.21.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64F1A13E41F; Thu, 27 Jun 2024 13:35:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719495341; cv=fail; b=inwSRTFzFaljtKgXjI8nCTOsaFfG2xV2qb2A/VJ+dtp/oZ8l759jYgBsuCxa7rswX8G3WDBnMi+FEW6NYgrkKzyttnfn0ZegNQcAkPX7TeWtQH02peVAh0cj3Igrcgs4PiAB0TCUac/n5JN3c+bzQ6a2I7mq4MufjYiaQ8QVl/Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719495341; c=relaxed/simple; bh=FIE/5efCl5f5iTmiIqvxWnTZIuLnF3bQjCS7hepozec=; h=Message-ID:Date:From:Subject:To:Cc:Content-Type:MIME-Version; b=ulTZSJOeEiIJMO4i7jS0aojt4XIWdqtUI1kzL5ZaXfPNou5P3kOi4C2WZfvge20ed4mgIa6PJCwS7IpmiYcQKgNrhF/oiXS4rGmUptxzlh6WEMFh3VOrNM62/eWG/k2j6ebKr75VJlRQI3fLGH86kVORB4tcfplqT4qUJFiuxeY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com; spf=pass smtp.mailfrom=siemens.com; dkim=pass (2048-bit key) header.d=siemens.com header.i=@siemens.com header.b=VIcrstD0; arc=fail smtp.client-ip=40.107.21.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=siemens.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=siemens.com header.i=@siemens.com header.b="VIcrstD0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oVCcP6FAVWyNsz/n/QgxLFOpP+tXJ8kfOwgq+Uz0TEdjTxBTdSchZ7Z/DFgIgaboKahCbqiTyC8nofj+eiuzGM9z4x2Hmfe3EjG4Og06lyBaTsB/LJSFbuJgzHdw+/L9r7Ya8XzBYnj6YpzXzXKW4dcnfUBZcATMdEhrlr1J2bPttRteWLlOga+KaoIzNdT6J4J08tu+GAaUkvk8J5KG56RbSPM38RZO0j5Dg+AqBBHEXIRxwF/80md7zO7f9XbEcW8UL0hrQVPsHDBs2E4KwVnC0cI+XWFEnBJ+fV0BeP74lGoOpZLdXip+GjpevcEsgdiY5nKE2PG9yEz0YCy9Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Eb2dyGmG6423ryYzlJ4aypPVG6IxfNHZxZ73huRcOQo=; b=eGs8Lnk2nutYOlCGrn41LJxJOcphrFHMpy252/cv4MrN9sHx4iimjVYsauGHlqhpbdqsB1x202lgucLYxR2Y6ZUqqcpNyZd/TuGsJTP1IDo5Q7EgjKjkGtVXDGYG83mQ+bXettd3unbGskQa3izNF8c3PZi1WY3lXxv2KzduXeZyQUrEJ5MvVpLminNLs5PcPnTGcujuM5/3cdq4B6SrDouaViOiylypicJOoiDVmZOJhWXbYsS/4BngVTWTsdBJxtLlOK3qH2pM77LbOH3LGVWF6xUL62mBBYl1EhP8v0WDekTg7W0ZehSSm5z8JXUxMsrwi037WkCAyySW5VpmNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Eb2dyGmG6423ryYzlJ4aypPVG6IxfNHZxZ73huRcOQo=; b=VIcrstD05qyV+vMXG/HZBxXMb46bjqOTVe8SjpxkhA6ArfhHBx7fQC7Krrjb4g5wvNNIw6G/Vyl7micPhf89qq6uLIEUOqfqfWJrYvDVZpqyNir4Ei7Q3d0B99vLKI/6LBEitLEOlPp6FKg3PjCSIcyEP63sqPQ1oQuVNPGHBzVc9rUYj+yTlA3bU0l70vGHFUb6CoH01edE/2NymWXX0+pYpEy68F/mX0/E+W/jF2l2NgzhpmvdU+fmudXK891Evx8M0xGTcJxFYIRsuDfs1NkFWvNFU0P65zxlRGZ2+ok1fStTDtxQJ42YIivvGO8cmOxi8/GuLl0+3M1fcvjKCw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by PA2PR10MB8479.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:416::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.32; Thu, 27 Jun 2024 13:35:34 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408%7]) with mapi id 15.20.7698.025; Thu, 27 Jun 2024 13:35:33 +0000 Message-ID: <7c5b8986-c69f-4ff5-9ed2-b2055ae848c4@siemens.com> Date: Thu, 27 Jun 2024 15:35:28 +0200 User-Agent: Mozilla Thunderbird From: Jan Kiszka Subject: [PATCH v3] PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0) Content-Language: en-US To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas , Kishon Vijay Abraham I Cc: Siddharth Vadapalli , Vignesh Raghavendra , Nishanth Menon , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List , linux-arm-kernel Autocrypt: addr=jan.kiszka@siemens.com; keydata= xsFNBGZY+hkBEACkdtFD81AUVtTVX+UEiUFs7ZQPQsdFpzVmr6R3D059f+lzr4Mlg6KKAcNZ uNUqthIkgLGWzKugodvkcCK8Wbyw+1vxcl4Lw56WezLsOTfu7oi7Z0vp1XkrLcM0tofTbClW xMA964mgUlBT2m/J/ybZd945D0wU57k/smGzDAxkpJgHBrYE/iJWcu46jkGZaLjK4xcMoBWB I6hW9Njxx3Ek0fpLO3876bszc8KjcHOulKreK+ezyJ01Hvbx85s68XWN6N2ulLGtk7E/sXlb 79hylHy5QuU9mZdsRjjRGJb0H9Buzfuz0XrcwOTMJq7e7fbN0QakjivAXsmXim+s5dlKlZjr L3ILWte4ah7cGgqc06nFb5jOhnGnZwnKJlpuod3pc/BFaFGtVHvyoRgxJ9tmDZnjzMfu8YrA +MVv6muwbHnEAeh/f8e9O+oeouqTBzgcaWTq81IyS56/UD6U5GHet9Pz1MB15nnzVcyZXIoC roIhgCUkcl+5m2Z9G56bkiUcFq0IcACzjcRPWvwA09ZbRHXAK/ao/+vPAIMnU6OTx3ejsbHn oh6VpHD3tucIt+xA4/l3LlkZMt5FZjFdkZUuAVU6kBAwElNBCYcrrLYZBRkSGPGDGYZmXAW/ VkNUVTJkRg6MGIeqZmpeoaV2xaIGHBSTDX8+b0c0hT/Bgzjv8QARAQABzSNKYW4gS2lzemth IDxqYW4ua2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ym0zz5Y3vxaYtbXG2wTrqJ 8WpkWIE8STUhQa9AkezgucXN7r6uSrzW8IQXxBInZwFIyBgM0f/fzyNqzThFT15QMrYUqhhW ZffO4PeNJOUYfXdH13A6rbU0y6xE7Okuoa01EqNi9yqyLA8gPgg/DhOpGtK8KokCsdYsTbk= X-ClientProxiedBy: FR0P281CA0091.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::11) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|PA2PR10MB8479:EE_ X-MS-Office365-Filtering-Correlation-Id: 8511d9b9-efc0-4477-d7fe-08dc96ae050f X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?q?mYG/q0JT4rOO5s8Cv25nnM/3CJqlaKU?= =?utf-8?q?Lm0hQHPoESxz50p9gbihZGAKxqiVwWHra81Mwu4dsJt4gREJLYp7ptVaTewCwFf9X?= =?utf-8?q?DtP3TPR9Nm+C9rGm30Q2dFMPKFk3YEe1JwQhsqBkSvh/bKPj6eHkD+0+Dq2/NG1lz?= =?utf-8?q?UyLLjYvP2mIUGUks7CrEVd3cDAT3BnI9MiJqJ09AnFfE1ixLmMawXHXy7nLgijz4f?= =?utf-8?q?EnTPGBgDgqlB4tnAV7InSFSivXckCcGcU3fOQ6/FbtzZDD+cCRY8BXaJ7iSMYZn74?= =?utf-8?q?lmEbP7RpiX8WHsf2XrUYpV7gQ4Z/jEdhNGdbymIanuiA4LvDSPioEDSeNsl629kxX?= =?utf-8?q?asRrFUDHBoYgkZnkGDnBLLRAesqR2yW6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ZHFs086JiXdwxDDZRYwlOGjPGYvI=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?KnL76HAAorADkaW5bfOk5Nxo4GE6?= =?utf-8?q?IPNLFUCa+9DPa175lS2oBvlYS2RE6vnk062LAUDRv42ADUtWrOoaqJ0LI5hPAuaKm?= =?utf-8?q?6pp7t//TH9iL4F2ag3js/VaRad3P4MOrAiu6di8ckd4Hw4IjGxHCulTxytCbOuI1J?= =?utf-8?q?HT16cjJD0NSqqnk6j9gFX/DbDeEBoQ2c97P7THrSr7O4zUFBixkAGvTVgjjGuWujg?= =?utf-8?q?p0ZZFyzKFu5pIN9wyWiEQ/2JG4l0ZK9mSwvf5H3oqIqE1htUY9P6zDgcVTAZg3jGb?= =?utf-8?q?Znr+hfMkc6YvxxslbvdcHaUz4BxLZU+5Pc619raxPrXFhG1IQkCgLffvMRy5YpYQJ?= =?utf-8?q?+FIhuJCSht7jlFye7mYgvuQ3O50AV2CRJjFwAImnqXOdvEVxR6m6DZgwgxzh78DE8?= =?utf-8?q?xbCdYsWqDicRGnaExQHW/8IhvN9ksqZsw2rvzlfAMPVwi/coYDKNvwBoV3swSdlH1?= =?utf-8?q?4r3vt++3OCYUQdU99979YgTai22ofl6ZCjifA0bIXM/4HaeMXhsiek4QhbHPiYN1W?= =?utf-8?q?lEKadQat5HJDcj2esfbz5JZOHF67eYChB5yvzrb54p+feN0EoJDRX1xu+j9DiV7aC?= =?utf-8?q?AVUortwW1W6VXsnJfn0Lue5xWCdMGRKc/gO9f+ABv2KlBvLewdA8iWi9w8Ekq/BR3?= =?utf-8?q?35vNsHleHecXti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5TshF5f47TuDYK9Q=3D=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8511d9b9-efc0-4477-d7fe-08dc96ae050f X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 13:35:33.4315 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dExQ12hOPYx8DyFKHhjEbLZJSWBWW3M3ZQLFGeEG3qErgMo+IMNFXrWzsYINh4+alHhiichI1TsTo/Yboc9UIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR10MB8479 From: Kishon Vijay Abraham I Errata #i2037 in AM65x/DRA80xM Processors Silicon Revision 1.0 (SPRZ452D_July 2018_Revised December 2019 [1]) mentions when an inbound PCIe TLP spans more than two internal AXI 128-byte bursts, the bus may corrupt the packet payload and the corrupt data may cause associated applications or the processor to hang. The workaround for Errata #i2037 is to limit the maximum read request size and maximum payload size to 128 Bytes. Add workaround for Errata #i2037 here. The errata and workaround is applicable only to AM65x SR 1.0 and later versions of the silicon will have this fixed. [1] -> http://www.ti.com/lit/er/sprz452d/sprz452d.pdf Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Achal Verma Signed-off-by: Vignesh Raghavendra Signed-off-by: Jan Kiszka --- Original patch: Link: https://lore.kernel.org/linux-pci/20210325090026.8843-7-kishon@ti.com/ --- drivers/pci/controller/dwc/pci-keystone.c | 44 ++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index d3a7d14ee685..df9df2dc1f8a 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -34,6 +34,11 @@ #define PCIE_DEVICEID_SHIFT 16 /* Application registers */ +#define PID 0x000 +#define RTL GENMASK(15, 11) +#define RTL_SHIFT 11 +#define AM6_PCI_PG1_RTL_VER 0x15 + #define CMD_STATUS 0x004 #define LTSSM_EN_VAL BIT(0) #define OB_XLAT_EN_VAL BIT(1) @@ -104,6 +109,8 @@ #define to_keystone_pcie(x) dev_get_drvdata((x)->dev) +#define PCI_DEVICE_ID_TI_AM654X 0xb00c + struct ks_pcie_of_data { enum dw_pcie_device_mode mode; const struct dw_pcie_host_ops *host_ops; @@ -525,7 +532,11 @@ static int ks_pcie_start_link(struct dw_pcie *pci) static void ks_pcie_quirk(struct pci_dev *dev) { struct pci_bus *bus = dev->bus; + struct keystone_pcie *ks_pcie; + struct device *bridge_dev; struct pci_dev *bridge; + u32 val; + static const struct pci_device_id rc_pci_devids[] = { { PCI_DEVICE(PCI_VENDOR_ID_TI, PCIE_RC_K2HK), .class = PCI_CLASS_BRIDGE_PCI_NORMAL, .class_mask = ~0, }, @@ -537,6 +548,11 @@ static void ks_pcie_quirk(struct pci_dev *dev) .class = PCI_CLASS_BRIDGE_PCI_NORMAL, .class_mask = ~0, }, { 0, }, }; + static const struct pci_device_id am6_pci_devids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_AM654X), + .class = PCI_CLASS_BRIDGE_PCI << 8, .class_mask = ~0, }, + { 0, }, + }; if (pci_is_root_bus(bus)) bridge = dev; @@ -558,10 +574,36 @@ static void ks_pcie_quirk(struct pci_dev *dev) */ if (pci_match_id(rc_pci_devids, bridge)) { if (pcie_get_readrq(dev) > 256) { - dev_info(&dev->dev, "limiting MRRS to 256\n"); + dev_info(&dev->dev, "limiting MRRS to 256 bytes\n"); pcie_set_readrq(dev, 256); } } + + /* + * Memory transactions fail with PCI controller in AM654 PG1.0 + * when MRRS is set to more than 128 Bytes. Force the MRRS to + * 128 Bytes in all downstream devices. + */ + if (pci_match_id(am6_pci_devids, bridge)) { + bridge_dev = pci_get_host_bridge_device(dev); + if (!bridge_dev && !bridge_dev->parent) + return; + + ks_pcie = dev_get_drvdata(bridge_dev->parent); + if (!ks_pcie) + return; + + val = ks_pcie_app_readl(ks_pcie, PID); + val &= RTL; + val >>= RTL_SHIFT; + if (val != AM6_PCI_PG1_RTL_VER) + return; + + if (pcie_get_readrq(dev) > 128) { + dev_info(&dev->dev, "limiting MRRS to 128 bytes\n"); + pcie_set_readrq(dev, 128); + } + } } DECLARE_PCI_FIXUP_ENABLE(PCI_ANY_ID, PCI_ANY_ID, ks_pcie_quirk);