Messages in this thread | | | Date | Tue, 07 Apr 2015 17:23:29 +0300 | From | Mathias Nyman <> | Subject | Re: [PATCH 1/5] usb: xhci: cleanup xhci_hcd allocation |
| |
Hi
On 02.04.2015 15:23, Roger Quadros wrote: > HCD core allocates memory for HCD private data in > usb_create_[shared_]hcd() so make use of that > mechanism to allocate the struct xhci_hcd. > > Introduce struct xhci_driver_overrides to provide > the size of HCD private data and hc_driver operation > overrides. As of now we only need to override the > reset and start methods. > > Signed-off-by: Roger Quadros <rogerq@ti.com>
I'm not sure I fully understand the what's going on, or what the intention of this patch is.
So currently xhci driver manages the allocation and freeing of the xhci_hcd structure. We store a pointer to the xhci_hcd structure in the content of both the primary and shared usb_hcds structures hcd_priv field.
With this patch xhci would be part of the usb_hcd structure, starting at hcd_priv[0]. (Like EHCI I think) It allocates enough space to include the xhci_hcd in both the primary and shared usb_hcd, but always only use the one in the primary hcd. I'm not sure what to do with the space allocated for the shared hcd's hcd_priv field.
This also means that xhci goes away together with the primary hcd. It's possible this has some impact as the xhci driver expects xhci to always exists.
-Mathias
| |