Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253286
b: refs/heads/master
c: 001fd38
h: refs/heads/master
v: v3
  • Loading branch information
Maarten Lankhorst authored and Sarah Sharp committed Jun 2, 2011
1 parent 4443110 commit 343ac80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2b0217715c6d10379d94bdfe5560af96eecbb7c
refs/heads/master: 001fd3826f4c736ce292315782d015f768399080
7 changes: 7 additions & 0 deletions trunk/drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2467,6 +2467,7 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
struct xhci_command *reset_device_cmd;
int timeleft;
int last_freed_endpoint;
struct xhci_slot_ctx *slot_ctx;

ret = xhci_check_args(hcd, udev, NULL, 0, false, __func__);
if (ret <= 0)
Expand Down Expand Up @@ -2499,6 +2500,12 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
return -EINVAL;
}

/* If device is not setup, there is no point in resetting it */
slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
if (GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state)) ==
SLOT_STATE_DISABLED)
return 0;

xhci_dbg(xhci, "Resetting device with slot ID %u\n", slot_id);
/* Allocate the command structure that holds the struct completion.
* Assume we're in process context, since the normal device reset
Expand Down

0 comments on commit 343ac80

Please sign in to comment.