usb-redir: Return babble when getting more bulk data then requested
Babble is the appropriate error in this case (rather then signalling a stall).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 2979a36183
)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
636071de92
commit
22ba7a7488
|
@ -1324,9 +1324,9 @@ static void usbredir_bulk_packet(void *priv, uint32_t id,
|
||||||
if (data_len <= p->iov.size) {
|
if (data_len <= p->iov.size) {
|
||||||
usb_packet_copy(p, data, data_len);
|
usb_packet_copy(p, data, data_len);
|
||||||
} else {
|
} else {
|
||||||
ERROR("bulk buffer too small (%d > %zd)\n", data_len,
|
ERROR("bulk got more data then requested (%d > %zd)\n",
|
||||||
p->iov.size);
|
data_len, p->iov.size);
|
||||||
len = USB_RET_STALL;
|
len = USB_RET_BABBLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p->result = len;
|
p->result = len;
|
||||||
|
|
Loading…
Reference in New Issue