Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143612
b: refs/heads/master
c: f720af9
h: refs/heads/master
v: v3
  • Loading branch information
David Vrabel authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent 4f21aef commit 4b638f4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 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: 7f0406db5fe4dd3ad3cbd53830239a87d68156fd
refs/heads/master: f720af91ec2c67e9a1abbd935570f4b4e1f0dd54
12 changes: 9 additions & 3 deletions trunk/drivers/usb/host/whci/asl.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,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;
}

/**
Expand Down
12 changes: 9 additions & 3 deletions trunk/drivers/usb/host/whci/pzl.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,23 +283,29 @@ int pzl_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)
qset_insert_in_sw_list(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->periodic_work);

return 0;
return err;
}

/**
Expand Down

0 comments on commit 4b638f4

Please sign in to comment.