File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 */
220219struct 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
Original file line number Diff line number Diff line change @@ -76,6 +76,11 @@ static int qcom_mhi_qrtr_probe(struct mhi_device *mhi_dev,
7676 struct qrtr_mhi_dev * qdev ;
7777 int rc ;
7878
79+ /* start channels */
80+ rc = mhi_prepare_for_transfer (mhi_dev );
81+ if (rc )
82+ return rc ;
83+
7984 qdev = devm_kzalloc (& mhi_dev -> dev , sizeof (* qdev ), GFP_KERNEL );
8085 if (!qdev )
8186 return - ENOMEM ;
@@ -99,6 +104,7 @@ static void qcom_mhi_qrtr_remove(struct mhi_device *mhi_dev)
99104 struct qrtr_mhi_dev * qdev = dev_get_drvdata (& mhi_dev -> dev );
100105
101106 qrtr_endpoint_unregister (& qdev -> ep );
107+ mhi_unprepare_from_transfer (mhi_dev );
102108 dev_set_drvdata (& mhi_dev -> dev , NULL );
103109}
104110
You can’t perform that action at this time.
0 commit comments