Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19226
b: refs/heads/master
c: 0be930c
h: refs/heads/master
v: v3
  • Loading branch information
Olav Kongas authored and Greg Kroah-Hartman committed Feb 1, 2006
1 parent e613b68 commit 425d6d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: e9aa795aaed0b861aaa5a8075748c9c34e2620ee
refs/heads/master: 0be930c546ad056cad5780ee9424a28cf979cb42
21 changes: 11 additions & 10 deletions trunk/drivers/usb/host/isp116x-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,33 +1420,34 @@ static int isp116x_bus_suspend(struct usb_hcd *hcd)
int ret = 0;

spin_lock_irqsave(&isp116x->lock, flags);

val = isp116x_read_reg32(isp116x, HCCONTROL);

switch (val & HCCONTROL_HCFS) {
case HCCONTROL_USB_OPER:
spin_unlock_irqrestore(&isp116x->lock, flags);
val &= (~HCCONTROL_HCFS & ~HCCONTROL_RWE);
val |= HCCONTROL_USB_SUSPEND;
if (device_may_wakeup(&hcd->self.root_hub->dev))
val |= HCCONTROL_RWE;
/* Wait for usb transfers to finish */
mdelay(2);
msleep(2);
spin_lock_irqsave(&isp116x->lock, flags);
isp116x_write_reg32(isp116x, HCCONTROL, val);
spin_unlock_irqrestore(&isp116x->lock, flags);
/* Wait for devices to suspend */
mdelay(5);
case HCCONTROL_USB_SUSPEND:
msleep(5);
break;
case HCCONTROL_USB_RESUME:
isp116x_write_reg32(isp116x, HCCONTROL,
(val & ~HCCONTROL_HCFS) |
HCCONTROL_USB_RESET);
case HCCONTROL_USB_RESET:
ret = -EBUSY;
default: /* HCCONTROL_USB_SUSPEND */
spin_unlock_irqrestore(&isp116x->lock, flags);
break;
default:
ret = -EINVAL;
}

spin_unlock_irqrestore(&isp116x->lock, flags);
return ret;
}

Expand Down Expand Up @@ -1715,9 +1716,9 @@ static struct platform_driver isp116x_driver = {
.remove = isp116x_remove,
.suspend = isp116x_suspend,
.resume = isp116x_resume,
.driver = {
.name = (char *)hcd_name,
},
.driver = {
.name = (char *)hcd_name,
},
};

/*-----------------------------------------------------------------*/
Expand Down

0 comments on commit 425d6d6

Please sign in to comment.