Browse files

handle error case on USB 3.0: control transfer may return 512 bytes

Signed-off-by: Florian Echtler <floe@butterbrot.org>
  • Loading branch information...
1 parent 55451aa commit d1d19df8957f8d63a562b310413da15d3e6ef7a1 @floe floe committed with zarvox Dec 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/cameras.c
View
3 src/cameras.c
@@ -688,7 +688,8 @@ static int send_cmd(freenect_device *dev, uint16_t cmd, void *cmdbuf, unsigned i
do {
actual_len = fnusb_control(&dev->usb_cam, 0xc0, 0, 0, 0, ibuf, 0x200);
- } while (actual_len == 0);
+ FN_FLOOD("actual_len: %d\n", actual_len);
+ } while ((actual_len == 0) || (actual_len == 0x200));
FN_SPEW("Control reply: %d\n", res);
if (actual_len < (int)sizeof(*rhdr)) {
FN_ERROR("send_cmd: Input control transfer failed (%d)\n", res);

0 comments on commit d1d19df

Please sign in to comment.