2006-01-26 11:03:27

by Oskar Senft

[permalink] [raw]
Subject: USB host pci-quirks

--- drivers/usb/host/Makefile.orig 2006-01-24 12:28:11.000000000 +0100
+++ drivers/usb/host/Makefile 2006-01-24 12:27:38.000000000 +0100
@@ -2,7 +2,15 @@
# Makefile for USB Host Controller Drivers
#

-obj-$(CONFIG_PCI) += pci-quirks.o
+# only compile pci-quirks if PCI is enabled
+# and USB is either compiled as a module
+ifeq ($(CONFIG_USB),m)
+ obj-$(CONFIG_PCI) += pci-quirks.o
+endif
+# or directly into the kernel
+ifeq ($(CONFIG_USB),y)
+ obj-$(CONFIG_PCI) += pci-quirks.o
+endif

obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o


Attachments:
pci_but_no_usb-2006-01-24.patch (605.00 B)

2006-01-26 22:17:56

by Aleksey Gorelov

[permalink] [raw]
Subject: RE: USB host pci-quirks



>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of Oskar Senft
>Sent: Thursday, January 26, 2006 3:03 AM
>To: [email protected]
>Subject: USB host pci-quirks
>
>Hi all!
>
>I'm currently working with Linux in a hardware virtualization
>environment (L4 microkernel). During tests, we discovered,
>that there is
>some incosistency in the kernel configuration dependencies:
>
>the file "drivers/usb/host/pci-quirks.c" is added to the kernel as soon
>as PCI support is activated, even if USB support is completely
>disabled.
>
>We discovered this issue while trying to run multiple Linux instances
>simultaneously.
>
>Is there a special need, that the "drivers/usb/host/pci-quirks.c" is
>compiled into the kernel even if USB support is disabled?

Yes, there is. USB handoff is necessary even if USB support is
disabled completely in kernel. In fact, initially early usb handoff code
was under pci, but since USB drivers do handoff anyway, it was decided
to move everything into usb with a goal of merging them together.
Just search for USB handoff in kernel archives.

Thanks,
Aleks.

>
>I suggest the attached patch to resolve that problem. The file then is
>only included if PCI and USB support is enabled.
>
>Best regards,
>Oskar.

2006-01-26 22:38:39

by Oskar Senft

[permalink] [raw]
Subject: Re: USB host pci-quirks

Dear Aleksey,

thank you for your e-mail!

>>Is there a special need, that the "drivers/usb/host/pci-quirks.c" is
>>compiled into the kernel even if USB support is disabled?
>
> Yes, there is. USB handoff is necessary even if USB support is
> disabled completely in kernel. In fact, initially early usb handoff code
> was under pci, but since USB drivers do handoff anyway, it was decided
> to move everything into usb with a goal of merging them together.
> Just search for USB handoff in kernel archives.

I see ... but as David Brownell already stated on Thu Sep 02 2004 -
20:07:57 EST:
For backwards compatibility, the early reset should not be the
default. There aren't many systems where it's a problem.

What happened to that argument?

Regards,
Oskar.

2006-01-26 23:16:39

by Aleksey Gorelov

[permalink] [raw]
Subject: RE: USB host pci-quirks

>-----Original Message-----
>From: Oskar Senft [mailto:[email protected]]
>Sent: Thursday, January 26, 2006 2:38 PM
>To: Aleksey Gorelov; [email protected]
>Subject: Re: USB host pci-quirks
>
>Dear Aleksey,
>
>thank you for your e-mail!
>
>>>Is there a special need, that the "drivers/usb/host/pci-quirks.c" is
>>>compiled into the kernel even if USB support is disabled?
>>
>> Yes, there is. USB handoff is necessary even if USB support is
>> disabled completely in kernel. In fact, initially early usb
>handoff code
>> was under pci, but since USB drivers do handoff anyway, it
>was decided
>> to move everything into usb with a goal of merging them together.
>> Just search for USB handoff in kernel archives.
>
>I see ... but as David Brownell already stated on Thu Sep 02 2004 -
>20:07:57 EST:
>For backwards compatibility, the early reset should not be the
>default. There aren't many systems where it's a problem.
>
>What happened to that argument?

There's been a lot of reports since then for hardware which does require
handoff. Hence it's been made default. I did not see any compatibility
issues, but that does not mean they do not exist.

Aleks.

>
>Regards,
>Oskar.
>

2006-01-27 00:48:14

by Greg KH

[permalink] [raw]
Subject: Re: USB host pci-quirks

On Thu, Jan 26, 2006 at 11:38:26PM +0100, Oskar Senft wrote:
> Dear Aleksey,
>
> thank you for your e-mail!
>
> >>Is there a special need, that the "drivers/usb/host/pci-quirks.c" is
> >>compiled into the kernel even if USB support is disabled?
> >
> > Yes, there is. USB handoff is necessary even if USB support is
> > disabled completely in kernel. In fact, initially early usb handoff code
> > was under pci, but since USB drivers do handoff anyway, it was decided
> > to move everything into usb with a goal of merging them together.
> > Just search for USB handoff in kernel archives.
>
> I see ... but as David Brownell already stated on Thu Sep 02 2004 -
> 20:07:57 EST:
> For backwards compatibility, the early reset should not be the
> default. There aren't many systems where it's a problem.
>
> What happened to that argument?

In the year and a half since then, we have changed our mind :)

A major distro has shipped for a while with this always enabled with no
problems, which has helped with this.

thanks,

greg k-h

2006-01-27 08:13:03

by Oskar Senft

[permalink] [raw]
Subject: Re: USB host pci-quirks

Dear Greg, dear Aleksey,

thank you for your response!

> A major distro has shipped for a while with this always enabled with no
> problems, which has helped with this.
I see, ok!

I think we'll find some workaround in our virtualization environment,
but now I know how it came to the current situation.

Thank you,
Oskar.