aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorElric Fu <elricfu1@gmail.com>2012-06-27 04:30:57 -0400
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-09-13 18:46:41 -0400
commitc181bc5b5d5c79b71203cd10cef97f802fb6f9c1 (patch)
treef6378b3d7c7cbef225674a56dcb94d0063b6ffd2 /drivers/usb/host/xhci.h
parentc2d57aec81f3d479642523fd4d3537006168c240 (diff)
xHCI: add cmd_ring_state
Adding cmd_ring_state for command ring. It helps to verify the current command ring state for controlling the command ring operations. This patch should be backported to kernels as old as 3.0. The commit 7ed603ecf8b68ab81f4c83097d3063d43ec73bb8 "xhci: Add an assertion to check for virt_dev=0 bug." papers over the NULL pointer dereference that I now believe is related to a timed out Set Address command. This (and the four patches that follow it) contain the real fix that also allows VIA USB 3.0 hubs to consistently re-enumerate during the plug/unplug stress tests. Signed-off-by: Elric Fu <elricfu1@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Miroslav Sabljic <miroslav.sabljic@avl.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index c713256297ac..33f24e9fa766 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1421,6 +1421,10 @@ struct xhci_hcd {
1421 /* data structures */ 1421 /* data structures */
1422 struct xhci_device_context_array *dcbaa; 1422 struct xhci_device_context_array *dcbaa;
1423 struct xhci_ring *cmd_ring; 1423 struct xhci_ring *cmd_ring;
1424 unsigned int cmd_ring_state;
1425#define CMD_RING_STATE_RUNNING (1 << 0)
1426#define CMD_RING_STATE_ABORTED (1 << 1)
1427#define CMD_RING_STATE_STOPPED (1 << 2)
1424 unsigned int cmd_ring_reserved_trbs; 1428 unsigned int cmd_ring_reserved_trbs;
1425 struct xhci_ring *event_ring; 1429 struct xhci_ring *event_ring;
1426 struct xhci_erst erst; 1430 struct xhci_erst erst;