* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
@ 2003-06-11 2:04 ` Bill Nottingham
2003-06-11 6:29 ` Olaf Hering
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Bill Nottingham @ 2003-06-11 2:04 UTC (permalink / raw)
To: linux-hotplug
David Brownell (david-b@pacbell.net) said:
> Olaf Hering wrote:
> > I missed /etc/sysconfig/hotplug in usb.rc, fixed patch:
> >
> > - do not use /etc/sysconfig/usb anymore, use /etc/sysconfig/hotplug
> > instead
>
> But is anything except USB using that? This is an area it'd
> be good to see RedHat, SuSE, and others agree, but I'd take
> SuSE as a start.
We just have the stock references to /etc/sysconfig/{pci,usb};
we don't use /etc/sysconfig/hotplug.
Bill
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
2003-06-11 2:04 ` Bill Nottingham
@ 2003-06-11 6:29 ` Olaf Hering
2003-06-11 16:22 ` Bill Nottingham
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2003-06-11 6:29 UTC (permalink / raw)
To: linux-hotplug
On Tue, Jun 10, Bill Nottingham wrote:
> David Brownell (david-b@pacbell.net) said:
> > Olaf Hering wrote:
> > > I missed /etc/sysconfig/hotplug in usb.rc, fixed patch:
> > >
> > > - do not use /etc/sysconfig/usb anymore, use /etc/sysconfig/hotplug
> > > instead
> >
> > But is anything except USB using that? This is an area it'd
> > be good to see RedHat, SuSE, and others agree, but I'd take
> > SuSE as a start.
>
> We just have the stock references to /etc/sysconfig/{pci,usb};
> we don't use /etc/sysconfig/hotplug.
I see no /etc/sysconfig/{pci,usb} on a redhat system, but hotplug is
installed.
Such a sysconfig file would make sense to add static drivers that must
be loaded at hotplug start, but that may not trigger events.
The hostcontroller list is maybe not needed, pci hotplug could take care
of this. The potential problem that I see with pci hotplug is, that it
does load all drivers for a system, it loads them in a random order
(unverified), and it could load the wrong ones (uhci/usb-uhci).
Loading buggy drivers could lead to crashes, loading them in random
order could reorder your network interfaces if there are more than one
kind of network card (eth0 could become eth1), and so on.
I have an ieee1394.rc script for that reason, just to avoid pci.rc
usage.
Further, we have a patch to beep on /dev/console when a driver is
loaded. And also a patch that allows more verbose logging of hotplug
events.
So we have now 4 users of such a /etc/sysconfig/hotplug file.
Now, Debian has its stuff in /etc/default/... Too bad that the standard
leaves the sysconfig stuff undefined.
Gruss Olaf
--
USB is for mice, FireWire is for men!
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
2003-06-11 2:04 ` Bill Nottingham
2003-06-11 6:29 ` Olaf Hering
@ 2003-06-11 16:22 ` Bill Nottingham
2003-06-11 17:00 ` Olaf Hering
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Bill Nottingham @ 2003-06-11 16:22 UTC (permalink / raw)
To: linux-hotplug
Olaf Hering (olh@suse.de) said:
> > > But is anything except USB using that? This is an area it'd
> > > be good to see RedHat, SuSE, and others agree, but I'd take
> > > SuSE as a start.
> >
> > We just have the stock references to /etc/sysconfig/{pci,usb};
> > we don't use /etc/sysconfig/hotplug.
>
> I see no /etc/sysconfig/{pci,usb} on a redhat system, but hotplug is
> installed.
We don't include ones, but the hotplug scripts we ship will use
the USB one if they it's there (the pci one is commented out,
sorry.)
Bill
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
` (2 preceding siblings ...)
2003-06-11 16:22 ` Bill Nottingham
@ 2003-06-11 17:00 ` Olaf Hering
2003-06-11 18:15 ` Bill Nottingham
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2003-06-11 17:00 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jun 11, Bill Nottingham wrote:
> Olaf Hering (olh@suse.de) said:
> > > > But is anything except USB using that? This is an area it'd
> > > > be good to see RedHat, SuSE, and others agree, but I'd take
> > > > SuSE as a start.
> > >
> > > We just have the stock references to /etc/sysconfig/{pci,usb};
> > > we don't use /etc/sysconfig/hotplug.
> >
> > I see no /etc/sysconfig/{pci,usb} on a redhat system, but hotplug is
> > installed.
>
> We don't include ones, but the hotplug scripts we ship will use
> the USB one if they it's there (the pci one is commented out,
> sorry.)
what values do they contain? It seems hotplug can perfectly work without
them.
And it would make much sense to load hid.o, mousedev.o and keybdev.o per
default anyway, so this x11 hack is obsolete. Or is there a reason why
one would not load the usb hid drivers? I dont see any.
Gruss Olaf
--
USB is for mice, FireWire is for men!
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
` (3 preceding siblings ...)
2003-06-11 17:00 ` Olaf Hering
@ 2003-06-11 18:15 ` Bill Nottingham
2003-06-12 19:43 ` David Brownell
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Bill Nottingham @ 2003-06-11 18:15 UTC (permalink / raw)
To: linux-hotplug
> > We don't include ones, but the hotplug scripts we ship will use
> > the USB one if they it's there (the pci one is commented out,
> > sorry.)
>
> what values do they contain? It seems hotplug can perfectly work without
> them.
Whatever someone wants, I suppose. We just use the stock scripts that
refer to them.
> And it would make much sense to load hid.o, mousedev.o and keybdev.o per
> default anyway, so this x11 hack is obsolete. Or is there a reason why
> one would not load the usb hid drivers? I dont see any.
We actually load them outside of the usb hotplug framework.
Bill
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
` (4 preceding siblings ...)
2003-06-11 18:15 ` Bill Nottingham
@ 2003-06-12 19:43 ` David Brownell
2003-06-12 19:45 ` Bill Nottingham
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: David Brownell @ 2003-06-12 19:43 UTC (permalink / raw)
To: linux-hotplug
Bill Nottingham wrote:
>>>We don't include ones, but the hotplug scripts we ship will use
>>>the USB one if they it's there (the pci one is commented out,
>>>sorry.)
>>
>>what values do they contain? It seems hotplug can perfectly work without
>>them.
>
>
> Whatever someone wants, I suppose. We just use the stock scripts that
> refer to them.
And Olaf had the right idea to ship the /etc/sysconfig/* files that
are referenced. I'm just thinking that just a "usb" file would be
enough; nothing much is shared between the different agents, and
having a "hotplug" file with only USB-specific options seems wrong.
>>And it would make much sense to load hid.o, mousedev.o and keybdev.o per
>>default anyway, so this x11 hack is obsolete. Or is there a reason why
>>one would not load the usb hid drivers? I dont see any.
>
>
> We actually load them outside of the usb hotplug framework.
Which is a bit of a problem in terms of getting convergence. It'd
be good to have a standard way to start up USB, and that's exactly
what "/etc/hotplug/usb.rc start" was intended to do.
If I understand why RedHat's rc.sysinit does it that way, there are
a few reasons. One is (a) to use "kudzu" static config data, which
knows various USB-specific, overlapping /etc/sysconfig/usb a bit.
The better (IMO) reason is (b) to ensure that USB keyboards/mice can
be used during system bootstrap, if the kernel (or its initrd) didn't
build them in. That's early for "usb.rc start", since hotplug agents
often can't run that early (filesystems unmounted or readonly, etc).
And it also doesn't use the same conventions as "usb.rc" does.
Seems like we would win by having an "rc.usb boot" way for RC scripts
to solve that input device problem, calling it later to handle the
"coldplug" problem like "rc.usb start" does today (synthesizing the
events that couldn't be handled that early).
- Dave
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
` (5 preceding siblings ...)
2003-06-12 19:43 ` David Brownell
@ 2003-06-12 19:45 ` Bill Nottingham
2003-06-12 20:10 ` David Brownell
2003-06-12 20:19 ` Olaf Hering
8 siblings, 0 replies; 10+ messages in thread
From: Bill Nottingham @ 2003-06-12 19:45 UTC (permalink / raw)
To: linux-hotplug
David Brownell (david-b@pacbell.net) said:
> > We actually load them outside of the usb hotplug framework.
>
> Which is a bit of a problem in terms of getting convergence. It'd
> be good to have a standard way to start up USB, and that's exactly
> what "/etc/hotplug/usb.rc start" was intended to do.
>
> If I understand why RedHat's rc.sysinit does it that way, there are
> a few reasons. One is (a) to use "kudzu" static config data, which
> knows various USB-specific, overlapping /etc/sysconfig/usb a bit.
> The better (IMO) reason is (b) to ensure that USB keyboards/mice can
> be used during system bootstrap, if the kernel (or its initrd) didn't
> build them in. That's early for "usb.rc start", since hotplug agents
> often can't run that early (filesystems unmounted or readonly, etc).
> And it also doesn't use the same conventions as "usb.rc" does.
It's actually only for the second reason; so that the keyboard is
there if (for example) fsck fails.
Bill
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
` (6 preceding siblings ...)
2003-06-12 19:45 ` Bill Nottingham
@ 2003-06-12 20:10 ` David Brownell
2003-06-12 20:19 ` Olaf Hering
8 siblings, 0 replies; 10+ messages in thread
From: David Brownell @ 2003-06-12 20:10 UTC (permalink / raw)
To: linux-hotplug
Bill Nottingham wrote:
>
> It's actually only for the second reason; so that the keyboard is
> there if (for example) fsck fails.
So it looks like it'd be a win if "rc.usb boot" did that logic,
without the "coldplug" stuff to handle the system being only
partially booted. RH-specific logic won't be necessary.
Of course there's still that issue of which HCDs to load;
Olaf's patch says that's what the /etc/sysconfig file holds.
RH currently uses /etc/modules.conf for such stuff ... and
a pure hotplug model would use interact with what PCI says
is actually present.
- Dave
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes
2003-06-11 0:43 [linux-usb-devel] Re: [PATCH] hotplug usb.rc changes David Brownell
` (7 preceding siblings ...)
2003-06-12 20:10 ` David Brownell
@ 2003-06-12 20:19 ` Olaf Hering
8 siblings, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2003-06-12 20:19 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jun 12, David Brownell wrote:
> Bill Nottingham wrote:
> >
> >It's actually only for the second reason; so that the keyboard is
> >there if (for example) fsck fails.
>
> So it looks like it'd be a win if "rc.usb boot" did that logic,
> without the "coldplug" stuff to handle the system being only
> partially booted. RH-specific logic won't be necessary.
Our runlevel S loads the usb stuff unconditionally like this:
#
# load usb drivers in runlevel S
#
case "${PREVLEVEL}${RUNLEVEL}" in
N1|NS)
test -f /etc/sysconfig/hotplug && . /etc/sysconfig/hotplug && test "$HOTPLUG_START_USB" = "yes" && {
test -f /proc/cpuinfo || mount -n -t proc proc /proc 2>/dev/null
test -d /proc/bus/usb || modprobe usbcore >/dev/null 2>&1
mount usbdevfs >/dev/null 2>&1
for i in $HOTPLUG_USB_HOSTCONTROLLER_LIST ;do echo -n $i" " ;modprobe $i >/dev/null 2>&1 ;done;echo
sleep 3
grep ^I: /proc/bus/usb/devices | grep HID && for i in input hid keybdev;do modprobe $i >/dev/null 2>&1 ;done
}
;;
esac
This HOTPLUG_START_USB used to exist, but I'm not sure if we will leave
these HOTPLUG_START_{USB,IEEE1394,...} stuff for the next release. I
will probably remove it, have to think about it in the next days.
Well, maybe something like this could become part of a 'usb.rc boot' or
'usb.rc single' or something.
The only real issue is the /etc/sysconfig/ vs. /etc/default/
We should source both if they exist, it causes only one additional
stat() call.
The goal should be that the configuration is unified somehow, and not
spread all over /etc for the various distros.
Gruss Olaf
--
USB is for mice, FireWire is for men!
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread