diff options
Diffstat (limited to 'daemon/usb-linux.c')
| -rw-r--r-- | daemon/usb-linux.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/daemon/usb-linux.c b/daemon/usb-linux.c index f1be612..0edc557 100644 --- a/daemon/usb-linux.c +++ b/daemon/usb-linux.c | |||
| @@ -134,18 +134,12 @@ int usb_send(struct usb_device *dev, const unsigned char *buf, int length) | |||
| 134 | struct libusb_transfer *xfer = libusb_alloc_transfer(0); | 134 | struct libusb_transfer *xfer = libusb_alloc_transfer(0); |
| 135 | libusb_fill_bulk_transfer(xfer, dev->dev, BULK_OUT, (void*)buf, length, tx_callback, dev, 0); | 135 | libusb_fill_bulk_transfer(xfer, dev->dev, BULK_OUT, (void*)buf, length, tx_callback, dev, 0); |
| 136 | xfer->flags = LIBUSB_TRANSFER_SHORT_NOT_OK; | 136 | xfer->flags = LIBUSB_TRANSFER_SHORT_NOT_OK; |
| 137 | #ifndef EXPLICIT_ZLP_TRANSACTION | ||
| 138 | if (length % dev->wMaxPacketSize == 0) { | ||
| 139 | xfer->flags |= LIBUSB_TRANSFER_ZERO_PACKET; | ||
| 140 | } | ||
| 141 | #endif | ||
| 142 | if((res = libusb_submit_transfer(xfer)) < 0) { | 137 | if((res = libusb_submit_transfer(xfer)) < 0) { |
| 143 | usbmuxd_log(LL_ERROR, "Failed to submit TX transfer %p len %d to device %d-%d: %d", buf, length, dev->bus, dev->address, res); | 138 | usbmuxd_log(LL_ERROR, "Failed to submit TX transfer %p len %d to device %d-%d: %d", buf, length, dev->bus, dev->address, res); |
| 144 | libusb_free_transfer(xfer); | 139 | libusb_free_transfer(xfer); |
| 145 | return res; | 140 | return res; |
| 146 | } | 141 | } |
| 147 | collection_add(&dev->tx_xfers, xfer); | 142 | collection_add(&dev->tx_xfers, xfer); |
| 148 | #ifdef EXPLICIT_ZLP_TRANSACTION | ||
| 149 | if (length % dev->wMaxPacketSize == 0) { | 143 | if (length % dev->wMaxPacketSize == 0) { |
| 150 | usbmuxd_log(LL_DEBUG, "Send ZLP"); | 144 | usbmuxd_log(LL_DEBUG, "Send ZLP"); |
| 151 | // Send Zero Length Packet | 145 | // Send Zero Length Packet |
| @@ -160,7 +154,6 @@ int usb_send(struct usb_device *dev, const unsigned char *buf, int length) | |||
| 160 | } | 154 | } |
| 161 | collection_add(&dev->tx_xfers, xfer); | 155 | collection_add(&dev->tx_xfers, xfer); |
| 162 | } | 156 | } |
| 163 | #endif | ||
| 164 | return 0; | 157 | return 0; |
| 165 | } | 158 | } |
| 166 | 159 | ||
