Skip to content

Commit 9ebc275

Browse files
Kalle Valokuba-moo
authored andcommitted
Revert "net: really fix the build..."
This reverts commit ce78ffa. Wren and Nicolas reported that ath11k was failing to initialise QCA6390 Wi-Fi 6 device with error: qcom_mhi_qrtr: probe of mhi0_IPCR failed with error -22 Commit ce78ffa ("net: really fix the build..."), introduced in v5.14-rc5, caused this regression in qrtr. Most likely all ath11k devices are broken, but I only tested QCA6390. Let's revert the broken commit so that ath11k works again. Reported-by: Wren Turkal <[email protected]> Reported-by: Nicolas Schichan <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 75da63b commit 9ebc275

File tree

6 files changed

+8
-30
lines changed

6 files changed

+8
-30
lines changed

drivers/bus/mhi/core/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ void mhi_rddm_prepare(struct mhi_controller *mhi_cntrl,
682682
struct image_info *img_info);
683683
void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl);
684684
int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
685-
struct mhi_chan *mhi_chan, unsigned int flags);
685+
struct mhi_chan *mhi_chan);
686686
int mhi_init_chan_ctxt(struct mhi_controller *mhi_cntrl,
687687
struct mhi_chan *mhi_chan);
688688
void mhi_deinit_chan_ctxt(struct mhi_controller *mhi_cntrl,

drivers/bus/mhi/core/main.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ static void mhi_unprepare_channel(struct mhi_controller *mhi_cntrl,
14301430
}
14311431

14321432
int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
1433-
struct mhi_chan *mhi_chan, unsigned int flags)
1433+
struct mhi_chan *mhi_chan)
14341434
{
14351435
int ret = 0;
14361436
struct device *dev = &mhi_chan->mhi_dev->dev;
@@ -1455,9 +1455,6 @@ int mhi_prepare_channel(struct mhi_controller *mhi_cntrl,
14551455
if (ret)
14561456
goto error_pm_state;
14571457

1458-
if (mhi_chan->dir == DMA_FROM_DEVICE)
1459-
mhi_chan->pre_alloc = !!(flags & MHI_CH_INBOUND_ALLOC_BUFS);
1460-
14611458
/* Pre-allocate buffer for xfer ring */
14621459
if (mhi_chan->pre_alloc) {
14631460
int nr_el = get_nr_avail_ring_elements(mhi_cntrl,
@@ -1613,7 +1610,7 @@ void mhi_reset_chan(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan)
16131610
}
16141611

16151612
/* Move channel to start state */
1616-
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev, unsigned int flags)
1613+
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev)
16171614
{
16181615
int ret, dir;
16191616
struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
@@ -1624,7 +1621,7 @@ int mhi_prepare_for_transfer(struct mhi_device *mhi_dev, unsigned int flags)
16241621
if (!mhi_chan)
16251622
continue;
16261623

1627-
ret = mhi_prepare_channel(mhi_cntrl, mhi_chan, flags);
1624+
ret = mhi_prepare_channel(mhi_cntrl, mhi_chan);
16281625
if (ret)
16291626
goto error_open_chan;
16301627
}

drivers/net/mhi/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static int mhi_net_newlink(void *ctxt, struct net_device *ndev, u32 if_id,
335335
u64_stats_init(&mhi_netdev->stats.tx_syncp);
336336

337337
/* Start MHI channels */
338-
err = mhi_prepare_for_transfer(mhi_dev, 0);
338+
err = mhi_prepare_for_transfer(mhi_dev);
339339
if (err)
340340
goto out_err;
341341

drivers/net/wwan/mhi_wwan_ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static int mhi_wwan_ctrl_start(struct wwan_port *port)
110110
int ret;
111111

112112
/* Start mhi device's channel(s) */
113-
ret = mhi_prepare_for_transfer(mhiwwan->mhi_dev, 0);
113+
ret = mhi_prepare_for_transfer(mhiwwan->mhi_dev);
114114
if (ret)
115115
return ret;
116116

include/linux/mhi.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -719,13 +719,8 @@ void mhi_device_put(struct mhi_device *mhi_dev);
719719
* host and device execution environments match and
720720
* channels are in a DISABLED state.
721721
* @mhi_dev: Device associated with the channels
722-
* @flags: MHI channel flags
723722
*/
724-
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev,
725-
unsigned int flags);
726-
727-
/* Automatically allocate and queue inbound buffers */
728-
#define MHI_CH_INBOUND_ALLOC_BUFS BIT(0)
723+
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev);
729724

730725
/**
731726
* mhi_unprepare_from_transfer - Reset UL and DL channels for data transfer.

net/qrtr/mhi.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ struct qrtr_mhi_dev {
1515
struct qrtr_endpoint ep;
1616
struct mhi_device *mhi_dev;
1717
struct device *dev;
18-
struct completion ready;
1918
};
2019

2120
/* From MHI to QRTR */
@@ -51,10 +50,6 @@ static int qcom_mhi_qrtr_send(struct qrtr_endpoint *ep, struct sk_buff *skb)
5150
struct qrtr_mhi_dev *qdev = container_of(ep, struct qrtr_mhi_dev, ep);
5251
int rc;
5352

54-
rc = wait_for_completion_interruptible(&qdev->ready);
55-
if (rc)
56-
goto free_skb;
57-
5853
if (skb->sk)
5954
sock_hold(skb->sk);
6055

@@ -84,7 +79,7 @@ static int qcom_mhi_qrtr_probe(struct mhi_device *mhi_dev,
8479
int rc;
8580

8681
/* start channels */
87-
rc = mhi_prepare_for_transfer(mhi_dev, 0);
82+
rc = mhi_prepare_for_transfer(mhi_dev);
8883
if (rc)
8984
return rc;
9085

@@ -101,15 +96,6 @@ static int qcom_mhi_qrtr_probe(struct mhi_device *mhi_dev,
10196
if (rc)
10297
return rc;
10398

104-
/* start channels */
105-
rc = mhi_prepare_for_transfer(mhi_dev, MHI_CH_INBOUND_ALLOC_BUFS);
106-
if (rc) {
107-
qrtr_endpoint_unregister(&qdev->ep);
108-
dev_set_drvdata(&mhi_dev->dev, NULL);
109-
return rc;
110-
}
111-
112-
complete_all(&qdev->ready);
11399
dev_dbg(qdev->dev, "Qualcomm MHI QRTR driver probed\n");
114100

115101
return 0;

0 commit comments

Comments
 (0)