From: Greg KH <greg@kroah.com>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: linux-kernel@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net,
linux-usb-storage@lists.one-eyed-alien.net
Subject: Re: [linux-usb-devel] RFC drivers/usb/storage/libusual
Date: Wed, 28 Sep 2005 01:52:00 -0700 [thread overview]
Message-ID: <20050928085159.GA11862@kroah.com> (raw)
In-Reply-To: <20050927205559.078ba9ed.zaitcev@redhat.com>
On Tue, Sep 27, 2005 at 08:55:59PM -0700, Pete Zaitcev wrote:
> This makes hotplug to function in a deterministic way, which is a good
> thing. The patch is not in Linus' tree. It was there at one point,
> but Adrian Bunk removed it.
I also did not like that patch.
> Why? Because he could not be bothered to understand how the hotplug
> works. Before we say "how stupid", observe that he was very far from
> being alone. A few other users also enabled UB (despite all the
> warnings in Kconfig) and then did not know what to do when something
> did not work for them. And people involved were not morons at all.
> I had to explain how this was supposed to work to Doug Gilbert
> and Randy Dunlap, who had considerable experience. This tells me that
> the mechanisms I used here were unreasonably intricate (to put it
> mildly).
>
> Simply put, if it's not obvious, it's wrong.
Ok, fair enough, but it is nice at times to mix ub and usb-storage
device controlled devices.
> So, I came up with a solution to the problem, which, I hope, is better.
> It has the following features:
> - The usb_device_id table is now shared between ub and usb-storage.
Nice.
> - The table is located physically in a neutral driver, libusual.
Also nice. But you might want to rename it to show that this is only
for usb storage type devices. And no, I can't think of a better name
right now :)
> - There is only one table. It is not split in any way.
Nice.
> - Userland tricks are not used (not necesserily a good thing).
Hm... more on this below...
> - Devices can be marked for use by ub or usb-storage without rebuilding
> or rebooting.
How? I missed this in the patch somewhere.
> - The scheme can be useful for sharing of devices between
> HID, Wacom, and Apitek, if we like how it works for the storage.
Fair enough, so we should rename it :)
> - Even with every kernel option enabled, the assignment defaults to
> usb-storage. Users have to add an explicit option to /etc/modprobe.conf
> before the ub gets hotplugged. Thus, the system addresses the Adrian's
> original problem.
Yes, that works better. Kind of. But this seems like a lot of work
just to get a "preference". Although the kernel thread hack is fun.
Your patch mixes a few things in that you probably don't need to show
how libusual works which bloat the patch. The unusual_devs.h rework
comes to mind.
Just to verify that I read this code correct, is this how it all works?
- kernel finds usb device and calls out to hotplug with the
device id stuff.
- hotplug scripts load libusual as that is where the mod info is
pointing to.
- libusual's probe function gets called.
- kernel thread is spawned and probe fails
- module for "preferred" driver is loaded with a call to
request_module
- requested module is loaded.
- requested module's probe is called by core and device is bound
to it.
Did I get that correct?
If so, a few comments.
- This only covers the "which module to load" question. Once the
module is loaded, it still always grabs the storage devices, even if
another module is loaded later on. Isn't that still the same issue
we have today? Can't we fix this too?
- request_module() is icky. I keep wanting to get rid of that
function, and really don't want to see any further users get added.
But that's just my feeling, if there's no other way to do this, I
don't mind.
thanks,
greg k-h
next prev parent reply other threads:[~2005-09-28 8:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-28 3:55 RFC drivers/usb/storage/libusual Pete Zaitcev
2005-09-28 8:52 ` Greg KH [this message]
2005-09-28 19:40 ` [linux-usb-devel] " Alan Stern
2005-09-29 0:01 ` Pete Zaitcev
2005-10-10 21:15 ` Rusty Russell
2005-10-07 7:24 ` Pete Zaitcev
2005-10-07 14:41 ` [usb-storage] " Alan Stern
2005-10-08 7:35 ` Pete Zaitcev
2005-10-08 15:17 ` Alan Stern
2005-10-08 21:01 ` usb: drivers/usb/storage/libusual Pete Zaitcev
2005-10-09 2:14 ` [usb-storage] " Matthew Dharm
2005-10-09 8:09 ` Pete Zaitcev
2005-09-28 16:56 ` [linux-usb-devel] RFC drivers/usb/storage/libusual Alan Stern
2005-09-29 2:21 ` Pete Zaitcev
2005-09-30 7:09 ` [linux-usb-devel] " Phil Dibowitz
2005-10-01 0:26 ` Pete Zaitcev
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=20050928085159.GA11862@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=linux-usb-storage@lists.one-eyed-alien.net \
--cc=zaitcev@redhat.com \
/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