From nobody Sat Jul 25 22:03:04 2026 Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012043.outbound.protection.outlook.com [40.93.195.43]) (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 231C22E03F1; Mon, 13 Jul 2026 07:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.195.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927330; cv=fail; b=WGV7+Y7q1K1wTyiHr9idQ0w28hbBCz/5YTSZ6/rXcBPSzPOW4iX8Ky0ebJy/rGJ2fzHQ1/yI+fVEwkm32cPL9tWaTuHv95zEE2tVjG9OeLGVNl2A5XzkwBwu+jfoiQUUiTAnHvxPsCphM8S2jo/Xy/jBU0feLbxJHIqm2lfbonc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927330; c=relaxed/simple; bh=7eTfpNuz7glLer0glprFK858euInVMsvpzT1hLMww90=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AFDdvnFqzn3wpaz25UWBNdrzIYKozNV7rPp+ZFr99jyoD9UZVnsg54hZ5o0Ge4mKWOSBHJHuOmNg0uA/VRQHonucF6eogAv026lkX7KgopRch41Fe3YX0qxw8UH055dI+tHCQ22P1cJ8sX+wXDMgY8uFnrnaftpKUAZ1Q5aM0Mc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=qOPUzrRv; arc=fail smtp.client-ip=40.93.195.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="qOPUzrRv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Qos2G5PRPRyewPlM5Jx73c8Di72i62rQ/EvyaSOgI8ug1QxnyDGNaIxnBBGXHD2y9/0vzJMzExhSXbn38GMPlu0se+pY/LuxeO/BsSi1qSKXiMZAADp2TG5a0HeocMJN7ZKle6X6fqfhR5I7LZY2qcoQeCBmlygbbOmJD9U3Jn2f44MtxLXk0p/Q9FRTAtZsAnev78S1QCze7ZBUE+jbUMe6UAYE57nPSrh7bHMuGxqHCfHddtQI9mA9csDGvagxa46cPHLI/zwS+nJQ6mQQJ1xV4AtkqvEl7kp7wlcjyJDTT8HnjhI9SZakLROclj4+1BebnZGIWZ99Hw66jktwxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=DWWddXUhBm7O44lQU/wEzS0lO6WiRAjYDjUdDgckX+I=; b=TG1//xm863Jt+LRO8qs9HPIYb4FfA/oC2RZCrpZaYLF2rXCr/5Hc2xcYJfDuXh0sCZYx4YaymvpwABCX2QTMVheZfbtRG/9nHQ7FLK5h8CwOwQD8/IF2sNf7Br9UG48rZqrk5kBHNQ6/KRmWk+WBu4uyv7kBKFpDlDdfrmyzP8hseruQDGuH9kVg7Ts8XJCmb2+RnVsY1v4kdWkFMi5YGHQI4T1C+jnFLrxQfYwmJLswDoOo+RmECNP8IBOf1ufW15Qw1D4jr23Y1pPAOoh0s6CHkHqFVC88O62nun9dzwPzS4lQW5kstayEP2N1bq3BT7U6hmfgy936vPYmASYHXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DWWddXUhBm7O44lQU/wEzS0lO6WiRAjYDjUdDgckX+I=; b=qOPUzrRvzo0PY+m+jd1tjXdfy9u0/A+g2BwZvblUfN1V7W8Y+wyKp4yeijSozARPgzfPG4T5gu5AzcMIjvwZO0K5czpgLuQxQ3Q/A5RHLdaYJ5Vkr0z1qtIwtWN1yJRUvhRXLFS1yy6jKZpHrKGwx4+agnI3MPyvvGdwcG779TM= Received: from BY1P220CA0023.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::11) by DS4PR12MB9748.namprd12.prod.outlook.com (2603:10b6:8:29e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.18; Mon, 13 Jul 2026 07:21:59 +0000 Received: from SJ1PEPF000026C5.namprd04.prod.outlook.com (2603:10b6:a03:5c3:cafe::af) by BY1P220CA0023.outlook.office365.com (2603:10b6:a03:5c3::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.202.19 via Frontend Transport; Mon, 13 Jul 2026 07:21:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by SJ1PEPF000026C5.mail.protection.outlook.com (10.167.244.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.223.9 via Frontend Transport; Mon, 13 Jul 2026 07:21:58 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 02:21:58 -0500 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 02:21:57 -0500 Received: from xhdsneeli41.xilinx.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Mon, 13 Jul 2026 02:21:52 -0500 From: Srinivas Neeli To: Vinod Koul , Radhey Shyam Pandey CC: Frank Li , Michal Simek , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Suraj Gupta , Marek Vasut , Tomi Valkeinen , Alex Bereza , "Folker Schwesinger" , , , , , Subject: [PATCH v4 1/4] dmaengine: xilinx_dma: Fix MCDMA descriptor fields based on DMA direction Date: Mon, 13 Jul 2026 12:51:43 +0530 Message-ID: <20260713072146.45269-2-srinivas.neeli@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260713072146.45269-1-srinivas.neeli@amd.com> References: <20260713072146.45269-1-srinivas.neeli@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C5:EE_|DS4PR12MB9748:EE_ X-MS-Office365-Filtering-Correlation-Id: ef24e639-0b9e-4917-49c4-08dee0af6d52 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700016|376014|7416014|82310400026|23010399003|18002099003|22082099003|11063799006|56012099006; X-Microsoft-Antispam-Message-Info: jYRhh7K4PTy2wL0Miio6Wpo0a+LjdF1iDfZXTOgwiMNd9iOAEGiPNH27Xy2VEhEmeVSS4/FXVSajRXT4LZ36NUbW2UgqaHYw01G2zH0UqXRBc+7sqK1hpjrrUweY+8Ww6jJQb6ZY+fDIzOEiHGA3e//LS+D4OGyubl+0Xl//RphwWj4vZuJ7UXovUlgATrBDW4JmyG9ersAZY+hRG8/JlGH4BBMNAzUa3zFEylFxcSiz7t5pT+NAqiQYwcIHX5MDWirEJOGcsSsuZu+nafQcCdu8n8Yv8FF78yfcJAVvl1M3JyqhIQSrlU3BMfE2MhTbingKljtBzycyQwb+mElQm/LwpkUfDzH1YBvefsB6QZb9xkV/B/lUQhcvWBm6Fn1m1G1iR0tqE9M90+rHneJVswHEUAgzFIXZUHWVGuBSGt3atiWJUxcdl+dXzA6n287Gi7hjN/Y43j0UaFa/Xc+Kgbt8Ydf1fM8PEdo3RmBmpHZzfp2+/uu/45B3d/rEqhAOKLNgBijOwgHQs0ctSzwLDMP5WD8uo9e1U+7urkCJE09+eJOt8lMmsJkjBmZnxM8syZzRJOZ+R3y8xJ5BJCAJEetHdAxVDRKsvkM2Cor+EkX9SZjnS0mf0+Fp7zBD+sHbMMh2I3cr/pDhZ3qVBQ5BpiEowT4iYOK395I0TnWXkVZxQXXl/WL6wf9iYVamH5zmYvqM4W86pPVqO2N1J84O3A== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700016)(376014)(7416014)(82310400026)(23010399003)(18002099003)(22082099003)(11063799006)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y7ogJ/Nw7loWLWtoAwEY0pZmjIcU+MRKZux42yMBbw5uWvNImqMkLn04vB+wIoSY+fUrvIMbPf8/JoNN771S7kBGEyFbSaD+sQWNmto3rPs2d/ae8tQnIeeSyFsGABH1Iv44sAsLkWREYSoGgV4w/0Bu5gTnPawHojtcyZgF3vjL1zOOVMTq2Fisipa5R1SgOdjE+yiXs62j6UBa2ywDp2LgOqT/2KDfP+LWX+J0UauYvo+/bf+Lw3cQ45e6PCOpXTXEsUU1pijrS5UA9z+RvK0aVbtQpsdcJxX+cinN7yewHTc6lg8B3T4lF/J8lZM7tLGNtnvp7prb5FxlKzR9txn5L2L/VjfHKjXjtNIdhhCo3DlF+QYb62F4PCtHT7TBw3z2O0AvtuSs6ATyH4C1DLMq20mkQ6Ew7v4O2uW/4u4uuZKAeWpYumJaMLPf3euL X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2026 07:21:58.9937 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef24e639-0b9e-4917-49c4-08dee0af6d52 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000026C5.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS4PR12MB9748 Content-Type: text/plain; charset="utf-8" The MCDMA BD format differs between memory-to-device (MM2S) and device-to-memory (S2MM) directions, but the driver was using generic 'status' and 'sideband_status' fields for both. This led to incorrect residue calculations when the hardware updates direction-specific fields. Refactor the descriptor structure to use unions with direction-specific field mappings, and update the residue calculation logic to select the correct status field based on DMA direction. This matches the hardware descriptor layout and fixes incorrect residue reporting. Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine dr= iver support") Reviewed-by: Radhey Shyam Pandey Signed-off-by: Srinivas Neeli --- Changes in V4: - Added Reviewed-by: Radhey Shyam Pandey. Changes in V3: - Renamed subject from "for MM2S vs S2MM" to "based on DMA direction". - Reworded commit message for clarity. - Added XILINX_MCDMA_BD_HW_SIZE macro and static_assert to verify descriptor size at compile time. - Refactored residue calculation to separate addition and subtraction operations for better readability. Changes in V2: - No change. --- drivers/dma/xilinx/xilinx_dma.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dm= a.c index 98b41b8f8915..ff5b29a808e9 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -223,6 +223,7 @@ #define XILINX_MCDMA_IRQ_ERR_MASK BIT(7) #define XILINX_MCDMA_BD_EOP BIT(30) #define XILINX_MCDMA_BD_SOP BIT(31) +#define XILINX_MCDMA_BD_HW_SIZE 64 =20 /** * struct xilinx_vdma_desc_hw - Hardware Descriptor @@ -277,8 +278,10 @@ struct xilinx_axidma_desc_hw { * @buf_addr_msb: MSB of Buffer address @0x0C * @rsvd: Reserved field @0x10 * @control: Control Information field @0x14 - * @status: Status field @0x18 - * @sideband_status: Status of sideband signals @0x1C + * @mm2s_ctrl_sideband: Sideband control info for mm2s @0x18 + * @s2mm_status: Status field for s2mm @0x18 + * @mm2s_status: Status field for mm2s @0x1C + * @s2mm_sideband_status: Sideband status for s2mm @0x1C * @app: APP Fields @0x20 - 0x30 */ struct xilinx_aximcdma_desc_hw { @@ -288,10 +291,17 @@ struct xilinx_aximcdma_desc_hw { u32 buf_addr_msb; u32 rsvd; u32 control; - u32 status; - u32 sideband_status; + union { + u32 mm2s_ctrl_sideband; + u32 s2mm_status; + }; + union { + u32 mm2s_status; + u32 s2mm_sideband_status; + }; u32 app[XILINX_DMA_NUM_APP_WORDS]; } __aligned(64); +static_assert(sizeof(struct xilinx_aximcdma_desc_hw) =3D=3D XILINX_MCDMA_B= D_HW_SIZE); =20 /** * struct xilinx_cdma_desc_hw - Hardware Descriptor @@ -1015,9 +1025,11 @@ static u32 xilinx_dma_get_residue(struct xilinx_dma_= chan *chan, struct xilinx_aximcdma_tx_segment, node); aximcdma_hw =3D &aximcdma_seg->hw; - residue +=3D - (aximcdma_hw->control & chan->xdev->max_buffer_len) - - (aximcdma_hw->status & chan->xdev->max_buffer_len); + residue +=3D aximcdma_hw->control & chan->xdev->max_buffer_len; + if (chan->direction =3D=3D DMA_DEV_TO_MEM) + residue -=3D aximcdma_hw->s2mm_status & chan->xdev->max_buffer_len; + else + residue -=3D aximcdma_hw->mm2s_status & chan->xdev->max_buffer_len; } } =20 --=20 2.25.1 From nobody Sat Jul 25 22:03:04 2026 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011010.outbound.protection.outlook.com [52.101.62.10]) (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 E238636F8E8; Mon, 13 Jul 2026 07:22:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.10 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927334; cv=fail; b=aE5hVKKUB81mL5n+QFBr1jMu4pq17DEqHDdGYJ/M8Tekbg5O7a7KfQTvpCbyg3UB3lXupA0SR0COry3GuBGhCb6AMRA2kwFb8Hqzs6do73WqpSA6FWR2CG3HYbXkBdOxbEcctyUHhKrDCWtp2wFFdaI2uBixVnu7yltLZ7vXwLc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927334; c=relaxed/simple; bh=KgL18bj92fbCAPoKZJlel4/kCPseTZgcPPD7Jyc/3V0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hPthXRm7oFtKYfS6+EvsmrGf+bmEX3O81nSAYB5N9UrnFdzzPW8tKOlzCDbm+51utwu1dkkij5wE2/pmca6OUG4Vjm1yAwcOnwNfzooN/63znWXUZ/2f065DDZSuBMkyFtmnMmMFZgSF+9FQ0bNsTk3X/Pv/kyamtQBaba3yPnM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=tCSwtgsY; arc=fail smtp.client-ip=52.101.62.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="tCSwtgsY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pW2QMdHp7J33pXiZjlyXhrCS3s+GpFmBuZd4XcGNOek6pn5gocXunzbSSpO6BZjbsI8JfUYyjeigOUedQk90roPF25n1yBPcdNgruuGequsEF1i1voavSSPlALe9dE1wKhsiYg0i8i47vWgwi4mH2+Q7/Q44okuwvk4BKODT952Rqa4U8PMBTbeTdaTeTuHdgRcvEmsrORVZM1VpohVzswpVhKECSKCziE8faDmiUVI7ZyxPCiIiOIZyF6A6YMydx7BTHSySAhTqFIH3TKM29jzMfpq0/7NEJ/4xjygEifPuJOx2LEA869TBiddQfs1r4GHxj32eQxWzs20U8ChYCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=+X/O4NBeT5ZTdS8ik8SCStHIRNCc4cPRH1WbAhSrO9U=; b=HDKLhIcJy9Dx8GNa9LMi+zQWlXfxX/OAT6+bCxAfNFSjRZsfb1NGsCs40oFkodep2TIX8Uu/QanH95hNmY6ah8ur8hHMnUxwU3C2o9f9sqVvipGeZmDRdxHsqAuuzDjn+BbngRHTn0rH4acgEJi7DjBTFOpni/Ugwn0B7FaBpN7XB+Mxk97UiwU75Ri5q+bikh9zxkkP74MmrzsTOhVUCoh4FKuwDWUEcUcgsUkB2ZuFi6uS55nmAcJNPn1kIb4nVm6EbarfA4aUtzoMSbI1yC17Qvvl7IFACTR6b/WyxTCamG1qTh93ASnau2ZXuS0HfLxYaWR4vYR23xWnIGCD7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+X/O4NBeT5ZTdS8ik8SCStHIRNCc4cPRH1WbAhSrO9U=; b=tCSwtgsYXgxZwYIZ7YVeF5AVTxEx34pq06cMC9f2+GIn3kmMuL7BCYAo8XILJvOlrTqDKXc3MrYrRiWttSzbHNGPJTDbV60zy44keKxuBP5DXCfbNqpmgknEavOlBkMchw3+SrgoDM2xrVYMrpYyzCVB8kWwMybtra4pNb3IBKQ= Received: from SJ0P220CA0010.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::14) by CH1PPF4CBE7339A.namprd12.prod.outlook.com (2603:10b6:61f:fc00::60e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.18; Mon, 13 Jul 2026 07:22:05 +0000 Received: from SJ1PEPF000026C9.namprd04.prod.outlook.com (2603:10b6:a03:41b:cafe::35) by SJ0P220CA0010.outlook.office365.com (2603:10b6:a03:41b::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.202.19 via Frontend Transport; Mon, 13 Jul 2026 07:22:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by SJ1PEPF000026C9.mail.protection.outlook.com (10.167.244.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.223.9 via Frontend Transport; Mon, 13 Jul 2026 07:22:05 +0000 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 02:22:02 -0500 Received: from xhdsneeli41.xilinx.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Mon, 13 Jul 2026 02:21:58 -0500 From: Srinivas Neeli To: Vinod Koul , Radhey Shyam Pandey CC: Frank Li , Michal Simek , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Suraj Gupta , Marek Vasut , Tomi Valkeinen , Alex Bereza , "Folker Schwesinger" , , , , , Subject: [PATCH v4 2/4] dmaengine: xilinx_dma: Move descriptors to done list based on completion bit Date: Mon, 13 Jul 2026 12:51:44 +0530 Message-ID: <20260713072146.45269-3-srinivas.neeli@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260713072146.45269-1-srinivas.neeli@amd.com> References: <20260713072146.45269-1-srinivas.neeli@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C9:EE_|CH1PPF4CBE7339A:EE_ X-MS-Office365-Filtering-Correlation-Id: f68cde26-de7e-40e0-980c-08dee0af710c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700016|376014|7416014|82310400026|23010399003|18002099003|22082099003|5023799004|11063799006|56012099006|6133799003; X-Microsoft-Antispam-Message-Info: rzSXwuyDJGV+82mQFOU/SII99R6Devt/Hsp3hiDYKfGsntmQZt2iz5BahDJhL36xKbySFv2JWRlBZmo1K+x4o11qj/f9YqmgXeiNs6L7XHbJRw0KP9A+8drb+HNAWHL5rtIo7mOYeXRGUg6+N5YZe47mdGqA3yMh2IoD7HprJc0qDNGsXV2Ft8J796jO06FcWoGufpF8bTPNIp6mTbODuEVGOBdjXqMb2SADKka5/sLtPTdkRwIuJ6wxh5+tkDlugbFD10oJfAJ1/gZNgPdDw7SVop+OzDDFc2CciguZqlMSmAnRHWnOHB1/3pnD8RMjZ6WZ/Qlp9J+GQr1nU/oobGTfgrnN9Eo44AJcL7pkCBbbusKVj6v9Gjaujdma02R+64zB71DNGs3WFSXKejtkIRNy/de8JdLc/CHOrY/W0vF5XecleIHGg5FI4+p20QLjxkdhx/xhrVAaHdJx0mZjPmjlhMz7wmKnVwehqBrnaM/l/mLS0YdijYHbmFqHE9axp17u2ICqiNojOclG9qYScBSbN0PWujjEV1jbiYzQk6Xp/eCKL09zk/i1h78u/apbjQ5ayVGE4qLtE/qxeg5LbGZoJjTRmLlrelQ2PrB7BQIcgw/OPO7vkFRYmIFhLqHJYcoRynQfSphItY+iwuAIrCJ6W07JRjaLnDMr6OfngyaTj90FmUNMaKwYEtU1R6jLk0Wn2SpT5AC4m5vWg9tXcQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700016)(376014)(7416014)(82310400026)(23010399003)(18002099003)(22082099003)(5023799004)(11063799006)(56012099006)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zB44urI8CElqib68gHw5t0LW/uYJsKJmdI6wP+1bfUaY4rfOXr2uv+Dvi886dJ7/9HdOxfAqA4mDgsoD2YbWXLJHhYjCuYHf9I0oYLTaXdW8U64Y4IIQXINgHdsxNg5jOoIMHQKx/Bu4k1RLsd/Jc7MrTvd/SjJ7VH9e9Ik25UY1tyw7/554Isq9g73yAqK4XjzAsPN/Yc2TjWuQ7qfdfvw5Yuffe/INzGdTlebeSTBpnLxh2yQnG9ywgGvH2/5anOUA7YEzt0H7zAxmXfYaX2VM9IIPLUTic6vk2FxlHAdNi3dsk/G4n2db5lrJZZfKnZ6j47lJzbrwo1uTmTsbcNVBmQwDq5dPF6noF7m7k+/nkHujmvYyOv7QArLwLGVLenUNmloRjry5LsKzMVS1CkbHzzOvNEMYn9FOn7WOSZ3fuhRs7LutTv/EF/JJJ6qE X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2026 07:22:05.2963 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f68cde26-de7e-40e0-980c-08dee0af710c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000026C9.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH1PPF4CBE7339A Content-Type: text/plain; charset="utf-8" In AXI MCDMA, xilinx_dma_complete_descriptor() walks the channel's active_list and unconditionally moves every entry to the done_list. The MCDMA IOC interrupt handler invokes this function on every interrupt-on-completion, but with interrupt coalescing (IRQThreshold > 1) an IOC interrupt may fire after only a subset of the queued descriptors have actually been processed by the hardware. As a result, descriptors whose completion bit is not yet set in the BD status were being reported as completed to client drivers. Add a check for the descriptor completion bit before moving entries from the active list to the done list, using the appropriate direction- specific status field (s2mm_status for DMA_DEV_TO_MEM, mm2s_status for DMA_MEM_TO_DEV). This mirrors the AXIDMA fix in commit 7bcdaa658102 ("dmaengine: xilinx_dma: Freeup active list based on descriptor completion bit"). Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine dr= iver support") Reviewed-by: Radhey Shyam Pandey Signed-off-by: Srinivas Neeli --- Changes in V4: - Reworded commit message to reference the AXIDMA fix it mirrors (commit 7bcdaa658102). - Added Reviewed-by: Radhey Shyam Pandey. Changes in V3: - Added Fixes tag. - Expanded commit message to explain the interrupt coalescing scenario and why the has_sg guard is omitted for MCDMA. - Changed local variable from 'bool completed' to 'u32 status' for cleaner status field access. - Simplified completion check logic. Changes in V2: - No change. --- drivers/dma/xilinx/xilinx_dma.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dm= a.c index ff5b29a808e9..1b5b00f08c5f 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -1784,6 +1784,17 @@ static void xilinx_dma_complete_descriptor(struct xi= linx_dma_chan *chan) struct xilinx_axidma_tx_segment, node); if (!(seg->hw.status & XILINX_DMA_BD_COMP_MASK) && chan->has_sg) break; + } else if (chan->xdev->dma_config->dmatype =3D=3D XDMA_TYPE_AXIMCDMA) { + struct xilinx_aximcdma_tx_segment *seg; + u32 status; + + seg =3D list_last_entry(&desc->segments, + struct xilinx_aximcdma_tx_segment, + node); + status =3D (chan->direction =3D=3D DMA_DEV_TO_MEM) ? + seg->hw.s2mm_status : seg->hw.mm2s_status; + if (!(status & XILINX_DMA_BD_COMP_MASK)) + break; } if (chan->has_sg && chan->xdev->dma_config->dmatype !=3D XDMA_TYPE_VDMA) --=20 2.25.1 From nobody Sat Jul 25 22:03:04 2026 Received: from SA9PR02CU001.outbound.protection.outlook.com (mail-southcentralusazon11013066.outbound.protection.outlook.com [40.93.196.66]) (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 9B64A31283E; Mon, 13 Jul 2026 07:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.196.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927341; cv=fail; b=ZUMcFu7zc/HLc6FoyOurOS3YzrjgWDoHTmaJe3W+FdKuijyTmYt8uM/Aa548+zUoVncg3y0d9vAhKvUkVNCBwKChmimVq/9ycXByvl1cHVyY5aLN+EjY43E4o78Kitw4uaikhH+q/vWRNthnQJ+z5h2YdkPaveHVrAyWMZj03bE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927341; c=relaxed/simple; bh=Fcy3E6eZFPIP4esuYSAkqsQ/udSXTba1AR7tt450Ano=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KQlzu5gHT6l+bFaNdEv/LqgrWpH8bAEeUoNHL2MEHAllVANEcQsBqykYHnZHZmPGZGNBzMj2V7B0SemANuwXIuviCOk4wNR+Wq9DaNXs2uOLAUWnE3trRq2NLItMlbHSvg8RiTGWedpIk+uSyDptIkISTseyb6oq2OEPuB4vLvc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=F2Qk5kut; arc=fail smtp.client-ip=40.93.196.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="F2Qk5kut" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B+l8cbDczx0+jxTkAerITySW+zUNdJg3sKrXylWQJ7G8tQhP4TeQN4y+J4K5DieMwHgfunK8FYJBnMQQi7HVEKhmme+uEcl2hKTN0vZR2hEvKtNr/QOF1ixvR/mz8ZccwZyUyxSzp69oYtHLNTfNAdDW1B0AOG5SfQVYlbcPZKxOPbHjCQKzBIUEohcAg8761HxsB6DfmRSF+CAuVpQA6rj7rS2Sob9Agrmt2K+A4SqZhohLePPD7T2XY9nDuIBFgVgusDT3IHWQTnOfZ9O8s2/INK4hmwTWDeUPJkC1S7Ko7p/Pu2Frbhdbt18VVp6K9VSv17VSvF/m3EkGnrpBYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=j9Nx89r/Z1rBeQVIr4b67OVpmsFeyYUVp9C7O53WU+8=; b=w4nIWAEa0RxTDosKmSnFhPj6naTFR2D+DFgAZi3e1UbEghlTczzI6eRXGB8qzjn5Ld5k+Cv1/TnUwDu8wfuKgmj+WzIlhmbwFkr0JwGG7Jrow8jX9HXnnQMygt3z7gCLdWnyuAELNzaKQfOed7mJuDThw1SRseQe0JZWYmJghi2OpI70Z3y3F5PaOU09TI2xv/Tayk1/TpzAsM3bEeEGlzhzardP6aWXBgF49sgPCTx2YL8A5g07/0WZ9NVo+yPv86swe4WNafLTEYCg/iTa5RLIuejXtFeMVQpQ6ieu7PrG5aDK1Yy1GAwGZkGfJOAgLpZr/HhtiJivIoLAK3dDRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j9Nx89r/Z1rBeQVIr4b67OVpmsFeyYUVp9C7O53WU+8=; b=F2Qk5kutFEOz4Nu80DIMXOs+sw8ziY9Y87cEa+lGpmPI1U30LboKZVg86KtXuyhIVJ4DetMOpdvo7DPn5ryK6TFDLVsW/QrvqRlcAN6wQCkcOLYRVq+PcyZrw1rmc+JpnLJHDU9FCOqK9ma5uT7gcwyiY/ZRoWiPY/REGXcA6ps= Received: from SJ0PR03CA0197.namprd03.prod.outlook.com (2603:10b6:a03:2ef::22) by LV3PR12MB9355.namprd12.prod.outlook.com (2603:10b6:408:216::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.18; Mon, 13 Jul 2026 07:22:13 +0000 Received: from SJ1PEPF000026C8.namprd04.prod.outlook.com (2603:10b6:a03:2ef:cafe::46) by SJ0PR03CA0197.outlook.office365.com (2603:10b6:a03:2ef::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.202.19 via Frontend Transport; Mon, 13 Jul 2026 07:22:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by SJ1PEPF000026C8.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.223.9 via Frontend Transport; Mon, 13 Jul 2026 07:22:13 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 02:22:09 -0500 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 02:22:08 -0500 Received: from xhdsneeli41.xilinx.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Mon, 13 Jul 2026 02:22:03 -0500 From: Srinivas Neeli To: Vinod Koul , Radhey Shyam Pandey CC: Frank Li , Michal Simek , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Suraj Gupta , Marek Vasut , Tomi Valkeinen , Alex Bereza , "Folker Schwesinger" , , , , , Subject: [PATCH v4 3/4] net: xilinx: axienet: Derive RX frame length from residue in dmaengine path Date: Mon, 13 Jul 2026 12:51:45 +0530 Message-ID: <20260713072146.45269-4-srinivas.neeli@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260713072146.45269-1-srinivas.neeli@amd.com> References: <20260713072146.45269-1-srinivas.neeli@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000026C8:EE_|LV3PR12MB9355:EE_ X-MS-Office365-Filtering-Correlation-Id: 6753c5ae-ffd8-4753-2c66-08dee0af75c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700016|82310400026|23010399003|7416014|376014|3023799007|6133799003|18002099003|22082099003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info: pTGL4bl7NF1vs8wxxN6pMQppazsE4cPP+RSOaHaPd5nOYEO0DKryN6RifPuIKWU8oS4OddpAHn7qv7uhcvRQUuzYI7wEe/tEjhiDkDNUTIbYWT1+6kvsLnbTtYhm6TPdPVn9qScIS6m1Dy6BKBh3/cZXfkeStXQw7f1+iLz6K18P6s/Hr9OfgSIWxsBT1UN1sdkioX0E9urReBmQPFKJLsuItyiUZJZ33/DKqHtY3nAUSe3DVNd9f9tRvaW5NLIopj2DluuiEYtkUv3S2FBl4zuP7ksdVo8EU4dNuctjyrnOfG7BRQsnkfa6KLqSGJx/xZBmEAcWJg0SO7XyqCcIia9OoEjLcIFOQrCGTnlYoXPri03BVDs8rCnp72KvEcJGBGoDbknNJB9XScEptiBSH/gj/4qNg0dStWKrOFKYOJefgbqnRRZ3RDNBTea5jFQI3OVAunITik8c81nW3bi6Mb8GiGGwwHmrrRubWmeQm6HCB0tG1WfXwYZ6GQQ8ZA3JvEuKcsGTIg8B/WhDlkeO6evGUwK97hAe0z/DoYUdcoX+z1wOwaI6JmjwLi/L3LUMYpXwVQ2wrzUImx8WtcDu/Fu3fofxkhZ9K2MgzydwC5jV5i2Xi+ZSDMfHOD+n2QMRZ7MASELT91bAP/M206p+hIkWScYQejzyWsqfp4UMFmgy9+6P4r2yFZMzCxp3QZ0aq759bwjdcrXgH13bYa/t8Q== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700016)(82310400026)(23010399003)(7416014)(376014)(3023799007)(6133799003)(18002099003)(22082099003)(56012099006)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tHfoXw9A9oa2NKdxDDUQUyRnw4fQlmfT4YFHIhptN/FPNuR3B34xrvKpqaDE071K4wUJGM2zYx7Y9omX7YqwsC6/E8/nobVtONQE5P7h/+pw+VLK5GP9jWhFT7ayzbLWobf7wJLC7hxxhCljffUWilqBhgzNRWCWR7V8upEB+RCWRMdQhsVMdc50DDkEN89JKA+hAGqktrKH+iTQD2VVV/i+/rpL0NAs4mw5qoDHMqUKwsxRIVhjub/rP7zM4AiyyQElPaQtwHlxiMwhbAamDcUtsIp4+TzqPuBPnV1FpZiKh72VaqxIHi3Vy7krpkDLGyqgfWfQylL3Pq6lWeHAEgyPr0q+4gp7SJzQ/V398A/+AZepFVUfh9BGx0aq8ljuiu+DEjdHN80NRBWmCFQQb9UIBG3OF2x5N8JSNVXo5Q73SSq9duXJsiKnYnoCCmqz X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2026 07:22:13.1282 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6753c5ae-ffd8-4753-2c66-08dee0af75c0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000026C8.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9355 Content-Type: text/plain; charset="utf-8" The dmaengine RX path derived the received frame length from the descriptor APP metadata. That only works when the optional AXI4-Stream status/control interface is present, because the hardware populates the APP fields solely when that interface is enabled. On designs without it the length read back is invalid. The AXI DMA engine already reports how many bytes it wrote into the buffer through the standard dmaengine residue mechanism. Compute the RX frame length as the posted buffer length minus result->residue, which is independent of the status/control interface and correct across all designs, including multi-descriptor frames where the residue is summed over the chain. Drop the descriptor metadata lookup, which was only used for this purpose. Detect a failed transfer from dmaengine_result.result instead of the metadata pointer return value, and remove the now unused LEN_APP macro. The transmit path is unaffected. It still passes APP metadata for checksum offload and derives its length from the skb. Signed-off-by: Srinivas Neeli Reviewed-by: Radhey Shyam Pandey --- Changes in V4: - Renamed subject to "Derive RX frame length from residue in dmaengine path". - Condensed the commit message. - Dropped the Fixes tag. Changes in V3: - New patch in this series. - This patch enables axienet to work on designs where the AXI4-Stream status/control interface is not present. By using the standard dmaengine residue mechanism, the driver no longer depends on APP fields being populated by hardware. - This approach replaces the V2 xferred_bytes mechanism (V2 patch 5/5), making the dt-bindings patch (V2 patch 4/5) for xlnx,include-stscntrl-st= rm also unnecessary. Both V2 patches are dropped in this series. --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/ne= t/ethernet/xilinx/xilinx_axienet_main.c index fcf517069d16..67d1b8e91d68 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -53,7 +53,6 @@ #define TX_BD_NUM_MAX 4096 #define RX_BD_NUM_MAX 4096 #define DMA_NUM_APP_WORDS 5 -#define LEN_APP 4 #define RX_BUF_NUM_DEFAULT 128 =20 /* Must be shorter than length of ethtool_drvinfo.driver field to fit */ @@ -1159,29 +1158,26 @@ axienet_start_xmit(struct sk_buff *skb, struct net_= device *ndev) static void axienet_dma_rx_cb(void *data, const struct dmaengine_result *r= esult) { struct skbuf_dma_descriptor *skbuf_dma; - size_t meta_len, meta_max_len, rx_len; struct axienet_local *lp =3D data; struct sk_buff *skb; - u32 *app_metadata; + size_t rx_len; int i; =20 skbuf_dma =3D axienet_get_rx_desc(lp, lp->rx_ring_tail++); skb =3D skbuf_dma->skb; - app_metadata =3D dmaengine_desc_get_metadata_ptr(skbuf_dma->desc, &meta_l= en, - &meta_max_len); dma_unmap_single(lp->dev, skbuf_dma->dma_address, lp->max_frm_size, DMA_FROM_DEVICE); =20 - if (IS_ERR(app_metadata)) { + if (result->result !=3D DMA_TRANS_NOERROR) { if (net_ratelimit()) - netdev_err(lp->ndev, "Failed to get RX metadata pointer\n"); + netdev_err(lp->ndev, "RX DMA transfer failed\n"); dev_kfree_skb_any(skb); lp->ndev->stats.rx_dropped++; goto rx_submit; } =20 - /* TODO: Derive app word index programmatically */ - rx_len =3D (app_metadata[LEN_APP] & 0xFFFF); + /* Actual length =3D posted buffer length - residue. */ + rx_len =3D lp->max_frm_size - result->residue; skb_put(skb, rx_len); skb->protocol =3D eth_type_trans(skb, lp->ndev); skb->ip_summed =3D CHECKSUM_NONE; --=20 2.25.1 From nobody Sat Jul 25 22:03:04 2026 Received: from PH0PR06CU001.outbound.protection.outlook.com (mail-westus3azon11011010.outbound.protection.outlook.com [40.107.208.10]) (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 A36A2361640; Mon, 13 Jul 2026 07:22:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.208.10 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927340; cv=fail; b=i/d4g9qD+x20pDzI4RipbDMFblkMK+OfvC7gqeTNgRN5oQBmHfaWXJiMPHpTpzqf5Q4Z0atLv51A6UYocti5l80Dff6cIThKEpkn8g7SGm80TSYx5Y2GreUzN3r8M2zslKwBZVMoQ/03ylK0Jft+MPmxyLEq7hmZtbPQTzy8Kqk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783927340; c=relaxed/simple; bh=NFM+bfYKQB7P5UG4FPUycR9XDIklVnJJv/jLLoEphuU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=A5ujXF2mwjmV64VHHUYnvON3iRrnEb1bMlKPejZJRBbUspSXnVSLYuzMyNx80txR9rIyvuxMNmrVrEPO89RgnNyxoIRzGrQFq5y4SplQTtge/UOgNypILSq1zP/5L9KwUEHX7G2lF5ZaqUqsYFk3YzGME2zb+F50zJecarqtKok= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=QNc82diB; arc=fail smtp.client-ip=40.107.208.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="QNc82diB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZfJhwoSPFqE5Y8+voJjQpet6/YWIaKaLyNhsmFsJoUM+C63dAYHZNH5gQYGwz3ohz2rPScKnjby6oS02dV2hfOxBCUcz3+MzauVvqLrKErVSzAb1ujM1ima5DoDVxmibfnbjQeffUAmdR4hEZLsLbE7CSGKvjJ08KEQIVDn2IYcjCFV/g2RFIQBTGPeilQBAPyVE8eKXkOjUeVInVQdhUllCajsjiiF9fu3y1p1EWfrMR6g0+0N4WBPEfMy8LAB9+/BRB7xFcWhykwCL5BnA9xHB2kDbeABr9Y3LBLr6VY6f7lYad59GS4MRT0p9rfVxjo0T0gDQ7TIV1KtKZeO4+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ILs0zhuWj2N5J/O0cLyjNuA1PgMldmppg86cnxVkA3E=; b=vCKAar2irVhPWQ9Up9liRnax7wAYkJkxDRFSaR5Jm2oq3Fpg+Cofz2VTndKgSt7XfRagyqW9i1dS3tqIzpYphEiW058XL7BITVaOvhtXiOvdsBsBuLZHwH/p4HFFIAkPph1SQImjGXrKI0yguHHUPTApEZHvLt32JstdGKvMtTdI5VUDBdDHRpWlEgF1Gf5Qe1xiJDECkatUpI2hccP0IbGA+97eS74LfRoClmvHd/34Jo6iv9e+roFvH7EnF3ziyZlwa/hP0t0ay9/dm3NYiPalw08KA4KgiFrzR2u4rwas7zeHDIplvXHx0tVL5x/hYGp86aj7Lg9ivOdtUrF+dQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ILs0zhuWj2N5J/O0cLyjNuA1PgMldmppg86cnxVkA3E=; b=QNc82diBwzNUvXhQnHUxQr/Cthb9y3ZViKdJqRFGHtDZ0hdNEnOytdapp0zAKTC+kpGGB8zjVJYu/mLUYJzHRzAMrqauKeCnzMIBaLswrdxY17/jmj1TY2jhrUz1lXqe4pl9WSeJtAzM0lGTRTwr2DWrnbuqXkwsAaYlGgjsqtI= Received: from CH0PR03CA0090.namprd03.prod.outlook.com (2603:10b6:610:cc::35) by SJ0PR12MB8615.namprd12.prod.outlook.com (2603:10b6:a03:484::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.18; Mon, 13 Jul 2026 07:22:14 +0000 Received: from CH2PEPF00000148.namprd02.prod.outlook.com (2603:10b6:610:cc:cafe::9e) by CH0PR03CA0090.outlook.office365.com (2603:10b6:610:cc::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.19 via Frontend Transport; Mon, 13 Jul 2026 07:22:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by CH2PEPF00000148.mail.protection.outlook.com (10.167.244.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.223.9 via Frontend Transport; Mon, 13 Jul 2026 07:22:14 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 02:22:14 -0500 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 02:22:13 -0500 Received: from xhdsneeli41.xilinx.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Mon, 13 Jul 2026 02:22:08 -0500 From: Srinivas Neeli To: Vinod Koul , Radhey Shyam Pandey CC: Frank Li , Michal Simek , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Suraj Gupta , Marek Vasut , Tomi Valkeinen , Alex Bereza , "Folker Schwesinger" , , , , , Subject: [PATCH v4 4/4] dmaengine: xilinx_dma: Extend metadata handling for AXI DMA and MCDMA Date: Mon, 13 Jul 2026 12:51:46 +0530 Message-ID: <20260713072146.45269-5-srinivas.neeli@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260713072146.45269-1-srinivas.neeli@amd.com> References: <20260713072146.45269-1-srinivas.neeli@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF00000148:EE_|SJ0PR12MB8615:EE_ X-MS-Office365-Filtering-Correlation-Id: 345e7316-9326-4a95-ae13-08dee0af7697 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|23010399003|1800799024|7416014|376014|36860700016|6133799003|11063799006|56012099006|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: ePd0L/AZD1Gsod91Cp5N2zZSGu7nPB+9b7V7IKE2C/GVG5W1geW3HFy6LALqq85Vxu2qfuKnEDwoemFUdY6p/qtaVTlJ5lgvbPT/TiwQJu4kb+Q8QbN3XdIq10p0hzYYsV7KBVHPc1j+b9gLeCq6H3KnFxjGlA+WueqmED9qFalk/JjkuY/NTjkOuYp0kMGFYu62VcHBfuHieDZVS1/6x0PgTk1OxZDoqV2+Pswe3XQdfqquM557AkN/II0YwwRpJJZ73vBYh7zppOP7R9MeAXiY65cS2cj2ThExrf8YqbFeSU0sD8GPJ4yjCvNIFk4qO46AelNOIqpf1XmnDiRqpBriqA9fCF4NHLtmcMlSbedCXJiN81HEpzCLtSOUhdkiLqDRk7MFVzm7J7UT+qrDAoKbEfHFkWVAyLkZl/DJUBoD+awou8+K8b5Bd5pPaLoalPywQlKDnwQXX6zLkvnPYog/xyhbfOH8QNOxmJJp2FU2dDJbkkFVUcgjnIIZK9NY2+ovyXJ6o49S5agpiGIUskk9tFpS8SKcGEJzdJbDNgHN6zc5FoxUwM9B2VZ0tlWoaNG9ol3DdTrA42+cwzjwblQvNCLCzeTht7UdCokkWUtHHDgLFT3xG4+V16sp1owATd9+LP7aba+6hGVY0QG8qTnlSOJYubzqMK7Ow4PjqEd8L8KCHtOaXTomCc7tHtlDweebEacGBR9ogjOqEE2uaA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(23010399003)(1800799024)(7416014)(376014)(36860700016)(6133799003)(11063799006)(56012099006)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: N8UoRJ8o1MpL7Aj3qNvm0gBbdkR4ASXdmIGetGEl4f8c2ifw93PUO8hw8z8OujTOOK4OSWwY8Cf9OipOlvRIyPEES7wBgtywj88ijd6HdF1kkt+wsahmRdOrWzKHtlnbm8D2Us1orPaW6n3Eq+l1ITgz7L0Bx1cW6xMjr1NsRyM6cVtIY12Z2rlnVq/WT9YZmvXr0KoiM1ArAkKLsgDdgGFe41KzI/DcZ3aoqyCC0qSQH3bsF2rJBNCZvfY5vlflTR5dSLSn3DL5XY37Zyy7cYPbWYCLE+YSqGfnwOrVyQVpHSjBFD4Js/75B91d/PAkJySCJs2bivbjak8l4oLg5clQ6HJnWHGUExB9yNg0G4pvTGydXT9z+8r+LLFagBIGS+epumCYnlzGQReonWJ7FrDZiuyGksEQQMGVrXxsyJD4IHbvegJdbkj6qNgJd2Tf X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2026 07:22:14.6181 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 345e7316-9326-4a95-ae13-08dee0af7697 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF00000148.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB8615 Content-Type: text/plain; charset="utf-8" From: Suraj Gupta xilinx_dma_get_metadata_ptr() exposed only the descriptor APP fields. Each descriptor also carries a status word, and AXI MCDMA carries an AXI4-Stream sideband word holding TID, TDEST and TUSER that clients may need. Return a pointer to the status word so clients can read the status, the sideband and the APP fields together. The exact index layout is documented at the function. Take the pointer from the End-Of-Frame descriptor, where the hardware writes these fields. For AXI DMA the pointer now starts at the status word of the EOF descriptor instead of the APP fields of the first descriptor, and the payload grows from 20 to 24 bytes. No in-tree consumer is affected, since axienet reads the RX frame length from result->residue rather than the APP fields. Read xlnx,axistream-connected for MCDMA as well, and attach metadata_ops in xilinx_mcdma_prep_slave_sg() when an AXI Stream interface is present, so MCDMA clients use the metadata API the same way as AXI DMA clients. Signed-off-by: Suraj Gupta Co-developed-by: Srinivas Neeli Signed-off-by: Srinivas Neeli --- Changes in V4: - Restructured xilinx_dma_get_metadata_ptr(): AXIDMA is now the fall-through path instead of a separate branch guarded by WARN_ON_ONCE()/ERR_PTR(). - Rewrote the kernel-doc as an index table covering AXI DMA, MCDMA S2MM and MCDMA MM2S, and documented that the pointer and payload length are the same for both MCDMA directions. - Added an inline comment explaining the union aliasing. - Condensed the commit message. Changes in V3: - Renamed subject to include "AXI DMA and MCDMA" (was "AXI MCDMA" only). - Complete rewrite of commit message and implementation. - Metadata pointer now returns status field at index 0 instead of APP fields, exposing status and sideband information to clients. - Changed from list_first_entry to list_last_entry to return the EOF descriptor where hardware writes status and APP fields. - Added explicit handling for both AXIDMA and MCDMA types with proper payload length calculation. - Added WARN_ON_ONCE for unsupported DMA types. - Removed the 'chan' field from struct xilinx_dma_tx_descriptor (was added in V2) as it's no longer needed; channel is obtained from tx->chan instead. - Dropped V2 patches 4/5 (dt-bindings xlnx,include-stscntrl-strm) and 5/5 (xferred_bytes support) as the approach changed to use residue. Changes in V2: - Added support for MCDMA metadata handling alongside AXIDMA. - Added 'chan' field to struct xilinx_dma_tx_descriptor. --- drivers/dma/xilinx/xilinx_dma.c | 49 ++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dm= a.c index 1b5b00f08c5f..2be95f0ba3ea 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -651,18 +651,49 @@ static inline void xilinx_aximcdma_buf(struct xilinx_= dma_chan *chan, * @tx: async transaction descriptor * @payload_len: metadata payload length * @max_len: metadata max length - * Return: The app field pointer. + * + * The hardware writes the status, sideband and APP fields into the last + * (End-Of-Frame) descriptor. These words are contiguous, so a client reads + * them by index from the returned pointer: + * + * AXI DMA: [0] status, [1..] app + * AXI MCDMA (S2MM): [0] status, [1] sideband (TID/TDEST/TUSER), = [2..] app + * AXI MCDMA (MM2S): [0] ctrl sideband, [1] status, = [2..] app + * + * For MCDMA the pointer and payload length are the same in both directions + * because the union members overlay the same descriptor words. + * + * Return: Pointer to the first metadata word. */ static void *xilinx_dma_get_metadata_ptr(struct dma_async_tx_descriptor *t= x, size_t *payload_len, size_t *max_len) { struct xilinx_dma_tx_descriptor *desc =3D to_dma_tx_descriptor(tx); - struct xilinx_axidma_tx_segment *seg; + struct xilinx_dma_chan *chan =3D to_xilinx_chan(tx->chan); + + if (chan->xdev->dma_config->dmatype =3D=3D XDMA_TYPE_AXIMCDMA) { + struct xilinx_aximcdma_tx_segment *seg =3D + list_last_entry(&desc->segments, + struct xilinx_aximcdma_tx_segment, node); =20 - *max_len =3D *payload_len =3D sizeof(u32) * XILINX_DMA_NUM_APP_WORDS; - seg =3D list_first_entry(&desc->segments, - struct xilinx_axidma_tx_segment, node); - return seg->hw.app; + /* + * The union members overlay the same words, so one pointer and + * length cover both directions (see the layout above). + */ + *max_len =3D *payload_len =3D sizeof(seg->hw.s2mm_status) + + sizeof(seg->hw.s2mm_sideband_status) + + sizeof(seg->hw.app); + return &seg->hw.s2mm_status; + } + + /* Only AXIDMA and MCDMA attach metadata_ops, so this is AXIDMA. */ + struct xilinx_axidma_tx_segment *seg =3D + list_last_entry(&desc->segments, + struct xilinx_axidma_tx_segment, node); + + *max_len =3D *payload_len =3D sizeof(seg->hw.status) + + sizeof(seg->hw.app); + return &seg->hw.status; } =20 static struct dma_descriptor_metadata_ops xilinx_dma_metadata_ops =3D { @@ -2639,6 +2670,9 @@ xilinx_mcdma_prep_slave_sg(struct dma_chan *dchan, st= ruct scatterlist *sgl, segment->hw.control |=3D XILINX_MCDMA_BD_EOP; } =20 + if (chan->xdev->has_axistream_connected) + desc->async_tx.metadata_ops =3D &xilinx_dma_metadata_ops; + return &desc->async_tx; =20 error: @@ -3287,7 +3321,8 @@ static int xilinx_dma_probe(struct platform_device *p= dev) =20 dma_set_max_seg_size(xdev->dev, xdev->max_buffer_len); =20 - if (xdev->dma_config->dmatype =3D=3D XDMA_TYPE_AXIDMA) { + if (xdev->dma_config->dmatype =3D=3D XDMA_TYPE_AXIDMA || + xdev->dma_config->dmatype =3D=3D XDMA_TYPE_AXIMCDMA) { xdev->has_axistream_connected =3D of_property_read_bool(node, "xlnx,axistream-connected"); } --=20 2.25.1