public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: How to find if BIOS has already enabled the device
@ 2005-05-28  1:34 Aleksey Gorelov
  2005-05-28  1:50 ` Parag Warudkar
  0 siblings, 1 reply; 15+ messages in thread
From: Aleksey Gorelov @ 2005-05-28  1:34 UTC (permalink / raw)
  To: Parag Warudkar, linux-kernel

>I am trying to trace the root cause of an annoying problem 
>with a USB Storage 
>device - 
>
>My laptop's BIOS supports booting from USB devices. I have attached an 
>external USB HDD to a USB 2.0 port. If I boot Linux with the 
>HDD attached and 
>powered on, load of OHCI-HCD module hangs the machine for 
>around 2 minutes - 
>after that it recovers and all is fine. I have tried different distros 
>without luck, but while installing debian, I figured out that the hang 
>happens after ohci-hcd calls pci_enable_device() for the USB 
>controller.
>
>This does not happen when the boot is complete. I.e. if I 
>attach the HDD after 
>boot is complete (BIOS did not get a chance to enable it 
>beforehand) load of 
>ohci-hcd (during and after boot) does not hang the machine.
>
>I think since the machine supports booting from USB HDD, the 
>BIOS must be 
>enabling the USB controller and attached device early during 
>boot, and when 
>ohci-hcd tries to re-enable it, it doesn't like it and leads 
>to a hang. 

See if 'usb-handoff' as a kernel parameter makes it any better.

Aleks.

>
>My question - Is it possible to detect if the USB controller 
>is already 
>enabled and skip enabling it second time?
>
>Thanks
>
>Parag
>-
>To unsubscribe from this list: send the line "unsubscribe 
>linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: How to find if BIOS has already enabled the device
@ 2005-05-30 14:49 Parag Warudkar
  0 siblings, 0 replies; 15+ messages in thread
From: Parag Warudkar @ 2005-05-30 14:49 UTC (permalink / raw)
  To: Michael Sterrett -Mr. Bones.-
  Cc: Lee Revell, Alan Cox, John Livingston, Aleksey Gorelov, gregkh,
	Linux Kernel Mailing List

> Wow, I definitely disagree, considering that the udev maintainer has
> commit privileges for Gentoo.
> 
> Try http://www.gentoo.org/doc/en/udev-guide.xml for help.
> 
> Michael Sterrett
>    -Mr. Bones.-

"Just works" == emerge udev; rc-update add udev boot; reboot 
 -:)! Add "reading a big document" to that and it becomes "works after reading a document" ! 

Well, I had tried the gentoo udev guide, but landed in an non booting system - kernel couldn't mount /dev/hdaX since udev hadn't set it up by then. So I have to add devfs to command line. No offense to udev maintainer or the document writer - the problem might be unique to my setup.

Now going back to my original question - has anyone got an idea as to why pci_enable_device() could hang system for 2 minutes before recovering ;) ?!

Parag




^ permalink raw reply	[flat|nested] 15+ messages in thread
* How to find if BIOS has already enabled the device
@ 2005-07-12  2:55 Parag Warudkar
  0 siblings, 0 replies; 15+ messages in thread
From: Parag Warudkar @ 2005-07-12  2:55 UTC (permalink / raw)
  To: Alan Cox, linux-kernel

> On Sad, 2005-05-28 at 14:57, Parag Warudkar wrote:
> > This current problem of Hang-On-Boot if USB drive is attached does not 
happen 
> > with Windows - so it is some sort of additional (unnecessary?) thing which 
> > Linux does and the BIOS doesn't like.  (Like re-enabling the controller 
even 
> > if BIOS has already enabled it or some such.)

> > Alan Cox wrote:
> Provide dmesg output and we might be able to guess. The first obvious
> candidate would be the BIOS refusing to do a handover if it booted from
> USB disk.

Hi Alan

Sorry for digging this out so late - (Quick recap - My machine hangs for 
couple minutes on boot if USB storage disk is attached - hang occurs in 
pci_enable_device).

I have filed a bug to track this one - 
http://bugme.osdl.org/show_bug.cgi?id=4711

Further analysis points towards  wrong/differing IRQ assigments being the 
cause of this hang. I observed that when the machine hangs, the IRQ 
assignment looks like -

18:        379   IO-APIC-level  eth0   
 19:          3   IO-APIC-level  ohci1394   
 20:       1439   IO-APIC-level  ohci_hcd, NVidia nForce3 Modem   
 21:          0   IO-APIC-level  ohci_hcd, NVidia nForce3   
 22:      12884   IO-APIC-level  ehci_hcd   

And when it does NOT hang it looks like -
16:          3   IO-APIC-level  ohci1394   
 18:      49277   IO-APIC-level  nvidia   
 19:       1753   IO-APIC-level  eth0   
 20:       6253   IO-APIC-level  ohci_hcd   
 21:        646   IO-APIC-level  ohci_hcd, NVidia nForce3   
 22:       2225   IO-APIC-level  ehci_hcd, NVidia nForce3 Modem   

Seems to me like the OHCI controller doesn't like to be assigned IRQ 19. Is 
this difference in IRQ assignment normal or is it a bug somewhere? 

Parag

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-07-12  2:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-28  1:34 How to find if BIOS has already enabled the device Aleksey Gorelov
2005-05-28  1:50 ` Parag Warudkar
2005-05-28  3:24   ` John Livingston
2005-05-28 13:57     ` Parag Warudkar
2005-05-28 14:04       ` Alan Cox
2005-05-28 14:18         ` Parag Warudkar
2005-05-28 14:37           ` Parag Warudkar
2005-05-28 16:15           ` Alan Cox
2005-05-28 17:01             ` Parag Warudkar
2005-05-29  0:06               ` Lee Revell
2005-05-29  0:17                 ` Parag Warudkar
2005-05-30  3:22                   ` Michael Sterrett -Mr. Bones.-
2005-06-01  1:12             ` Parag Warudkar
  -- strict thread matches above, loose matches on Subject: below --
2005-05-30 14:49 Parag Warudkar
2005-07-12  2:55 Parag Warudkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox