Bug 80622 - usb hotplug is broken in phoebe kernel
Summary: usb hotplug is broken in phoebe kernel
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: kernel
Version: phoebe
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 79578
TreeView+ depends on / blocked
 
Reported: 2002-12-28 22:05 UTC by Leonid Kanter
Modified: 2007-04-18 16:49 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-02-16 09:22:19 UTC
Embargoed:


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

Description Leonid Kanter 2002-12-28 22:05:30 UTC
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-30 01:28:13 UTC
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-30 02:58:55 UTC
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 11:57:21 UTC
I reproduced situation with usb keyboard exactly as described by  Warren Togami . 

Comment 4 Leonid Kanter 2003-01-03 10:28:02 UTC
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 20:43:01 UTC
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 17:13:39 UTC
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 11:19:34 UTC
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 11:22:46 UTC
*** Bug 80840 has been marked as a duplicate of this bug. ***

Comment 9 Aleksey Nogin 2003-01-06 11:34:52 UTC
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 17:31:01 UTC
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 07:31:45 UTC
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 16:50:20 UTC
I can confirm this with my USB camera 

Comment 13 Pete Zaitcev 2003-01-09 05:23:06 UTC
Leonid, what does "ps aux| grep khubd" produce on your box?


Comment 14 Leonid Kanter 2003-01-09 10:19:11 UTC
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 10:37:53 UTC
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 12:33:24 UTC
- 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 12:55:58 UTC
Looks like 80622 and 80840 are duplicated bugs

Comment 18 Pete Zaitcev 2003-01-09 17:41:05 UTC
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 17:43:53 UTC
Created attachment 89246 [details]
Protect khubd (daemonize() fix)

Comment 20 Pete Zaitcev 2003-01-09 18:59:32 UTC
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 21:08:24 UTC
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 22:34:47 UTC
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-16 03:36:49 UTC
This was working fine for a while now (using Rawhide kernels)... Time to close
this bug?

Comment 24 Leonid Kanter 2003-02-16 09:22:19 UTC
Yes, everything works. closing.


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