From 3807e26d69b9ad3864fe03224ebebc9610d5802e Mon Sep 17 00:00:00 2001 From: Alek Du Date: Tue, 14 Jul 2009 07:23:29 +0800 Subject: USB: EHCI: split ehci_qh into hw and sw parts The ehci_qh structure merged hw and sw together which is not good: 1. More and more items are being added into ehci_qh, the ehci_qh software part are unnecessary to be allocated in DMA qh_pool. 2. If HCD has local SRAM, the sw part will consume it too, and it won't bring any benefit. 3. For non-cache-coherence system, the entire ehci_qh is uncachable, actually we only need the hw part to be uncacheable. Spliting them will let the sw part to be cacheable. Signed-off-by: Alek Du Cc: David Brownell CC: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/usb/host/ehci.h') diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index acec1089407..fa12f20fbfe 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -299,8 +299,8 @@ union ehci_shadow { * These appear in both the async and (for interrupt) periodic schedules. */ -struct ehci_qh { - /* first part defined by EHCI spec */ +/* first part defined by EHCI spec */ +struct ehci_qh_hw { __hc32 hw_next; /* see EHCI 3.6.1 */ __hc32 hw_info1; /* see EHCI 3.6.2 */ #define QH_HEAD 0x00008000 @@ -318,7 +318,10 @@ struct ehci_qh { __hc32 hw_token; __hc32 hw_buf [5]; __hc32 hw_buf_hi [5]; +} __attribute__ ((aligned(32))); +struct ehci_qh { + struct ehci_qh_hw *hw; /* the rest is HCD-private */ dma_addr_t qh_dma; /* address of qh */ union ehci_shadow qh_next; /* ptr to qh; or periodic */ @@ -358,7 +361,7 @@ struct ehci_qh { struct usb_device *dev; /* access to TT */ unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ -} __attribute__ ((aligned (32))); +}; /*-------------------------------------------------------------------------*/ -- cgit v1.2.3-70-g09d2