Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201263
b: refs/heads/master
c: d1dc908
h: refs/heads/master
i:
  201261: 778ecf3
  201259: c552da5
  201255: ee51e66
  201247: ad5d169
v: v3
  • Loading branch information
Sarah Sharp authored and Greg Kroah-Hartman committed Jul 26, 2010
1 parent bf210a9 commit 2c6f2ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 7595931c986f50b1e197ce7b881563e36a7d041e
refs/heads/master: d1dc908a251c8cd87c1a1ad4f2c4a40cdbd8286c
11 changes: 7 additions & 4 deletions trunk/drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2380,16 +2380,19 @@ static int queue_command(struct xhci_hcd *xhci, u32 field1, u32 field2,
u32 field3, u32 field4, bool command_must_succeed)
{
int reserved_trbs = xhci->cmd_ring_reserved_trbs;
int ret;

if (!command_must_succeed)
reserved_trbs++;

if (!room_on_ring(xhci, xhci->cmd_ring, reserved_trbs)) {
if (!in_interrupt())
xhci_err(xhci, "ERR: No room for command on command ring\n");
ret = prepare_ring(xhci, xhci->cmd_ring, EP_STATE_RUNNING,
reserved_trbs, GFP_ATOMIC);
if (ret < 0) {
xhci_err(xhci, "ERR: No room for command on command ring\n");
if (command_must_succeed)
xhci_err(xhci, "ERR: Reserved TRB counting for "
"unfailable commands failed.\n");
return -ENOMEM;
return ret;
}
queue_trb(xhci, xhci->cmd_ring, false, false, field1, field2, field3,
field4 | xhci->cmd_ring->cycle_state);
Expand Down

0 comments on commit 2c6f2ad

Please sign in to comment.