aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 71121d99235d..8d6bdf2f8015 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -235,7 +235,10 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
235 return 0; 235 return 0;
236 dev = xhci->devs[slot_id]; 236 dev = xhci->devs[slot_id];
237 237
238 /* Allocate the (output) device context that will be used in the HC */ 238 /* Allocate the (output) device context that will be used in the HC.
239 * The structure is 32 bytes smaller than the input context, but that's
240 * fine.
241 */
239 dev->out_ctx = dma_pool_alloc(xhci->device_pool, flags, &dma); 242 dev->out_ctx = dma_pool_alloc(xhci->device_pool, flags, &dma);
240 if (!dev->out_ctx) 243 if (!dev->out_ctx)
241 goto fail; 244 goto fail;
@@ -260,16 +263,12 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
260 263
261 init_completion(&dev->cmd_completion); 264 init_completion(&dev->cmd_completion);
262 265
263 /* 266 /* Point to output device context in dcbaa. */
264 * Point to output device context in dcbaa; skip the output control 267 xhci->dcbaa->dev_context_ptrs[slot_id] = dev->out_ctx_dma;
265 * context, which is eight 32 bit fields (or 32 bytes long)
266 */
267 xhci->dcbaa->dev_context_ptrs[slot_id] =
268 (u32) dev->out_ctx_dma + (32);
269 xhci_dbg(xhci, "Set slot id %d dcbaa entry %p to 0x%llx\n", 268 xhci_dbg(xhci, "Set slot id %d dcbaa entry %p to 0x%llx\n",
270 slot_id, 269 slot_id,
271 &xhci->dcbaa->dev_context_ptrs[slot_id], 270 &xhci->dcbaa->dev_context_ptrs[slot_id],
272 (unsigned long long)dev->out_ctx_dma); 271 (unsigned long long) xhci->dcbaa->dev_context_ptrs[slot_id]);
273 272
274 return 1; 273 return 1;
275fail: 274fail: