[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201031160838.39586608@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date: Sat, 31 Oct 2020 16:08:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Hayes Wang <hayeswang@...ltek.com>
Cc: <netdev@...r.kernel.org>, <nic_swsd@...ltek.com>,
<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: Re: [PATCH net-next v2] net/usb/r8153_ecm: support ECM mode for
RTL8153
On Fri, 30 Oct 2020 11:23:08 +0800 Hayes Wang wrote:
> Support ECM mode based on cdc_ether with relative mii functions,
> when CONFIG_USB_RTL8152 is not set, or the device is not supported
> by r8152 driver.
>
> Signed-off-by: Hayes Wang <hayeswang@...ltek.com>
Can you describe the use case in more detail?
AFAICT r8152 defines a match for the exact same device.
Does it not mean that which driver is used will be somewhat random
if both are built?
> +/* Define these values to match your device */
> +#define VENDOR_ID_REALTEK 0x0bda
> +#define VENDOR_ID_MICROSOFT 0x045e
> +#define VENDOR_ID_SAMSUNG 0x04e8
> +#define VENDOR_ID_LENOVO 0x17ef
> +#define VENDOR_ID_LINKSYS 0x13b1
> +#define VENDOR_ID_NVIDIA 0x0955
> +#define VENDOR_ID_TPLINK 0x2357
$ git grep 0x2357 | grep -i tplink
drivers/net/usb/cdc_ether.c:#define TPLINK_VENDOR_ID 0x2357
drivers/net/usb/r8152.c:#define VENDOR_ID_TPLINK 0x2357
drivers/usb/serial/option.c:#define TPLINK_VENDOR_ID 0x2357
$ git grep 0x17ef | grep -i lenovo
drivers/hid/hid-ids.h:#define USB_VENDOR_ID_LENOVO 0x17ef
drivers/hid/wacom.h:#define USB_VENDOR_ID_LENOVO 0x17ef
drivers/net/usb/cdc_ether.c:#define LENOVO_VENDOR_ID 0x17ef
drivers/net/usb/r8152.c:#define VENDOR_ID_LENOVO 0x17ef
Time to consolidate those vendor id defines perhaps?
Powered by blists - more mailing lists