Discussion:
[PATCH] dummy_hcd: change the default power budget
Alan Stern
2007-12-06 16:10:39 UTC
Permalink
This patch (as1025) changes the default power budget for dummy-hcd to
500 mA and makes it a preprocessor parameter for easier testing.

Signed-off-by: Alan Stern <***@rowland.harvard.edu>

---

Index: usb-2.6/drivers/usb/gadget/dummy_hcd.c
===================================================================
--- usb-2.6.orig/drivers/usb/gadget/dummy_hcd.c
+++ usb-2.6/drivers/usb/gadget/dummy_hcd.c
@@ -61,6 +61,8 @@
#define DRIVER_DESC "USB Host+Gadget Emulator"
#define DRIVER_VERSION "02 May 2005"

+#define POWER_BUDGET 500 /* in mA; use 8 for low-power port testing */
+
static const char driver_name [] = "dummy_hcd";
static const char driver_desc [] = "USB Host+Gadget Emulator";

@@ -1810,8 +1812,7 @@ static int dummy_start (struct usb_hcd *

INIT_LIST_HEAD (&dum->urbp_list);

- /* only show a low-power port: just 8mA */
- hcd->power_budget = 8;
+ hcd->power_budget = POWER_BUDGET;
hcd->state = HC_STATE_RUNNING;
hcd->uses_new_polling = 1;



-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
g***@suse.de
2007-12-20 23:37:22 UTC
Permalink
This is a note to let you know that I've just added the patch titled

Subject: USB: dummy_hcd: change the default power budget

to my gregkh-2.6 tree. Its filename is

usb-dummy_hcd-change-the-default-power-budget.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
From: Alan Stern <***@rowland.harvard.edu>
Date: Thu, 6 Dec 2007 11:10:39 -0500 (EST)
Subject: USB: dummy_hcd: change the default power budget
To: Greg KH <***@kroah.com>
Cc: USB list <linux-***@vger.kernel.org>, USB development list <linux-usb-***@lists.sourceforge.net>
Message-ID: <Pine.LNX.4.44L0.0712061109001.4308-***@iolanthe.rowland.org>


This patch (as1025) changes the default power budget for dummy-hcd to
500 mA and makes it a preprocessor parameter for easier testing.

Signed-off-by: Alan Stern <***@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <***@suse.de>

---
drivers/usb/gadget/dummy_hcd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -61,6 +61,8 @@
#define DRIVER_DESC "USB Host+Gadget Emulator"
#define DRIVER_VERSION "02 May 2005"

+#define POWER_BUDGET 500 /* in mA; use 8 for low-power port testing */
+
static const char driver_name [] = "dummy_hcd";
static const char driver_desc [] = "USB Host+Gadget Emulator";

@@ -1810,8 +1812,7 @@ static int dummy_start (struct usb_hcd *

INIT_LIST_HEAD (&dum->urbp_list);

- /* only show a low-power port: just 8mA */
- hcd->power_budget = 8;
+ hcd->power_budget = POWER_BUDGET;
hcd->state = HC_STATE_RUNNING;
hcd->uses_new_polling = 1;



Patches currently in gregkh-2.6 which might be from ***@rowland.harvard.edu are

driver/pm-acquire-device-locks-prior-to-suspending.patch
driver/kobject-drop-child-parent-ref-at-unregistration.patch
driver/driver-core-fix-race-in-__device_release_driver.patch
driver/driver-core-fix-class-glue-dir-cleanup-logic.patch
usb/usb-add-usbfs-stubs-for-suspend-and-resume.patch
usb/usb-dummy_hcd-change-the-default-power-budget.patch
usb/usb-usb-storage-new-lockable-subclass-0x07.patch
usb/usb-ehci-add-separate-iaa-watchdog-timer.patch
usb/usb-usb-mon-mon_bin.c-cleanups.patch
usb/usb-autosuspend-for-cdc-acm.patch
usb/usb-repair-usbdevfs_connect-ioctl.patch
usb/usb-don-t-change-hc-power-state-for-a-freeze.patch
usb/usb-dummy_hcd-don-t-register-drivers-on-the-platform-bus.patch
usb/usb-force-handover-port-to-companion-when-hub_port_connect_change-fails.patch
usb/usb-make-ksuspend_usbd-thread-non-freezable.patch
usb/usb-updates-to-usb_reset_composite_device.patch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Loading...