diff options
author | Elric Fu <elricfu1@gmail.com> | 2012-06-27 16:31:52 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-28 10:02:14 -0700 |
commit | 4b360f4937e646f777a3049c65124056c84c6977 (patch) | |
tree | fb4bbaf3b25b1743236e7284edf872f3d28b5d89 /drivers/usb/host/xhci.h | |
parent | bc47204b268516ae4085ebdc81a34ddda71b77c4 (diff) | |
download | kernel_samsung_smdk4412-4b360f4937e646f777a3049c65124056c84c6977.zip kernel_samsung_smdk4412-4b360f4937e646f777a3049c65124056c84c6977.tar.gz kernel_samsung_smdk4412-4b360f4937e646f777a3049c65124056c84c6977.tar.bz2 |
xHCI: cancel command after command timeout
commit 6e4468b9a0793dfb53eb80d9fe52c739b13b27fd upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r-- | drivers/usb/host/xhci.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index a94bf29..17d1253 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1111,6 +1111,9 @@ struct xhci_td { union xhci_trb *last_trb; }; +/* xHCI command default timeout value */ +#define XHCI_CMD_DEFAULT_TIMEOUT (5 * HZ) + /* command descriptor */ struct xhci_cd { struct list_head cancel_cmd_list; |