Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10775
b: refs/heads/master
c: b13296c
h: refs/heads/master
i:
  10773: bef9ba6
  10771: 6801eaa
  10767: d53ed56
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent d5ae2bc commit 568e99b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 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: 5edbfb7c8af0577097dae87cdd4dfdba82bb9579
refs/heads/master: b13296c6617f22e8c0174a7af32780617db0e680
28 changes: 12 additions & 16 deletions trunk/drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,22 +458,18 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)

default:
/* non-generic request */
if (HC_IS_SUSPENDED (hcd->state))
status = -EAGAIN;
else {
switch (typeReq) {
case GetHubStatus:
case GetPortStatus:
len = 4;
break;
case GetHubDescriptor:
len = sizeof (struct usb_hub_descriptor);
break;
}
status = hcd->driver->hub_control (hcd,
typeReq, wValue, wIndex,
tbuf, wLength);
switch (typeReq) {
case GetHubStatus:
case GetPortStatus:
len = 4;
break;
case GetHubDescriptor:
len = sizeof (struct usb_hub_descriptor);
break;
}
status = hcd->driver->hub_control (hcd,
typeReq, wValue, wIndex,
tbuf, wLength);
break;
error:
/* "protocol stall" on error */
Expand All @@ -487,7 +483,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
"CTRL: TypeReq=0x%x val=0x%x "
"idx=0x%x len=%d ==> %d\n",
typeReq, wValue, wIndex,
wLength, urb->status);
wLength, status);
}
}
if (len) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/usb/core/urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
(dev->state < USB_STATE_DEFAULT) ||
(!dev->bus) || (dev->devnum <= 0))
return -ENODEV;
if (dev->state == USB_STATE_SUSPENDED)
if (dev->bus->controller->power.power_state.event != PM_EVENT_ON
|| dev->state == USB_STATE_SUSPENDED)
return -EHOSTUNREACH;
if (!(op = dev->bus->op) || !op->submit_urb)
return -ENODEV;
Expand Down

0 comments on commit 568e99b

Please sign in to comment.