summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-13 15:51:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-13 15:51:48 +0200
commit4278202648dca9ccf812e4ae592c4868897984f1 (patch)
tree64a42e2b5cc71d222ab68766dcd8fc2f6144a56c /include/linux
parent79e5797d243a466138f641932f81dc69f796060c (diff)
parent0b1883ca75c0005ab5ca52c7bc1a26329bc39746 (diff)
downloadlinux-4278202648dca9ccf812e4ae592c4868897984f1.tar.gz
linux-4278202648dca9ccf812e4ae592c4868897984f1.zip
Merge tag 'mhi-for-v7.4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next
Manivannan writes: MHI Host -------- - Add a host-side loopback client driver that binds to the standard MHI LOOPBACK channel and exposes a sysfs interface for data path testing. The interface lets users configure the TRE buffer size and count, trigger a loopback test, and read back the result to validate the MHI data path between host and endpoint. - Add the IP_CTRL channel (18/19) to the Sierra EM919x/EM929x channel configuration. IP_CTRL is a standard Qualcomm MHI control channel that carries the host serial control lines (DTR/RTS) to the modem, which the host previously had no way to drive for these devices. - Add the DUN uplink (32) and downlink (33) channels to the Qualcomm modem channel configuration. These channels transport AT commands over MHI and let userspace reach the modem AT interface through the MHI WWAN client driver. - Add support for the Quectel RM500Q-AE (SDX55) module. It provides MBIM control on channels 12/13, not the QMI setup that the generic SDX55 entry assumes, so QMI requests over the control channel were timing out. Add an entry matched by its subsystem ID that reuses the Quectel MBIM channel configuration, so no out-of-tree driver is needed. - Fix a runtime PM usage count imbalance for no_m3 devices in the pci_generic driver. Probe only dropped the reference taken by the PCI core when the device supported both PME from D3hot and M3, while remove re-took it based on PME capability alone. The count therefore crept up on every bind/unbind cycle and could end up preventing runtime suspend. QDU100 is the only affected device today. - Convert the %pK pointer format specifier to %p. Pointers are hashed by default now, so %pK is no longer needed to prevent address leaks, and %p keeps the value available for debugging. - Fix a spelling typo ("intented") in a comment. MHI Endpoint ------------ - Add the mhi_ep_queue_buf() API for queuing raw buffers on downlink transfers, for endpoint clients that do not use socket buffers. The existing mhi_ep_queue_skb() is refactored to share a common internal helper with the new API. - Add an endpoint-side loopback client driver that binds to the LOOPBACK channel and echoes received data back to the host. On a Linux-based endpoint there is no modem firmware to provide the echo, so this driver acts as the software echo partner for the host loopback driver and completes the end-to-end MHI data path test. - Pass IRQF_NO_AUTOEN to request_irq() for the doorbell IRQ instead of setting IRQ_NOAUTOEN on the descriptor by hand. The manual flag was never cleared on the error paths or at unregister, so it leaked onto the descriptor after the IRQ was freed. * tag 'mhi-for-v7.4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: ep: clients: Add loopback driver for data path testing bus: mhi: ep: Add mhi_ep_queue_buf() API for raw buffer queuing bus: mhi: host: clients: Add loopback driver with sysfs interface bus: mhi: host: pci_generic: Add Quectel RM500Q-AE support bus: mhi: host: pci_generic: Add DUN channel configuration bus: mhi: ep: Use IRQF_NO_AUTOEN flag in request_irq() bus: mhi: host: Use %p for pointer formatting bus: mhi: host: Fix typo "intented" in comment bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices bus: mhi: host: pci_generic: Add IP_CTRL channel for Sierra EM919x/EM929x
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mhi.h2
-rw-r--r--include/linux/mhi_ep.h16
2 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index 8616bacd8675..65e8a397cc50 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -687,7 +687,7 @@ int mhi_pm_resume(struct mhi_controller *mhi_cntrl);
* Resume the device irrespective of its MHI state. As per the MHI spec, devices
* has to be in M3 state during resume. But some devices seem to be in a
* different MHI state other than M3 but they continue working fine if allowed.
- * This API is intented to be used for such devices.
+ * This API is intended to be used for such devices.
*
* Return: 0 if the resume succeeds, a negative error code otherwise
*/
diff --git a/include/linux/mhi_ep.h b/include/linux/mhi_ep.h
index f6383a57a872..852f331f03fd 100644
--- a/include/linux/mhi_ep.h
+++ b/include/linux/mhi_ep.h
@@ -304,4 +304,20 @@ bool mhi_ep_queue_is_empty(struct mhi_ep_device *mhi_dev, enum dma_data_directio
*/
int mhi_ep_queue_skb(struct mhi_ep_device *mhi_dev, struct sk_buff *skb);
+/**
+ * mhi_ep_queue_buf - Transfer buffer contents to host over MHI Endpoint
+ * @mhi_dev: Device associated with the DL channel
+ * @buf: Buffer to be queued. On success, ownership passes to the MHI stack;
+ * the caller must not free @buf until the DL transfer callback fires
+ * with result->buf_addr equal to @buf. On failure, the caller retains
+ * ownership and must free @buf.
+ * Note: if @len spans multiple host DL TREs, the DL transfer callback
+ * fires once per TRE, each time with result->buf_addr equal to @buf.
+ * @len: Size of the buffer
+ *
+ * Return: 0 if the buffer contents have been transferred successfully, a
+ * negative error code otherwise.
+ */
+int mhi_ep_queue_buf(struct mhi_ep_device *mhi_dev, void *buf, size_t len);
+
#endif