From: Nickolay Goppen <setotau@mainlining.org>
To: Stephan Gerhold <stephan.gerhold@linaro.org>,
Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Stephan Gerhold <stephan@gerhold.net>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Subject: Re: [PATCH net-next 1/3] dmaengine: qcom: bam_dma: report residue for completed RX transfers
Date: Fri, 4 Dec 2026 14:18:35 +0300 [thread overview]
Message-ID: <ba4037ac-e5d7-418d-a7ba-76ba4230abda@mainlining.org> (raw)
In-Reply-To: <axKRmSq4vQwAlrgM@linaro.org>
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 <deepak.singh@oss.qualcomm.com>
>> Signed-off-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
>> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
> 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
next prev parent reply other threads:[~2026-12-04 11:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 16:10 [PATCH net-next 0/3] net: wwan: qcom_bam_dmux: Add QMAP support Vishnu Santhosh
2026-12-03 16:10 ` [PATCH net-next 1/3] dmaengine: qcom: bam_dma: report residue for completed RX transfers Vishnu Santhosh
2026-12-03 16:19 ` Frank Li
2026-12-04 10:10 ` Stephan Gerhold
2026-12-04 11:18 ` Nickolay Goppen [this message]
2026-12-04 11:31 ` Nickolay Goppen
2026-12-04 16:11 ` sashiko-bot
2026-12-04 17:06 ` netdev-bot+sashiko
2026-12-03 16:10 ` [PATCH net-next 2/3] net: wwan: qcom_bam_dmux: use DMA transfer size for RX packets Vishnu Santhosh
2026-12-04 10:14 ` Stephan Gerhold
2026-12-04 17:06 ` netdev-bot+sashiko
2026-12-03 16:10 ` [PATCH net-next 3/3] net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem Vishnu Santhosh
2026-12-03 19:22 ` Loic Poulain
2026-12-04 10:42 ` Stephan Gerhold
2026-12-04 16:11 ` sashiko-bot
2026-12-04 17:06 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba4037ac-e5d7-418d-a7ba-76ba4230abda@mainlining.org \
--to=setotau@mainlining.org \
--cc=Frank.Li@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=deepak.singh@oss.qualcomm.com \
--cc=dmaengine@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ryazanov.s.a@gmail.com \
--cc=stephan.gerhold@linaro.org \
--cc=stephan@gerhold.net \
--cc=vishnu.santhosh@oss.qualcomm.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox