Re: [PATCH] net: qrtr: mhi: synchronize qrtr and mhi preparation

From: Maxim Kochetkov
Date: Wed Nov 06 2024 - 04:15:44 EST


05.11.2024 04:29, Chris Lew wrote:
From: Bhaumik Bhatt <bbhatt@xxxxxxxxxxxxxx>

The call to qrtr_endpoint_register() was moved before
mhi_prepare_for_transfer_autoqueue() to prevent a case where a dl
callback can occur before the qrtr endpoint is registered.

Now the reverse can happen where qrtr will try to send a packet
before the channels are prepared. Add a wait in the sending path to
ensure the channels are prepared before trying to do a ul transfer.

Fixes: 68a838b84eff ("net: qrtr: start MHI channel after endpoit creation")
Reported-by: Johan Hovold <johan@xxxxxxxxxx>
Closes: https://lore.kernel.org/linux-arm-msm/ZyTtVdkCCES0lkl4@xxxxxxxxxxxxxxxxxxxx/
Signed-off-by: Bhaumik Bhatt <bbhatt@xxxxxxxxxxxxxx>
Signed-off-by: Chris Lew <quic_clew@xxxxxxxxxxx>

Reviewed-by: Maxim Kochetkov <fido_max@xxxxxxxx>