lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090526004146.GD4300@spacedout.fries.net>
Date:	Mon, 25 May 2009 19:41:46 -0500
From:	David Fries <david@...es.net>
To:	Clemens Ladisch <clemens@...isch.de>
Cc:	David Griffith <dgriffi@...csubak.edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alan Stern <stern@...land.harvard.edu>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: bad endpoint address, MOTU FastLane

On Mon, May 25, 2009 at 10:20:43AM +0200, Clemens Ladisch wrote:
> David Fries wrote:
> > On Tue, May 12, 2009 at 09:55:08AM +0200, Clemens Ladisch wrote:
> > > The driver could call usb_set_interface() again for the first interface
> > > so that the USB core takes notice of the first set of endpoints again.
> > > Please try the patch below.
> > > 
> > > I guess I'll have to write another quirk for this.
> > 
> > Adding usb_set_interface lets the device work again, ...
> > 
> > The MOTU Fastlane device is the only one using QUIRK_MIDI_RAW.  How about
> > changing the name to QUIRK_MIDI_FASTLANE to imply it isn't completely
> > generic anymore and adding a comment?
> 
> And while we're at it, the driver should claim interface 1 to prevent
> anyone else from using it.

Before and after the latest patch snd-usb-audio claims interface 1.
I:* If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=04 Prot=ff Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=03 Prot=ff Driver=snd-usb-audio

The new snd_usbmidi_detect_fastlane in case 1 returns 1, which then
will return 0 from snd_usb_create_midi_interface, but
ignore_interface_quirk already returns 0 if it was left with the
ignore interface quirk, so I don't see a need for that part of the
patch.

> New patch below.
> 
> Are you okay with the tested-by tag?

Yes, it works.  I'm watching the LEDs blink on the device and data
come across.

> +static int snd_usbmidi_detect_fastlane(struct snd_usb_midi *umidi,
> +				       struct snd_usb_midi_endpoint_info *eps)
> +{
> +	switch (get_iface_desc(umidi->iface->altsetting)->bInterfaceNumber) {
...
> +	case 1:
> +		return 1; /* no MIDI device for this interface, just claim it */

> @@ -1778,9 +1805,13 @@ int snd_usb_create_midi_interface(struct
> +		err = snd_usbmidi_detect_fastlane(umidi, endpoints);
> +		if (err == 1) {
> +			kfree(umidi);
> +			return 0;
> +		}

-- 
David Fries <david@...es.net>
http://fries.net/~david/ (PGP encryption key available)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