2012-08-20 19:39:43

by Andi Kleen

[permalink] [raw]
Subject: [PATCH] USB: Build usb_speed_string unconditionally

From: Andi Kleen <[email protected]>

The usb core uses usb_speed_string(). But it's only selected
for USB_GADGET. Enable it unconditionally.

Fixes a lot of randconfig builds.

Cc: [email protected]
Signed-off-by: Andi Kleen <[email protected]>
---
drivers/usb/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index f5ed3d7..d74535b 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -57,4 +57,4 @@ obj-$(CONFIG_USB_CHIPIDEA) += chipidea/
obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
obj-$(CONFIG_USB_GADGET) += gadget/

-obj-$(CONFIG_USB_COMMON) += usb-common.o
+obj-y += usb-common.o
--
1.7.7.6


2012-08-20 19:47:51

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH] USB: Build usb_speed_string unconditionally

On Mon, 20 Aug 2012, Andi Kleen wrote:

> From: Andi Kleen <[email protected]>
>
> The usb core uses usb_speed_string(). But it's only selected
> for USB_GADGET. Enable it unconditionally.

What are you talking about? USB_COMMON isn't selected at all, but it
does get built whenever USB or USB_GAGDET is enabled. From
drivers/usb/Kconfig:

config USB_COMMON
tristate
default y
depends on USB || USB_GADGET

One could argue that USB_COMMON should never be set to M, that it
should be Y if either USB or USB_GADGET is enabled at all. But that's
a separate matter.

> Fixes a lot of randconfig builds.

How?

Alan Stern

> Cc: [email protected]
> Signed-off-by: Andi Kleen <[email protected]>
> ---
> drivers/usb/Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
> index f5ed3d7..d74535b 100644
> --- a/drivers/usb/Makefile
> +++ b/drivers/usb/Makefile
> @@ -57,4 +57,4 @@ obj-$(CONFIG_USB_CHIPIDEA) += chipidea/
> obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/
> obj-$(CONFIG_USB_GADGET) += gadget/
>
> -obj-$(CONFIG_USB_COMMON) += usb-common.o
> +obj-y += usb-common.o

2012-08-20 19:58:14

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] USB: Build usb_speed_string unconditionally

On Mon, Aug 20, 2012 at 03:47:48PM -0400, Alan Stern wrote:
> On Mon, 20 Aug 2012, Andi Kleen wrote:
>
> > From: Andi Kleen <[email protected]>
> >
> > The usb core uses usb_speed_string(). But it's only selected
> > for USB_GADGET. Enable it unconditionally.
>
> What are you talking about? USB_COMMON isn't selected at all, but it
> does get built whenever USB or USB_GAGDET is enabled. From
> drivers/usb/Kconfig:

Just trying to fix my LTO randconfigs.

Here's a config that violated it on rc2.

-Andi


Attachments:
(No filename) (512.00 B)
config11468.0 (45.30 kB)
Download all attachments

2012-08-20 20:27:52

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] USB: Build usb_speed_string unconditionally

On 08/20/12 12:58, Andi Kleen wrote:

> On Mon, Aug 20, 2012 at 03:47:48PM -0400, Alan Stern wrote:
>> On Mon, 20 Aug 2012, Andi Kleen wrote:
>>
>>> From: Andi Kleen <[email protected]>
>>>
>>> The usb core uses usb_speed_string(). But it's only selected
>>> for USB_GADGET. Enable it unconditionally.
>>
>> What are you talking about? USB_COMMON isn't selected at all, but it
>> does get built whenever USB or USB_GAGDET is enabled. From
>> drivers/usb/Kconfig:
>
> Just trying to fix my LTO randconfigs.
>
> Here's a config that violated it on rc2.


Involves known problem with DRM_USB AFAICT.

Greg just accepted a patch from Guenter Roeck that should
fix this:
[PATCH RESEND] gpu/mfd/usb: Fix USB randconfig problems

--
~Randy

2012-08-20 20:42:48

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH] USB: Build usb_speed_string unconditionally

On Mon, 20 Aug 2012, Andi Kleen wrote:

