[PATCH] usb: cdns3: gadget: Configure speed in udc_start
Marek Vasut
marex at denx.de
Wed Jul 19 12:33:38 CEST 2023
On 7/19/23 10:59, Ravi Gunasekaran wrote:
> When one of the functions does not support super speed, the composite
> driver forces the gadget to high speed. But the speed is never
> configured in the cdns3 gadget driver. So configure the speed
> in cdns3_gadget_udc_start just like in the kernel.
>
> Signed-off-by: Ravi Gunasekaran <r-gunasekaran at ti.com>
Is this a patch picked from the kernel ?
Is there a matching kernel commit ID ?
> ---
> drivers/usb/cdns3/gadget.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
> index fcaeab9cc1..cae570cf59 100644
> --- a/drivers/usb/cdns3/gadget.c
> +++ b/drivers/usb/cdns3/gadget.c
> @@ -82,6 +82,9 @@ static int __cdns3_gadget_ep_queue(struct usb_ep *ep,
> struct usb_request *request,
> gfp_t gfp_flags);
>
> +static void cdns3_gadget_udc_set_speed(struct usb_gadget *gadget,
> + enum usb_device_speed speed);
> +
> /**
> * cdns3_set_register_bit - set bit in given register.
> * @ptr: address of device controller register to be read and changed
> @@ -2341,6 +2344,7 @@ static int cdns3_gadget_udc_start(struct usb_gadget *gadget,
>
> spin_lock_irqsave(&priv_dev->lock, flags);
> priv_dev->gadget_driver = driver;
> + cdns3_gadget_udc_set_speed(gadget, gadget->max_speed);
> cdns3_gadget_config(priv_dev);
> spin_unlock_irqrestore(&priv_dev->lock, flags);
> return 0;
>
> base-commit: 76c61f29d63163d178b1584ecc9fc2c96c538ff0
Where did this ^ come from ?
More information about the U-Boot
mailing list