21 #include <linux/slab.h>
34 if (priv->
seqnum == seqnum) {
46 "urb %p was unlinked "
47 "%ssynchronuously.\n", urb,
48 status == -
ENOENT ?
"" :
"a");
51 "urb %p may be in a error, "
52 "status %d\n", urb, status);
66 static void vhci_recv_ret_submit(
struct vhci_device *vdev,
78 pr_err(
"cannot find a urb of seqnum %u\n", pdu->
base.seqnum);
139 static void vhci_recv_ret_unlink(
struct vhci_device *vdev,
148 unlink = dequeue_pending_unlink(vdev, pdu);
150 pr_info(
"cannot find the pending unlink %u\n",
165 pr_info(
"the urb (seqnum %d) was already given back\n",
172 pr_info(
"urb->status %d\n", urb->status);
185 static int vhci_priv_tx_empty(
struct vhci_device *vdev)
190 empty = list_empty(&vdev->
priv_rx);
205 memset(&pdu, 0,
sizeof(pdu));
211 pr_info(
"connection reset by peer\n");
212 else if (ret == -
EAGAIN) {
214 if (vhci_priv_tx_empty(vdev))
216 pr_info(
"connection timed out with pending urbs\n");
218 pr_info(
"xmit failed %d\n", ret);
228 if (ret !=
sizeof(pdu)) {
229 pr_err(
"received pdu size is %d, should be %d\n", ret,
230 (
unsigned int)
sizeof(pdu));
240 switch (pdu.
base.command) {
242 vhci_recv_ret_submit(vdev, &pdu);
245 vhci_recv_ret_unlink(vdev, &pdu);