Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167572
b: refs/heads/master
c: 171b37e
h: refs/heads/master
v: v3
  • Loading branch information
David Vrabel authored and Greg Kroah-Hartman committed Oct 14, 2009
1 parent cdc8a8d commit e0885fc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 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: b41ecf9a80a55406eb4bf90c1ba260785002e103
refs/heads/master: 171b37ee95865c052a88d52a05895c3c584f4871
19 changes: 12 additions & 7 deletions trunk/drivers/usb/host/whci/asl.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ int asl_urb_dequeue(struct whc *whc, struct urb *urb, int status)
struct whc_urb *wurb = urb->hcpriv;
struct whc_qset *qset = wurb->qset;
struct whc_std *std, *t;
bool has_qtd = false;
int ret;
unsigned long flags;

Expand All @@ -315,17 +316,21 @@ int asl_urb_dequeue(struct whc *whc, struct urb *urb, int status)
goto out;

list_for_each_entry_safe(std, t, &qset->stds, list_node) {
if (std->urb == urb)
if (std->urb == urb) {
if (std->qtd)
has_qtd = true;
qset_free_std(whc, std);
else
} else
std->qtd = NULL; /* so this std is re-added when the qset is */
}

asl_qset_remove(whc, qset);
wurb->status = status;
wurb->is_async = true;
queue_work(whc->workqueue, &wurb->dequeue_work);

if (has_qtd) {
asl_qset_remove(whc, qset);
wurb->status = status;
wurb->is_async = true;
queue_work(whc->workqueue, &wurb->dequeue_work);
} else
qset_remove_urb(whc, qset, urb, status);
out:
spin_unlock_irqrestore(&whc->lock, flags);

Expand Down
20 changes: 13 additions & 7 deletions trunk/drivers/usb/host/whci/pzl.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ int pzl_urb_dequeue(struct whc *whc, struct urb *urb, int status)
struct whc_urb *wurb = urb->hcpriv;
struct whc_qset *qset = wurb->qset;
struct whc_std *std, *t;
bool has_qtd = false;
int ret;
unsigned long flags;

Expand All @@ -343,17 +344,22 @@ int pzl_urb_dequeue(struct whc *whc, struct urb *urb, int status)
goto out;

list_for_each_entry_safe(std, t, &qset->stds, list_node) {
if (std->urb == urb)
if (std->urb == urb) {
if (std->qtd)
has_qtd = true;
qset_free_std(whc, std);
else
} else
std->qtd = NULL; /* so this std is re-added when the qset is */
}

pzl_qset_remove(whc, qset);
wurb->status = status;
wurb->is_async = false;
queue_work(whc->workqueue, &wurb->dequeue_work);

if (has_qtd) {
pzl_qset_remove(whc, qset);
update_pzl_hw_view(whc);
wurb->status = status;
wurb->is_async = false;
queue_work(whc->workqueue, &wurb->dequeue_work);
} else
qset_remove_urb(whc, qset, urb, status);
out:
spin_unlock_irqrestore(&whc->lock, flags);

Expand Down

0 comments on commit e0885fc

Please sign in to comment.