summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-01-30 10:38:15 +0100
committerLinus Walleij <linus.walleij@linaro.org>2015-01-30 10:38:15 +0100
commitb6afdbe8e841e20297a38e2af0a053d8eb26c19b (patch)
tree4a336799dcd7d77a7d1f1e9b46b9e48551053524 /drivers/usb/host/xhci.c
parentpinctrl: zynq: Fix usb0 pins (diff)
parentLinux 3.19-rc6 (diff)
downloadlinux-b6afdbe8e841e20297a38e2af0a053d8eb26c19b.tar.xz
linux-b6afdbe8e841e20297a38e2af0a053d8eb26c19b.zip
Merge tag 'v3.19-rc6' into devel
Linux 3.19-rc6
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c9
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,
return -EINVAL;
}
+ if (setup == SETUP_CONTEXT_ONLY) {
+ slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
+ if (GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state)) ==
+ SLOT_STATE_DEFAULT) {
+ xhci_dbg(xhci, "Slot already in default state\n");
+ return 0;
+ }
+ }
+
command = xhci_alloc_command(xhci, false, false, GFP_KERNEL);
if (!command)
return -ENOMEM;