usb: xhci: allocate arrays based on supported slot amount
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | usb: xhci: refactor DCBAA structdrivers/ drivers/ drivers/ +1 more | +32 | 0 replies | |
| 2/3 | usb: xhci: allocate DCBAA based on host controller max slotsdrivers/ drivers/ drivers/ | +7 | 0 replies | |
| 3/3 | usb: xhci: allocate internal DCBAA mirror dynamicallydrivers/ drivers/ drivers/ | +19 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] usb: xhci: allocate arrays based on supported slot amount
The xHCI specification allows for up to 255 device slots, but the actual number of slots supported by the controller may be lower.
Prior to this patch, the xhci driver allocated the devices and device context pointer arrays to 255 slots, regardless of the supported amount. Each entry is 8 bytes, which results in 4080 bytes being allocated even on systems that support far fewer slots.
Address this by allocating these arrays based on the number of slots supported by the controller. This approach is consistent with how the driver already handles allocation for ports and interrupters.
Niklas Neronin (3):
usb: xhci: refactor DCBAA struct
usb: xhci: allocate DCBAA based on host controller max slots
usb: xhci: allocate internal DCBAA mirror dynamically
drivers/usb/host/xhci-mem.c | 54 +++++++++++++++++++++--------------- drivers/usb/host/xhci-ring.c | 6 ++-- drivers/usb/host/xhci.c | 10 +++---- drivers/usb/host/xhci.h | 27 ++++++++++-------- 4 files changed, 54 insertions(+), 43 deletions(-)
Signature · 1 line
2.50.1