Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363881
b: refs/heads/master
c: 2663d79
h: refs/heads/master
i:
  363879: 8686411
v: v3
  • Loading branch information
Stefan Reif authored and Greg Kroah-Hartman committed Apr 5, 2013
1 parent c7bf3ec commit 5e95e35
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 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: c5a73ee2d1eb3f1961e6af0590971669d87deac8
refs/heads/master: 2663d79b8393460dc8ba9cafe0bf8eaeacbd0bf6
54 changes: 29 additions & 25 deletions trunk/drivers/staging/usbip/vhci_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,37 @@ struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum)
int status;

list_for_each_entry_safe(priv, tmp, &vdev->priv_rx, list) {
if (priv->seqnum == seqnum) {
urb = priv->urb;
status = urb->status;

usbip_dbg_vhci_rx("find urb %p vurb %p seqnum %u\n",
urb, priv, seqnum);

/* TODO: fix logic here to improve indent situtation */
if (status != -EINPROGRESS) {
if (status == -ENOENT ||
status == -ECONNRESET)
dev_info(&urb->dev->dev,
"urb %p was unlinked "
"%ssynchronuously.\n", urb,
status == -ENOENT ? "" : "a");
else
dev_info(&urb->dev->dev,
"urb %p may be in a error, "
"status %d\n", urb, status);
}

list_del(&priv->list);
kfree(priv);
urb->hcpriv = NULL;

if (priv->seqnum != seqnum)
continue;

urb = priv->urb;
status = urb->status;

usbip_dbg_vhci_rx("find urb %p vurb %p seqnum %u\n",
urb, priv, seqnum);

switch (status) {
case -ENOENT:
/* fall through */
case -ECONNRESET:
dev_info(&urb->dev->dev,
"urb %p was unlinked %ssynchronuously.\n", urb,
status == -ENOENT ? "" : "a");
break;
case -EINPROGRESS:
/* no info output */
break;
default:
dev_info(&urb->dev->dev,
"urb %p may be in a error, status %d\n", urb,
status);
}

list_del(&priv->list);
kfree(priv);
urb->hcpriv = NULL;

break;
}

return urb;
Expand Down

0 comments on commit 5e95e35

Please sign in to comment.