On Tue, Mar 12, 2013 at 11:18 PM, Xiaofan Chen <xiaof...@gmail.com> wrote:
> On Fri, Mar 8, 2013 at 1:55 PM, Xiaofan Chen <xiaof...@gmail.com> wrote:
>> On Thu, Mar 7, 2013 at 11:34 AM, Xiaofan Chen <xiaof...@gmail.com> wrote:
>>> I have removed some of the Mac OS X thingy from 1.0.15. They
>>> are good to have but not necessary.
>>
>> Now only issue #83, issue #98 and issue #102 are listed under
>> 1.0.15 milestone.
>> https://github.com/libusbx/libusbx/issues?milestone=11&state=open
>>
>> If possible, I will see if I can get #97 and #99 Darwin bug fixes into
>> 1.0.15 or not. If not, they can be in next release. They look
>> relatively simple to me.
>>
>
> The following is the patch for #97, recreated from Nathan's patch
> against libusbx.git.
>

The following is for #99, modified from the libusb.org ticket #165.
I think the original patch there is flawed since it does not consider
Super Speed where Mac OS X 10.8.x supports.

>From 4f22847d7d25ccb5caedfa8b72bc18167c9fabee Mon Sep 17 00:00:00 2001
From: Vegard Storheil Eriksen <z...@jvnv.net>
Date: Tue, 12 Mar 2013 23:30:05 +0800
Subject: [PATCH] Darwin: Do not assume HS when submitting isochronous
 transfer

---
 libusb/os/darwin_usb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
index ed4a933..8575162 100644
--- a/libusb/os/darwin_usb.c
+++ b/libusb/os/darwin_usb.c
@@ -1443,7 +1443,10 @@ static int submit_iso_transfer(struct
usbi_transfer *itransfer) {

transfer->num_iso_packets, tpriv->isoc_framelist,
darwin_async_io_callback,
                                                               itransfer);

-  cInterface->frames[transfer->endpoint] = frame +
transfer->num_iso_packets / 8;
+  if (transfer->dev_handle->dev->speed == LIBUSB_SPEED_FULL)
+    cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets;
+  else
+    cInterface->frames[transfer->endpoint] = frame +
transfer->num_iso_packets / 8;

   if (kresult != kIOReturnSuccess) {
     usbi_err (TRANSFER_CTX (transfer), "isochronous transfer failed
(dir: %s): %s", IS_XFERIN(transfer) ? "In" : "Out",
-- 
1.7.12.4 (Apple Git-37)

-- 
Xiaofan

Attachment: fix_isoc_darwin.patch
Description: Binary data

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to