USB stack getting confused
Hans Petter Selasky
hps at selasky.org
Mon Mar 11 13:42:11 UTC 2019
On 3/11/19 1:36 PM, O'Connor, Daniel wrote:
>
>
>> On 11 Mar 2019, at 18:57, Hans Petter Selasky <hps at selasky.org> wrote:
>>
>> On 3/11/19 7:27 AM, O'Connor, Daniel wrote:
>>> I just realised I can check procstat for open file, derp.
>>> [maarsytest 6:26] ~> procstat -f 2324|grep 0.5.0| wc
>>> 64 640 4928
>>> So I guess that is why it is giving ENOMEM, I'm leaking FDs!
>>
>> That looks like a bug in your application??
>
> Yes, I think it is.
> I thought it was something else because usbconfig didn't see the device.
>
>> Which USB API are you using?
>
> The libusb10 interface - I didn't write the code (the vendor supplied a Linux version that was trivially compilable on FreeBSD).
>
> I have the source code and I can see what the issue is so I'll fix that, although I am surprised the limit for USB devices is so much lower than the system limit for file descriptors generally.
>
Hi,
USB has a limit on open FD's per USB device, (USB_FIFO_MAX = 128) / 2 = 64.
--HPS
More information about the freebsd-hackers
mailing list