[Libusbx-devel] [PATCH 2/2] Add API for specifying bulk stream ids

2013-09-11 Thread Hans de Goede
Being able to allocate bulk-streams is not really useful if the user cannot specify the stream ids when submitting transfers. Note that the actual stream id gets added to our private itransfer struct, and a setter + getter is added to get to it. Unfortunately this is the only way to add support fo

[Libusbx-devel] [PATCH 1/2] Add API for allocating / freeing usb3 bulk streams + Linux implementation

2013-09-11 Thread Hans de Goede
Signed-off-by: Hans de Goede --- libusb/core.c | 62 + libusb/libusb.h | 5 libusb/libusbi.h| 8 +++ libusb/os/linux_usbfs.c | 47 + libusb/os/linux_usbfs.h | 8 +++ libus

[Libusbx-devel] [RFC 0/2] Add support for USB-3 bulk streams

2013-09-11 Thread Hans de Goede
Hi All, These 2 patches add support to the libusb API and Linux backend for USB-3 bulk streams. The Linux backend code uses a new usbfs API for this which I've proposed upstream, and which has received favorable review upstream. Like the Linux kernel patches, these patches are only RFC for now, s

Re: [Libusbx-devel] [RFC 0/2] Add support for USB-3 bulk streams

2013-09-11 Thread Nathan Hjelm
Looks good to me. I will spend some time over the next couple of days implementing stream support on Darwin. I don’t have any devices to test the code with though. -Nathan On Sep 11, 2013, at 5:53 AM, Hans de Goede wrote: > Hi All, > > These 2 patches add support to the libusb API and Linux

Re: [Libusbx-devel] [RFC 0/2] Add support for USB-3 bulk streams

2013-09-11 Thread Nathan Hjelm
One question. Would it make sense to add an additional transfer type for stream transfers? The stream_id field is not set to 0 by libusb_fill_bulk_transfer so I can not reliably tell if a transfer is a stream transfer in the backend. I need a reliable way to detect stream transfers so I can swit

Re: [Libusbx-devel] [RFC 0/2] Add support for USB-3 bulk streams

2013-09-11 Thread Hans de Goede
Hi, On 09/11/2013 02:47 PM, Nathan Hjelm wrote: > Looks good to me. I will spend some time over the next couple of days > implementing stream support on Darwin. I don’t have any devices to test the > code with though. Oh, very good, one of my main worries was how portable the API would be, so h

Re: [Libusbx-devel] [RFC 0/2] Add support for USB-3 bulk streams

2013-09-11 Thread Nathan Hjelm
One more thing. I think we should make the stream id either a uint32_t or unsigned int. It can never be negative and stream id 0 is not a valid stream. -Nathan -- How ServiceNow helps IT people transform IT departments: 1

Re: [Libusbx-devel] [RFC 0/2] Add support for USB-3 bulk streams

2013-09-11 Thread Nathan Hjelm
On Sep 11, 2013, at 7:15 AM, Nathan Hjelm wrote: > One question. Would it make sense to add an additional transfer type for > stream transfers? The stream_id field is not set to 0 by > libusb_fill_bulk_transfer so I can not reliably tell if a transfer is a > stream transfer in the backend. I

Re: [Libusbx-devel] [RFC 0/2] Add support for USB-3 bulk streams

2013-09-11 Thread Hans de Goede
Hi, On 09/11/2013 04:10 PM, Nathan Hjelm wrote: > > On Sep 11, 2013, at 7:15 AM, Nathan Hjelm wrote: > >> One question. Would it make sense to add an additional transfer type for >> stream transfers? The stream_id field is not set to 0 by >> libusb_fill_bulk_transfer so I can not reliably tell