qdss_bridge: handle usb write done event

USB_QDSS_DATA_WRITE_DONE event should be handle in
usb_notifier(), even if drvdata->open != ENABLE.

Change-Id: I7c7e106f03cf819117abfed67f2095e59d90004d
Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com>
This commit is contained in:
Yuanfang Zhang 2021-10-29 16:09:50 +08:00
parent e7f004a48d
commit 45c3592664

View file

@ -468,8 +468,7 @@ static void usb_notifier(void *priv, unsigned int event,
{
struct qdss_bridge_drvdata *drvdata = priv;
if (!drvdata || drvdata->mode != MHI_TRANSFER_TYPE_USB
|| drvdata->opened != ENABLE) {
if (!drvdata || drvdata->mode != MHI_TRANSFER_TYPE_USB) {
pr_err_ratelimited("%s can't be called in invalid status.\n",
__func__);
return;
@ -477,8 +476,10 @@ static void usb_notifier(void *priv, unsigned int event,
switch (event) {
case USB_QDSS_CONNECT:
usb_qdss_alloc_req(ch, drvdata->nr_trbs);
mhi_queue_read(drvdata);
if (drvdata->opened == ENABLE) {
usb_qdss_alloc_req(ch, drvdata->nr_trbs);
mhi_queue_read(drvdata);
}
break;
case USB_QDSS_DISCONNECT: