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=1796383918; b=ZhQX7j6zDLVQlF4+HqSzOajPAvULFhMVZXzJIv8iPT5VEp2c9Fd/P1E1aKGf3auFRgR+ oAtgJ9YVw9Onu01dTYZvb778BJ0/oH6na59my4QMC73suG7mXxsH6rn0HxNuT2nwSMN8R slbMRV9pjzQnAPYM7rh8EnobTf2Dh9oUCyni/76DdgyzSPd5+FeA7mmSbKMeiQwolH/X1 rh9rzM2fHCE3IXshqyyKGmGKeLStqSchh+BqqNU1VbvGcBbW7PHGCnrUKMF5rwrqfSWGY FT+GdwXMGIQmYaa7ZHi7VlapBIYUUuP9Gax3+7QOclqHrDcQy9ht2mgYjD7I7+loAnQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383918; 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=jGPVZmUDh3kMMLNzsjaRrZn7QX6+HgdQVZm1b0pFkFA=; b=5ovleAv1G5awQeFEdKNtyYoTQSt3+Q04KkX1Bq0dyk4nFrYv/D+sBa63BR7Qx+UzkcsQ MATw4qDSCLFZv0sPN8f7q090s+h/pdaFa4m9s2ZF56ykAK6CWq3d5a8g9PuPfiQQuTL1s tuFrEL9E//ocLKBkJGNSvDyg9/F/pKAgH+xgvjgU+NpG4Cx1dVl2+K6Sig1DBzmq3vHS9 NRTBeh7ZknXgPcMxeKy0pkji8VUmCvuucAPrRdPHl1TbAa3rqqPXg9XhdJrJ/veSAgjkc GymPjzkuTc9ZVuPJDk0e/FFA1MmB0yMtPC834/Ucg12dLKOsUqHuc9qGGh8nz/2nS3g== 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=bRotgDzH; dkim=pass header.d=mainlining.org header.i=@mainlining.org header.a=ed25519-sha256 header.s=202507e header.b=6cSYdQVC; 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)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1831660A263C; Fri, 4 Dec 2026 11:31:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1831660A263C 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) header.d=mainlining.org header.i=@mainlining.org header.a=rsa-sha256 header.s=202507r header.b=bRotgDzH; dkim=pass header.d=mainlining.org header.i=@mainlining.org header.a=ed25519-sha256 header.s=202507e header.b=6cSYdQVC DKIM-Signature: v=1; a=rsa-sha256; s=202507r; d=mainlining.org; c=relaxed/relaxed; h=From:To:Subject:Date:Message-ID; t=1796383909; bh=jGPVZmUDh3kMMLNzsjaRrZn 7QX6+HgdQVZm1b0pFkFA=; b=bRotgDzHV4EUfM3lvJv2O5hVElhjkuRD/n9SSVQGz303YpMTxz ESeq/u1j1CuSNyjOh92eXsUsPmCzL8+32ChwGWzFM7/JlvMJZBCc7cu8McWlNVuwcWGbGaNuxVx NZS7ZnigB9s7wr0heCZ6qOqqlQOSrkxSDiYQjbeDsOLyAmAn+kVZsNjYyNQdPE/T68gehpi6kD4 /NPgzj3CuBilN2O5uHF7LHjJ5Q5o1P7vGomMAPBIBfQ2/CG56gM24bywzClcz17/gJbNRYWomA2 DLSxBXEpGagshik+q42v4e6I/0HbqM7OFHOL9VcSsM88YykB1HXb7DQ0fR2JAbMSa1A==; DKIM-Signature: v=1; a=ed25519-sha256; s=202507e; d=mainlining.org; c=relaxed/relaxed; h=From:To:Subject:Date:Message-ID; t=1796383909; bh=jGPVZmUDh3kMMLNzsjaRrZn 7QX6+HgdQVZm1b0pFkFA=; b=6cSYdQVC7kHM0EsZNQlFwjwhoOUX3z/El0YltSFnLhVW1qFaZy QqBSgS+iZOwfOf0jDAc/45qX2RQ6gBgzMcAg==; Message-ID: Date: Fri, 4 Dec 2026 14:31:48 +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). :-) I need to test a patch from here > https://lore.kernel.org/r/20261116-qcom-bam-dma-metadata-v2-1-aade3a42fcb4@mainlining.org/ > > Thanks, > Stephan -- Best regards, Nickolay