Hi Konrad,
On 4/26/23 12:17, 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@xxxxxxxxxxx>
---
V1 -> V2: Fixed checkpatch.pl warnings
When sending a new version, please use the -v option of git format-patch
to add the v2 prefix in the [PATCH] header, see
https://lore.kernel.org/lkml/20230417065005.24967-1-yu.tu@xxxxxxxxxxx/
(here a v7).
c.f.
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#the-canonical-patch-format
Additionally, please use scripts/get_maintainer.pl on your patch to know
who to put in the recipient list, here you're missing
linux-kernel@xxxxxxxxxxxxxxx which is always added. If I'm not mistaken,
it's basically used for archival purposes but also so people don't have
to subscribe or search through all mailing list to know what's going on
globally in the kernel community.
drivers/usb/gadget/function/u_ether.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
The patch should be the mail body and not attached, git send-email
should be able to get you through the hoops. I've seen
https://git-send-email.io/ mentioned in various places so maybe that
could help you get started.
See
https://lore.kernel.org/lkml/20230417065005.24967-2-yu.tu@xxxxxxxxxxx/
and yours:
https://lore.kernel.org/all/f147dabd-5c39-31c2-0ff0-f72745d7cd3f@xxxxxxxxxxx/
In yours, you can see
"""
[-- Attachment #1.1.2:
0001-usb-gadget-u_ether-Fix-host-MAC-address-case.patch --]
[-- Type: text/x-patch, Size: 812 bytes --]
"""
this is not good.
The point of the mailing list patch submission process is to allow
in-line review, people will typically comment in-line directly, see
https://lore.kernel.org/lkml/20230426111358.xh3gbhlvxj46ggi5@CAB-WSD-L081021/
for example. Adding the patch as an attachment doesn't allow this review
process to happen. There also are a few robots applying patches directly
from the various mailing lists and running some build tests
automatically, I am not sure they are developed with patch as an
attachment in mind.
c.f.
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#no-mime-no-links-no-compression-no-attachments-just-plain-text
For the "i'm not so sure" part of my mail now.
I don't know if this matches stable backport policy but I believe it
could/should. So maybe add:
"""
Cc: stable@xxxxxxxxxxxxxxx
"""
before your Signed-off-by, c.f.
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
I think you should add:
"""
Fixes: bcd4a1c40bee ("usb: gadget: u_ether: construct with default
values and add setters/getters")
"""
since (I believe) this is fixing an issue introduced in that commit.
c.f.
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes
and
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
Cheers,
Quentin