mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Johannes Zink <j.zink@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 15/18] usb: gadget: fastboot: Add super speed descriptors
Date: Wed, 22 Mar 2023 09:28:21 +0100	[thread overview]
Message-ID: <e1ff34b699e9d2df04f75d1dc90cffb03d09db06.camel@pengutronix.de> (raw)
In-Reply-To: <20230320152941.3155428-16-s.hauer@pengutronix.de>

Hi Sascha,

there is a small typo in the commit message:

On Mon, 2023-03-20 at 16:29 +0100, Sascha Hauer wrote:
> Add super speed descriptors to the fasboot gadget. These are taken

s/fasboot/fastboot/

Best regards
Johannes

> from
> U-Boot v2023.04-rc4.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  drivers/usb/gadget/function/f_fastboot.c | 34
> +++++++++++++++++++++++-
>  1 file changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/f_fastboot.c
> b/drivers/usb/gadget/function/f_fastboot.c
> index 4e9c373796..4266b78b40 100644
> --- a/drivers/usb/gadget/function/f_fastboot.c
> +++ b/drivers/usb/gadget/function/f_fastboot.c
> @@ -109,6 +109,36 @@ static struct usb_descriptor_header
> *fb_hs_descs[] = {
>         NULL,
>  };
>  
> +static struct usb_endpoint_descriptor ss_ep_in = {
> +       .bLength                = USB_DT_ENDPOINT_SIZE,
> +       .bDescriptorType        = USB_DT_ENDPOINT,
> +       .bEndpointAddress       = USB_DIR_IN,
> +       .bmAttributes           = USB_ENDPOINT_XFER_BULK,
> +       .wMaxPacketSize         = cpu_to_le16(1024),
> +};
> +
> +static struct usb_endpoint_descriptor ss_ep_out = {
> +       .bLength                = USB_DT_ENDPOINT_SIZE,
> +       .bDescriptorType        = USB_DT_ENDPOINT,
> +       .bEndpointAddress       = USB_DIR_OUT,
> +       .bmAttributes           = USB_ENDPOINT_XFER_BULK,
> +       .wMaxPacketSize         = cpu_to_le16(1024),
> +};
> +
> +static struct usb_ss_ep_comp_descriptor fb_ss_bulk_comp_desc = {
> +       .bLength =              sizeof(fb_ss_bulk_comp_desc),
> +       .bDescriptorType =      USB_DT_SS_ENDPOINT_COMP,
> +};
> +
> +static struct usb_descriptor_header *fb_ss_descs[] = {
> +       (struct usb_descriptor_header *)&interface_desc,
> +       (struct usb_descriptor_header *)&ss_ep_in,
> +       (struct usb_descriptor_header *)&fb_ss_bulk_comp_desc,
> +       (struct usb_descriptor_header *)&ss_ep_out,
> +       (struct usb_descriptor_header *)&fb_ss_bulk_comp_desc,
> +       NULL,
> +};
> +
>  /*
>   * static strings, in UTF-8
>   */
> @@ -255,6 +285,8 @@ static int fastboot_bind(struct usb_configuration
> *c, struct usb_function *f)
>  
>         hs_ep_out.bEndpointAddress = fs_ep_out.bEndpointAddress;
>         hs_ep_in.bEndpointAddress = fs_ep_in.bEndpointAddress;
> +       ss_ep_out.bEndpointAddress = fs_ep_out.bEndpointAddress;
> +       ss_ep_in.bEndpointAddress = fs_ep_in.bEndpointAddress;
>  
>         f_fb->out_req = fastboot_alloc_request(f_fb->out_ep);
>         if (!f_fb->out_req) {
> @@ -266,7 +298,7 @@ static int fastboot_bind(struct usb_configuration
> *c, struct usb_function *f)
>         f_fb->out_req->complete = rx_handler_command;
>         f_fb->out_req->context = f_fb;
>  
> -       ret = usb_assign_descriptors(f, fb_fs_descs, fb_hs_descs,
> NULL, NULL);
> +       ret = usb_assign_descriptors(f, fb_fs_descs, fb_hs_descs,
> fb_ss_descs, fb_ss_descs);
>         if (ret)
>                 goto err_free_in_req;
>  

-- 
Pengutronix e.K.                | Johannes Zink                  |
Steuerwalder Str. 21            | https://www.pengutronix.de/    |
31137 Hildesheim, Germany       | Phone: +49-5121-206917-0       |
Amtsgericht Hildesheim, HRA 2686| Fax:   +49-5121-206917-5555    |




  reply	other threads:[~2023-03-22  8:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 15:29 [PATCH 00/18] USB gadget overhaul Sascha Hauer
2023-03-20 15:29 ` [PATCH 01/18] usb: gadget: fastboot: Allocate IN requests when needed Sascha Hauer
2023-03-20 15:29 ` [PATCH 02/18] usb: gadget: drop gadget_chips.h Sascha Hauer
2023-03-20 15:29 ` [PATCH 03/18] usb: gadget: move files to place where Linux has them Sascha Hauer
2023-03-20 15:29 ` [PATCH 04/18] usb: move include " Sascha Hauer
2023-03-20 15:29 ` [PATCH 05/18] usb: ch9: Update from Linux Kernel Sascha Hauer
2023-03-20 15:29 ` [PATCH 06/18] phy: Add mode setting support Sascha Hauer
2023-03-20 15:29 ` [PATCH 07/18] driver: Add unregister_driver() Sascha Hauer
2023-03-20 15:43   ` Ahmad Fatoum
2023-03-21  8:07     ` Sascha Hauer
2023-03-20 15:29 ` [PATCH 08/18] usb: gadget: Update core to Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 09/18] uuid.h: sync with Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 10/18] usb: gadget: Add super-speed-plus descriptors Sascha Hauer
2023-03-20 15:29 ` [PATCH 11/18] usb: gadget: update composite.c from Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 12/18] Add dev_WARN_ONCE() Sascha Hauer
2023-03-20 15:29 ` [PATCH 13/18] usb: dwc3: sync with Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 14/18] usb: gadget: dfu: Assign super speed descriptors Sascha Hauer
2023-03-20 15:29 ` [PATCH 15/18] usb: gadget: fastboot: Add " Sascha Hauer
2023-03-22  8:28   ` Johannes Zink [this message]
2023-03-20 15:29 ` [PATCH 16/18] usb: gadget: mass storage: " Sascha Hauer
2023-03-20 15:29 ` [PATCH 17/18] usb: gadget: u_serial: Put back to list if shutdown Sascha Hauer
2023-03-20 15:29 ` [PATCH 18/18] usb: gadget multi: support USB Super Speed Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1ff34b699e9d2df04f75d1dc90cffb03d09db06.camel@pengutronix.de \
    --to=j.zink@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox