Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: xhci: move initialization for lifetime objects

Initialize objects that exist for the lifetime of the driver only once,
rather than repeatedly. These objects do not require re-initialization
after events such as S4 (suspend-to-disk).

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260402131342.2628648-10-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Niklas Neronin and committed by
Greg Kroah-Hartman
45484754 e4573f49

+8 -8
-1
drivers/usb/host/xhci-mem.c
··· 2009 2009 xhci->port_caps = NULL; 2010 2010 xhci->interrupters = NULL; 2011 2011 2012 - xhci->page_size = 0; 2013 2012 xhci->usb2_rhub.bus_state.bus_suspended = 0; 2014 2013 xhci->usb3_rhub.bus_state.bus_suspended = 0; 2015 2014 }
+8 -7
drivers/usb/host/xhci.c
··· 549 549 int retval; 550 550 551 551 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Starting %s", __func__); 552 - spin_lock_init(&xhci->lock); 553 - 554 - INIT_LIST_HEAD(&xhci->cmd_list); 555 - INIT_DELAYED_WORK(&xhci->cmd_timer, xhci_handle_command_timeout); 556 - init_completion(&xhci->cmd_ring_stop_completion); 557 - xhci_hcd_page_size(xhci); 558 - memset(xhci->devs, 0, MAX_HC_SLOTS * sizeof(*xhci->devs)); 559 552 560 553 retval = xhci_mem_init(xhci, GFP_KERNEL); 561 554 if (retval) ··· 5524 5531 xhci_dbg(xhci, "Enabling 32-bit DMA addresses.\n"); 5525 5532 dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); 5526 5533 } 5534 + 5535 + spin_lock_init(&xhci->lock); 5536 + INIT_LIST_HEAD(&xhci->cmd_list); 5537 + INIT_DELAYED_WORK(&xhci->cmd_timer, xhci_handle_command_timeout); 5538 + init_completion(&xhci->cmd_ring_stop_completion); 5539 + xhci_hcd_page_size(xhci); 5540 + 5541 + memset(xhci->devs, 0, MAX_HC_SLOTS * sizeof(*xhci->devs)); 5527 5542 5528 5543 xhci_dbg(xhci, "Calling HCD init\n"); 5529 5544 /* Initialize HCD and host controller data structures. */