All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Konrad Gräfe" <k.graefe@gateware.de>
Cc: linux-usb@vger.kernel.org, quentin.schulz@theobroma-systems.com
Subject: Re: [PATCH] usb: gadget: u_ether: Fix host MAC address case
Date: Wed, 26 Apr 2023 13:49:28 +0200	[thread overview]
Message-ID: <2023042625-rendition-distort-fe06@gregkh> (raw)
In-Reply-To: <d62f5a2b-ec47-6cee-4cf1-0d1ea18dee56@gateware.de>

On Wed, Apr 26, 2023 at 12:17:53PM +0200, Konrad Gräfe wrote:
> 
> As the CDC-ECM specification states the host MAC address must be sent to
> the host as an uppercase hexadecimal string:
>     The Unicode character is chosen from the set of values 30h through
>     39h and 41h through 46h (0-9 and A-F).
> 
> However, snprintf(.., "%pm", ..) generates a lowercase MAC address
> string. While most host drivers are tolerant to this, UsbNcm.sys on
> Windows 10 is not. Instead it uses a different MAC address with all
> bytes set to zero including and after the first byte containing a
> lowercase letter. On Windows 11 Microsoft fixed it, but apparently they
> did not backport the fix.
> 
> This change fixes the issue by upper-casing the MAC to comply with the
> specification.
> 
> Signed-off-by: Konrad Gräfe <k.graefe@gateware.de>
> ---
> V1 -> V2: Fixed checkpatch.pl warnings

There is no "v2" in the subject line, so our tools will get confused and
have no idea this is a newer patch.

Please fix up and send a v3?

>  	snprintf(host_addr, len, "%pm", dev->host_mac);

Is there no option to print a mac address with all uppercase?  If not,
why not add that instead as it's needed here and maybe other places,
right?

thanks,

greg k-h

  parent reply	other threads:[~2023-04-26 11:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 13:15 [PATCH] usb: gadget: u_ether: Fix host MAC address case Konrad Gräfe
2023-04-25 13:37 ` Greg KH
2023-04-26 10:17   ` Konrad Gräfe
2023-04-26 11:49     ` Quentin Schulz
2023-04-26 11:49     ` Greg KH [this message]
2023-04-27 11:51       ` [PATCH v3 1/2] vsprintf: Add %p[mM]U for uppercase MAC address Konrad Gräfe
2023-04-27 11:51         ` [PATCH v3 2/2] usb: gadget: u_ether: Fix host MAC address case Konrad Gräfe
2023-04-28  6:49           ` [PATCH v4 1/2] vsprintf: Add %p[mM]U for uppercase MAC address Konrad Gräfe
2023-04-28  6:49             ` [PATCH v4 2/2] usb: gadget: u_ether: Fix host MAC address case Konrad Gräfe
2023-05-02 20:03             ` [PATCH v4 1/2] vsprintf: Add %p[mM]U for uppercase MAC address Andy Shevchenko
2023-05-05 14:36           ` [PATCH v5] usb: gadget: u_ether: Fix host MAC address case Konrad Gräfe
2023-04-27 12:26         ` [PATCH v3 1/2] vsprintf: Add %p[mM]U for uppercase MAC address Greg Kroah-Hartman
2023-04-27 12:35         ` Rasmus Villemoes
2023-04-27 14:26           ` Konrad Gräfe
2023-04-27 21:30           ` Peter Seiderer
2023-04-28  6:56         ` Rasmus Villemoes
2023-04-28  7:19           ` Greg Kroah-Hartman
2023-04-28  7:46           ` David Laight
2023-05-02 20:01             ` Andy Shevchenko
2023-05-02 12:23           ` Petr Mladek
2023-05-04 13:25             ` Konrad Gräfe
  -- strict thread matches above, loose matches on Subject: below --
2023-04-25 12:58 [PATCH] usb: gadget: u_ether: Fix host MAC address case Konrad Gräfe
2023-04-25 13:04 ` Greg KH

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=2023042625-rendition-distort-fe06@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=k.graefe@gateware.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=quentin.schulz@theobroma-systems.com \
    /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.