Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235407
b: refs/heads/master
c: 752d57a
h: refs/heads/master
i:
  235405: 573b2f6
  235403: d89ab41
  235399: 8049b76
  235391: 9f50e03
v: v3
  • Loading branch information
Paul Bolle authored and Greg Kroah-Hartman committed Mar 11, 2011
1 parent 5bbf135 commit acb4303
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0dfeefbc93e38c3a9bd6d4e579cc5a76d3f13dc2
refs/heads/master: 752d57a8b7b97423bffa3452638aa0fd3c3bb9d1
24 changes: 19 additions & 5 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -3408,12 +3408,19 @@ static void hub_events(void)
}

if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
dev_err (hub_dev,
"over-current change on port %d\n",
i);
u16 status = 0;
u16 unused;

dev_dbg(hub_dev, "over-current change on port "
"%d\n", i);
clear_port_feature(hdev, i,
USB_PORT_FEAT_C_OVER_CURRENT);
msleep(100); /* Cool down */
hub_power_on(hub, true);
hub_port_status(hub, i, &status, &unused);
if (status & USB_PORT_STAT_OVERCURRENT)
dev_err(hub_dev, "over-current "
"condition on port %d\n", i);
}

if (portchange & USB_PORT_STAT_C_RESET) {
Expand Down Expand Up @@ -3445,10 +3452,17 @@ static void hub_events(void)
hub->limited_power = 0;
}
if (hubchange & HUB_CHANGE_OVERCURRENT) {
dev_dbg (hub_dev, "overcurrent change\n");
msleep(500); /* Cool down */
u16 status = 0;
u16 unused;

dev_dbg(hub_dev, "over-current change\n");
clear_hub_feature(hdev, C_HUB_OVER_CURRENT);
msleep(500); /* Cool down */
hub_power_on(hub, true);
hub_hub_status(hub, &status, &unused);
if (status & HUB_STATUS_OVERCURRENT)
dev_err(hub_dev, "over-current "
"condition\n");
}
}

Expand Down

0 comments on commit acb4303

Please sign in to comment.