diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-21 17:12:16 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-21 17:12:16 +0900 |
commit | 4db25d496c09fdf094d52d11a90ae51f9ee473c6 (patch) | |
tree | 77ab8003db1d6ccbcf3a9acafad26002fba37b63 /drivers/usb/host/whci/asl.c | |
parent | b8c193f88ebd8705b3e916532539031cd9fc0b4c (diff) | |
parent | 8c31813f31cd4403b46802866949a95a6e8fa584 (diff) |
Merge branch 'sh/stable-updates' into sh/for-2.6.30
Diffstat (limited to 'drivers/usb/host/whci/asl.c')
-rw-r--r-- | drivers/usb/host/whci/asl.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/usb/host/whci/asl.c b/drivers/usb/host/whci/asl.c index 958751ccea4..c2050785a81 100644 --- a/drivers/usb/host/whci/asl.c +++ b/drivers/usb/host/whci/asl.c @@ -122,7 +122,8 @@ static uint32_t process_qset(struct whc *whc, struct whc_qset *qset) process_inactive_qtd(whc, qset, td); } - update |= qset_add_qtds(whc, qset); + if (!qset->remove) + update |= qset_add_qtds(whc, qset); done: /* @@ -254,23 +255,29 @@ int asl_urb_enqueue(struct whc *whc, struct urb *urb, gfp_t mem_flags) spin_lock_irqsave(&whc->lock, flags); + err = usb_hcd_link_urb_to_ep(&whc->wusbhc.usb_hcd, urb); + if (err < 0) { + spin_unlock_irqrestore(&whc->lock, flags); + return err; + } + qset = get_qset(whc, urb, GFP_ATOMIC); if (qset == NULL) err = -ENOMEM; else err = qset_add_urb(whc, qset, urb, GFP_ATOMIC); if (!err) { - usb_hcd_link_urb_to_ep(&whc->wusbhc.usb_hcd, urb); if (!qset->in_sw_list) asl_qset_insert_begin(whc, qset); - } + } else + usb_hcd_unlink_urb_from_ep(&whc->wusbhc.usb_hcd, urb); spin_unlock_irqrestore(&whc->lock, flags); if (!err) queue_work(whc->workqueue, &whc->async_work); - return 0; + return err; } /** |