> On Mon, Aug 20, 2012 at 03:47:48PM -0400, Alan Stern wrote:
> > On Mon, 20 Aug 2012, Andi Kleen wrote:
> >
> > > From: Andi Kleen <[email protected]>
> > >
> > > The usb core uses usb_speed_string(). But it's only selected
> > > for USB_GADGET. Enable it unconditionally.
> >
> > What are you talking about? USB_COMMON isn't selected at all, but it
> > does get built whenever USB or USB_GAGDET is enabled. From
> > drivers/usb/Kconfig:
>
> Just trying to fix my LTO randconfigs.
>
> Here's a config that violated it on rc2.

Okay, I see the problem. Your config has:

# CONFIG_USB_SUPPORT is not set
CONFIG_USB=m

That combination should not be possible, because in
drivers/usb/Kconfig, the definition of USB is inside an "if
USB_SUPPORT" block.

Runing "make oldconfig" shows that this happened because:

warning: (MOUSE_APPLETOUCH && MOUSE_BCM5974 && MOUSE_SYNAPTICS_USB && JOYSTICK_XPAD && TABLET_USB_ACECAD && TABLET_USB_AIPTEK && TABLET_USB_HANWANG && TABLET_USB_KBTAB && TABLET_USB_WACOM && TOUCHSCREEN_USB_COMPOSITE && INPUT_ATI_REMOTE2 && INPUT_KEYSPAN_REMOTE && INPUT_POWERMATE && INPUT_YEALINK && INPUT_CM109 && RC_ATI_REMOTE && IR_IMON && IR_MCEUSB && IR_REDRAT3 && IR_STREAMZAP && IR_IGUANA && DRM_USB) selects USB which has unmet direct dependencies (USB_SUPPORT && USB_ARCH_HAS_HCD)

The culprit is DRM_USB, and I think Greg has just accepted a patch to
fix it.

Alan Stern

2012-08-20 20:49:53

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] USB: Build usb_speed_string unconditionally

On Mon, Aug 20, 2012 at 04:42:44PM -0400, Alan Stern wrote:
> On Mon, 20 Aug 2012, Andi Kleen wrote:
>
> > On Mon, Aug 20, 2012 at 03:47:48PM -0400, Alan Stern wrote:
> > > On Mon, 20 Aug 2012, Andi Kleen wrote:
> > >
> > > > From: Andi Kleen <[email protected]>
> > > >
> > > > The usb core uses usb_speed_string(). But it's only selected
> > > > for USB_GADGET. Enable it unconditionally.
> > >
> > > What are you talking about? USB_COMMON isn't selected at all, but it
> > > does get built whenever USB or USB_GAGDET is enabled. From
> > > drivers/usb/Kconfig:
> >
> > Just trying to fix my LTO randconfigs.
> >
> > Here's a config that violated it on rc2.
>
> Okay, I see the problem. Your config has:
>
> # CONFIG_USB_SUPPORT is not set
> CONFIG_USB=m
>
> That combination should not be possible, because in
> drivers/usb/Kconfig, the definition of USB is inside an "if
> USB_SUPPORT" block.
>
> Runing "make oldconfig" shows that this happened because:
>
> warning: (MOUSE_APPLETOUCH && MOUSE_BCM5974 && MOUSE_SYNAPTICS_USB && JOYSTICK_XPAD && TABLET_USB_ACECAD && TABLET_USB_AIPTEK && TABLET_USB_HANWANG && TABLET_USB_KBTAB && TABLET_USB_WACOM && TOUCHSCREEN_USB_COMPOSITE && INPUT_ATI_REMOTE2 && INPUT_KEYSPAN_REMOTE && INPUT_POWERMATE && INPUT_YEALINK && INPUT_CM109 && RC_ATI_REMOTE && IR_IMON && IR_MCEUSB && IR_REDRAT3 && IR_STREAMZAP && IR_IGUANA && DRM_USB) selects USB which has unmet direct dependencies (USB_SUPPORT && USB_ARCH_HAS_HCD)
>
> The culprit is DRM_USB, and I think Greg has just accepted a patch to
> fix it.

Yes, it's now in Linus's tree.

Andi, care to try this again with this .config on Linus's tree to see if
it all now works properly?

thanks,

greg k-h

2012-08-20 21:28:04

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] USB: Build usb_speed_string unconditionally

> Andi, care to try this again with this .config on Linus's tree to see if
> it all now works properly?

Works in mainline. Thanks.

-Andi

--
[email protected] -- Speaking for myself only.