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: Sun, 6 Dec 2026 16:30:54 +0300 [thread overview]
Message-ID: <b817687b-c211-455d-bdd6-74b5741b84e1@mainlining.org> (raw)
In-Reply-To: <a5cf7ec4-95b9-474d-9000-dbf533f2ec31@mainlining.org>
04.12.2026 14:31, Nickolay Goppen пишет:
>
> 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). :-)
> I need to test a patch from here
Replaced my metadata patch with this residue patch and ipa2 still
working, so I'll use this patch
>> 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-06 13:31 UTC|newest]
Thread overview: 15+ 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
2026-12-04 11:31 ` Nickolay Goppen
2026-12-06 13:30 ` Nickolay Goppen [this message]
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 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=b817687b-c211-455d-bdd6-74b5741b84e1@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
all inboxes | Powered by JetHome®