lkml.org 
[lkml]   [2018]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] usb: dwc3: gadget: don't remove the request if bus-expired
Date
We have already returned EAGAIN for bus-expiry, and it's designed to
start with a future Frame number and start the transfer again. So we
should not remove the request for that case.

Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
drivers/usb/dwc3/gadget.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 2ecde30..16a6e3c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1250,7 +1250,7 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep)
}

ret = dwc3_send_gadget_ep_cmd(dep, cmd, &params);
- if (ret < 0) {
+ if (ret < 0 && ret != -EAGAIN) {
/*
* FIXME we need to iterate over the list of requests
* here and stop, unmap, free and del each of the linked
@@ -1259,10 +1259,9 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep)
if (req->trb)
memset(req->trb, 0, sizeof(struct dwc3_trb));
dwc3_gadget_del_and_unmap_request(dep, req, ret);
- return ret;
}

- return 0;
+ return ret;
}

static int __dwc3_gadget_get_frame(struct dwc3 *dwc)
--
2.7.4
\
 
 \ /
  Last update: 2018-12-20 13:51    [W:0.072 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site