This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 80622 - usb hotplug is broken in phoebe kernel
usb hotplug is broken in phoebe kernel
Status: CLOSED WORKSFORME
Product: Red Hat Public Beta
Classification: Retired
Component: kernel (Show other bugs)
phoebe
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
:
Depends On:
Blocks: 79578
  Show dependency treegraph
 
Reported: 2002-12-28 17:05 EST by Leonid Kanter
Modified: 2007-04-18 12:49 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-16 04:22:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A "rc.usb" script (from some old hotplug, I believe) (5.87 KB, text/plain)
2003-01-07 02:31 EST, Aleksey Nogin
no flags Details
Protect khubd (daemonize() fix) (3.46 KB, patch)
2003-01-09 12:43 EST, Pete Zaitcev
no flags Details | Diff

  None (edit)
Description Leonid Kanter 2002-12-28 17:05:30 EST
Description of problem:

phoebe kernel is unable to recognize usb devices which are connected after
system boot

Version-Release number of selected component (if applicable):

2.4.20-2.2

How reproducible:

always

Steps to Reproduce:
1.boot phoebe with no usb devices attached
2.physically connect usb mouse, storage or other device
    
Actual results:

device isn'n in /proc/bus/usb/devices, no driver is loaded, device isn't
initialised properly (optical mouse LED doesn't light)

Expected results:

device info must appear in /proc/bus/usb/devices when device is connected,
driver must be loaded and device must be initialised

Additional info:

If device is connected before system boot, it will be present in 
/proc/bus/usb/devices.
Comment 1 Warren Togami 2002-12-29 20:28:13 EST
I tried to plugin a USB keyboard into my laptop and these messages began
appearing in my dmesg.  Even after I unplugged the keyboard they continue, one
message per ~5 seconds.  They continued constantly for days until I rebooted.

usb-uhci.c: interrupt, status 3, frame# 540
usb-uhci.c: interrupt, status 3, frame# 1456
usb-uhci.c: interrupt, status 3, frame# 332
usb-uhci.c: interrupt, status 3, frame# 1252

When booting with USB keyboard already plugged in, the keyboard works and these
interrupt errors don't occur.  Definitely a hotplug problem.
Comment 2 Eugene Kanter 2002-12-29 21:58:55 EST
I have seem similar messages when I connected my USB device and manually loaded
acm driver (loads automatically in 7.3 and if rebooted). However the device
newer worked at all. Works in 7.3.
Comment 3 Leonid Kanter 2002-12-30 06:57:21 EST
I reproduced situation with usb keyboard exactly as described by  Warren Togami . 
Comment 4 Leonid Kanter 2003-01-03 05:28:02 EST
Looks like this problem is not redhat-cpecific, it can be a result of acpi patch. See 
following message: 
http://sourceforge.net/mailarchive/forum.php?thread_id=1476886&forum_id=5395 
 
Comment 5 Leonid Kanter 2003-01-03 15:43:01 EST
I tried to rebuild kernel 2.4.20-2.2 with acpi support turned off - the prolem
is still present.
Comment 6 Jef Spaleta 2003-01-04 12:13:39 EST
I'm not sure my usb problmes are related...but maybe they are
I have a compact flash card reader (Sandisk model SDDR-31) which has worked
pretty much flawlessly under redhat 8, and 7.3.  Now under the beta it seems to work
intermittantly...I'm having trouble narrowing down the problem.  Sometimes when
I reboot with the reader installed without a card....I can load a card and get
it to mount.  Sometimes I can't.  If the reader is not installed on boot, and i
plug it in, its not detected and the mountpoint isnt created like it should be
for a hotplug device.  
Comment 7 Aleksey Nogin 2003-01-06 06:19:34 EST
I am seing the exact same thing (tried it with a mouse, usb-storage camera and
printer) - if device is plugged in at boot time, everything works. After that -
if I unplug an existing device or plug in a new USB device, the kernel does not
seem to notice it - no messages in dmesg, no reaction whatsoever. I tried going
single user, rmmoding all the USB-related modules and modprobing them back and
still it does not recognize that it has something polugged in - nothing short of
a complete reboot helps.
Comment 8 Aleksey Nogin 2003-01-06 06:22:46 EST
*** Bug 80840 has been marked as a duplicate of this bug. ***
Comment 9 Aleksey Nogin 2003-01-06 06:34:52 EST
It seems that if the uhci driver is used instead of usb-uhci, then everything
works normally! At the point where usb-uhci would stop responding to any
stimilus, the uhci driver says

uhci.c: bf80: host controller halted. very bad

and keeps working.

P.S. See also bug 80805 for another example of things working with uhci and not
working with usb-uhci...
Comment 10 Leonid Kanter 2003-01-06 12:31:01 EST
I tried uhci.o, it works but hotplug is still broken. USB mouse works only if it
was inserted before system boot. If mouse is inserted after system boot, there
is no way to get it working, even if I reload all usb-related modules.
Comment 11 Aleksey Nogin 2003-01-07 02:31:45 EST
Created attachment 89184 [details]
A "rc.usb" script (from some old hotplug, I believe)

Yes, you are right - simply using uhci does not help. But if you run "rc.usb
restart" (script attached - essentially it just unloads all the USB modules and
then loads them back), then things start working again. Not only that - after
such  restart, hotplug starts working normally!

