aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorElric Fu <elricfu1@gmail.com>2012-06-27 04:31:52 -0400
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-09-13 18:49:38 -0400
commit6e4468b9a0793dfb53eb80d9fe52c739b13b27fd (patch)
treef6de43852120c65707f0d7c1518a25f052025d1a /drivers/usb/host/xhci.h
parentb92cc66c047ff7cf587b318fe377061a353c120f (diff)
xHCI: cancel command after command timeout
The patch is used to cancel command when the command isn't acknowledged and a timeout occurs. This patch should be backported to kernels as old as 3.0, that contain the commit 7ed603ecf8b68ab81f4c83097d3063d43ec73bb8 "xhci: Add an assertion to check for virt_dev=0 bug." That commit papers over a NULL pointer dereference, and this patch fixes the underlying issue that caused the NULL pointer dereference. 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index fdfcebf342e8..e81ccfa3552f 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1256,6 +1256,9 @@ struct xhci_td {
1256 union xhci_trb *last_trb; 1256 union xhci_trb *last_trb;
1257}; 1257};
1258 1258
1259/* xHCI command default timeout value */
1260#define XHCI_CMD_DEFAULT_TIMEOUT (5 * HZ)
1261
1259/* command descriptor */ 1262/* command descriptor */
1260struct xhci_cd { 1263struct xhci_cd {
1261 struct list_head cancel_cmd_list; 1264 struct list_head cancel_cmd_list;