Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=403fae78d7388876b96fbe30ccf2cb551c49ae5a
Commit:     403fae78d7388876b96fbe30ccf2cb551c49ae5a
Parent:     ed6590a861a16276db34ee626375fa79f3369ac3
Author:     jidong xiao <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 14 00:08:51 2007 +0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:55:27 2007 -0700

    USB: fix limited_power setting mistake in hub.c
    
    This patch (jx001) fixes a variable assignment mistake in hub driver.
    limited_power should be set to 0 if the hub is self-powered,and 1 if
    the hub is bus-powered.
    
    However, the effect of the code was exactly opposite to the spec's
    statement for the Local Power Source field. The spec says, this field
    is 1 meaning Local power supply lost while this field is 0 indicating
    Local power supply good.(This statement is very confusing.)
    
    So this patch switchs the 0 and 1.
    
    
    Signed-off-by: Jason Xiao <[EMAIL PROTECTED]>
    Acked-by: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/core/hub.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 691acf2..481dca6 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2818,9 +2818,9 @@ static void hub_events(void)
                                clear_hub_feature(hdev, C_HUB_LOCAL_POWER);
                                if (hubstatus & HUB_STATUS_LOCAL_POWER)
                                        /* FIXME: Is this always true? */
-                                       hub->limited_power = 0;
-                               else
                                        hub->limited_power = 1;
+                               else
+                                       hub->limited_power = 0;
                        }
                        if (hubchange & HUB_CHANGE_OVERCURRENT) {
                                dev_dbg (hub_dev, "overcurrent change\n");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to