Skip to content

Commit b8a97f2

Browse files
Loic Poulaingregkh
authored andcommitted
bus: mhi: pci_generic: Fix inbound IPCR channel
The qrtr-mhi client driver assumes that inbound buffers are automatically allocated and queued by the MHI core, but this doesn't happen for mhi pci devices since IPCR inbound channel is not flagged with auto_queue, causing unusable IPCR (qrtr) feature. Fix that. Link: https://lore.kernel.org/r/1625736749-24947-1-git-send-email-loic.poulain@linaro.org [mani: fixed a spelling mistake in commit description] Fixes: 855a70c ("bus: mhi: Add MHI PCI support for WWAN modems") Cc: stable@vger.kernel.org #5.10 Reviewed-by: Hemant kumar <hemantk@codeaurora.org> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20210716075106.49938-4-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 546362a commit b8a97f2

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

drivers/bus/mhi/pci_generic.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,22 @@ struct mhi_pci_dev_info {
7575
.doorbell_mode_switch = false, \
7676
}
7777

78+
#define MHI_CHANNEL_CONFIG_DL_AUTOQUEUE(ch_num, ch_name, el_count, ev_ring) \
79+
{ \
80+
.num = ch_num, \
81+
.name = ch_name, \
82+
.num_elements = el_count, \
83+
.event_ring = ev_ring, \
84+
.dir = DMA_FROM_DEVICE, \
85+
.ee_mask = BIT(MHI_EE_AMSS), \
86+
.pollcfg = 0, \
87+
.doorbell = MHI_DB_BRST_DISABLE, \
88+
.lpm_notify = false, \
89+
.offload_channel = false, \
90+
.doorbell_mode_switch = false, \
91+
.auto_queue = true, \
92+
}
93+
7894
#define MHI_EVENT_CONFIG_CTRL(ev_ring, el_count) \
7995
{ \
8096
.num_elements = el_count, \
@@ -213,7 +229,7 @@ static const struct mhi_channel_config modem_qcom_v1_mhi_channels[] = {
213229
MHI_CHANNEL_CONFIG_UL(14, "QMI", 4, 0),
214230
MHI_CHANNEL_CONFIG_DL(15, "QMI", 4, 0),
215231
MHI_CHANNEL_CONFIG_UL(20, "IPCR", 8, 0),
216-
MHI_CHANNEL_CONFIG_DL(21, "IPCR", 8, 0),
232+
MHI_CHANNEL_CONFIG_DL_AUTOQUEUE(21, "IPCR", 8, 0),
217233
MHI_CHANNEL_CONFIG_UL_FP(34, "FIREHOSE", 32, 0),
218234
MHI_CHANNEL_CONFIG_DL_FP(35, "FIREHOSE", 32, 0),
219235
MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0", 128, 2),

0 commit comments

Comments
 (0)