[oe-commits] org.oe.oz354x linux-openzaurus 2.6.16: backport of USB MaxPower limit information

hrw commit openembedded-commits at lists.openembedded.org
Wed Sep 6 17:50:50 UTC 2006


linux-openzaurus 2.6.16: backport of USB MaxPower limit information

Author: hrw at openembedded.org
Branch: org.openembedded.oz354x
Revision: 69f0a166098b754a6fa1cbb114317c805f34e399
ViewMTN: http://monotone.openembedded.org/revision.psp?id=69f0a166098b754a6fa1cbb114317c805f34e399
Files:
1
packages/linux/linux-openzaurus-2.6.16/maxpower-message.patch
packages/linux/linux-openzaurus_2.6.16.bb
Diffs:

#
# mt diff -r7c2dd5e8e1985403a587513e398d88f3c44cf9bf -r69f0a166098b754a6fa1cbb114317c805f34e399
#
# 
# 
# add_file "packages/linux/linux-openzaurus-2.6.16/maxpower-message.patch"
#  content [bacce4301dae406f2ba4e0b60ea50db8460b4430]
# 
# patch "packages/linux/linux-openzaurus_2.6.16.bb"
#  from [fec6fd09bd88fc7672778f299b569f2346774108]
#    to [3515c7ce9ce8821e0f9fe762f545260d542f2ed6]
# 
============================================================
--- packages/linux/linux-openzaurus-2.6.16/maxpower-message.patch	bacce4301dae406f2ba4e0b60ea50db8460b4430
+++ packages/linux/linux-openzaurus-2.6.16/maxpower-message.patch	bacce4301dae406f2ba4e0b60ea50db8460b4430
@@ -0,0 +1,55 @@
+From: Daniel Drake <dsd at gentoo.org>
+Date: Fri, 26 May 2006 20:36:28 +0000 (+0100)
+Subject: [PATCH] USB: print message when device is rejected due to insufficient power
+X-Git-Tag: v2.6.18-rc1
+X-Git-Url: http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1fbe75e12f0dd567c86533e13ba2605f3ecad2e1
+
+[PATCH] USB: print message when device is rejected due to insufficient power
+
+2.6.16 introduces USB power budgeting in the Linux kernel, and since then, a
+fair number of users have observed that some of their devices no longer work in
+unpowered hubs (this is not a bug, the devices claim that they need more than
+100mA).
+
+The very least we can do is print an informational message to the kernel log
+when this happens, otherwise it is not at all clear why the device was not
+accepted.
+
+Signed-off-by: Daniel Drake <dsd at gentoo.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+---
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -1176,6 +1176,7 @@ static int choose_configuration(struct u
+ {
+ 	int i;
+ 	int num_configs;
++	int insufficient_power = 0;
+ 	struct usb_host_config *c, *best;
+ 
+ 	best = NULL;
+@@ -1228,8 +1229,10 @@ static int choose_configuration(struct u
+ 		 */
+ 
+ 		/* Rule out configs that draw too much bus current */
+-		if (c->desc.bMaxPower * 2 > udev->bus_mA)
++		if (c->desc.bMaxPower * 2 > udev->bus_mA) {
++			insufficient_power++;
+ 			continue;
++		}
+ 
+ 		/* If the first config's first interface is COMM/2/0xff
+ 		 * (MSFT RNDIS), rule it out unless Linux has host-side
+@@ -1263,6 +1266,11 @@ static int choose_configuration(struct u
+ 			best = c;
+ 	}
+ 
++	if (insufficient_power > 0)
++		dev_info(&udev->dev, "rejected %d configuration%s "
++			"due to insufficient available bus power\n",
++			insufficient_power, plural(insufficient_power));
++
+ 	if (best) {
+ 		i = best->desc.bConfigurationValue;
+ 		dev_info(&udev->dev,
============================================================
--- packages/linux/linux-openzaurus_2.6.16.bb	fec6fd09bd88fc7672778f299b569f2346774108
+++ packages/linux/linux-openzaurus_2.6.16.bb	3515c7ce9ce8821e0f9fe762f545260d542f2ed6
@@ -1,6 +1,6 @@ require linux-openzaurus.inc
 require linux-openzaurus.inc
 
-PR = "r44"
+PR = "r45"
 
 # Handy URLs
 # git://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git \
@@ -68,6 +68,7 @@ SRC_URI = "http://www.kernel.org/pub/lin
            file://00-hostap.patch;patch=1;status=merged \
            file://10-pcnet.patch;patch=1;status=merged \
            ${RPSRC}/alsa/asoc-v0.10rc4.patch;patch=1 \
+           file://maxpower-message.patch;patch=1;status=backported \
            ${RPSRC}/asoc_fixups-r0.patch;patch=1 \
            ${RPSRC}/hx2750_base-r24.patch;patch=1 \
            ${RPSRC}/hx2750_bl-r5.patch;patch=1 \






More information about the Openembedded-commits mailing list