xhci: Store information about roothubs and TTs.
[deliverable/linux.git] / drivers / usb / host / xhci.c
index 7da3b139c8dd0f921db009594a70f4c5ed246abd..1657041c19cf69850ec2fd3724fd0c56d1f73a03 100644 (file)
@@ -2990,6 +2990,14 @@ int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
        }
 
        spin_lock_irqsave(&xhci->lock, flags);
+       if (hdev->speed == USB_SPEED_HIGH &&
+                       xhci_alloc_tt_info(xhci, vdev, hdev, tt, GFP_ATOMIC)) {
+               xhci_dbg(xhci, "Could not allocate xHCI TT structure.\n");
+               xhci_free_command(xhci, config_cmd);
+               spin_unlock_irqrestore(&xhci->lock, flags);
+               return -ENOMEM;
+       }
+
        xhci_slot_copy(xhci, config_cmd->in_ctx, vdev->out_ctx);
        ctrl_ctx = xhci_get_input_control_ctx(xhci, config_cmd->in_ctx);
        ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG);
This page took 0.023777 seconds and 5 git commands to generate.