Skip to contentSkip to conversation

rawhide hotplug broken

DISCUSSION Jack Howarth 4 participants 7 messages Apr 10, 2001 – Apr 11, 2001

lore
Share & tools
lore
#0 lore raw

In case folks here are unaware, RedHat has been hacking
the hotplug srpm releases here for their rawhide releases (and I assume their upcoming RH 7.1 release) doing such things as removing the rc scripts from hotplug. On my linuxppc (running Linux 2.4.4pre1, glibc 2.2.3 and the rawhide srpms), I find that RedHat's modified hotplug doesn't work for loading the usb print module when it sees my Epson 740i printer. Their previous hotplug-1.9 release did work but RedHat claims this was broken and loaded all modules blindly.
I discovered last night that if I installed the latest
hotplug-2001_02_28 and usbutils-0.7-101 rpms on my machine that the usb print module was loaded on boot or hotplugging the Epson 740i printer. I also discovered that I had to have usbutils installed for the hotplugging to work. Also if I substituted RedHat's rawhide hotplug-2001_02_14-15 rpm, the hotplugging no longer worked with or without usbutils. Perhaps some of the experts here should help out RedHat since they seem to be a tad confused on how the hotplug stuff should be set up. Oh, the bugzilla report for this problem is...

http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id5091

Thanks in advance for helping them out with this.
Jack

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 4 lines · Jack Howarth

In case folks here are unaware, RedHat has been hacking
the hotplug srpm releases here for their rawhide releases (and I assume their upcoming RH 7.1 release) doing such things as removing the rc scripts from hotplug.

That script only initializes modules - we do this in rc.sysinit, so USB keyboards can be used for interactive startup and if you have to manually run things like fsck.

Quoted 4 lines

I discovered last night that if I installed the latest
hotplug-2001_02_28 and usbutils-0.7-101 rpms on my machine that the usb print module was loaded on boot or hotplugging the Epson 740i printer.

It does work with most other devices, I don't know why your printer is an exception. You've tried an identical kernel with both versions of hotplug?

Signature · 7 lines
Trond Eivind Glomsrød
Red Hat, Inc.

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#2 lore raw
In reply to Jack Howarth

Trond,
I am using Linux 2.2.4pre1 (from the linuxppc bitkeeper tree)
and find that the hotplugging works with the stock hotplug-2001_02_28-1.src.rpm rpm from sourceforge. However it requires usbutils to be installed. I find that your srpm in rawhide for hotplug doesn't work with or without usbutils. I'll look at the differences between your srpm and the stock srpm to see if anything jumps out at me. I am a tad puzzled why (if usbutils is essential for hotplugging to work in the sourceforge release of hotplug) that you don't include usbutils as part of rawhide.
Jack

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Jack Howarth
Quoted 9 lines · Jack Howarth

hotplug-2001_02_28 and usbutils-0.7-101 rpms on my machine that the usb print module was loaded on boot or hotplugging the Epson 740i printer. I also discovered that I had to have usbutils installed for the hotplugging to work. Also if I substituted RedHat's rawhide hotplug-2001_02_14-15 rpm, the hotplugging no longer worked with or without usbutils. Perhaps some of the experts here should help out RedHat since they seem to be a tad confused on how the hotplug stuff should be set up.

Actually, from looking at this, it just appears to require newer hotplug scripts than we ship. Or am I missing something?

Bill

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to Jack Howarth
Quoted 4 lines

In case folks here are unaware, RedHat has been hacking
the hotplug srpm releases here for their rawhide releases (and I assume their upcoming RH 7.1 release) doing such things as removing the rc scripts from hotplug.

It'd be interesting to know why that isn't being included.

Despite what Trond said (in a separate email on this thread), it does more than just load modules; it also mounts "usbdevfs" at the _right_ time (before USB host controller modules load) to deal with some boot-time hotplugging ("cold-plugging") issues that come up in some configurations ... like the way RedHat 7.0 initialized USB, or the last 7.1 init scripts I saw did.

Also, perhaps of more relevance to USB developers, "rc.usb" provides some simple USB diagnostics ("rc.usb status") and makes it easy to start, stop, and restart the USB subsystem.

Quoted 4 lines

On my linuxppc (running
Linux 2.4.4pre1, glibc 2.2.3 and the rawhide srpms), I find that RedHat's modified hotplug doesn't work for loading the usb print module when it sees my Epson 740i printer. ...

Well, I did notice RedHat wasn't using current RPMs, but I don't think that'd be the whole problem.

Quoted 5 lines

I discovered last night that if I installed the latest
hotplug-2001_02_28 and usbutils-0.7-101 rpms on my machine that the usb print module was loaded on boot or hotplugging the Epson 740i printer. I also discovered that I had to have usbutils installed for the hotplugging to work.

Curious. Can you try debugging the script invocation to see why? I usually: (a) modify /sbin/hotplug to "env >/tmp/debug";
(b) insert the device, (c) modify a copy of that /tmp/debug file and turn it into a script that exports all variables (or at least the six used by USB hotplug :) and then does something like

cd /etc/hotplug
sh -x usb.agent

Then there's copious debug output (save it to a log file) which can be examined ... in this case, to see why the "printer" driver listing in /lib/modules/.../modules.usbmap doesn't match.

- Dave

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#5 lore raw
In reply to Jack Howarth
Quoted 6 lines · David Brownell
Quoted 4 lines

In case folks here are unaware, RedHat has been hacking
the hotplug srpm releases here for their rawhide releases (and I assume their upcoming RH 7.1 release) doing such things as removing the rc scripts from hotplug.

It'd be interesting to know why that isn't being included.

Since we initialize usb in rc.sysinit, it wouldn't do anything.

Quoted 3 lines

Despite what Trond said (in a separate email on this thread), it does more than just load modules; it also mounts "usbdevfs" at the _right_ time (before USB host controller modules load)

We do that. The reason cold-plugging doesn't work with this because the fs isn't read-write at the time. So in our current package, hotplug actually waits around for a while for the root fs to become read-write. It's not the most elegant solution, but it was the quickest to code at the time.

Bill

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#6 lore raw
In reply to Jack Howarth
Quoted 5 lines
Quoted 3 lines

Despite what Trond said (in a separate email on this thread), it does more than just load modules; it also mounts "usbdevfs" at the _right_ time (before USB host controller modules load)

We do that.

Good to know -- the last version I looked at didn't work that way.

Quoted 5 lines

The reason cold-plugging doesn't work with this because
the fs isn't read-write at the time. So in our current package, hotplug actually waits around for a while for the root fs to become read-write. It's not the most elegant solution, but it was the quickest to code at the time.

Hmm, that'd explain the original problem:

- Using hotplug scripts old enough that they demand that /tmp be writable ... so the pure bash version of hotplugging won't work;

- Not having "usbmodules", so the bash code is the only option.

Yes, that was an old bug in the hotplug scripts, now fixed.

- Dave

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel