* [PATCH net-next 0/3] net: wwan: qcom_bam_dmux: Add QMAP support
@ 2026-12-03 16:10 Vishnu Santhosh
2026-12-03 16:10 ` [PATCH net-next 1/3] dmaengine: qcom: bam_dma: report residue for completed RX transfers Vishnu Santhosh
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Vishnu Santhosh @ 2026-12-03 16:10 UTC (permalink / raw)
To: Vinod Koul, Frank Li, Stephan Gerhold, Loic Poulain,
Sergey Ryazanov, Johannes Berg, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: linux-arm-msm, dmaengine, netdev, linux-kernel, Vishnu Santhosh,
Deepak Kumar Singh
Newer modem firmware supports QMAP as an additional multiplexing layer
on top of BAM-DMUX. QMAP is handled by the rmnet driver on top of the
BAM-DMUX network interfaces, and allows multiple data connections over
a single BAM-DMUX channel.
Two changes are needed in BAM-DMUX for this:
- With QMAP, the modem sets the length in the header of DATA packets to
0xffff, which means the payload covers the rest of the DMA transfer.
The BAM DMA driver does not report the size of completed RX transfers
today. Patch 1 reports it as residue through callback_result, and
patch 2 uses it in BAM-DMUX.
- The modem only uses QMAP on a channel if the OPEN command it receives
has the QMAP signal bit set. Patch 3 sets the bit if the modem set it
in its own OPEN command.
Patch 2 depends on patch 1. Vinod, if you are fine with patch 1, could
you ack it so that the series can go through net-next?
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
---
Vishnu Santhosh (3):
dmaengine: qcom: bam_dma: report residue for completed RX transfers
net: wwan: qcom_bam_dmux: use DMA transfer size for RX packets
net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem
drivers/dma/qcom/bam_dma.c | 53 ++++++++++++++++++++++++++++++++++++++++
drivers/net/wwan/qcom_bam_dmux.c | 50 ++++++++++++++++++++++++++++++-------
2 files changed, 94 insertions(+), 9 deletions(-)
---
base-commit: 34d30f9e1f2d8cb25c12ae48572143411a6d278b
change-id: 20261201-qcom-bam-dmux-qmap-6879f7f485ff
Best regards,
--
Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/3] dmaengine: qcom: bam_dma: report residue for completed RX transfers
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 ` Vishnu Santhosh
2026-12-03 16:19 ` Frank Li
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-03 16:10 ` [PATCH net-next 3/3] net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem Vishnu Santhosh
2 siblings, 1 reply; 5+ messages in thread
From: Vishnu Santhosh @ 2026-12-03 16:10 UTC (permalink / raw)
To: Vinod Koul, Frank Li, Stephan Gerhold, Loic Poulain,
Sergey Ryazanov, Johannes Berg, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: linux-arm-msm, dmaengine, netdev, linux-kernel, Vishnu Santhosh,
Deepak Kumar Singh
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>
---
drivers/dma/qcom/bam_dma.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index e62e411dc8f8b24ecb9443b0c7eafb73ecfe8f01..b5d661b9af3df05ebd1ef909dea66a98ba938915 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -834,6 +834,57 @@ static int bam_resume(struct dma_chan *chan)
return 0;
}
+/**
+ * bam_update_rx_result - account for bytes received by completed descriptors
+ * @bchan: bam channel
+ * @async_desc: descriptor whose hardware descriptors have completed
+ *
+ * On a producer pipe the BAM writes the number of bytes it transferred back
+ * into the size field of each completed descriptor in the FIFO. Report the
+ * unused part of the buffers as residue, so that clients using
+ * callback_result know how much data was received. Only the last descriptor
+ * of a transfer may be short, otherwise the transfer is marked as aborted.
+ * Clients that rely on the residue should therefore use a single buffer of
+ * at most BAM_FIFO_SIZE bytes per transfer. The residue is undefined if the
+ * result is not DMA_TRANS_NOERROR.
+ */
+static void bam_update_rx_result(struct bam_chan *bchan,
+ struct bam_async_desc *async_desc)
+{
+ struct bam_desc_hw *fifo = PTR_ALIGN(bchan->fifo_virt,
+ sizeof(struct bam_desc_hw));
+ u32 i;
+
+ if (async_desc->dir != DMA_DEV_TO_MEM)
+ return;
+
+ /* Read the written back sizes only after reading BAM_P_SW_OFSTS */
+ dma_rmb();
+
+ for (i = 0; i < async_desc->xfer_len; i++) {
+ u16 expected = le16_to_cpu(async_desc->curr_desc[i].size);
+ u16 received = le16_to_cpu(fifo[(bchan->head + i) %
+ MAX_DESCRIPTORS].size);
+
+ if (received > expected) {
+ async_desc->vd.tx_result.result = DMA_TRANS_WRITE_FAILED;
+ async_desc->vd.tx_result.residue += expected;
+ continue;
+ }
+
+ /*
+ * The next descriptor writes from its own address, so a short
+ * write before the last one leaves a hole in the buffer that
+ * cannot be described by the residue.
+ */
+ if (received < expected && i != async_desc->num_desc - 1 &&
+ async_desc->vd.tx_result.result == DMA_TRANS_NOERROR)
+ async_desc->vd.tx_result.result = DMA_TRANS_ABORTED;
+
+ async_desc->vd.tx_result.residue += expected - received;
+ }
+}
+
/**
* process_channel_irqs - processes the channel interrupts
* @bdev: bam controller
@@ -881,6 +932,8 @@ static u32 process_channel_irqs(struct bam_device *bdev)
if (avail < async_desc->xfer_len)
break;
+ bam_update_rx_result(bchan, async_desc);
+
/* manage FIFO */
bchan->head += async_desc->xfer_len;
bchan->head %= MAX_DESCRIPTORS;
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/3] net: wwan: qcom_bam_dmux: use DMA transfer size for RX packets
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:10 ` Vishnu Santhosh
2026-12-03 16:10 ` [PATCH net-next 3/3] net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem Vishnu Santhosh
2 siblings, 0 replies; 5+ messages in thread
From: Vishnu Santhosh @ 2026-12-03 16:10 UTC (permalink / raw)
To: Vinod Koul, Frank Li, Stephan Gerhold, Loic Poulain,
Sergey Ryazanov, Johannes Berg, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: linux-arm-msm, dmaengine, netdev, linux-kernel, Vishnu Santhosh,
Deepak Kumar Singh
With QMAP, the multiplexing protocol handled by the rmnet driver, the
modem sets the length in the header of DATA packets to 0xffff. This
means that the payload fills the rest of the DMA transfer, which can
hold several QMAP packets. The driver treats 0xffff as a real length
and drops every such packet:
Data larger than buffer? (65535 > 2040)
Get the number of received bytes from the DMA result, and:
- drop the buffer if the transfer failed or is shorter than a header
- take the payload length from the received size if the header says
0xffff
- drop packets that claim more data than was received, replacing the
check against the buffer size, since a transfer cannot be larger
than the buffer
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>
---
drivers/net/wwan/qcom_bam_dmux.c | 38 ++++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c
index e1cc3038a724ee2a3eba4a9d97715f1f5966452d..a7d05b1b8b1230d1d54e9a7abcbc16a16681797e 100644
--- a/drivers/net/wwan/qcom_bam_dmux.c
+++ b/drivers/net/wwan/qcom_bam_dmux.c
@@ -30,6 +30,7 @@
#define BAM_DMUX_NUM_SKB 32
#define BAM_DMUX_HDR_MAGIC 0x33fc
+#define BAM_DMUX_LEN_FROM_DMA 0xffff
#define BAM_DMUX_AUTOSUSPEND_DELAY 1000
#define BAM_DMUX_REMOTE_TIMEOUT msecs_to_jiffies(2000)
@@ -467,7 +468,8 @@ static void bam_dmux_register_netdev_work(struct work_struct *work)
}
}
-static void bam_dmux_rx_callback(void *data);
+static void bam_dmux_rx_callback(void *data,
+ const struct dmaengine_result *result);
static bool bam_dmux_skb_dma_submit_rx(struct bam_dmux_skb_dma *skb_dma)
{
@@ -482,7 +484,7 @@ static bool bam_dmux_skb_dma_submit_rx(struct bam_dmux_skb_dma *skb_dma)
return false;
}
- dmaengine_desc_set_callback(desc, bam_dmux_rx_callback, NULL, skb_dma);
+ dmaengine_desc_set_callback(desc, NULL, bam_dmux_rx_callback, skb_dma);
dmaengine_submit(desc);
return true;
}
@@ -500,21 +502,23 @@ static bool bam_dmux_skb_dma_queue_rx(struct bam_dmux_skb_dma *skb_dma, gfp_t gf
bam_dmux_skb_dma_submit_rx(skb_dma);
}
-static void bam_dmux_cmd_data(struct bam_dmux_skb_dma *skb_dma)
+static void bam_dmux_cmd_data(struct bam_dmux_skb_dma *skb_dma,
+ unsigned int rx_len)
{
struct bam_dmux *dmux = skb_dma->dmux;
struct sk_buff *skb = skb_dma->skb;
struct bam_dmux_hdr *hdr = (struct bam_dmux_hdr *)skb->data;
struct net_device *netdev = dmux->netdevs[hdr->ch];
+ unsigned int avail = rx_len - sizeof(*hdr);
if (!netdev || !netif_running(netdev)) {
dev_warn(dmux->dev, "Data for inactive channel %u\n", hdr->ch);
return;
}
- if (hdr->len > BAM_DMUX_MAX_DATA_SIZE) {
- dev_err(dmux->dev, "Data larger than buffer? (%u > %u)\n",
- hdr->len, (u16)BAM_DMUX_MAX_DATA_SIZE);
+ if (hdr->len > avail) {
+ dev_err(dmux->dev, "Data larger than received? (%u > %u)\n",
+ hdr->len, avail);
return;
}
@@ -574,15 +578,29 @@ static void bam_dmux_cmd_close(struct bam_dmux *dmux, struct bam_dmux_hdr *hdr)
netif_device_detach(netdev);
}
-static void bam_dmux_rx_callback(void *data)
+static void bam_dmux_rx_callback(void *data,
+ const struct dmaengine_result *result)
{
struct bam_dmux_skb_dma *skb_dma = data;
struct bam_dmux *dmux = skb_dma->dmux;
struct sk_buff *skb = skb_dma->skb;
struct bam_dmux_hdr *hdr = (struct bam_dmux_hdr *)skb->data;
+ unsigned int rx_len;
bam_dmux_skb_dma_unmap(skb_dma, DMA_FROM_DEVICE);
+ if (result->result != DMA_TRANS_NOERROR || result->residue > skb->len) {
+ dev_err(dmux->dev, "RX DMA failed: %d (residue %u)\n",
+ result->result, result->residue);
+ goto out;
+ }
+
+ rx_len = skb->len - result->residue;
+ if (rx_len < sizeof(*hdr)) {
+ dev_err(dmux->dev, "RX shorter than header: %u\n", rx_len);
+ goto out;
+ }
+
if (hdr->magic != BAM_DMUX_HDR_MAGIC) {
dev_err(dmux->dev, "Invalid magic in header: %#x\n", hdr->magic);
goto out;
@@ -593,9 +611,13 @@ static void bam_dmux_rx_callback(void *data)
goto out;
}
+ /* The remote side may leave it to us to use the DMA transfer size */
+ if (hdr->cmd == BAM_DMUX_CMD_DATA && hdr->len == BAM_DMUX_LEN_FROM_DMA)
+ hdr->len = rx_len - sizeof(*hdr);
+
switch (hdr->cmd) {
case BAM_DMUX_CMD_DATA:
- bam_dmux_cmd_data(skb_dma);
+ bam_dmux_cmd_data(skb_dma, rx_len);
break;
case BAM_DMUX_CMD_OPEN:
bam_dmux_cmd_open(dmux, hdr);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 3/3] net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem
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:10 ` [PATCH net-next 2/3] net: wwan: qcom_bam_dmux: use DMA transfer size for RX packets Vishnu Santhosh
@ 2026-12-03 16:10 ` Vishnu Santhosh
2 siblings, 0 replies; 5+ messages in thread
From: Vishnu Santhosh @ 2026-12-03 16:10 UTC (permalink / raw)
To: Vinod Koul, Frank Li, Stephan Gerhold, Loic Poulain,
Sergey Ryazanov, Johannes Berg, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: linux-arm-msm, dmaengine, netdev, linux-kernel, Vishnu Santhosh,
Deepak Kumar Singh
Newer modem firmware can use QMAP to carry several data connections over
one BAM-DMUX channel, with the rmnet driver handling QMAP on top of the
BAM-DMUX network interfaces. The modem only enables QMAP on a channel if
bit 1 is set in the signal byte of the OPEN command it receives. The
driver always sends 0, so QMAP stays disabled.
The modem sets the same bit in its own OPEN command if it supports QMAP.
Remember the bit for each channel and set it in the OPEN command sent to
the modem. The modem always opens a channel before its network interface
is created, so the bit is known by the time ndo_open() sends the OPEN
command. Firmware that does not set the bit is 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>
---
drivers/net/wwan/qcom_bam_dmux.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c
index a7d05b1b8b1230d1d54e9a7abcbc16a16681797e..9e82a30b16a68d786cd7523a8d6a8bb52dd9fe89 100644
--- a/drivers/net/wwan/qcom_bam_dmux.c
+++ b/drivers/net/wwan/qcom_bam_dmux.c
@@ -32,6 +32,9 @@
#define BAM_DMUX_HDR_MAGIC 0x33fc
#define BAM_DMUX_LEN_FROM_DMA 0xffff
+/* Signal bits in OPEN commands */
+#define BAM_DMUX_OPEN_QMAP BIT(1)
+
#define BAM_DMUX_AUTOSUSPEND_DELAY 1000
#define BAM_DMUX_REMOTE_TIMEOUT msecs_to_jiffies(2000)
@@ -90,6 +93,7 @@ struct bam_dmux {
struct work_struct tx_wakeup_work;
DECLARE_BITMAP(remote_channels, BAM_DMUX_NUM_CH);
+ DECLARE_BITMAP(remote_qmap, BAM_DMUX_NUM_CH);
struct work_struct register_netdev_work;
struct net_device *netdevs[BAM_DMUX_NUM_CH];
};
@@ -247,6 +251,8 @@ static int bam_dmux_send_cmd(struct bam_dmux_netdev *bndev, u8 cmd)
hdr->magic = BAM_DMUX_HDR_MAGIC;
hdr->cmd = cmd;
hdr->ch = bndev->ch;
+ if (cmd == BAM_DMUX_CMD_OPEN && test_bit(bndev->ch, dmux->remote_qmap))
+ hdr->signal = BAM_DMUX_OPEN_QMAP;
skb_dma = bam_dmux_tx_queue(dmux, skb);
if (!skb_dma) {
@@ -548,13 +554,17 @@ static void bam_dmux_cmd_open(struct bam_dmux *dmux, struct bam_dmux_hdr *hdr)
{
struct net_device *netdev = dmux->netdevs[hdr->ch];
- dev_dbg(dmux->dev, "open channel: %u\n", hdr->ch);
+ dev_dbg(dmux->dev, "open channel: %u (signal %#x)\n", hdr->ch,
+ hdr->signal);
if (__test_and_set_bit(hdr->ch, dmux->remote_channels)) {
dev_warn(dmux->dev, "Channel already open: %u\n", hdr->ch);
return;
}
+ /* Use QMAP on our side of the channel only if the remote supports it */
+ assign_bit(hdr->ch, dmux->remote_qmap, hdr->signal & BAM_DMUX_OPEN_QMAP);
+
if (netdev) {
netif_device_attach(netdev);
} else {
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 1/3] dmaengine: qcom: bam_dma: report residue for completed RX transfers
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
0 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2026-12-03 16:19 UTC (permalink / raw)
To: 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,
dmaengine, netdev, linux-kernel, Deepak Kumar Singh
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>
> ---
> drivers/dma/qcom/bam_dma.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> index e62e411dc8f8b24ecb9443b0c7eafb73ecfe8f01..b5d661b9af3df05ebd1ef909dea66a98ba938915 100644
> --- a/drivers/dma/qcom/bam_dma.c
> +++ b/drivers/dma/qcom/bam_dma.c
> @@ -834,6 +834,57 @@ static int bam_resume(struct dma_chan *chan)
> return 0;
> }
>
> +/**
> + * bam_update_rx_result - account for bytes received by completed descriptors
> + * @bchan: bam channel
> + * @async_desc: descriptor whose hardware descriptors have completed
> + *
> + * On a producer pipe the BAM writes the number of bytes it transferred back
> + * into the size field of each completed descriptor in the FIFO. Report the
> + * unused part of the buffers as residue, so that clients using
> + * callback_result know how much data was received. Only the last descriptor
> + * of a transfer may be short, otherwise the transfer is marked as aborted.
> + * Clients that rely on the residue should therefore use a single buffer of
> + * at most BAM_FIFO_SIZE bytes per transfer. The residue is undefined if the
> + * result is not DMA_TRANS_NOERROR.
> + */
> +static void bam_update_rx_result(struct bam_chan *bchan,
> + struct bam_async_desc *async_desc)
> +{
> + struct bam_desc_hw *fifo = PTR_ALIGN(bchan->fifo_virt,
> + sizeof(struct bam_desc_hw));
> + u32 i;
> +
> + if (async_desc->dir != DMA_DEV_TO_MEM)
> + return;
> +
> + /* Read the written back sizes only after reading BAM_P_SW_OFSTS */
> + dma_rmb();
> +
> + for (i = 0; i < async_desc->xfer_len; i++) {
> + u16 expected = le16_to_cpu(async_desc->curr_desc[i].size);
> + u16 received = le16_to_cpu(fifo[(bchan->head + i) %
> + MAX_DESCRIPTORS].size);
> +
> + if (received > expected) {
> + async_desc->vd.tx_result.result = DMA_TRANS_WRITE_FAILED;
> + async_desc->vd.tx_result.residue += expected;
> + continue;
> + }
> +
> + /*
> + * The next descriptor writes from its own address, so a short
> + * write before the last one leaves a hole in the buffer that
> + * cannot be described by the residue.
> + */
> + if (received < expected && i != async_desc->num_desc - 1 &&
> + async_desc->vd.tx_result.result == DMA_TRANS_NOERROR)
> + async_desc->vd.tx_result.result = DMA_TRANS_ABORTED;
Suppose need break loop here. Need check following desc.
Frank
> +
> + async_desc->vd.tx_result.residue += expected - received;
> + }
> +}
> +
> /**
> * process_channel_irqs - processes the channel interrupts
> * @bdev: bam controller
> @@ -881,6 +932,8 @@ static u32 process_channel_irqs(struct bam_device *bdev)
> if (avail < async_desc->xfer_len)
> break;
>
> + bam_update_rx_result(bchan, async_desc);
> +
> /* manage FIFO */
> bchan->head += async_desc->xfer_len;
> bchan->head %= MAX_DESCRIPTORS;
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-03 16:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-03 16:10 ` [PATCH net-next 2/3] net: wwan: qcom_bam_dmux: use DMA transfer size for RX packets Vishnu Santhosh
2026-12-03 16:10 ` [PATCH net-next 3/3] net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem Vishnu Santhosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox