public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing
@ 2006-10-31 20:00 Felipe Balbi
  2006-10-31 20:28 ` Felipe Balbi
  2006-11-01 17:09 ` Dirk Behme
  0 siblings, 2 replies; 5+ messages in thread
From: Felipe Balbi @ 2006-10-31 20:00 UTC (permalink / raw)
  To: Linux OMAP Mailing List

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

This small patch changes omap_h3_1710_defconfig to fix the bug.

The catch is: for struct usb_device to have the fields struct 
work_struct autosuspend and unsigned autopm:1 CONFIG_PM should be set "y".


make uImage
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  CC      drivers/usb/core/usb.o
drivers/usb/core/usb.c: In function 'usb_release_dev':
drivers/usb/core/usb.c:177: error: 'struct usb_device' has no member 
named 'autosuspend'
drivers/usb/core/usb.c: In function 'usb_autosuspend_work':
drivers/usb/core/usb.c:218: error: 'struct usb_device' has no member 
named 'auto_pm'
drivers/usb/core/usb.c:219: warning: statement with no effect
make[3]: *** [drivers/usb/core/usb.o] Error 1
make[2]: *** [drivers/usb/core] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2


-- 
Best Regards,

Felipe Balbi
ext-felipe.lima@nokia.com
OSMRC - INdT


[-- Attachment #2: patch-autosuspend-auto_pm.diff --]
[-- Type: text/x-patch, Size: 813 bytes --]

Index: linux-omap-2.6-dev/include/linux/usb.h
===================================================================
--- linux-omap-2.6-dev.orig/include/linux/usb.h	2006-10-31 14:16:01.000000000 -0400
+++ linux-omap-2.6-dev/include/linux/usb.h	2006-10-31 15:48:43.000000000 -0400
@@ -381,13 +381,13 @@ struct usb_device {
 	struct usb_device *children[USB_MAXCHILDREN];
 
 	int pm_usage_cnt;		/* usage counter for autosuspend */
-#ifdef CONFIG_PM
+/* #ifdef CONFIG_PM */
 	struct work_struct autosuspend;	/* for delayed autosuspends */
 	struct mutex pm_mutex;		/* protects PM operations */
 
 	unsigned auto_pm:1;		/* autosuspend/resume in progress */
 	unsigned do_remote_wakeup:1;	/* remote wakeup should be enabled */
-#endif
+/* #endif */
 };
 #define	to_usb_device(d) container_of(d, struct usb_device, dev)
 

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing
  2006-10-31 20:00 [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing Felipe Balbi
@ 2006-10-31 20:28 ` Felipe Balbi
  2006-11-01 17:09 ` Dirk Behme
  1 sibling, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2006-10-31 20:28 UTC (permalink / raw)
  Cc: Linux OMAP Mailing List

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

Please forget about the other patch... this is the right one...

sorry guys


ext Felipe Balbi wrote:
> This small patch changes omap_h3_1710_defconfig to fix the bug.
>
> The catch is: for struct usb_device to have the fields struct 
> work_struct autosuspend and unsigned autopm:1 CONFIG_PM should be set 
> "y".
>
>
> make uImage
>  CHK     include/linux/version.h
> make[1]: `include/asm-arm/mach-types.h' is up to date.
>  CHK     include/linux/utsrelease.h
>  CHK     include/linux/compile.h
>  CC      drivers/usb/core/usb.o
> drivers/usb/core/usb.c: In function 'usb_release_dev':
> drivers/usb/core/usb.c:177: error: 'struct usb_device' has no member 
> named 'autosuspend'
> drivers/usb/core/usb.c: In function 'usb_autosuspend_work':
> drivers/usb/core/usb.c:218: error: 'struct usb_device' has no member 
> named 'auto_pm'
> drivers/usb/core/usb.c:219: warning: statement with no effect
> make[3]: *** [drivers/usb/core/usb.o] Error 1
> make[2]: *** [drivers/usb/core] Error 2
> make[1]: *** [drivers/usb] Error 2
> make: *** [drivers] Error 2
>
>

-- 
Best Regards,

Felipe Balbi
ext-felipe.lima@nokia.com
OSMRC - INdT


[-- Attachment #2: patch-autosuspend-auto_pm.diff --]
[-- Type: text/x-patch, Size: 468 bytes --]

Index: linux-omap-2.6-dev/arch/arm/configs/omap_h3_1710_defconfig
===================================================================
--- linux-omap-2.6-dev.orig/arch/arm/configs/omap_h3_1710_defconfig	2006-10-31 14:30:35.000000000 -0400
+++ linux-omap-2.6-dev/arch/arm/configs/omap_h3_1710_defconfig	2006-10-31 16:26:56.000000000 -0400
@@ -223,7 +223,7 @@ CONFIG_BINFMT_AOUT=y
 #
 # Power management options
 #
-# CONFIG_PM is not set
+CONFIG_PM=y
 
 #
 # Networking

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing
  2006-10-31 20:00 [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing Felipe Balbi
  2006-10-31 20:28 ` Felipe Balbi
@ 2006-11-01 17:09 ` Dirk Behme
  2006-11-01 19:55   ` David Brownell
  1 sibling, 1 reply; 5+ messages in thread
From: Dirk Behme @ 2006-11-01 17:09 UTC (permalink / raw)
  To: David Brownell; +Cc: Linux OMAP Mailing List

Hi David,

Felipe Balbi wrote:
>  CC      drivers/usb/core/usb.o
> drivers/usb/core/usb.c: In function 'usb_release_dev':
> drivers/usb/core/usb.c:177: error: 'struct usb_device' has no member 
> named 'autosuspend'
> drivers/usb/core/usb.c: In function 'usb_autosuspend_work':
> drivers/usb/core/usb.c:218: error: 'struct usb_device' has no member 
> named 'auto_pm'
> drivers/usb/core/usb.c:219: warning: statement with no effect
> make[3]: *** [drivers/usb/core/usb.o] Error 1

do we have a mismatch here between usage of CONFIG_PM in 
include/linux/usb.h and CONFIG_USB_SUSPEND in usb/core/usb.c 
if CONFIG_PM isn't set for OMAP?

Cheers

Dirk

include/linux/usb.h:

#ifdef CONFIG_PM
	struct work_struct autosuspend;	/* for delayed autosuspends */
	struct mutex pm_mutex;		/* protects PM operations */

	unsigned auto_pm:1;		/* autosuspend/resume in progress */
	unsigned do_remote_wakeup:1;	/* remote wakeup should be 
enabled */
#endif

usb/core/usb.c line ~177:

#ifdef	CONFIG_USB_SUSPEND
	cancel_delayed_work(&udev->autosuspend);
...
#endif

usb/core/usb.c line ~218:

#ifdef	CONFIG_USB_SUSPEND
...
	udev->auto_pm = 1;
...

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

* Re: [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing
  2006-11-01 17:09 ` Dirk Behme
@ 2006-11-01 19:55   ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2006-11-01 19:55 UTC (permalink / raw)
  To: Dirk Behme; +Cc: Alan Stern, Linux OMAP Mailing List

On Wednesday 01 November 2006 9:09 am, Dirk Behme wrote:

> do we have a mismatch here between usage of CONFIG_PM in 
> include/linux/usb.h and CONFIG_USB_SUSPEND in usb/core/usb.c 
> if CONFIG_PM isn't set for OMAP?

We have a case of patches not getting into the OMAP tree yet;
I'm not sure if they've been merged into kernel.org yet.

Alan, this tree is at ~RC3 ... is this fix in the main kernel
GIT tree yet, or just in MM?

- Dave

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

* Re: [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing
       [not found] <Pine.LNX.4.44L0.0611011552330.8259-100000@iolanthe.rowland.org>
@ 2006-11-01 21:48 ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2006-11-01 21:48 UTC (permalink / raw)
  To: Alan Stern; +Cc: Linux OMAP Mailing List

On Wednesday 01 November 2006 1:07 pm, Alan Stern wrote:

> I don't know what's going on with the OMAP tree, but it shouldn't be 
> possible to set CONFIG_USB_SUSPEND without also setting CONFIG_PM.

I'm suspecting the issue was just a broken defconfig, because that's
exactly what I see.  Specifically, omap_h2_1610_defconfig is borked.

Though why that broken defconfig didn't get fixed when the kernel
got built, I don't know ...

Sorry to bother you with that; I should have looked closer too, but
I thought one of the nyet-merged patches had those same symptoms.

- Dave

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

end of thread, other threads:[~2006-11-01 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-31 20:00 [PATCH] [USB/CORE/USB.C] Fixes autosuspend and auto_pm fields missing Felipe Balbi
2006-10-31 20:28 ` Felipe Balbi
2006-11-01 17:09 ` Dirk Behme
2006-11-01 19:55   ` David Brownell
     [not found] <Pine.LNX.4.44L0.0611011552330.8259-100000@iolanthe.rowland.org>
2006-11-01 21:48 ` David Brownell

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