Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mei: bus: add mei_cldev_mtu interface

Add a new helper function that allows MEI client drivers
to query the maximum transmission unit (MTU) for a connected
MEI client.

This is useful for clients that need to transmit large payloads,
such as firmware blobs, allowing them to determine the maximum
message size that can be safely sent before starting transmission and
size of the buffer to allocate when receiving data.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250905154953.3974335-2-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

authored by

Alexander Usyskin and committed by
Lucas De Marchi
8d5b7009 187e16f6

+14
+13
drivers/misc/mei/bus.c
··· 615 615 EXPORT_SYMBOL_GPL(mei_cldev_ver); 616 616 617 617 /** 618 + * mei_cldev_mtu - max message that client can send and receive 619 + * 620 + * @cldev: mei client device 621 + * 622 + * Return: mtu or 0 if client is not connected 623 + */ 624 + size_t mei_cldev_mtu(const struct mei_cl_device *cldev) 625 + { 626 + return mei_cl_mtu(cldev->cl); 627 + } 628 + EXPORT_SYMBOL_GPL(mei_cldev_mtu); 629 + 630 + /** 618 631 * mei_cldev_enabled - check whether the device is enabled 619 632 * 620 633 * @cldev: mei client device
+1
include/linux/mei_cl_bus.h
··· 113 113 mei_cldev_cb_t notif_cb); 114 114 115 115 u8 mei_cldev_ver(const struct mei_cl_device *cldev); 116 + size_t mei_cldev_mtu(const struct mei_cl_device *cldev); 116 117 117 118 void *mei_cldev_get_drvdata(const struct mei_cl_device *cldev); 118 119 void mei_cldev_set_drvdata(struct mei_cl_device *cldev, void *data);