xhci: Add a global command queue
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 8 May 2014 16:26:01 +0000 (19:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 May 2014 01:03:25 +0000 (10:03 +0900)
commitc9aa1a2de4cbf7d0db6012fbf86b6ee0c3719470
tree418f09500cbbe216460c77689ea6ac7b18e37714
parentddba5cd0aeff5bbed92ebdf4b1223300b0541e78
xhci: Add a global command queue

Create a list to store command structures, add a structure to it every time
a command is submitted, and remove it from the list once we get a
command completion event matching the command.

Callers that wait for completion will free their command structures themselves.
The other command structures are freed in the command completion event handler.

Also add a check that prevents queuing commands if host is dying

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h