aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-hcd.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2009-07-27 15:05:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-28 17:31:13 -0400
commit28c2d2efb48dec2f0b050affae6d5787d6449e47 (patch)
treeaaa5d3617857f0a40b964f85e371207ce761c373 /drivers/usb/host/xhci-hcd.c
parent254c80a3a0eb811489f7410c3291f01a60e8e42f (diff)
USB: xhci: Always align output device contexts to 64 bytes.
Make sure the xHCI output device context is 64-byte aligned. Previous code was using the same structure for both the output device context and the input control context. Since the structure had 32 bytes of flags before the device context, the output device context wouldn't be 64-byte aligned. Define a new structure to use for the output device context and clean up the debugging for these two structures. The copy of the device context in the input control context does *not* need to be 64-byte aligned. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci-hcd.c')
-rw-r--r--drivers/usb/host/xhci-hcd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
index 008326d5bc52..921dd173d793 100644
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -1013,7 +1013,7 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
1013 } 1013 }
1014 1014
1015 xhci_dbg(xhci, "Output context after successful config ep cmd:\n"); 1015 xhci_dbg(xhci, "Output context after successful config ep cmd:\n");
1016 xhci_dbg_ctx(xhci, virt_dev->out_ctx, virt_dev->out_ctx_dma, 1016 xhci_dbg_device_ctx(xhci, virt_dev->out_ctx, virt_dev->out_ctx_dma,
1017 LAST_CTX_TO_EP_NUM(virt_dev->in_ctx->slot.dev_info)); 1017 LAST_CTX_TO_EP_NUM(virt_dev->in_ctx->slot.dev_info));
1018 1018
1019 xhci_zero_in_ctx(virt_dev); 1019 xhci_zero_in_ctx(virt_dev);
@@ -1265,7 +1265,7 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
1265 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); 1265 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);
1266 xhci_dbg_ctx(xhci, virt_dev->in_ctx, virt_dev->in_ctx_dma, 2); 1266 xhci_dbg_ctx(xhci, virt_dev->in_ctx, virt_dev->in_ctx_dma, 2);
1267 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id); 1267 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id);
1268 xhci_dbg_ctx(xhci, virt_dev->out_ctx, virt_dev->out_ctx_dma, 2); 1268 xhci_dbg_device_ctx(xhci, virt_dev->out_ctx, virt_dev->out_ctx_dma, 2);
1269 /* 1269 /*
1270 * USB core uses address 1 for the roothubs, so we add one to the 1270 * USB core uses address 1 for the roothubs, so we add one to the
1271 * address given back to us by the HC. 1271 * address given back to us by the HC.
@@ -1274,9 +1274,6 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
1274 /* Zero the input context control for later use */ 1274 /* Zero the input context control for later use */
1275 virt_dev->in_ctx->add_flags = 0; 1275 virt_dev->in_ctx->add_flags = 0;
1276 virt_dev->in_ctx->drop_flags = 0; 1276 virt_dev->in_ctx->drop_flags = 0;
1277 /* Mirror flags in the output context for future ep enable/disable */
1278 virt_dev->out_ctx->add_flags = SLOT_FLAG | EP0_FLAG;
1279 virt_dev->out_ctx->drop_flags = 0;
1280 1277
1281 xhci_dbg(xhci, "Device address = %d\n", udev->devnum); 1278 xhci_dbg(xhci, "Device address = %d\n", udev->devnum);
1282 /* XXX Meh, not sure if anyone else but choose_address uses this. */ 1279 /* XXX Meh, not sure if anyone else but choose_address uses this. */