Re: search usbd_interfaces in case of non-compliant device

2021-01-28 Thread Mark Kettenis
> Date: Thu, 28 Jan 2021 16:45:12 +0100 > From: Marcus Glocker > Cc: Alexandre Ratchov , tech@openbsd.org, ratc...@openbsd.org, > st...@openbsd.org, kette...@openbsd.org, m...@openbsd.org > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > On Thu, Jan 28, 2021 a

Re: search usbd_interfaces in case of non-compliant device

2021-01-28 Thread Marcus Glocker
On Thu, Jan 28, 2021 at 02:38:04PM +, Edd Barrett wrote: > On Thu, Jan 28, 2021 at 09:56:14AM +, Edd Barrett wrote: > > > > Here's a revised diff that always searches the array, instead of first > trying the expected index. Everyone agreed that this makes for simpler > code, and that sinc

Re: search usbd_interfaces in case of non-compliant device

2021-01-28 Thread Edd Barrett
On Thu, Jan 28, 2021 at 09:56:14AM +, Edd Barrett wrote: > Here's a revised diff that always searches the array, instead of first trying the expected index. Everyone agreed that this makes for simpler code, and that since this function isn't called much, there's no real performance concern. C

Re: search usbd_interfaces in case of non-compliant device

2021-01-28 Thread Edd Barrett
Hi, On Wed, Jan 27, 2021 at 08:58:21AM +0100, Alexandre Ratchov wrote: > ok ratchov Thanks everyone for your OKs. Here's an updated diff that caters for Marcus' recent attribute renaming and which also has the long comment wrapped. I'll commit it shortly if nothing else comes up. Index: usbdi

Re: search usbd_interfaces in case of non-compliant device

2021-01-26 Thread Alexandre Ratchov
On Tue, Jan 26, 2021 at 08:56:29PM +, Edd Barrett wrote: > Hi, > > I've recently come across a uaudio device which doesn't work in OpenBSD: > > uaudio2 at uhub0 port 1 configuration 1 interface 3 "E+ Corp. DAC Audio" rev > 1.10/0.01 addr 2 > uaudio2: class v1, full-speed, async, channels: 2

Re: search usbd_interfaces in case of non-compliant device

2021-01-26 Thread Marcus Glocker
On Tue, Jan 26, 2021 at 08:56:29PM +, Edd Barrett wrote: > Hi, > > I've recently come across a uaudio device which doesn't work in OpenBSD: > > uaudio2 at uhub0 port 1 configuration 1 interface 3 "E+ Corp. DAC Audio" rev > 1.10/0.01 addr 2 > uaudio2: class v1, full-speed, async, channels: 2

search usbd_interfaces in case of non-compliant device

2021-01-26 Thread Edd Barrett
Hi, I've recently come across a uaudio device which doesn't work in OpenBSD: uaudio2 at uhub0 port 1 configuration 1 interface 3 "E+ Corp. DAC Audio" rev 1.10/0.01 addr 2 uaudio2: class v1, full-speed, async, channels: 2 play, 0 rec, 3 ctls audio3 at uaudio2 When opening the audio device, the k