|
@@ -1,5 +1,7 @@
|
|
|
/*
|
|
|
* Copyright (C) 2003-2008 Takahiro Hirofuchi
|
|
|
+ * Copyright (C) 2015-2016 Samsung Electronics
|
|
|
+ * Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
|
*
|
|
|
* This is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
@@ -643,7 +645,7 @@ int usbip_recv_iso(struct usbip_device *ud, struct urb *urb)
|
|
|
ret);
|
|
|
kfree(buff);
|
|
|
|
|
|
- if (ud->side == USBIP_STUB)
|
|
|
+ if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC)
|
|
|
usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
|
|
|
else
|
|
|
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
|
|
@@ -665,7 +667,7 @@ int usbip_recv_iso(struct usbip_device *ud, struct urb *urb)
|
|
|
"total length of iso packets %d not equal to actual length of buffer %d\n",
|
|
|
total_length, urb->actual_length);
|
|
|
|
|
|
- if (ud->side == USBIP_STUB)
|
|
|
+ if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC)
|
|
|
usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
|
|
|
else
|
|
|
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
|
|
@@ -723,7 +725,7 @@ int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
|
|
|
int ret;
|
|
|
int size;
|
|
|
|
|
|
- if (ud->side == USBIP_STUB) {
|
|
|
+ if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC) {
|
|
|
/* the direction of urb must be OUT. */
|
|
|
if (usb_pipein(urb->pipe))
|
|
|
return 0;
|
|
@@ -755,7 +757,7 @@ int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
|
|
|
ret = usbip_recv(ud->tcp_socket, urb->transfer_buffer, size);
|
|
|
if (ret != size) {
|
|
|
dev_err(&urb->dev->dev, "recv xbuf, %d\n", ret);
|
|
|
- if (ud->side == USBIP_STUB) {
|
|
|
+ if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC) {
|
|
|
usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
|
|
|
} else {
|
|
|
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
|