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

Maxim Kochetkov
2024-11-06T09:15:28Z

05.11.2024 04:29, Chris Lew wrote:
> From: Bhaumik Bhatt <bbhatt@codeaurora.org>
>
> 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@kernel.org>
> Closes: https://lore.kernel.org/linux-arm-msm/ZyTtVdkCCES0lkl4@hovoldconsulting.com/
> Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
> Signed-off-by: Chris Lew <quic_clew@quicinc.com>

Reviewed-by: Maxim Kochetkov <fido_max@inbox.ru>