Skip to content

Commit ed5298c

Browse files
Loic PoulainMani-Sadhasivam
authored andcommitted
bus: mhi: Remove auto-start option
There is really no point having an auto-start for channels. This is confusing for the device drivers, some have to enable the channels, others don't have... and waste resources (e.g. pre allocated buffers) that may never be used. This is really up to the MHI device(channel) driver to manage the state of its channels. While at it, let's also remove the auto-start option from ath11k mhi controller. Signed-off-by: Loic Poulain <[email protected]> Acked-by: Kalle Valo <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> [mani: clubbed ath11k change] Signed-off-by: Manivannan Sadhasivam <[email protected]>
1 parent 3650b22 commit ed5298c

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

drivers/bus/mhi/core/init.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,6 @@ static int parse_ch_cfg(struct mhi_controller *mhi_cntrl,
758758
mhi_chan->offload_ch = ch_cfg->offload_channel;
759759
mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch;
760760
mhi_chan->pre_alloc = ch_cfg->auto_queue;
761-
mhi_chan->auto_start = ch_cfg->auto_start;
762761

763762
/*
764763
* If MHI host allocates buffers, then the channel direction
@@ -1160,11 +1159,6 @@ static int mhi_driver_probe(struct device *dev)
11601159
goto exit_probe;
11611160

11621161
ul_chan->xfer_cb = mhi_drv->ul_xfer_cb;
1163-
if (ul_chan->auto_start) {
1164-
ret = mhi_prepare_channel(mhi_cntrl, ul_chan);
1165-
if (ret)
1166-
goto exit_probe;
1167-
}
11681162
}
11691163

11701164
ret = -EINVAL;
@@ -1198,9 +1192,6 @@ static int mhi_driver_probe(struct device *dev)
11981192
if (ret)
11991193
goto exit_probe;
12001194

1201-
if (dl_chan && dl_chan->auto_start)
1202-
mhi_prepare_channel(mhi_cntrl, dl_chan);
1203-
12041195
mhi_device_put(mhi_dev);
12051196

12061197
return ret;

drivers/bus/mhi/core/internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ struct mhi_chan {
563563
bool configured;
564564
bool offload_ch;
565565
bool pre_alloc;
566-
bool auto_start;
567566
bool wake_capable;
568567
};
569568

drivers/net/wireless/ath/ath11k/mhi.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ static struct mhi_channel_config ath11k_mhi_channels[] = {
2424
.offload_channel = false,
2525
.doorbell_mode_switch = false,
2626
.auto_queue = false,
27-
.auto_start = false,
2827
},
2928
{
3029
.num = 1,
@@ -39,7 +38,6 @@ static struct mhi_channel_config ath11k_mhi_channels[] = {
3938
.offload_channel = false,
4039
.doorbell_mode_switch = false,
4140
.auto_queue = false,
42-
.auto_start = false,
4341
},
4442
{
4543
.num = 20,
@@ -54,7 +52,6 @@ static struct mhi_channel_config ath11k_mhi_channels[] = {
5452
.offload_channel = false,
5553
.doorbell_mode_switch = false,
5654
.auto_queue = false,
57-
.auto_start = true,
5855
},
5956
{
6057
.num = 21,
@@ -69,7 +66,6 @@ static struct mhi_channel_config ath11k_mhi_channels[] = {
6966
.offload_channel = false,
7067
.doorbell_mode_switch = false,
7168
.auto_queue = true,
72-
.auto_start = true,
7369
},
7470
};
7571

include/linux/mhi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ enum mhi_db_brst_mode {
214214
* @offload_channel: The client manages the channel completely
215215
* @doorbell_mode_switch: Channel switches to doorbell mode on M0 transition
216216
* @auto_queue: Framework will automatically queue buffers for DL traffic
217-
* @auto_start: Automatically start (open) this channel
218217
* @wake-capable: Channel capable of waking up the system
219218
*/
220219
struct mhi_channel_config {
@@ -232,7 +231,6 @@ struct mhi_channel_config {
232231
bool offload_channel;
233232
bool doorbell_mode_switch;
234233
bool auto_queue;
235-
bool auto_start;
236234
bool wake_capable;
237235
};
238236

0 commit comments

Comments
 (0)