aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-09 00:27:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-09 00:27:51 -0400
commit141dc40ee343ab532717b235dd645e2d25ae3092 (patch)
tree2289e5d1ec20df5e465b9b629e291877f4d70485 /drivers/usb/host/xhci-mem.c
parent1c83d94ff646001f9ee83f0330a3933b55660927 (diff)
parent317ddd256b9c24b0d78fa8018f80f1e495481a10 (diff)
Merge 3.10-rc5 into usb-next
We need the changes in this branch. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 832f05ede427..8c0e119efa4e 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1827,6 +1827,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1827 } 1827 }
1828 spin_unlock_irqrestore(&xhci->lock, flags); 1828 spin_unlock_irqrestore(&xhci->lock, flags);
1829 1829
1830 if (!xhci->rh_bw)
1831 goto no_bw;
1832
1830 num_ports = HCS_MAX_PORTS(xhci->hcs_params1); 1833 num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
1831 for (i = 0; i < num_ports; i++) { 1834 for (i = 0; i < num_ports; i++) {
1832 struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; 1835 struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table;
@@ -1845,6 +1848,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1845 } 1848 }
1846 } 1849 }
1847 1850
1851no_bw:
1848 xhci->num_usb2_ports = 0; 1852 xhci->num_usb2_ports = 0;
1849 xhci->num_usb3_ports = 0; 1853 xhci->num_usb3_ports = 0;
1850 xhci->num_active_eps = 0; 1854 xhci->num_active_eps = 0;
@@ -2281,6 +2285,9 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2281 u32 page_size, temp; 2285 u32 page_size, temp;
2282 int i; 2286 int i;
2283 2287
2288 INIT_LIST_HEAD(&xhci->lpm_failed_devs);
2289 INIT_LIST_HEAD(&xhci->cancel_cmd_list);
2290
2284 page_size = xhci_readl(xhci, &xhci->op_regs->page_size); 2291 page_size = xhci_readl(xhci, &xhci->op_regs->page_size);
2285 xhci_dbg(xhci, "Supported page size register = 0x%x\n", page_size); 2292 xhci_dbg(xhci, "Supported page size register = 0x%x\n", page_size);
2286 for (i = 0; i < 16; i++) { 2293 for (i = 0; i < 16; i++) {
@@ -2359,7 +2366,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2359 xhci->cmd_ring = xhci_ring_alloc(xhci, 1, 1, TYPE_COMMAND, flags); 2366 xhci->cmd_ring = xhci_ring_alloc(xhci, 1, 1, TYPE_COMMAND, flags);
2360 if (!xhci->cmd_ring) 2367 if (!xhci->cmd_ring)
2361 goto fail; 2368 goto fail;
2362 INIT_LIST_HEAD(&xhci->cancel_cmd_list);
2363 xhci_dbg(xhci, "Allocated command ring at %p\n", xhci->cmd_ring); 2369 xhci_dbg(xhci, "Allocated command ring at %p\n", xhci->cmd_ring);
2364 xhci_dbg(xhci, "First segment DMA is 0x%llx\n", 2370 xhci_dbg(xhci, "First segment DMA is 0x%llx\n",
2365 (unsigned long long)xhci->cmd_ring->first_seg->dma); 2371 (unsigned long long)xhci->cmd_ring->first_seg->dma);
@@ -2470,8 +2476,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2470 if (xhci_setup_port_arrays(xhci, flags)) 2476 if (xhci_setup_port_arrays(xhci, flags))
2471 goto fail; 2477 goto fail;
2472 2478
2473 INIT_LIST_HEAD(&xhci->lpm_failed_devs);
2474
2475 /* Enable USB 3.0 device notifications for function remote wake, which 2479 /* Enable USB 3.0 device notifications for function remote wake, which
2476 * is necessary for allowing USB 3.0 devices to do remote wakeup from 2480 * is necessary for allowing USB 3.0 devices to do remote wakeup from
2477 * U3 (device suspend). 2481 * U3 (device suspend).