Date: Thu, 14 Mar 2019 23:32:56 +1030 From: "O'Connor, Daniel" <darius@dons.net.au> To: Hans Petter Selasky <hps@selasky.org> Cc: Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: USB stack getting confused Message-ID: <01E69132-6EB6-4688-ADA2-FF62393F8DFA@dons.net.au> In-Reply-To: <d293e973-cf48-dff2-b8bc-a297222b5cd3@selasky.org> References: <f3e6e30b-8b62-546b-2b51-e841f2e645bd@selasky.org> <3B29D870-41F9-46AF-B9F3-03106DEC417D@dons.net.au> <20190309152613.GM2492@kib.kiev.ua> <ea6e2690-1ad7-6c06-49e5-c528013f26c0@selasky.org> <20190309162640.GN2492@kib.kiev.ua> <CANCZdfr9jRcXQeZWMPKSMvUB5u7kE0eDvbuKrtGvuUDYOr=n4A@mail.gmail.com> <20190309192330.GO2492@kib.kiev.ua> <fd5038a4-406b-6e4b-bb52-b567b1954ad1@selasky.org> <20190310094758.GP2492@kib.kiev.ua> <35f69493-4bbb-4142-b61a-3e90adc8777b@selasky.org> <20190310102629.GQ2492@kib.kiev.ua> <40bf77e0-47a5-6edc-b5d0-58e3c44988ac@selasky.org> <030A0C16-4508-4C7C-A87C-72B69B15EDF5@dons.net.au> <1BBD445B-9A27-4BE7-9B60-04BE0814D7CA@dons.net.au> <CDE6EC29-BCEE-46FD-A2A2-82772304BE46@dons.net.au> <1692bbc5-02f4-d0e9-a290-219f045ff55b@selasky.org> <205EC4C0-810B-47C3-A21E-A1EE0A6E3824@dons.net.au> <991d10df-b42d-b557-1b47-37db5bfb4d42@selasky.org> <d293e973-cf48-dff2-b8bc-a297222b5cd3@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 14 Mar 2019, at 23:30, Hans Petter Selasky <hps@selasky.org> wrote: > On 3/11/19 2:41 PM, Hans Petter Selasky wrote: >>>=20 >>> 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. >>>=20 >> Hi, >> USB has a limit on open FD's per USB device, (USB_FIFO_MAX =3D 128) / = 2 =3D 64. >> --HPS >=20 > There can be up to 127 devices per USB controller, so 127 * 64 FDs is = the maximum allowed. I think the limit is reasonable, given that = non-admin users can have access to such devices. I suppose that makes sense, but the failure mode was pretty surprising = to me. I didn't realise that usbconfig has to open each device to get = information on it - I had assumed that it got it via /dev/usbctl or = similar. > Did you get any further on this issue? Sorry - yes I found the leak in my code. I thought I already said so but = obviously not. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01E69132-6EB6-4688-ADA2-FF62393F8DFA>