From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=5.75.144.95 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383138; b=phBL4/ip6tXLHBw57RP9ngELetnQ4dJMzVMSFxueqj/V+HMSVd/vNQA/sZ5Cyqf36OTu +YTMJ4y4d0y/XTp3/IOFa4vavxLei3/iASTbMfznli1NBnKNPGsWFDJKe3Wed14cjAZNL YZiC/VM20eNVnHk3+iwZuMR0R+Unr4uO31FzG3eA5KZf0a+U5ZxLodfeykzbnzJy2CPLS opKh4pxUZ4bTCQfWSX8wbXQ3kjKGuIqdiiGuE+VPaG0ropTMhkHsXR3yFSLc7rilUr/Pj unf05fOEF7kUSALvwQxUOI1/Cu5zhhlS1xFZqFZ5oCDQ2muMvG96F5RS2h8K/Y76+Fg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383138; h=DMARC-Filter:DKIM-Signature:DKIM-Signature:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=l/5gdI9rleg1L9THo2lLJD1yCxvPiPLCBbn0TIhYxRc=; b=womovKbG+SvkXTV+epqi18kWb5r/T/uCRn62wlOgN4YqKZMgkCbCETSEmELUJHo4tXPv FB5UzECNOvOq78R57sSgJd+LttP8Q4za6famA48BnLNj1J3y0ZgX2qNEN12b1JKPk+nTi uNeMFh7SpflUyR9ogndNEUaq14noHXjJNFM4Utlbl2vSnfrXP+wpOB2GsOkIEf8lzPXCL 86uC0geEtDYv2w5FqSsOip2CRp+kQxEnDJRMHW6UVcN70RsVupI5QJ2OYmDyMKpYVIfMW aHNDj+RKeM04wB4dCSq7TQ5iCyu+6ptY8JA9eX8ajFXASftPE6VBTVqHCpjGzVoMQVw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=mainlining.org; spf=pass smtp.mailfrom=mainlining.org; dkim=pass header.d=mainlining.org header.i=@mainlining.org header.a=rsa-sha256 header.s=202507r header.b=VgRnZIvu; dkim=pass header.d=mainlining.org header.i=@mainlining.org header.a=ed25519-sha256 header.s=202507e header.b=WJicOH4G; arc=none smtp.remote-ip=5.75.144.95 Received: from mail.mainlining.org (mail.mainlining.org [5.75.144.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E712B606A68C; Fri, 4 Dec 2026 11:18:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E712B606A68C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mainlining.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mainlining.org header.i=@mainlining.org header.a=rsa-sha256 header.s=202507r header.b=VgRnZIvu; dkim=pass header.d=mainlining.org header.i=@mainlining.org header.a=ed25519-sha256 header.s=202507e header.b=WJicOH4G DKIM-Signature: v=1; a=rsa-sha256; s=202507r; d=mainlining.org; c=relaxed/relaxed; h=From:To:Subject:Date:Message-ID; t=1796383117; bh=l/5gdI9rleg1L9THo2lLJD1 yCxvPiPLCBbn0TIhYxRc=; b=VgRnZIvuqPrv6LCK1ko6BREYm9w0zQHN4d6YbsGacWujUDEyjW r1/5JgKTMbjpDp1X7RAzFlRFbj3bifirS/KPNJw6hHu7aXR7ut6KDnu0iSYXWUsUVq1hV0L9LR3 RMK9gG1gNj6Bllaw2qtAJ88dBaj6mmpRpefxgGAjEuYMVpW7x1pB/K6C4JW+isAmPQ8L8AfSGET UbMIwXPM1m844C7I5Ngak3h4HOQpqWGrJ5LJUbRmbJ6BLVhZCIdi0VxdMCkWbj4JlBqoQ62Wr69 kKImLIXcywe3wJUbRUgilDYwYl/MDOYqN34ITgofpN+fDDlQlJFdpm8n5gYLiHxw4bw==; DKIM-Signature: v=1; a=ed25519-sha256; s=202507e; d=mainlining.org; c=relaxed/relaxed; h=From:To:Subject:Date:Message-ID; t=1796383117; bh=l/5gdI9rleg1L9THo2lLJD1 yCxvPiPLCBbn0TIhYxRc=; b=WJicOH4G7559gZL7FYPKLjnw3NbDehYiWnxEnikT5uhEqwRPQB bsTS27mVOb30/RHt8rqYlPWy0CeDk8Lb4NDw==; Message-ID: Date: Fri, 4 Dec 2026 14:18:35 +0300 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 1/3] dmaengine: qcom: bam_dma: report residue for completed RX transfers To: Stephan Gerhold , Vishnu Santhosh Cc: Vinod Koul , Frank Li , Stephan Gerhold , Loic Poulain , Sergey Ryazanov , Johannes Berg , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Deepak Kumar Singh References: <20261203-qcom-bam-dmux-qmap-v1-0-abc2e80a03af@oss.qualcomm.com> <20261203-qcom-bam-dmux-qmap-v1-1-abc2e80a03af@oss.qualcomm.com> Content-Language: ru-RU, en-US From: Nickolay Goppen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 04.12.2026 13:10, Stephan Gerhold пишет: > On Thu, Dec 03, 2026 at 09:40:52PM +0530, Vishnu Santhosh wrote: >> For device-to-memory transfers, the BAM writes the number of bytes it >> transferred back into the size field of each completed descriptor in the >> FIFO. The driver ignores this and always reports a residue of zero, so >> clients cannot tell how much data was received. >> >> BAM-DMUX needs this, because the modem can send packets whose length is >> only given by the size of the transfer. >> >> Read the written-back sizes when a transfer completes, and report the >> unused part of the buffers as residue through callback_result. If the >> BAM reports more bytes than were queued, mark the transfer as >> DMA_TRANS_WRITE_FAILED. If a descriptor other than the last one is >> short, the received data is not contiguous and cannot be described by a >> residue, so mark the transfer as DMA_TRANS_ABORTED. >> >> All existing users set the plain callback, which does not receive the >> result, so they are not affected. >> >> Co-developed-by: Deepak Kumar Singh >> Signed-off-by: Deepak Kumar Singh >> Signed-off-by: Vishnu Santhosh > I think you should coordinate this patch with Nickolay, there is a > similar patch already on the list. (I haven't checked if any of the > patches is preferable, I suggest you both cross-review/test and pick > your favorite for Vinod to apply). :-) My patch is a preparation for upcoming ipa2 support in the ipa driver, but I can rebase it onto this patch https://github.com/sdm660-mainline/linux/commits/setotau/sdm660-7.3-ipa2/ > https://lore.kernel.org/r/20261116-qcom-bam-dma-metadata-v2-1-aade3a42fcb4@mainlining.org/ > > Thanks, > Stephan -- Best regards, Nickolay