P.S. To be honest, didn't have time to test it carefully and figure out what
exactly works and when, so I may be mistaken again...
Comment 12 Sammy 2003-01-07 11:50:20 EST
I can confirm this with my USB camera 
Comment 13 Pete Zaitcev 2003-01-09 00:23:06 EST
Leonid, what does "ps aux| grep khubd" produce on your box?
Comment 14 Leonid Kanter 2003-01-09 05:19:11 EST
Output of "ps aux| grep khubd" is empty on 2.4.20-2.2. On older kernels this
process is running.
Comment 15 Leonid Kanter 2003-01-09 05:37:53 EST
Additional information:
<boot system>
[root@leon root]# ps aux | grep khubd
[root@leon root]#
<run script provided by Aleksey Nogin, see his attachment>
[root@leon root]# service rc.usb restart 
Warning: USBD not started.
[root@leon root]# ps aux | grep khubd
root      5852  0.0  0.0     0    0 ?        SW   12:29   0:00 [khubd]

and everything work as expected, even with usb-uhci driver
Comment 16 Inger Karin Haarbye 2003-01-09 07:33:24 EST
- and if the usb-stuff from rc.sysinit is moved to ex. rc.local, hotplug will work as well, 
indicating that something is happening to usb after it is loaded in rc.sysinit (before rc.local)? 
(Se bug 80840)  
Comment 17 Leonid Kanter 2003-01-09 07:55:58 EST
Looks like 80622 and 80840 are duplicated bugs
Comment 18 Pete Zaitcev 2003-01-09 12:41:05 EST
Leonid, thanks. I think I have a fix then. Alexey will be in the same
boat (bug) with you f.t.m.

About 80840 - I divorced it because Alexey implied it was usb-uhci
problem and I'm very sensitive to that. Please let Inger track it
as he/she wishes after the next beta, even though it's most likely a dup.
Comment 19 Pete Zaitcev 2003-01-09 12:43:53 EST
Created attachment 89246 [details]
Protect khubd (daemonize() fix)
Comment 20 Pete Zaitcev 2003-01-09 13:59:32 EST
CVS: playpen, 2.4.20-2.10
(Ingo did it, witness advantages of having developers in all time zones :)
Comment 21 Inger Karin Haarbye 2003-01-09 16:08:24 EST
I tried to build a new kernel after applying the patch. I removed the ACPI because I got an error 
(compilation), but else I used the config from redhat (kernel-2.4.20-i386.config). USB hotplug 
seems to work with my new kernel - at least so far.  
Inger (she) thinks 80840 must be a duplicate of this bug... 
(I have tried with the kernel from RH 8.0 as well, it worked too - 2.4.18-19.8.0 ) 
Comment 22 Pete Zaitcev 2003-01-09 17:34:47 EST
Oh yuk, Ingo found an SMP bug in my patch: tasklist_lock must be taken
when coming from daemonize. His commit has correct version.
Comment 23 Aleksey Nogin 2003-02-15 22:36:49 EST
This was working fine for a while now (using Rawhide kernels)... Time to close
this bug?
Comment 24 Leonid Kanter 2003-02-16 04:22:19 EST
Yes, everything works. closing.

Note You need to log in before you can comment on or make changes to this bug.