aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2009-07-13 19:23:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:29 -0400
commit3807e26d69b9ad3864fe03224ebebc9610d5802e (patch)
tree3c85a5cb0686a7e72255c523b963942bbfc60b7f /drivers/usb/host/ehci-hcd.c
parent403dbd36739e344d2d25f56ebbe342248487bd48 (diff)
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 <alek.du@intel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> CC: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 2dc15f3ad143..7bee1638dfd7 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -507,6 +507,7 @@ static int ehci_init(struct usb_hcd *hcd)
507 u32 temp; 507 u32 temp;
508 int retval; 508 int retval;
509 u32 hcc_params; 509 u32 hcc_params;
510 struct ehci_qh_hw *hw;
510 511
511 spin_lock_init(&ehci->lock); 512 spin_lock_init(&ehci->lock);
512 513
@@ -550,12 +551,13 @@ static int ehci_init(struct usb_hcd *hcd)
550 * from automatically advancing to the next td after short reads. 551 * from automatically advancing to the next td after short reads.
551 */ 552 */
552 ehci->async->qh_next.qh = NULL; 553 ehci->async->qh_next.qh = NULL;
553 ehci->async->hw_next = QH_NEXT(ehci, ehci->async->qh_dma); 554 hw = ehci->async->hw;
554 ehci->async->hw_info1 = cpu_to_hc32(ehci, QH_HEAD); 555 hw->hw_next = QH_NEXT(ehci, ehci->async->qh_dma);
555 ehci->async->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); 556 hw->hw_info1 = cpu_to_hc32(ehci, QH_HEAD);
556 ehci->async->hw_qtd_next = EHCI_LIST_END(ehci); 557 hw->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT);
558 hw->hw_qtd_next = EHCI_LIST_END(ehci);
557 ehci->async->qh_state = QH_STATE_LINKED; 559 ehci->async->qh_state = QH_STATE_LINKED;
558 ehci->async->hw_alt_next = QTD_NEXT(ehci, ehci->async->dummy->qtd_dma); 560 hw->hw_alt_next = QTD_NEXT(ehci, ehci->async->dummy->qtd_dma);
559 561
560 /* clear interrupt enables, set irq latency */ 562 /* clear interrupt enables, set irq latency */
561 if (log2_irq_thresh < 0 || log2_irq_thresh > 6) 563 if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
@@ -985,7 +987,7 @@ rescan:
985 /* endpoints can be iso streams. for now, we don't 987 /* endpoints can be iso streams. for now, we don't
986 * accelerate iso completions ... so spin a while. 988 * accelerate iso completions ... so spin a while.
987 */ 989 */
988 if (qh->hw_info1 == 0) { 990 if (qh->hw->hw_info1 == 0) {
989 ehci_vdbg (ehci, "iso delay\n"); 991 ehci_vdbg (ehci, "iso delay\n");
990 goto idle_timeout; 992 goto idle_timeout;
991 } 993 }