From: Dan Williams <dcbw@redhat.com>
To: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Frank Schaefer <schaefer.frank@gmx.net>,
linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] ar9170usb: add mode-switching for AVM Fritz!WLAN USB N devices in cdrom mode
Date: Mon, 02 Nov 2009 13:42:04 -0800 [thread overview]
Message-ID: <1257198124.1027.63.camel@localhost.localdomain> (raw)
In-Reply-To: <20091102211123.GI24436@one-eyed-alien.net>
On Mon, 2009-11-02 at 13:11 -0800, Matthew Dharm wrote:
> On Mon, Nov 02, 2009 at 12:18:35PM -0800, Dan Williams wrote:
> > Devices with fake driver CDs and how they are handled currently:
> >
> > Zydas WLAN - kernel
> > Huawei 3G - kernel (unusual_devs entry)
> > Sierra 3G - kernel (drivers/usb/serial/sierra.c)
> > Option 3G - udev rules, 'rezero', or usb_modeswitch
> > ZTE 3G - udev rules, simple 'eject'
>
> It's worth noting that for some of these which are handled in-kernel, it
> had to be done that way because their storage-emulation was so poor that
> the normal 'eject' WOULD NOT work properly.
Half of them don't use eject at all, because of course on Windows the
vendor driver owns the device and can do whatever it wants. Huawei uses
a custom sequence, Option uses a custom sequence, and so does Sierra.
ZTE is the only one that I've seen that you can actually just "eject"
and make it work.
In userspace, usb_modeswitch is the place to put all this logic. Then
you tie it together with udev rules using some bubble-gum and duct-tape,
and maybe it works. Of course, there's massive duplication of data
between usb_modeswitch and the kernel drivers, because the there's
simply no communication between the two.
The kernel drivers know which devices are supported and how to drive
them. But because the eject code isn't in kernelspace, all that device
selection logic has to be duplicated in userspace with usb_modeswitch.
Pretty dumb.
Maybe we can get the kernel drivers to expose the information we need
(maybe even an 'eject' attribute in sysfs or something) and then we just
have to write udev rules instead of having a whole bunch of libusb junk
in userspace? Would that preserve the policy-always-in-userspace
requirement yet keep the code to drive the hardware in kernel space
where it really belongs?
Dan
next prev parent reply other threads:[~2009-11-02 21:42 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200910171606.02961.oliver@neukum.org>
[not found] ` <Pine.LNX.4.44L0.0910171130550.25594-100000@netrider.rowland.org>
[not found] ` <20091017220313.GH24502@one-eyed-alien.net>
[not found] ` <4ADC3657.6080906@gmx.net>
2009-11-01 18:00 ` [PATCH] ar9170usb: add mode-switching for AVM Fritz!WLAN USB N devices in cdrom mode Frank Schaefer
2009-11-01 18:27 ` Johannes Berg
2009-11-01 20:02 ` Frank Schaefer
2009-11-01 18:29 ` Josua Dietze
2009-11-01 18:35 ` Matthew Dharm
2009-11-01 20:24 ` Frank Schaefer
2009-11-01 20:49 ` Christian Lamparter
2009-11-02 20:16 ` Frank Schaefer
2009-11-02 0:47 ` Matthew Dharm
2009-11-02 20:07 ` Frank Schaefer
2009-11-02 21:10 ` Matthew Dharm
2009-11-02 21:15 ` Matthew Dharm
2009-11-03 20:33 ` Frank Schaefer
2009-11-01 20:11 ` Frank Schaefer
2009-11-02 0:51 ` Matthew Dharm
2009-11-02 20:10 ` Frank Schaefer
2009-11-02 20:18 ` Dan Williams
2009-11-02 21:05 ` Alan Cox
2009-11-02 21:37 ` Dan Williams
2009-11-02 21:45 ` Dan Williams
2009-11-02 22:23 ` Christian Lamparter
2009-11-03 20:22 ` Frank Schaefer
2009-11-02 21:11 ` Matthew Dharm
2009-11-02 21:42 ` Dan Williams [this message]
2009-11-02 22:39 ` Alan Cox
2009-11-03 0:54 ` Dan Williams
2009-11-03 10:55 ` Oliver Neukum
2009-11-03 15:16 ` Alan Stern
2009-11-03 16:29 ` Oliver Neukum
2009-11-03 22:47 ` Alan Stern
2009-11-03 23:55 ` Oliver Neukum
2009-11-04 3:57 ` Alan Stern
2009-11-04 9:11 ` Oliver Neukum
2009-11-03 20:42 ` Frank Schaefer
2009-11-04 16:16 ` Alan Stern
2009-11-04 16:25 ` Johannes Berg
2009-11-04 17:07 ` Alan Stern
2009-11-04 17:41 ` Josua Dietze
2009-11-04 16:41 ` Oliver Neukum
2009-11-04 17:41 ` Josua Dietze
2009-11-03 10:57 ` Oliver Neukum
2009-11-03 12:58 ` Christian Lamparter
2009-11-03 20:18 ` Frank Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1257198124.1027.63.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=schaefer.frank@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).