]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xHCI 1.0: Block Interrupts for Isoch transfer
authorAndiry Xu <andiry.xu@amd.com>
Thu, 5 May 2011 10:14:02 +0000 (18:14 +0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 9 May 2011 16:34:47 +0000 (09:34 -0700)
Currently an isoc URB is divided into multiple TDs, and every TD will
trigger an interrupt when it's processed. However, software can schedule
multiple TDs at a time, and it only needs an interrupt every URB.

xHCI 1.0 introduces the Block Event Interrupt(BEI) flag which allows Normal
and Isoch Transfer TRBs to place an Event TRB on an Event Ring but not
assert an intrrupt to the host, and the interrupt rate is significantly
reduced and the system performance is improved.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h

index 3e759af049b7e2a0b7a3909bb13c0eab8f4350d5..c35058b94de6bb05508e433976336b4de5b46ba5 100644 (file)
@@ -3293,6 +3293,11 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
                        } else {
                                td->last_trb = ep_ring->enqueue;
                                field |= TRB_IOC;
+                               if (xhci->hci_version == 0x100) {
+                                       /* Set BEI bit except for the last td */
+                                       if (i < num_tds - 1)
+                                               field |= TRB_BEI;
+                               }
                                more_trbs_coming = false;
                        }
 
index af8b66f2fd0050d9dc4a08fdd1ecf6fffba72b85..33a49d5d6c224a65593c316903048e40291ff5fa 100644 (file)
@@ -964,6 +964,8 @@ struct xhci_event_cmd {
 /* The buffer pointer contains immediate data */
 #define TRB_IDT                        (1<<6)
 
+/* Block Event Interrupt */
+#define        TRB_BEI                 (1<<9)
 
 /* Control transfer TRB specific fields */
 #define TRB_DIR_IN             (1<<16)