Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248893
b: refs/heads/master
c: 079cdb0
h: refs/heads/master
i:
  248891: bc2ece7
v: v3
  • Loading branch information
Arvid Brodin authored and Greg Kroah-Hartman committed May 19, 2011
1 parent ffbdf1a commit 3a8cf1b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69fff59de4d844f8b4c2454c3c23d32b69dcbfd7
refs/heads/master: 079cdb0947ce6ae7df0c73a1c82c14920a9b6b6d
68 changes: 34 additions & 34 deletions trunk/drivers/usb/host/isp1760-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,40 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
return retval;
}

static void isp1760_endpoint_disable(struct usb_hcd *hcd,
struct usb_host_endpoint *ep)
{
struct isp1760_hcd *priv = hcd_to_priv(hcd);
struct isp1760_qh *qh;
struct isp1760_qtd *qtd;
unsigned long spinflags;
int do_iter;

spin_lock_irqsave(&priv->lock, spinflags);
qh = ep->hcpriv;
if (!qh)
goto out;

do_iter = !list_empty(&qh->qtd_list);
while (do_iter) {
do_iter = 0;
list_for_each_entry(qtd, &qh->qtd_list, qtd_list) {
if (qtd->urb->ep == ep) {
spin_unlock_irqrestore(&priv->lock, spinflags);
isp1760_urb_dequeue(hcd, qtd->urb, -ECONNRESET);
spin_lock_irqsave(&priv->lock, spinflags);
do_iter = 1;
break; /* Restart iteration */
}
}
}
ep->hcpriv = NULL;
/* Cannot free qh here since it will be parsed by schedule_ptds() */

out:
spin_unlock_irqrestore(&priv->lock, spinflags);
}

static int isp1760_hub_status_data(struct usb_hcd *hcd, char *buf)
{
struct isp1760_hcd *priv = hcd_to_priv(hcd);
Expand Down Expand Up @@ -1927,40 +1961,6 @@ static int isp1760_hub_control(struct usb_hcd *hcd, u16 typeReq,
return retval;
}

static void isp1760_endpoint_disable(struct usb_hcd *hcd,
struct usb_host_endpoint *ep)
{
struct isp1760_hcd *priv = hcd_to_priv(hcd);
struct isp1760_qh *qh;
struct isp1760_qtd *qtd;
unsigned long spinflags;
int do_iter;

spin_lock_irqsave(&priv->lock, spinflags);
qh = ep->hcpriv;
if (!qh)
goto out;

do_iter = !list_empty(&qh->qtd_list);
while (do_iter) {
do_iter = 0;
list_for_each_entry(qtd, &qh->qtd_list, qtd_list) {
if (qtd->urb->ep == ep) {
spin_unlock_irqrestore(&priv->lock, spinflags);
isp1760_urb_dequeue(hcd, qtd->urb, -ECONNRESET);
spin_lock_irqsave(&priv->lock, spinflags);
do_iter = 1;
break; /* Restart iteration */
}
}
}
ep->hcpriv = NULL;
/* Cannot free qh here since it will be parsed by schedule_ptds() */

out:
spin_unlock_irqrestore(&priv->lock, spinflags);
}

static int isp1760_get_frame(struct usb_hcd *hcd)
{
struct isp1760_hcd *priv = hcd_to_priv(hcd);
Expand Down

0 comments on commit 3a8cf1b

Please sign in to comment.