diff options
Diffstat (limited to 'drivers/usb/host/xhci.c')
| -rw-r--r-- | drivers/usb/host/xhci.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 01fcbb5eb06e..c50d8d202618 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
| @@ -3803,6 +3803,15 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev, | |||
| 3803 | return -EINVAL; | 3803 | return -EINVAL; |
| 3804 | } | 3804 | } |
| 3805 | 3805 | ||
| 3806 | if (setup == SETUP_CONTEXT_ONLY) { | ||
| 3807 | slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx); | ||
| 3808 | if (GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state)) == | ||
| 3809 | SLOT_STATE_DEFAULT) { | ||
| 3810 | xhci_dbg(xhci, "Slot already in default state\n"); | ||
| 3811 | return 0; | ||
| 3812 | } | ||
| 3813 | } | ||
| 3814 | |||
| 3806 | command = xhci_alloc_command(xhci, false, false, GFP_KERNEL); | 3815 | command = xhci_alloc_command(xhci, false, false, GFP_KERNEL); |
| 3807 | if (!command) | 3816 | if (!command) |
| 3808 | return -ENOMEM; | 3817 | return -ENOMEM; |
