usb: xhci: decouple allocation and initialization
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest11 patches 2 repliesIn review
- v111 patches 1 replySuperseded
Changes in v2 from the cover letter
* Add "Array" to "Set Device Context Base Address pointer" comment.
* Rebase on top of the recently accepted sideband series to resolve some conflicts. The rebase impacts commits 8 and 9.
There will be duplicate code in xhci_create_secondary_interrupter(). Since I have another patch set pending that slightly impacts this function, I have decided to hold off on reworking or cleaning up the function.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | usb: xhci: relocate pre-allocation initializationdrivers/ drivers/ | +26 | 0 replies | |
| 2/11 | usb: xhci: move device slot enabling register writedrivers/ drivers/ | +22 | 0 replies | |
| 3/11 | usb: xhci: move command ring pointer writedrivers/ drivers/ | +20 | 1 reply | |
| 4/11 | usb: xhci: refactor xhci_set_cmd_ring_deq()drivers/ drivers/ | +18 | 0 replies | |
| 5/11 | usb: xhci: move DCBAA pointer writedrivers/ drivers/ | +3 | 0 replies | |
| 6/11 | usb: xhci: move doorbell array pointer assignmentdrivers/ drivers/ drivers/ | +15 | 1 reply | |
| 7/11 | usb: xhci: move enabling of USB 3 device notificationsdrivers/ drivers/ drivers/ | +18 | 0 replies | |
| 8/11 | usb: xhci: remove error handling from xhci_add_interrupter()drivers/ | +8 | 0 replies | |
| 9/11 | usb: xhci: move initialization of the primary interrupterdrivers/ drivers/ drivers/ | +14 | 0 replies | |
| 10/11 | usb: xhci: add individual allocation checks in xhci_mem_init()drivers/ | +9 | 0 replies | |
| 11/11 | usb: xhci: cleanup xhci_mem_init()drivers/ | +23 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/11] usb: xhci: decouple allocation and initialization
Currently, after hibernation (S4 state), the xhci driver frees all its memory and reallocates it from scratch, which is inefficient. Instead, much of the memory can be simply re-initialized.
The proposed changes begin the process by decoupling initialization code from memory allocation code. Specifically, the initialization code is moved from xhci_mem_init() into separate functions, which are then called from xhci_init().
By implementing these changes, future patches will be able to call the initialization functions directly after hibernation, thereby improving efficiency and enhancing code structure.
v2:
* Add "Array" to "Set Device Context Base Address pointer" comment.
* Rebase on top of the recently accepted sideband series to resolve some conflicts. The rebase impacts commits 8 and 9.
There will be duplicate code in xhci_create_secondary_interrupter(). Since I have another patch set pending that slightly impacts this function, I have decided to hold off on reworking or cleaning up the function.
Niklas Neronin (11):
usb: xhci: relocate pre-allocation initialization
usb: xhci: move device slot enabling register write
usb: xhci: move command ring pointer write
usb: xhci: refactor xhci_set_cmd_ring_deq()
usb: xhci: move DCBAA pointer write
usb: xhci: move doorbell array pointer assignment
usb: xhci: move enabling of USB 3 device notifications
usb: xhci: remove error handling from xhci_add_interrupter()
usb: xhci: move initialization of the primary interrupter
usb: xhci: add individual allocation checks in xhci_mem_init()
usb: xhci: cleanup xhci_mem_init()
drivers/usb/host/xhci-caps.h | 4 +- drivers/usb/host/xhci-mem.c | 168 ++++++++++------------------------- drivers/usb/host/xhci.c | 126 +++++++++++++++++++++----- drivers/usb/host/xhci.h | 12 +-- 4 files changed, 159 insertions(+), 151 deletions(-)
Signature · 1 line
2.47.2