summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2016-11-11 16:13:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-14 12:18:23 +0300
commitc2d3d49bba0889f42e4753651d103f7ba74fbaf1 (patch)
tree02a2cb8ee6c534f13a2263faae4c0f30b0587491 /drivers/usb/host/xhci.h
parent87e44f2aac8d45c1e48c94017942fa10037daae0 (diff)
downloadlinux-c2d3d49bba0889f42e4753651d103f7ba74fbaf1.tar.xz
usb: xhci: move slot_id from xhci_hcd to xhci_command structure
xhci->slot_id is used for providing a way to pass slot id from the command completion handler to the function waiting for completion. It's shared by enumerations of all USB devices connected to an xhci host. Hence, it's a source for possible races. Since we've introduced command structure and the command queue to xhci driver. It's better to move slot_id from xhci_hcd structure to xhci_command structure. Hence the race source is removed. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index f24ae0ac12ae..266e3a86b6b4 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -791,6 +791,7 @@ struct xhci_command {
/* Input context for changing device state */
struct xhci_container_ctx *in_ctx;
u32 status;
+ int slot_id;
/* If completion is null, no one is waiting on this command
* and the structure can be freed after the command completes.
*/
@@ -1584,7 +1585,6 @@ struct xhci_hcd {
/* slot enabling and address device helpers */
/* these are not thread safe so use mutex */
struct mutex mutex;
- int slot_id;
/* For USB 3.0 LPM enable/disable. */
struct xhci_command *lpm_command;
/* Internal mirror of the HW's dcbaa */