mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] i3c: account for controller transfer limits
@ 2026-11-24  6:06 Shubham Patil
  2026-11-24  6:06 ` [PATCH v3 1/3] i3c: Add helpers to get the maximum transfer size for a device Shubham Patil
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shubham Patil @ 2026-11-24  6:06 UTC (permalink / raw)
  To: Alexandre Belloni, Frank Li
  Cc: Jeremy Kerr, Matt Johnston, linux-i3c, netdev, linux-kernel,
	meaganlloyd, git, Shubham Patil

Targets advertise MRL and MWL, but these values do not account for smaller controller transmit and receive buffers. This can cause client drivers such as mctp-i3c to request transfers that the controller must reject.

Add controller transfer limits to the I3C core, publish the independent DesignWare transmit and receive buffer depths, and make mctp-i3c use the effective target/controller limits.

 Changes in v3:
  - Rename controller limit fields to max_tx_bytes/max_rx_bytes.
  - Use FIELD_GET() and a u32 variable for the RX capability register.
  - Use sizeof(u32) to convert FIFO depths to bytes.
  - Add the DesignWare databook reference for RX_BUF_SIZE.
  - Shorten patch 1's commit message and update patch 3's subject prefix.

Link to v2:
https://lore.kernel.org/all/20261105085425.3418230-1-shubhamsanjay.patil@amd.com/

Changes in v2:
- Rework the solution to preserve the target-reported MRL and MWL instead
  of sending SETMRL/SETMWL and rewriting the GETMRL/GETMWL responses.
- Add I3C core fields and helper APIs that combine target and controller
  transfer limits.
- Track the DesignWare transmit and receive buffer depths separately.
- Add an mctp-i3c patch that uses the effective transfer limits.
- Drop the unrelated IBI payload-length clamping from this series.
- Split the original DesignWare-only patch into three patches.

Link to v1:
https://lore.kernel.org/all/20260908102724.3232660-1-shubhamsanjay.patil@amd.com/

Shubham Patil (3):
  i3c: Add helpers to get the maximum transfer size for a device
  i3c: dw: Track the transmit and receive buffer depths separately
  net: mctp i3c: clamp transfer lengths to the controller limits

 drivers/i3c/device.c               | 49 ++++++++++++++++++++++++++++++
 drivers/i3c/master/dw-i3c-master.c | 24 ++++++++++-----
 drivers/i3c/master/dw-i3c-master.h |  3 +-
 drivers/net/mctp/mctp-i3c.c        |  8 ++---
 include/linux/i3c/device.h         |  3 ++
 include/linux/i3c/master.h         | 13 ++++++--
 6 files changed, 85 insertions(+), 15 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-24  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24  6:06 [PATCH v3 0/3] i3c: account for controller transfer limits Shubham Patil
2026-11-24  6:06 ` [PATCH v3 1/3] i3c: Add helpers to get the maximum transfer size for a device Shubham Patil
2026-11-24  6:06 ` [PATCH v3 2/3] i3c: dw: Track the transmit and receive buffer depths separately Shubham Patil
2026-11-24  6:06 ` [PATCH v3 3/3] net: mctp i3c: clamp transfer lengths to the controller limits Shubham Patil

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®