aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
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.h
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.h')
-rw-r--r--drivers/usb/host/xhci.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 5a09b9a26e0d..d4d3c7777fb8 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -584,15 +584,29 @@ struct xhci_ep_ctx {
584 584
585/** 585/**
586 * struct xhci_device_control 586 * struct xhci_device_control
587 * Input/Output context; see section 6.2.5. 587 * Input context; see section 6.2.5.
588 * 588 *
589 * @drop_context: set the bit of the endpoint context you want to disable 589 * @drop_context: set the bit of the endpoint context you want to disable
590 * @add_context: set the bit of the endpoint context you want to enable 590 * @add_context: set the bit of the endpoint context you want to enable
591 */ 591 */
592struct xhci_device_control { 592struct xhci_device_control {
593 /* Input control context */
593 u32 drop_flags; 594 u32 drop_flags;
594 u32 add_flags; 595 u32 add_flags;
595 u32 rsvd[6]; 596 u32 rsvd[6];
597 /* Copy of device context */
598 struct xhci_slot_ctx slot;
599 struct xhci_ep_ctx ep[31];
600};
601
602/**
603 * struct xhci_device_ctx
604 * Device context; see section 6.2.1.
605 *
606 * @slot: slot context for the device.
607 * @ep: array of endpoint contexts for the device.
608 */
609struct xhci_device_ctx {
596 struct xhci_slot_ctx slot; 610 struct xhci_slot_ctx slot;
597 struct xhci_ep_ctx ep[31]; 611 struct xhci_ep_ctx ep[31];
598}; 612};
@@ -612,7 +626,7 @@ struct xhci_virt_device {
612 * track of input and output contexts separately because 626 * track of input and output contexts separately because
613 * these commands might fail and we don't trust the hardware. 627 * these commands might fail and we don't trust the hardware.
614 */ 628 */
615 struct xhci_device_control *out_ctx; 629 struct xhci_device_ctx *out_ctx;
616 dma_addr_t out_ctx_dma; 630 dma_addr_t out_ctx_dma;
617 /* Used for addressing devices and configuration changes */ 631 /* Used for addressing devices and configuration changes */
618 struct xhci_device_control *in_ctx; 632 struct xhci_device_control *in_ctx;
@@ -1126,6 +1140,7 @@ void xhci_dbg_erst(struct xhci_hcd *xhci, struct xhci_erst *erst);
1126void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci); 1140void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci);
1127void xhci_dbg_ring_ptrs(struct xhci_hcd *xhci, struct xhci_ring *ring); 1141void xhci_dbg_ring_ptrs(struct xhci_hcd *xhci, struct xhci_ring *ring);
1128void xhci_dbg_ctx(struct xhci_hcd *xhci, struct xhci_device_control *ctx, dma_addr_t dma, unsigned int last_ep); 1142void xhci_dbg_ctx(struct xhci_hcd *xhci, struct xhci_device_control *ctx, dma_addr_t dma, unsigned int last_ep);
1143void xhci_dbg_device_ctx(struct xhci_hcd *xhci, struct xhci_device_ctx *ctx, dma_addr_t dma, unsigned int last_ep);
1129 1144
1130/* xHCI memory managment */ 1145/* xHCI memory managment */
1131void xhci_mem_cleanup(struct xhci_hcd *xhci); 1146void xhci_mem_cleanup(struct xhci_hcd *xhci);