lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Nov 2020 16:29:37 +0100
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Hayes Wang <hayeswang@...ltek.com>, netdev@...r.kernel.org
Cc:     nic_swsd@...ltek.com, linux-kernel@...r.kernel.org,
        oliver@...kum.org, linux-usb@...r.kernel.org,
        'Linux Samsung SOC' <linux-samsung-soc@...r.kernel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Krzysztof Kozlowski <krzk@...nel.org>
Subject: Re: [PATCH net-next v2 RESEND] net/usb/r8153_ecm: support ECM mode
 for RTL8153

Hi Hayes,

On 04.11.2020 03:19, 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.
>
> Both r8152 and r8153_ecm would check the return value of
> rtl8152_get_version() in porbe(). If rtl8152_get_version()
> return none zero value, the r8152 is used for the device
> with vendor mode. Otherwise, the r8153_ecm is used for the
> device with ECM mode.
>
> Signed-off-by: Hayes Wang <hayeswang@...ltek.com>

This patch landed recently in linux-next and breaks ethernet operation 
on Samsung Exynos5422 Odroid XU4/HC1 boards when kernel is compiled from 
arm/configs/multi_v7_defconfig. The main problem is that the hardware is 
bound to r8153_ecm driver, not to the r8152. Manually switching the 
drivers by "echo 4-1:2.0 >/sys/bus/usb/drivers/r8153_ecm/unbind && echo 
4-1:2.0 >/sys/bus/usb/drivers/r8152/bind" fixes ethernet operation.

This is because in multi_v7_defconfig r8153_ecm driver is built-in (as 
it is tied to CONFIG_USB_NET_CDCETHER), while the r8152 driver is 
compiled as module and loaded when r8153_ecm has already bound.

I think that r8153_ecm driver should have a separate Kconfig symbol, 
which matches the r8152 driver (either both are built-in or both as 
modules), otherwise those 2 drivers cannot properly detect their cases.

> ---
>   drivers/net/usb/Makefile    |   2 +-
>   drivers/net/usb/r8152.c     |  30 +------
>   drivers/net/usb/r8153_ecm.c | 162 ++++++++++++++++++++++++++++++++++++
>   include/linux/usb/r8152.h   |  37 ++++++++
>   4 files changed, 204 insertions(+), 27 deletions(-)
>   create mode 100644 drivers/net/usb/r8153_ecm.c
>   create mode 100644 include/linux/usb/r8152.h
>
> > ...

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