mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Fabian Pflug <f.pflug@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH v2 2/5] usb: core: make usb_set_maxpacket_ep public
Date: Wed, 19 Aug 2026 11:15:14 +0200	[thread overview]
Message-ID: <6693f1b5-f896-4eba-8647-b9902c76c316@pengutronix.de> (raw)
In-Reply-To: <20260817-v2026-06-0-topic-efi_usb-v2-2-3d45c1782ccc@pengutronix.de>


On 8/17/26 10:47 AM, Fabian Pflug wrote:
> The function will be used by the efi usb driver to set the maxpackets
> per endpoint.
> 
> Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/usb/core/usb.c | 12 ++----------
>  drivers/usb/core/usb.h |  2 ++
>  2 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
> index ae87137447..ce10b71f40 100644
> --- a/drivers/usb/core/usb.c
> +++ b/drivers/usb/core/usb.c
> @@ -127,16 +127,8 @@ static int usb_set_configuration(struct usb_device *dev, int configuration)
>  		return res;
>  }
>  
> -/* The routine usb_set_maxpacket_ep() is extracted from the loop of routine
> - * usb_set_maxpacket(), because the optimizer of GCC 4.x chokes on this routine
> - * when it is inlined in 1 single routine. What happens is that the register r3
> - * is used as loop-count 'i', but gets overwritten later on.
> - * This is clearly a compiler bug, but it is easier to workaround it here than
> - * to update the compiler (Occurs with at least several GCC 4.{1,2},x
> - * CodeSourcery compilers like e.g. 2007q3, 2008q1, 2008q3 lite editions on ARM)
> - */
> -static void  noinline
> -usb_set_maxpacket_ep(struct usb_device *dev, struct usb_endpoint_descriptor *ep)
> +void usb_set_maxpacket_ep(struct usb_device *dev,
> +			  struct usb_endpoint_descriptor *ep)
>  {
>  	int b;
>  
> diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
> index 0d4f80c21d..b503e5b4a8 100644
> --- a/drivers/usb/core/usb.h
> +++ b/drivers/usb/core/usb.h
> @@ -6,5 +6,7 @@ struct usb_device *usb_alloc_new_device(void);
>  void usb_free_device(struct usb_device *dev);
>  int usb_new_device(struct usb_device *dev);
>  void usb_remove_device(struct usb_device *dev);
> +void usb_set_maxpacket_ep(struct usb_device *dev,
> +			  struct usb_endpoint_descriptor *ep);
>  
>  #endif /* __CORE_USB_H */
> 

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




  reply	other threads:[~2026-08-19  9:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  8:47 [PATCH v2 0/5] Add support for USB-EFI devices in EFI Playload Fabian Pflug
2026-08-17  8:47 ` [PATCH v2 1/5] efi: usb: add header for usb-efi Fabian Pflug
2026-08-19 10:01   ` Ahmad Fatoum
2026-08-19 13:32     ` Fabian Pflug
2026-08-19 14:03       ` Ahmad Fatoum
2026-08-19 14:11         ` Fabian Pflug
2026-08-17  8:47 ` [PATCH v2 2/5] usb: core: make usb_set_maxpacket_ep public Fabian Pflug
2026-08-19  9:15   ` Ahmad Fatoum [this message]
2026-08-17  8:47 ` [PATCH v2 3/5] drivers: usb: host: efi: add efi io driver Fabian Pflug
2026-08-19 11:04   ` Ahmad Fatoum
2026-08-17  8:47 ` [PATCH v2 4/5] efi: guid: add guid for usb host controller 2 Fabian Pflug
2026-08-19  9:18   ` Ahmad Fatoum
2026-08-17  8:47 ` [PATCH v2 5/5] test: x86: add test for uefi usb io Fabian Pflug
2026-08-19  9:18   ` Ahmad Fatoum

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=6693f1b5-f896-4eba-8647-b9902c76c316@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=f.pflug@pengutronix.de \
    --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