* Lenovo Hybrid Dock MAC passtrough patch
@ 2023-09-16 11:41 Louis-Marie
2023-09-16 11:51 ` Greg KH
2023-09-16 12:14 ` Bagas Sanjaya
0 siblings, 2 replies; 4+ messages in thread
From: Louis-Marie @ 2023-09-16 11:41 UTC (permalink / raw)
To: linux-usb@vger.kernel.org
Hi,
I would like to submit a patch for enabling mac passtrough for the Lenovo Hybrid Dock.
Tested with Fedora 6.4.12.
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.cindex 0c13d9950cd8..02e6404bf6ea 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -781,6 +781,7 @@ enum rtl8152_flags {
#define DEVICE_ID_THINKPAD_USB_C_DONGLE 0x720c
#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387
#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3 0x3062
+#define DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK 0xa359
struct tally_counter {
__le64 tx_packets;
@@ -9583,6 +9584,7 @@ static bool rtl8152_supports_lenovo_macpassthru(struct usb_device *udev)
case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2:
case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2:
case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3:
+ case DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK:
case DEVICE_ID_THINKPAD_USB_C_DONGLE:
return 1;
}
@@ -9832,6 +9834,7 @@ static const struct usb_device_id rtl8152_table[] = {
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) },
{ USB_DEVICE(VENDOR_ID_LENOVO, 0x721e) },
{ USB_DEVICE(VENDOR_ID_LENOVO, 0xa387) },
+ { USB_DEVICE(VENDOR_ID_LENOVO, 0xa359) },
{ USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) },
{ USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) },
{ USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) },
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 15e9bd180a1d..ad98c8ffbc69 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -470,6 +470,9 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Lenovo ThinkPad USB-C Dock Gen2 Ethernet (RTL8153 GigE) */
{ USB_DEVICE(0x17ef, 0xa387), .driver_info = USB_QUIRK_NO_LPM },
+ /* Lenovo ThinkPad Hydrid USB-C Dock */
+ { USB_DEVICE(0x17ef, 0xa359), .driver_info = USB_QUIRK_NO_LPM },
+
/* BUILDWIN Photo Frame */
{ USB_DEVICE(0x1908, 0x1315), .driver_info =
USB_QUIRK_HONOR_BNUMINTERFACES },
Signed-off-by: Louis-Marie Rauline <rauline.lm@protonmail.com>
Thanks,
Rauline Louis-Marie
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: Lenovo Hybrid Dock MAC passtrough patch 2023-09-16 11:41 Lenovo Hybrid Dock MAC passtrough patch Louis-Marie @ 2023-09-16 11:51 ` Greg KH 2023-09-16 12:14 ` Bagas Sanjaya 1 sibling, 0 replies; 4+ messages in thread From: Greg KH @ 2023-09-16 11:51 UTC (permalink / raw) To: Louis-Marie; +Cc: linux-usb@vger.kernel.org On Sat, Sep 16, 2023 at 11:41:49AM +0000, Louis-Marie wrote: > Hi, > I would like to submit a patch for enabling mac passtrough for the Lenovo Hybrid Dock. > Tested with Fedora 6.4.12. > > > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.cindex 0c13d9950cd8..02e6404bf6ea 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -781,6 +781,7 @@ enum rtl8152_flags { > #define DEVICE_ID_THINKPAD_USB_C_DONGLE 0x720c > #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387 > #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3 0x3062 > +#define DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK 0xa359 > > struct tally_counter { > __le64 tx_packets; > @@ -9583,6 +9584,7 @@ static bool rtl8152_supports_lenovo_macpassthru(struct usb_device *udev) > case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2: > case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2: > case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3: > + case DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK: > case DEVICE_ID_THINKPAD_USB_C_DONGLE: > return 1; > } > @@ -9832,6 +9834,7 @@ static const struct usb_device_id rtl8152_table[] = { > { USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) }, > { USB_DEVICE(VENDOR_ID_LENOVO, 0x721e) }, > { USB_DEVICE(VENDOR_ID_LENOVO, 0xa387) }, > + { USB_DEVICE(VENDOR_ID_LENOVO, 0xa359) }, > { USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) }, > { USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) }, > { USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) }, > diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c > index 15e9bd180a1d..ad98c8ffbc69 100644 > --- a/drivers/usb/core/quirks.c > +++ b/drivers/usb/core/quirks.c > @@ -470,6 +470,9 @@ static const struct usb_device_id usb_quirk_list[] = { > /* Lenovo ThinkPad USB-C Dock Gen2 Ethernet (RTL8153 GigE) */ > { USB_DEVICE(0x17ef, 0xa387), .driver_info = USB_QUIRK_NO_LPM }, > > + /* Lenovo ThinkPad Hydrid USB-C Dock */ > + { USB_DEVICE(0x17ef, 0xa359), .driver_info = USB_QUIRK_NO_LPM }, > + > /* BUILDWIN Photo Frame */ > { USB_DEVICE(0x1908, 0x1315), .driver_info = > USB_QUIRK_HONOR_BNUMINTERFACES }, > > Signed-off-by: Louis-Marie Rauline <rauline.lm@protonmail.com> > > Thanks, > Rauline Louis-Marie > > 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 is malformed (tabs converted to spaces, linewrapped, etc.) and can not be applied. Please read the file, Documentation/process/email-clients.rst in order to fix this. - Your patch does not have a Signed-off-by: line. Please read the kernel file, Documentation/process/submitting-patches.rst 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/process/submitting-patches.rst for what is needed in order to properly describe the change. - You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what a proper Subject: line should look like. 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lenovo Hybrid Dock MAC passtrough patch 2023-09-16 11:41 Lenovo Hybrid Dock MAC passtrough patch Louis-Marie 2023-09-16 11:51 ` Greg KH @ 2023-09-16 12:14 ` Bagas Sanjaya 2023-09-16 14:46 ` Andrew Lunn 1 sibling, 1 reply; 4+ messages in thread From: Bagas Sanjaya @ 2023-09-16 12:14 UTC (permalink / raw) To: Louis-Marie, Linux USB, Linux Networking, Linux Kernel Mailing List Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Greg Kroah-Hartman, Hayes Wang, Simon Horman, Antonio Napolitano, Douglas Anderson, Andrew Gaul, Bjørn Mork, Jean-Francois Le Fillatre, Dennis Wassenberg, Nicolas Dumazet, Mark Pearson, Hannu Hartikainen, Łukasz Bartosik [-- Attachment #1: Type: text/plain, Size: 2746 bytes --] On Sat, Sep 16, 2023 at 11:41:49AM +0000, Louis-Marie wrote: > Hi, > I would like to submit a patch for enabling mac passtrough for the Lenovo Hybrid Dock. > Tested with Fedora 6.4.12. > > > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.cindex 0c13d9950cd8..02e6404bf6ea 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -781,6 +781,7 @@ enum rtl8152_flags { > #define DEVICE_ID_THINKPAD_USB_C_DONGLE 0x720c > #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387 > #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3 0x3062 > +#define DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK 0xa359 > > struct tally_counter { > __le64 tx_packets; > @@ -9583,6 +9584,7 @@ static bool rtl8152_supports_lenovo_macpassthru(struct usb_device *udev) > case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2: > case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2: > case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3: > + case DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK: > case DEVICE_ID_THINKPAD_USB_C_DONGLE: > return 1; > } > @@ -9832,6 +9834,7 @@ static const struct usb_device_id rtl8152_table[] = { > { USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) }, > { USB_DEVICE(VENDOR_ID_LENOVO, 0x721e) }, > { USB_DEVICE(VENDOR_ID_LENOVO, 0xa387) }, > + { USB_DEVICE(VENDOR_ID_LENOVO, 0xa359) }, > { USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) }, > { USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) }, > { USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) }, > diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c > index 15e9bd180a1d..ad98c8ffbc69 100644 > --- a/drivers/usb/core/quirks.c > +++ b/drivers/usb/core/quirks.c > @@ -470,6 +470,9 @@ static const struct usb_device_id usb_quirk_list[] = { > /* Lenovo ThinkPad USB-C Dock Gen2 Ethernet (RTL8153 GigE) */ > { USB_DEVICE(0x17ef, 0xa387), .driver_info = USB_QUIRK_NO_LPM }, > > + /* Lenovo ThinkPad Hydrid USB-C Dock */ > + { USB_DEVICE(0x17ef, 0xa359), .driver_info = USB_QUIRK_NO_LPM }, > + > /* BUILDWIN Photo Frame */ > { USB_DEVICE(0x1908, 0x1315), .driver_info = > USB_QUIRK_HONOR_BNUMINTERFACES }, > > Signed-off-by: Louis-Marie Rauline <rauline.lm@protonmail.com> > Can you send above suggestion as formal patch instead? See Documentation/process/submitting-patches.rst for how to properly submit patches. And also, use git-send-email(1) when sending them so that patch corruption (like tabs converting to spaces and line wrapping as in above diff) doesn't occur. Thanks. -- An old man doll... just what I always wanted! - Clara [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lenovo Hybrid Dock MAC passtrough patch 2023-09-16 12:14 ` Bagas Sanjaya @ 2023-09-16 14:46 ` Andrew Lunn 0 siblings, 0 replies; 4+ messages in thread From: Andrew Lunn @ 2023-09-16 14:46 UTC (permalink / raw) To: Bagas Sanjaya Cc: Louis-Marie, Linux USB, Linux Networking, Linux Kernel Mailing List, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Greg Kroah-Hartman, Hayes Wang, Simon Horman, Antonio Napolitano, Douglas Anderson, Andrew Gaul, Bjørn Mork, Jean-Francois Le Fillatre, Dennis Wassenberg, Nicolas Dumazet, Mark Pearson, Hannu Hartikainen, Łukasz Bartosik On Sat, Sep 16, 2023 at 07:14:57PM +0700, Bagas Sanjaya wrote: > On Sat, Sep 16, 2023 at 11:41:49AM +0000, Louis-Marie wrote: > > Hi, > > I would like to submit a patch for enabling mac passtrough for the Lenovo Hybrid Dock. > > Tested with Fedora 6.4.12. > > > > > > > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.cindex 0c13d9950cd8..02e6404bf6ea 100644 > > --- a/drivers/net/usb/r8152.c > > +++ b/drivers/net/usb/r8152.c > > @@ -781,6 +781,7 @@ enum rtl8152_flags { > > #define DEVICE_ID_THINKPAD_USB_C_DONGLE 0x720c > > #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2 0xa387 > > #define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3 0x3062 > > +#define DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK 0xa359 > > > > struct tally_counter { > > __le64 tx_packets; > > @@ -9583,6 +9584,7 @@ static bool rtl8152_supports_lenovo_macpassthru(struct usb_device *udev) > > case DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2: > > case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2: > > case DEVICE_ID_THINKPAD_USB_C_DOCK_GEN3: > > + case DEVICE_ID_THINKPAD_HYBRID_USB_C_DOCK: > > case DEVICE_ID_THINKPAD_USB_C_DONGLE: > > return 1; > > } > > @@ -9832,6 +9834,7 @@ static const struct usb_device_id rtl8152_table[] = { > > { USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) }, > > { USB_DEVICE(VENDOR_ID_LENOVO, 0x721e) }, > > { USB_DEVICE(VENDOR_ID_LENOVO, 0xa387) }, > > + { USB_DEVICE(VENDOR_ID_LENOVO, 0xa359) }, > > { USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) }, > > { USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) }, > > { USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) }, > > diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c > > index 15e9bd180a1d..ad98c8ffbc69 100644 > > --- a/drivers/usb/core/quirks.c > > +++ b/drivers/usb/core/quirks.c > > @@ -470,6 +470,9 @@ static const struct usb_device_id usb_quirk_list[] = { > > /* Lenovo ThinkPad USB-C Dock Gen2 Ethernet (RTL8153 GigE) */ > > { USB_DEVICE(0x17ef, 0xa387), .driver_info = USB_QUIRK_NO_LPM }, > > > > + /* Lenovo ThinkPad Hydrid USB-C Dock */ > > + { USB_DEVICE(0x17ef, 0xa359), .driver_info = USB_QUIRK_NO_LPM }, > > + > > /* BUILDWIN Photo Frame */ > > { USB_DEVICE(0x1908, 0x1315), .driver_info = > > USB_QUIRK_HONOR_BNUMINTERFACES }, > > > > Signed-off-by: Louis-Marie Rauline <rauline.lm@protonmail.com> > > > > Can you send above suggestion as formal patch instead? See > Documentation/process/submitting-patches.rst for how to properly submit > patches. And also, use git-send-email(1) when sending them so that patch > corruption (like tabs converting to spaces and line wrapping as in above > diff) doesn't occur. > > Thanks. This appears to do more than MAC passthrough, e.g. adding a quirk for LPM. Please split the patch up. The MAC passthrough part is likely to be rejected, because MAC pass through is a mess, but the quirk part looks O.K. Andrew ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-16 14:46 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-09-16 11:41 Lenovo Hybrid Dock MAC passtrough patch Louis-Marie 2023-09-16 11:51 ` Greg KH 2023-09-16 12:14 ` Bagas Sanjaya 2023-09-16 14:46 ` Andrew Lunn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox