aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
commit3f17ea6dea8ba5668873afa54628a91aaa3fb1c0 (patch)
treeafbeb2accd4c2199ddd705ae943995b143a0af02 /drivers/usb/host/xhci-mem.c
parent1860e379875dfe7271c649058aeddffe5afd9d0d (diff)
parent1a5700bc2d10cd379a795fd2bb377a190af5acd4 (diff)
Merge branch 'next' (accumulated 3.16 merge window patches) into master
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index b1a8a5f4bbb8..8056d90690ee 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1020,7 +1020,6 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
1020 dev->num_rings_cached = 0; 1020 dev->num_rings_cached = 0;
1021 1021
1022 init_completion(&dev->cmd_completion); 1022 init_completion(&dev->cmd_completion);
1023 INIT_LIST_HEAD(&dev->cmd_list);
1024 dev->udev = udev; 1023 dev->udev = udev;
1025 1024
1026 /* Point to output device context in dcbaa. */ 1025 /* Point to output device context in dcbaa. */
@@ -1794,10 +1793,11 @@ void xhci_free_command(struct xhci_hcd *xhci,
1794void xhci_mem_cleanup(struct xhci_hcd *xhci) 1793void xhci_mem_cleanup(struct xhci_hcd *xhci)
1795{ 1794{
1796 struct device *dev = xhci_to_hcd(xhci)->self.controller; 1795 struct device *dev = xhci_to_hcd(xhci)->self.controller;
1797 struct xhci_cd *cur_cd, *next_cd;
1798 int size; 1796 int size;
1799 int i, j, num_ports; 1797 int i, j, num_ports;
1800 1798
1799 del_timer_sync(&xhci->cmd_timer);
1800
1801 /* Free the Event Ring Segment Table and the actual Event Ring */ 1801 /* Free the Event Ring Segment Table and the actual Event Ring */
1802 size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); 1802 size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries);
1803 if (xhci->erst.entries) 1803 if (xhci->erst.entries)
@@ -1816,11 +1816,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1816 xhci_ring_free(xhci, xhci->cmd_ring); 1816 xhci_ring_free(xhci, xhci->cmd_ring);
1817 xhci->cmd_ring = NULL; 1817 xhci->cmd_ring = NULL;
1818 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed command ring"); 1818 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed command ring");
1819 list_for_each_entry_safe(cur_cd, next_cd, 1819 xhci_cleanup_command_queue(xhci);
1820 &xhci->cancel_cmd_list, cancel_cmd_list) {
1821 list_del(&cur_cd->cancel_cmd_list);
1822 kfree(cur_cd);
1823 }
1824 1820
1825 num_ports = HCS_MAX_PORTS(xhci->hcs_params1); 1821 num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
1826 for (i = 0; i < num_ports; i++) { 1822 for (i = 0; i < num_ports; i++) {
@@ -2323,7 +2319,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2323 u32 page_size, temp; 2319 u32 page_size, temp;
2324 int i; 2320 int i;
2325 2321
2326 INIT_LIST_HEAD(&xhci->cancel_cmd_list); 2322 INIT_LIST_HEAD(&xhci->cmd_list);
2327 2323
2328 page_size = readl(&xhci->op_regs->page_size); 2324 page_size = readl(&xhci->op_regs->page_size);
2329 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2325 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
@@ -2509,6 +2505,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2509 "Wrote ERST address to ir_set 0."); 2505 "Wrote ERST address to ir_set 0.");
2510 xhci_print_ir_set(xhci, 0); 2506 xhci_print_ir_set(xhci, 0);
2511 2507
2508 /* init command timeout timer */
2509 init_timer(&xhci->cmd_timer);
2510 xhci->cmd_timer.data = (unsigned long) xhci;
2511 xhci->cmd_timer.function = xhci_handle_command_timeout;
2512
2512 /* 2513 /*
2513 * XXX: Might need to set the Interrupter Moderation Register to 2514 * XXX: Might need to set the Interrupter Moderation Register to
2514 * something other than the default (~1ms minimum between interrupts). 2515 * something other than the default (~1ms minimum between interrupts).