From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.84.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796074222; b=NU3K+yTSWwwQQdnSmvWIPKXGaglJ5uk7R5khCOx5KK+5gld72U4I6JjBw5PwmzvEBHue V5+yivHa6CeL/auo/oonjWrTZOYenJo17InzW7Ja0WlH1DD0Ir76NUXQHoZYoiUb+QtQI yQJIQNdz9n1DVYRHVvUg8SOFwcDEhkHh4Drw/UCZOGyvnQUr0hKFjiCx2OKO/XhhP6zO9 1/eXrKu24l3TfJ3RqkbRaLsWJ9nVq8nlDImG1gBuyObe7z3NmKtOeNQOzxpWhNyEapbug RG95basI153ICvUF4tP1lyDHX8kqdkn4hlZ1Qb29/eAqeNqEcpqo2cij37N3UDAPxUA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796074222; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:Content-Type:Content-Disposition: In-Reply-To:X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=4dxHLKGbDY6IJe7Xw+9Tj91A8h8tHDxn/dkEuXk4q3g=; b=cuKwMA/mnLNyD0FSH65r7wIvCMnaTolV9DrX/6LrKlrAWgULnytijKByD6NfHUNkQWtz VgpDKc5ZhVWSZeJqinU0Qaki4JO1vdlX+8fS/Ueuq7buDagSaq5XHLNDa9w4fEp58hHgf Ojli6MIeixhkrI69dJCdWOXcyQGDdazKzTizGs2tKRVE05auq8Tt9MD2myPGo4owCeakV 4u3lEWF4VaNHD5NPonrz73/3yLqV6hr7ZMNHAereZB6Oox5i9ef5V0Tt1uRUiqCILJM5g hd8DYqvqW/wGRThWBfFduz13BQ8EBUsMtYYqiI1+KbDTlseknJzqbBPQFcQ4vS75l/w== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-NXP1-onmicrosoft-com header.b=mFHkLnRP; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.84.1 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11010001.outbound.protection.outlook.com [52.101.84.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FBF7606A333; Mon, 30 Nov 2026 21:30:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1FBF7606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-NXP1-onmicrosoft-com header.b=mFHkLnRP ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KddwSezWNXyEhkcz4y1JOtoZ/RNohRcWuZOzSt5dXTaXIjrLtjEiukPX48SUiAPx73rY6nUU+OPXVollvBRzYrItMPhigKXA/GOVCgH+VBb24LCPwUu3RxAQD9eEhQitsPi/BdS+gR4X21wrKTTAaGAkti8YWizTsedPsc7wlwBQ3ORRPbBgvC/ZVNkHyf5XgZU5NTc5WpuEgqhHTUvbfvDngtswc4CBa8NA85xe6MC85VlTFJFSD4W9Q1EzsYhnSzIqDGs8WAevitsxYPLpcbmOCFu48PpMjGzfMdgBZS+gLUsZNAFnrzSU/uDqPpzNAhmAzpHGmoL8DiOOgDbScw== 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=4dxHLKGbDY6IJe7Xw+9Tj91A8h8tHDxn/dkEuXk4q3g=; b=yeM+5lWzShv5iV/YTl0Br92tCOZPKOIdJBBdGRPBrklaGKDaJwSJ6FoRfgWLHEe5wv9z+SalplhECi4g5bCL6yz5/zQKG/BgEuU4hKlg5Yhn6YjIFVsNuEtkDwlkIDTuhRzypd9LcfiMNSoMe+3Yl4YousdQhxW6DcZl71G+lYGvvtHfkXmyKP1dYuCUkUb3HKCtg/v8Pwktc3WWDRYUqrJfjxbqat65KqQykNs6WvorrWXp5YNT+Kt2htR+dIp4ECEpisz9bmeQkcnpQb2Ry/TQq7/I3u+p/Eg7H94w0gzxLgYysfXPfH3FRv9BAY6MoeCzQlbKtrZ6LMCKLdirdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4dxHLKGbDY6IJe7Xw+9Tj91A8h8tHDxn/dkEuXk4q3g=; b=mFHkLnRPtYOYDbQaH6fmT14jtIIWLkrd7ercB2cNdFdOstXg8B9H2wTcQKDT4TnnJmy976DWSNqO9iUwRyXfcX4KWuejU+jag52Yq+QOeJ82P865KQjM36VfRwHqwOhc38XZOwKKzOCXK/C62T0CVI6st50CQBkGhLdz/DCX7CXOTp+FHSCimdZHyoKi+124yH6DB//ETID3JTU5kOZbnYTbbaYCuUePM7Um5poQhLm5JmXOnX9v2N6N1F946xssmgaoLmQ8Tg59cyrH6n/kZ6sJiRXSV4kg27LpAO5H83oUzGMQAPf4MQQ9jhiLShvMLH4j24cuK00HdYWxJJQeTA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from MI3PR04MB12438.eurprd04.prod.outlook.com (2603:10a6:290:76::14) by AMBPR04MB830534.eurprd04.prod.outlook.com (2603:10a6:20b:798::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.12; Mon, 30 Nov 2026 21:30:19 +0000 Received: from MI3PR04MB12438.eurprd04.prod.outlook.com ([fe80::c715:c32:8bb1:b70b]) by MI3PR04MB12438.eurprd04.prod.outlook.com ([fe80::c715:c32:8bb1:b70b%4]) with mapi id 15.21.0662.012; Mon, 30 Nov 2026 21:30:19 +0000 Date: Mon, 30 Nov 2026 15:30:12 -0600 From: Frank Li To: Daniel Byrne Cc: Vinod Koul , dmaengine@vger.kernel.org, Vinicius Costa Gomes , Dave Jiang , Frank Li , Dan Williams , Ruoyu Wang , Zhejun Huang , Changyul Lee , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 2/4] dmaengine: idxd: list a new channel only once it is complete Message-ID: References: <20261130195203.1901143-1-daniel1.byrne@intel.com> <20261130195203.1901143-3-daniel1.byrne@intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130195203.1901143-3-daniel1.byrne@intel.com> X-ClientProxiedBy: CPBP307CA0020.DNKP307.PROD.OUTLOOK.COM (2603:10a6:380:2::6) To MI3PR04MB12438.eurprd04.prod.outlook.com (2603:10a6:290:76::14) X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MI3PR04MB12438:EE_|AMBPR04MB830534:EE_ X-MS-Office365-Filtering-Correlation-Id: bfd60d82-1297-4511-dd31-08df4f29220e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|23010399003|19092799006|376014|7416014|10067099003|56012099006|261022075727099003|261022113327099003|261022105027099003|261021121427099003|261022115727099003|261026130827099003|261026140227099003|261026121527099003|261021130227099003|261021135927099003|261021123027099003|261102123227099003|261102130727099003|261028144727099003|261009223027099003|18002099003|22082099003|11063799006|5023799004|4143699003|6133799003; X-Microsoft-Antispam-Message-Info: XoHcQOcbMdSh+eTtQSv2x4/j3A/RvyiC0QOZvv72G/goE8prVebPhjHlrXR0xwpiBFNKLGY7BF0HF8P4PP7RfiGixMdeNUt7G8Dqfg7CX4EaNIESkZS3GbdHevi9awAd95/UxVh0oLGhPf9QDnWX31D5QfF/96dyUUc2FPplE76r9ooc75TOwffnM3PoU52GVONzBxE0gd+2ep536CU3hZqKtYU6ualSql9mCV8aosTOTHxp8VAUKUCixFVlCfkDDoXu1bEQqpS1N8R/ixbhNqyZVIHgyqumR0lYt/gusdqTaTStNzLsqXxqW/TgNJC0FexPfvjdP7h2pxyQjV2DWNJ552HsWP6rrHRRUjixQkcEbuaQdnpN2gjWriAHPF5wRHgH3ZKvV/Vi32D2vXBK/DiDfGDqDcP9VtCGS21ZtLKLk4uwvkQU6HRLV8p0oj0e2BuvdWn398tt3dLYHiYoVkhoeIeuazTdW9DW1/j7NCYc8KSOrzMniw7RXjKfdeUGhXWq8iOJn6YNtRZ28aq7XnbcAH8cU+O+bq/Z5s7YIqiBxSo5PtH6ekl91Yu5xd6j+7iqJVmdDUGavgVra6Z0bjpVnkq5aYXLDTdzHBfmAqPnS9MXG6H8h6RjxPTCVruR X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MI3PR04MB12438.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(23010399003)(19092799006)(376014)(7416014)(10067099003)(56012099006)(261022075727099003)(261022113327099003)(261022105027099003)(261021121427099003)(261022115727099003)(261026130827099003)(261026140227099003)(261026121527099003)(261021130227099003)(261021135927099003)(261021123027099003)(261102123227099003)(261102130727099003)(261028144727099003)(261009223027099003)(18002099003)(22082099003)(11063799006)(5023799004)(4143699003)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qQOGwli1CGVEAVYXyYDK7lCyPCOmU7s2qI0nhT8dANBzB47MiSHQocr+z/hv?= =?us-ascii?Q?gIgtF0fVrCtSNwUTMjbBeTY5IxUk11qdtRmvfU905bZlnLhZH7dq3G31PEPL?= =?us-ascii?Q?gUPcEtx2GAJDSIZSQ7C1NsDYXNbwjxetJda2HAsRtQ6PLsEdKQjTNTlXjkdQ?= =?us-ascii?Q?gv3JaAryPKSDIBdiHH3nJOfsGDII/t1sJdzbZRGDNLn6NItlonpNhJ8Q2dVp?= =?us-ascii?Q?IRZHph6SNS8YK7j/eXekLblwdRCuIjFeK9L+rcqPulhnwSZ6JqltjHuEfAQ4?= =?us-ascii?Q?Z7VkZDV6YvNmiQzJ8+jliWRAJ2INbWX3bcgw7EsJAtVBp4zvSQtoAi/r6CgI?= =?us-ascii?Q?0ZLVee/24IOfp5Z9wKTux2MbuNF1vS3vNEqDrw3qhp5ChpP1z1NrnuxRrbUk?= =?us-ascii?Q?/ikLCbYaP1OnuCULwEMVhHQVzcH6Hb+JkQ3NtcaiREL4misgfVecq/ELXfoh?= =?us-ascii?Q?wJ36emavQ5te0sEAxQcP9/5A7cJ6KQYSwAOwl0ObHCS1FIoFJwWLT1IAZI5k?= =?us-ascii?Q?kErEtJbygTAAZmXt5oxI9YoNDnfBgMJn03lTq0ubVtf/An83kRDNQPPrsHDv?= =?us-ascii?Q?LSf24tfPyMPvcBBZ4SlugHK3+VDnDtBI8Zdzc0WZAFQApNEF6zT213xkMM0G?= =?us-ascii?Q?uQ75ShC9MlLije/FW4osai+jGyPJwYRW1NokN8HbSCakNt9HnOb2HzhBmfd+?= =?us-ascii?Q?JcBllLNuCo/hdVRrlnWOrNjI3KFLvBXchGoa4L9WEq5tnNzvKXL5UkyFcYYh?= =?us-ascii?Q?L75PMMs1MVoQOqpuZtlqp550iTLOZcfOhKXEMX14JOmDAdHWIBi5MnSFUsew?= =?us-ascii?Q?Alw7huEBeAMnx0CM0Q7lLgVtNcM98Ytj4i2XTUKSmr64mk6rbK7w1QWqT9Ww?= =?us-ascii?Q?Uo40ynMU/Cp6Ac1fzLgSnWYKEkKY5OI1AG3Zeym7ZN0Y5NbKjP5k1iIUX/7X?= =?us-ascii?Q?VPbwewSbbfG3ksYIt0iEZG/YITUD5RZ8smdZv6G7QuU294s656YHbAWfP1FV?= =?us-ascii?Q?WElrXlZUrq+wSasI2+mrXHKbnCWarpjyxhQM6/n+h5aCaopcVlx+AQ6vCfbk?= =?us-ascii?Q?aGzouM1kPpdUMYo/VMeCipwu7m5nBKN/hxN+tzGun6L2k3KG1CM5+J4w/rvO?= =?us-ascii?Q?wzmLzVgmCd2SZANxhqZzVSCBTy4rZfeZ/BEIoKBZPk2u7tO3PWrtOFv5qsXR?= =?us-ascii?Q?XkFwqMciwMm666UkeE0bVeU98Z085Z8Krl94Rhm7/5RSru8/VqBMXZQg5lNR?= =?us-ascii?Q?43Pv9Xm3y+GVpqewZHKb/PNMeWghf9viZ/GZVcudqIuPigHRf1Yw/Pvb7WJt?= =?us-ascii?Q?w9CEjcRTTQVQa2AmZJ7C9m8kOSch+kmdTgUxR5SKDLq5kRtX9p6NE96oyL6B?= =?us-ascii?Q?BavfkBZKVmEyTHeAYNTwQLOaLCOGaAtuQsQ027o1eeP1qlKd9pQMHQm05+l/?= =?us-ascii?Q?F9BS6Q5t2V4RyGjin0syE2FBLrn4D964jZw5WJt+Z/VTbeX2+/kmPG3x4cTB?= =?us-ascii?Q?BbPTgb8i53lXDNU5V/c/puCnWI9b1PXUgjPYltqRk10SjnkbDOvL7QJACM99?= =?us-ascii?Q?C28TqaXMkKHz3IUBuUcwKpADLZxaQvOsi/dhA+WqAFS0eQByO0DJlO8p2DQz?= =?us-ascii?Q?rvxz6SlLHdUIVBaKbLrSxNI5U4SFA3sTrolMQKHC+WoAU856jEtJorw/ZZoP?= =?us-ascii?Q?Yi1yLa/Mj1N2yNb6uyVYEaHyhxbdxzOlaqKLc8AtBZOdO83XnlLJRQGO4ABI?= =?us-ascii?Q?bmmo/xElazcQbgWyp/j+KRBzHxl7RiCksNxt98KTyYbs3U66qWqW?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfd60d82-1297-4511-dd31-08df4f29220e X-MS-Exchange-CrossTenant-AuthSource: MI3PR04MB12438.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2026 21:30:19.5592 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mm16BmG2FeyKSjqYgA4ygMRklmOScA+i9wu0lwaA+FecTSG8kfmLQBLc5zEcWnDgvlFbCsQ6uk0mP38OoTXQlHqvuYSiEui3Npv/2gpID0kJ2lXVHnzP1IOQ+Kxc43vN X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMBPR04MB830534 On Mon, Nov 30, 2026 at 11:52:01AM -0800, Daniel Byrne wrote: > idxd_register_dma_channel() links a new channel into the dma_device's > channel list before it registers the channel, and sets the channel's > work queue only after that. The dma_device is registered when the device > is enabled, before any of its work queues, and a channel request walks > the channel list of every registered device under dma_list_mutex and may > hand out any listed channel without a client. A request that runs while > a work queue is being enabled can therefore take the half-built channel, > and the allocation callback dereferences its NULL work queue with > dma_list_mutex held. After that every channel request and release hangs. > The link runs without that mutex as well, so it races the walkers. > > When the registration fails, the channel is unlinked again before it is > freed, since "dmaengine: idxd: Remove channel from list on registration > failure" [1]. Until then it is on the list like any other, where a > request can take the channel that is about to be freed, and the unlink > runs without the mutex as the link does. > > Add dma_async_device_channel_add(), which registers a channel and only > then links it into its device's list, under dma_list_mutex, and use it. > The driver sets the channel's work queue and initializes its descriptors > before the call, so a request finds the channel complete or not at all, > and a channel that failed to register is never listed. An enable whose > registration fails still fails, and has nothing to unlink, so drop the > list_del() that [1] added on the error path. > > This is a new helper rather than a change to > dma_async_device_channel_register(), whose contract requires the caller > to have linked the channel into the device's list already. virt-dma's > vchan_init() does that for stm32-dma3, the only other caller. That > driver has the same window between the link and the registration and is > left for a follow-up. > > The helper serves DMA_PRIVATE devices such as idxd's only. The channel > list of a public device is also walked under RCU alone, and its channels > hold references for the dmaengine_get() users, which the helper does not > take. The unbind still unlinks the channel without the mutex, which > needs a core helper that unlinks under it. > > The hang is reachable since the dma_device registration moved to the > device enable in v5.13, so this is for stable too. > > Fixes: 8f47d1a5e545 ("dmaengine: idxd: connect idxd to dmaengine subsystem") > Fixes: 397862855619 ("dmaengine: idxd: fix dma device lifetime") > Cc: stable@vger.kernel.org # 5.13+ > Signed-off-by: Daniel Byrne > Link: https://lore.kernel.org/r/20260709062303.4167624-1-ruoyuw560@gmail.com [1] > --- > v2: dma_async_device_channel_add() is declared in > drivers/dma/dmaengine.h, next to dma_async_device_channel_register() on > the new base, instead of include/linux/dmaengine.h; the helper itself is > unchanged. idxd_register_dma_channel() drops the list_del() that > "dmaengine: idxd: Remove channel from list on registration failure" > added to its error path, since a channel that failed to register is > never listed. The message describes the failed registration as it is > after that patch, with a Link to it, and no longer describes the -EEXIST > id reuse; of the unbind's unlink without the mutex it now says that this > needs a core helper, where v1 pointed at a later rework of the unbind. > > drivers/dma/dmaengine.c | 41 +++++++++++++++++++++++++++++++++++++++++ > drivers/dma/dmaengine.h | 2 ++ Use sperate patch to add APIs > drivers/dma/idxd/dma.c | 13 +++++++++---- > 3 files changed, 52 insertions(+), 4 deletions(-) > > diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c > index b1cb466f376f..1d8d2949a810 100644 > --- a/drivers/dma/dmaengine.c > +++ b/drivers/dma/dmaengine.c > @@ -1164,6 +1164,47 @@ int dma_async_device_channel_register(struct dma_device *device, > } > EXPORT_SYMBOL_GPL(dma_async_device_channel_register); > > +/** > + * dma_async_device_channel_add - register a channel and make it available > + * @device: the dmaengine device, DMA_PRIVATE and registered already > + * @chan: the channel, not on @device's channel list > + * @name: the channel's name, or NULL for the default one > + * > + * Channel requests walk the channel list of every registered device under > + * dma_list_mutex and may hand out any listed channel that has no client. > + * A channel added to a registered device is therefore linked to the list > + * only once it is registered, and under that mutex, so that a request > + * never finds it half initialized. The driver's own state behind the > + * channel must be complete before the call. A channel that fails to > + * register is not linked. > + * > + * Only a DMA_PRIVATE device may add channels this way. The channel list > + * of a public device is also walked under RCU alone, and its channels > + * hold references for the dmaengine_get() users, which this function > + * does not take. > + * > + * Return: 0 on success or a negative errno. > + */ > +int dma_async_device_channel_add(struct dma_device *device, > + struct dma_chan *chan, const char *name) > +{ New API should use prefix dmaengine_ Frank