Bug 5640

Summary: System doesn' shutdown when a device is connected to USB 1.1 root hub
Product: Drivers Reporter: RaffigeRaffe (RG.Schneider)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Severity: low CC: bunk, greg, protasnb
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6 ( all ) Tree: Mainline
Regression: ---
Bug Depends on:    
Bug Blocks: 5089    

Description RaffigeRaffe 2005-11-23 04:50:23 UTC
Most recent kernel where this bug did not occur:None
Distribution: Debian Sarge 3.10a
Hardware Environment: various older Motherboards like ASUS P(2,3)BF, HP e-Vectra
and USB 1.1 on Motherboard
Software Environment: ACPI disabled because BIOS too old. APM and APM=poweroff
                      given in kernel/ bootpromt/ grub menu kernel directive
Problem Description: 
If a USB storage device ( hartd disc or USB memory stick ) is plugged into the
USB 1.1 / 1.0 connector on the motherboard and a 'shutdown -h now' is ececuted, 
the system goes down until the final "power down" message. 
Immidiately after, the USB subsystem wakes up and reports a new storage device
found. System does not power down as if there would be no device connected.

Steps to reproduce:
1. Start the system.
2. Connect a 2.0/1.1/1.0 USB storage device to the OnMotherboard USB 1.0/1.1 
3. Mount the device ( or not, doesn't matter'
4. Stop the system with a shutdown command.
5. RESULT: After power down message, USB subsystem pops up message about new
   devive found and hangs.

On another system with a Debian Sarge 3.1r0a standard kernel ( 2.6.8-2-686 )
which NEVER powers down I can see that the USB reports the same message WHEN
I CONNECT A USB HARD DISC AFTERWARDS ( when the system should be already without
It seems that the USB subsystem/Module(s) doesn't care about the system shutdown.
Comment 1 Greg Kroah-Hartman 2006-02-14 17:46:02 UTC
Does this still happen on 2.6.16-rc3?
Comment 2 RaffigeRaffe 2006-02-20 04:48:36 UTC
> ------- Additional Comments From greg@kroah.com  2006-02-14 17:46 -------
> Does this still happen on 2.6.16-rc3?
Sorry, have not yet compiled the Kernel 2.6.16-rc3.

But as an add-on information not directly related to this trouble

1. I installed some kind of SuSe's SLES 9 Distro on the same computer /
Hardware and had NO problems at all with USB Devices - neither after
shutdown nor with copying big files to a USB Harddisc. I recognized that
SuSe is "limiting the direct PCI to PCI transfers" during system boot. 

2. Recently I had problems when connecting a 2.0 USB hard disc and I saw
that the ohci-hcd kernel module tried to take care about the disc
instead of the ehci-hcd. ( both loaded already into the kernel ) The
errors are described in some other problem reports as: 
            "error -device not accepting address 3 trying 4 ->
             error -device not accepting address 4 trying 5 " and so on
and on.
I solved it with unloading the ohci-hcd and disconnecting / reconnecting
the hard disc.
In most of my various computers I have a build-in USB 1.1 VIA/ALI and 
an add. PCI card with either ALI / or VIA     

Comment 3 Greg Kroah-Hartman 2006-03-06 10:42:32 UTC
Can you please try a kernel.org kernel?  If you want to stick with your
distro's kernels, then please file a bug report in their systems.
Comment 4 RaffigeRaffe 2006-03-08 05:04:33 UTC
> ------- Additional Comments From greg@kroah.com  2006-03-06 10:42 -------
> Can you please try a kernel.org kernel?  If you want to stick with your
> distro's kernels, then please file a bug report in their systems.

Hello greg,
of course I tried the official kernels too. ( up to 2.6.14 ). 
Sorry for the missunderstanding. I tried to tell You that I have less
problems with SuSe SLES9. Well, Even this proofed to be somehow wrong,
because SLES 9 suffers also the USB disconnect device problem as
described below.
Shall I make new bug reports against 2.6.16rc4 ?
I respond quite late to Your email because I saw that there's a new
kernel release 2.6.16rc4 an I spent the last days for exhaustive testing
on my various machines.

Here the results::

1. Whow - this kernel works much, much better than those before.
2. The problem that the system does not shutdown if a USB HD is 
   connected is (almost) gone. The machine switches off - but just 
   before poweroff I can still see the messages from the ohci driver 
   that new hardware is detected. Unfortuantely, it's impossible to 
   read/save or retreave it after powerup again.
3. I have only one combibnation left ( ASUS P2BF + ALI PCI<>USB2.0 )
   which causes problems when copying or even reading many or large 
   files from a USB HD. But the problem is different - it starts with a 
   Disconnect USB device message.

I will include 2 attachments that describe the problem and include 
hardware information. The 2nd is probably a new problem. 

Thanks very much! This kernel is now usable with USB 2.0 !!!!

Comment 5 Mats Johannesson 2006-05-15 06:39:56 UTC
Ralf, removing the poweroff (-p) parametre from the halt command will leave the
messages on screen. My simple BSD style init has the command last in a plain
/etc/rc.d/rc.0 but you'll probably have to grep around to find it on a modern

Greg, the "rediscover" of a high speed USB device on a "dead" system still
happens in 2.6.17-rc4. I've just bought a new HD for my notebook and connected
the old one through an external USB 2.0 enclosure. While gathering information
for a new ehci-related bugreport (which I'll raise today) I saw this one and
remembered that something flew by on the screen while shutting down.


Notebook is an Acer Aspire 1520 (1524) WLMi with an AMD Athlon64 Processor 3400+
on a VIA K8M800 (VT8237 PCI bridge [K8T800 South] according to lspci, but I've
read the actual chip markings and southbridge is a VT8235), 2 Gig memory.
Different lspci dumps can be found as attachments in bug 6072 and acpidump in
bug 5767 . System nowadays is a from-scratch-ish pure 64bit thing where I'm in
full control/understanding, meaning no udev, hal, dbus etc with a static /dev
No desktop, just a WM.


Boot -> "rmmod ehci_hcd" -> Connect ext. HD (uhci_hcd grabs it) -> halt -> OK
Boot -> "rmmod ehci_hcd" -> Connect ext. HD -> Disconnect ext. HD -> halt -> OK
Boot -> Connect ext. HD (ehci_hcd grabs it) -> Disconnect ext. HD -> halt -> OK
Boot -> Connect ext. HD (ehci_hcd grabs it) -> halt -> "rediscover"

_Rediscover Output_

Only usb 2-[1,2,3,4] and port [1,2,3,4] messages changes depending on physical
connection of the HD:

Unmounting local filesystems...
Flushing filesystem buffers...
Bye... [***** here my /etc/rc.d/rc.0 executes /sbin/halt -d -f *****]
usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: not running at top speed; connect to a high speed hub
usb 2-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
Shutdown: hda
System halted.
hub 2-0:1.0: cannot reset port 1 (err = -108)
[message repeated another four times]
hub 2-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 2-0:1.0: cannot disable port 1 (err = -108)
hub 2-0:1.0: cannot reset port 1 (err = -108)
[message repeated another four times]
[etc etc. Total RESET blocks = four, Total ENABLE-DISABLE blocks = four]
hub 2-0:1.0: cannot disable port 1 (err = -108)
hub 2-0:1.0: hub_port_status failed (err = -108)

And that's the end of messages. See you in my next bugreport.
Comment 6 Matthew Dharm 2007-02-20 14:01:11 UTC
This is almost certainly some sort of USB core/HCD issue, not a usb-storage issue.
Comment 7 Natalie Protasevich 2007-06-12 12:22:16 UTC
I noticed several fixes to HCD removal that went into 2.6.21.
Ralf, have you tried kernels at or later 2.6.21?
Comment 8 Adrian Bunk 2007-09-16 11:09:38 UTC
Please reopen this bug if it's still present with kernel 2.6.22.