From patchwork Sat Sep 16 11:41:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Louis-Marie X-Patchwork-Id: 723886 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D49D1107 for ; Sat, 16 Sep 2023 11:41:59 +0000 (UTC) Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86EEECC9 for ; Sat, 16 Sep 2023 04:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1694864515; x=1695123715; bh=cdygQT4m/Zqxs94pWuWjnhXWsAvNqdUcOsqh2JljqP0=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=UtejPTIXPcyq1wzeHnzXvt1kOTDSFaY+jWPm9iSoVB9qVUsTa9JT4GSLg4wKqjGpy zsgdmu6QOE8RARcdeSbIbwc+0IPz1ylH1DHfVNdalkm1wFjgmMowmfyfAxPu1bjBVY RyKw7fvNzr0WUylRY2WvrUi9r+k1eUkjm5ixTvGmTLY4211kGRY4Ws7ZsY4TLpUE0z HcnQs+ida10uskYGVUaE5z3esns3gXJ9dxD1AnkMPLzNOlBKykplayw9O4egUg2He4 hWNw9EsSvwdxpBlEv9ElOGDUMs6OJ/BoRs82sc00K/Zk/ZuIiXiwR0RdqtDr/y2eu1 e5UklkpgWXevQ== Date: Sat, 16 Sep 2023 11:41:49 +0000 To: "linux-usb@vger.kernel.org" From: Louis-Marie Subject: Lenovo Hybrid Dock MAC passtrough patch Message-ID: Feedback-ID: 8843366:user:proton Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Hi, I would like to submit a patch for enabling mac passtrough for the Lenovo Hybrid Dock. Tested with Fedora 6.4.12. Signed-off-by: Louis-Marie Rauline Thanks, Rauline Louis-Marie 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 },