summaryrefslogtreecommitdiffstats
path: root/usbmuxd
diff options
context:
space:
mode:
authorGravatar Hector Martin2009-08-13 00:56:59 +0200
committerGravatar Hector Martin2009-08-13 01:29:55 +0200
commit882543b1e42a960b714fa3aa9b05f9029513b5c1 (patch)
tree48ed88ceb58b5b3072b17623b7fbe31fbae9fc7b /usbmuxd
parent339112a796f774600a55ab143cad0a6123496606 (diff)
downloadusbmuxd-882543b1e42a960b714fa3aa9b05f9029513b5c1.tar.gz
usbmuxd-882543b1e42a960b714fa3aa9b05f9029513b5c1.tar.bz2
Remove obsolete patches, update code and comments for libusb git.
Please use libusb git as of the time of this writing, or 1.0.3 whenever it comes out.
Diffstat (limited to 'usbmuxd')
-rw-r--r--usbmuxd/usb-linux.c4
-rw-r--r--usbmuxd/usb.h6
2 files changed, 4 insertions, 6 deletions
diff --git a/usbmuxd/usb-linux.c b/usbmuxd/usb-linux.c
index b401cde..44eba2c 100644
--- a/usbmuxd/usb-linux.c
+++ b/usbmuxd/usb-linux.c
@@ -138,7 +138,7 @@ int usb_send(struct usb_device *dev, const unsigned char *buf, int length)
138 libusb_free_transfer(xfer); 138 libusb_free_transfer(xfer);
139 return res; 139 return res;
140 } 140 }
141 collection_add(&dev->tx_xfers, xfer);/* 141 collection_add(&dev->tx_xfers, xfer);
142 if((length % 512) == 0) { 142 if((length % 512) == 0) {
143 usbmuxd_log(LL_DEBUG, "Send ZLP"); 143 usbmuxd_log(LL_DEBUG, "Send ZLP");
144 // Send Zero Length Packet 144 // Send Zero Length Packet
@@ -152,7 +152,7 @@ int usb_send(struct usb_device *dev, const unsigned char *buf, int length)
152 return res; 152 return res;
153 } 153 }
154 collection_add(&dev->tx_xfers, xfer); 154 collection_add(&dev->tx_xfers, xfer);
155 }*/ 155 }
156 return 0; 156 return 0;
157} 157}
158 158
diff --git a/usbmuxd/usb.h b/usbmuxd/usb.h
index 8a48308..7eea707 100644
--- a/usbmuxd/usb.h
+++ b/usbmuxd/usb.h
@@ -29,16 +29,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 29
30// libusb fragments packets larger than this (usbfs limitation) 30// libusb fragments packets larger than this (usbfs limitation)
31// on input, this creates race conditions and other issues 31// on input, this creates race conditions and other issues
32// I don't think the device uses larger packets
33// if it does then we're going to have to implement proper framing...
34#define USB_MRU 16384 32#define USB_MRU 16384
35 33
36// max transmission packet size 34// max transmission packet size
37// libusb fragments these too, but doesn't send ZLPs so we're safe 35// libusb fragments these too, but doesn't send ZLPs so we're safe
38// but maybe we need to send a ZLP ourselves at the end (see usb-linux.h) 36// but we need to send a ZLP ourselves at the end (see usb-linux.c)
39// we're using 3 * 16384 to optimize for the fragmentation 37// we're using 3 * 16384 to optimize for the fragmentation
40// this results in three URBs per full transfer, 32 USB packets each 38// this results in three URBs per full transfer, 32 USB packets each
41// if there are ZLP issues this should make them show up too 39// if there are ZLP issues this should make them show up easily too
42#define USB_MTU (3 * 16384) 40#define USB_MTU (3 * 16384)
43 41
44#define USB_PACKET_SIZE 512 42#define USB_PACKET_SIZE 512