]> git.baikalelectronics.ru Git - kernel.git/commit
net: usb: ax88179_178a: Bind only to vendor-specific interface
authorHector Martin <marcan@marcan.st>
Sun, 31 Jul 2022 07:22:09 +0000 (16:22 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 2 Aug 2022 09:17:14 +0000 (11:17 +0200)
commit158318cc7cb1f9fc6b5efb4ab0142a6a873c3e77
treecc68655eb54370147bbe53a5ff5be46631ea04c0
parent185472e869f3c15292172bf0a564d3f09f2de780
net: usb: ax88179_178a: Bind only to vendor-specific interface

The Anker PowerExpand USB-C to Gigabit Ethernet adapter uses this
chipset, but exposes CDC Ethernet configurations as well as the
vendor specific one. This driver tries to bind by PID:VID
unconditionally and ends up picking up the CDC configuration, which
is supposed to be handled by the class driver. To make things even
more confusing, it sees both of the CDC class interfaces and tries
to bind twice, resulting in two broken Ethernet devices.

Change all the ID matches to specifically match the vendor-specific
interface. By default the device comes up in CDC mode and is bound by
that driver (which works fine); users may switch it to the vendor
interface using sysfs to set bConfigurationValue, at which point the
device actually goes through a reconnect cycle and comes back as a
vendor specific only device, and then this driver binds and works too.

The affected device uses VID/PID 0b95:1790, but we might as well change
all of them for good measure, since there is no good reason for this
driver to bind to standard CDC Ethernet interfaces.

v3: Added VID/PID info to commit message

Signed-off-by: Hector Martin <marcan@marcan.st>
Link: https://lore.kernel.org/r/20220731072209.45504-1-marcan@marcan.st
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/usb/ax88179_178a.c