netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] bus: mhi: host: Import mux_id item
@ 2024-06-12  9:38 Slark Xiao
  2024-06-12  9:46 ` Manivannan Sadhasivam
  2024-06-12 18:30 ` kernel test robot
  0 siblings, 2 replies; 14+ messages in thread
From: Slark Xiao @ 2024-06-12  9:38 UTC (permalink / raw)
  To: manivannan.sadhasivam, loic.poulain, ryazanov.s.a, johannes,
	quic_jhugo
  Cc: netdev, mhi, linux-arm-msm, linux-kernel, Slark Xiao

For SDX72 MBIM mode, it starts data mux id from 112 instead of 0.
This would lead to device can't ping outside successfully.
Also MBIM side would report "bad packet session (112)".
So we add a default mux_id value for SDX72. And this value
would be transferred to wwan mbim side.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
---
 drivers/bus/mhi/host/pci_generic.c | 3 +++
 include/linux/mhi.h                | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 0b483c7c76a1..9e9adf8320d2 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -53,6 +53,7 @@ struct mhi_pci_dev_info {
 	unsigned int dma_data_width;
 	unsigned int mru_default;
 	bool sideband_wake;
+	unsigned int mux_id;
 };
 
 #define MHI_CHANNEL_CONFIG_UL(ch_num, ch_name, el_count, ev_ring) \
@@ -469,6 +470,7 @@ static const struct mhi_pci_dev_info mhi_foxconn_sdx72_info = {
 	.dma_data_width = 32,
 	.mru_default = 32768,
 	.sideband_wake = false,
+	.mux_id = 112,
 };
 
 static const struct mhi_channel_config mhi_mv3x_channels[] = {
@@ -1035,6 +1037,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	mhi_cntrl->runtime_get = mhi_pci_runtime_get;
 	mhi_cntrl->runtime_put = mhi_pci_runtime_put;
 	mhi_cntrl->mru = info->mru_default;
+	mhi_cntrl->link_id = info->mux_id;
 
 	if (info->edl_trigger)
 		mhi_cntrl->edl_trigger = mhi_pci_generic_edl_trigger;
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index b573f15762f8..499c735fb1a3 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -361,6 +361,7 @@ struct mhi_controller_config {
  * @wake_set: Device wakeup set flag
  * @irq_flags: irq flags passed to request_irq (optional)
  * @mru: the default MRU for the MHI device
+ * @link_id: the default link
  *
  * Fields marked as (required) need to be populated by the controller driver
  * before calling mhi_register_controller(). For the fields marked as (optional)
@@ -445,6 +446,7 @@ struct mhi_controller {
 	bool wake_set;
 	unsigned long irq_flags;
 	u32 mru;
+	u32 link_id;
 };
 
 /**
-- 
2.25.1


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

end of thread, other threads:[~2024-06-25  9:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12  9:38 [PATCH v2 1/2] bus: mhi: host: Import mux_id item Slark Xiao
2024-06-12  9:46 ` Manivannan Sadhasivam
2024-06-12 10:19   ` Slark Xiao
2024-06-12 14:19   ` Jeffrey Hugo
2024-06-12 14:51     ` Manivannan Sadhasivam
2024-06-14 10:17       ` Loic Poulain
2024-06-14 14:31         ` Jeffrey Hugo
2024-06-21  3:17           ` Slark Xiao
2024-06-23 13:44             ` Manivannan Sadhasivam
2024-06-25  2:10               ` Slark Xiao
2024-06-25  7:44                 ` Manivannan Sadhasivam
2024-06-25  8:28                   ` Slark Xiao
2024-06-25  9:23                     ` Manivannan Sadhasivam
2024-06-12 18:30 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).