Skip to contentSkip to conversation

USB host pci-quirks

PATCH Oskar Senft 1 participant 1 message Jan 26, 2006

lore
Share & tools
lore
#0 lore raw

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?

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.

usb/host/Makefile renamed from usb/host/Makefile.orig +9 -1
@@ -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