Re: [PATCH 1/5] usb: xhci: cleanup xhci_hcd allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux