|
@@ -131,7 +131,8 @@ static void __usbhsg_queue_pop(struct usbhsg_uep *uep,
|
|
struct device *dev = usbhsg_gpriv_to_dev(gpriv);
|
|
struct device *dev = usbhsg_gpriv_to_dev(gpriv);
|
|
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
|
|
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
|
|
|
|
|
|
- dev_dbg(dev, "pipe %d : queue pop\n", usbhs_pipe_number(pipe));
|
|
|
|
|
|
+ if (pipe)
|
|
|
|
+ dev_dbg(dev, "pipe %d : queue pop\n", usbhs_pipe_number(pipe));
|
|
|
|
|
|
ureq->req.status = status;
|
|
ureq->req.status = status;
|
|
spin_unlock(usbhs_priv_to_lock(priv));
|
|
spin_unlock(usbhs_priv_to_lock(priv));
|
|
@@ -685,7 +686,13 @@ static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
|
|
struct usbhsg_request *ureq = usbhsg_req_to_ureq(req);
|
|
struct usbhsg_request *ureq = usbhsg_req_to_ureq(req);
|
|
struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
|
|
struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
|
|
|
|
|
|
- usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq));
|
|
|
|
|
|
+ if (pipe)
|
|
|
|
+ usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq));
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * To dequeue a request, this driver should call the usbhsg_queue_pop()
|
|
|
|
+ * even if the pipe is NULL.
|
|
|
|
+ */
|
|
usbhsg_queue_pop(uep, ureq, -ECONNRESET);
|
|
usbhsg_queue_pop(uep, ureq, -ECONNRESET);
|
|
|
|
|
|
return 0;
|
|
return 0;
|