]> git.baikalelectronics.ru Git - kernel.git/commit
xHCI: count free TRBs on transfer ring
authorAndiry Xu <andiry.xu@amd.com>
Mon, 5 Mar 2012 09:49:34 +0000 (17:49 +0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 13 Mar 2012 16:29:55 +0000 (09:29 -0700)
commit909822e370bb74382c0029e1ef6d6972bd91e7e3
tree05a59c4a4d8d624b18ad0844949841f36b241c17
parentc0a82e62923c1c4b8aa7f238d6b3ce48cbf44286
xHCI: count free TRBs on transfer ring

In the past, the room_on_ring() check was implemented by walking all over
the ring, which is wasteful and complicated.

Count the number of free TRBs instead. The free TRBs number should be
updated when enqueue/dequeue pointer is updated, or upon the completion
of a set dequeue pointer command.

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