[Libusbx-devel] asynchronous code in mufti-threading app

2012-09-11 Thread John Chen
Hi, My app needs be able to read & write (to different enpoint) at same time, and my code is not working. but if I change the call to Synchronous , everything works fine, could any one tell me what I did wrong here? thx CallBackData* userdata=new CallBackData(); userdata->ExitTransfer=false; int

Re: [Libusbx-devel] [PATCH 0/2 for v1.0.13]: Add libusb_detach_kernel_driver_and_claim()

2012-09-11 Thread Xiaofan Chen
On Wed, Sep 12, 2012 at 8:37 AM, Pete Batard wrote: > On 2012.09.11 09:25, Hans de Goede wrote: >>> Do we expect any other platforms, besides Linux to ever need >>> libusb_detach_kernel_driver_and_claim()? >> >> Yes actually, I do :) others platforms already have a claim implementation, >> and I w

Re: [Libusbx-devel] OSR discussion about DevicePath from USB hub and port

2012-09-11 Thread Pete Batard
On 2012.09.11 08:38, Xiaofan Chen wrote: > This thread in OSR may be of some interests to the list member here. > http://www.osronline.com/showthread.cfm?link=231745 > > From Microsoft's Doron Holan ++ > You can use the config manager (CM_Xxxx) APIs to walk the tree and find child > device

Re: [Libusbx-devel] libusb_error_name() and transfer status codes

2012-09-11 Thread Pete Batard
On 2012.09.11 12:49, Hans de Goede wrote: > I accidentally called libusb_error_name() on a transfer status code > in a piece of code of mine. Which of course did not work, but maybe > we should make this work? We can either add a: > libusb_transfer_status_name(), or simply make libusb_error_name()

Re: [Libusbx-devel] [PATCH] Don't log an error message when cancel fails due to -ENODEV

2012-09-11 Thread Pete Batard
On 2012.09.11 13:04, Hans de Goede wrote: This patch therefor makes libusb_cancel_transfer not log an error when the cancel fails with LIBUSB_ERROR_NO_DEVICE, so that apps can properly clean things up on device disconnect without flooding the console with these errors. Actually, I'm going to ad

Re: [Libusbx-devel] [PATCH 0/2 for v1.0.13]: Add libusb_detach_kernel_driver_and_claim()

2012-09-11 Thread Pete Batard
On 2012.09.11 09:25, Hans de Goede wrote: >> Do we expect any other platforms, besides Linux to ever need >> libusb_detach_kernel_driver_and_claim()? > > Yes actually, I do :) others platforms already have a claim implementation, > and I would hope / expect that one day we'll support detaching on m

Re: [Libusbx-devel] Mac USB 3.0

2012-09-11 Thread Xiaofan Chen
On Fri, Jul 13, 2012 at 7:08 AM, Dave Camarillo wrote: > Hello, I was wondering what kinds testing has been done on Mac's with USB 3.0? > > I happened to get a hold of a new mac with USB 3.0 and tried out our > software on it, which has been working well on many other machines of > a few years, an

[Libusbx-devel] [PATCH] Don't log an error message when cancel fails due to -ENODEV

2012-09-11 Thread Hans de Goede
A properly written app will cancel any outstanding transfers, before calling libusb_close(), and when an app does not, we complain loudly about it. But currently if a device gets unplugged while transfers are outstanding, and the app detects this disconnect by getting a LIBUSB_ERROR_NO_DEVICE, the

[Libusbx-devel] libusb_error_name() and transfer status codes

2012-09-11 Thread Hans de Goede
Hi, I accidentally called libusb_error_name() on a transfer status code in a piece of code of mine. Which of course did not work, but maybe we should make this work? We can either add a: libusb_transfer_status_name(), or simply make libusb_error_name() work with transfer codes too, since they don'

Re: [Libusbx-devel] [PATCH 0/2 for v1.0.13]: Add libusb_detach_kernel_driver_and_claim()

2012-09-11 Thread Hans de Goede
Hi, On 09/11/2012 12:51 AM, Pete Batard wrote: > On 2012.09.10 08:56, Hans de Goede wrote: >> Note this set does not yet hook up the new kernel ioctl, I would like to >> wait with that until it hits Linus' tree > > and > >> I know it is a bit late, but if possible I would like to get this in for >

[Libusbx-devel] OSR discussion about DevicePath from USB hub and port

2012-09-11 Thread Xiaofan Chen
This thread in OSR may be of some interests to the list member here. http://www.osronline.com/showthread.cfm?link=231745 From Microsoft's Doron Holan ++ You can use the config manager (CM_Xxxx) APIs to walk the tree and find child devices. You can get the device instances from those chil