Re: net: usb: ipheth: add CDC NCM support

From: Jakub Kicinski
Date: Thu May 11 2023 - 10:45:12 EST


On Thu, 11 May 2023 12:47:56 +0300 Georgi Valkov wrote:
> Can you please review, and accept the following patch. I’ve been using it for one year.
> I added the author Foster Snowhill to this mail, as well as a link to his Github [1].
> If needed, we can ask him to add the tag Signed-off-by:
>
>
> From 257d843a7f90e4e519635f82fe5b73fba918ec33 Mon Sep 17 00:00:00 2001
> From: Foster Snowhill <Forst@xxxxxxxxxxxxxxxxxxxxxxxx>
> Date: Fri, 22 Apr 2022 23:50:09 +0200
> Subject: [PATCH] net: usb: ipheth: add CDC NCM support (PoC)
>
> Recent iOS releases support CDC NCM encapsulation on RX. This mode is
> the default on macOS and Windows.
>
> When reconnecting a device from a macOS/Windows machine to a Linux
> machine, the device stays in NCM mode. Therefore to correctly support
> such a device, the driver has to either support the NCM mode too, or
> somehow put the device back into legacy mode.
>
> To match the behaviour of the macOS/Windows driver, and since there
> are no documented control commands to revert to legacy mode, I chose
> to implement basic NCM support.
>
> With this change, the device is attempted to be put into NCM mode by
> default, and falls back to legacy mode if said attempt failed.
>
> Tested-by: Georgi Valkov <gvalkov@xxxxxx>

Take a look at submitting patches, the best way to send a change is
with git send-mail. And make sure you CC the right lists
(./scripts/get_maintainer.pl)