All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andreas Bauer <andreas.bauer.nexus@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: gadget/legacy/ether: assume saner default power mode
Date: Thu, 16 Sep 2021 17:36:30 +0200	[thread overview]
Message-ID: <YUNkfp1kxOtfU4pX@kroah.com> (raw)
In-Reply-To: <YUNbDyoTPa+5J9Od@ws2>

On Thu, Sep 16, 2021 at 09:56:15PM +0700, Andreas Bauer wrote:
> 
> I propose the included patch to the OTG USB ethernet gadget code:
> 
>   Report default of bus powered and 500mA bMaxPower consumption.
> 
> Reason:
> 
>   The USB spec requires all devices consuming more than 100mA from
>   the bus to report in this manner. Devices such as Rpi Zero can operate
>   in this mode and will then falsly report being self-powered when they
>   are not.
> 
>   The more sane default is to report being 500mA bus-powered than being
>   self-powered
> 
> This patch was born from an issue within the Raspberry Pi Zero ecosystem,
> therefore I would invite comment regarding other usage of this OTG code.
> 
> Best regards,
> 
> Andreas
> 
> $ diff -u linux-5.14.2/drivers/usb/gadget/legacy/ether.c.orig linux-5.14.2/drivers/usb/gadget/legacy/ether.c
> --- linux-5.14.2/drivers/usb/gadget/legacy/ether.c.orig	2021-09-08 13:52:41.000000000 +0700
> +++ linux-5.14.2/drivers/usb/gadget/legacy/ether.c	2021-09-16 21:25:06.782958554 +0700
> @@ -296,7 +296,8 @@
>  	/* .label = f(hardware) */
>  	.bConfigurationValue	= 1,
>  	/* .iConfiguration = DYNAMIC */
> -	.bmAttributes		= USB_CONFIG_ATT_SELFPOWER,
> +	.bmAttributes		= 0,   /* bus powered implied */
> +	.bMaxPower		= 250, /* 500mA in 2mA units */
>  };
>  
>  /*-------------------------------------------------------------------------*/

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/SubmittingPatches and resend it after
  adding that line.  Note, the line needs to be in the body of the
  email, before the patch, not at the bottom of the patch or in the
  email signature.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

  reply	other threads:[~2021-09-16 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 14:56 [PATCH] usb: gadget/legacy/ether: assume saner default power mode Andreas Bauer
2021-09-16 15:36 ` Greg KH [this message]
2021-09-17  5:28 ` Felipe Balbi
2021-09-17  7:15   ` Andreas Bauer
2021-09-17  8:29     ` Felipe Balbi
2021-09-17 17:12       ` Andreas Bauer

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=YUNkfp1kxOtfU4pX@kroah.com \
    --to=greg@kroah.com \
    --cc=andreas.bauer.nexus@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.