mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Hayes Wang <hayeswang@realtek.com>, netdev@vger.kernel.org
Cc: nic_swsd@realtek.com, linux-kernel@vger.kernel.org,
	oliver@neukum.org, linux-usb@vger.kernel.org,
	'Linux Samsung SOC' <linux-samsung-soc@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH net-next v2 RESEND] net/usb/r8153_ecm: support ECM mode for RTL8153
Date: Fri, 13 Nov 2020 16:29:37 +0100	[thread overview]
Message-ID: <7fd014f2-c9a5-e7ec-f1c6-b3e4bb0f6eb6@samsung.com> (raw)
In-Reply-To: <1394712342-15778-392-Taiwan-albertk@realtek.com>

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@realtek.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


  parent reply	other threads:[~2020-11-13 15:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 12:33 [PATCH] " Hayes Wang
2020-10-29 15:04 ` kernel test robot
2020-10-30  3:23 ` [PATCH net-next v2] " Hayes Wang
2020-10-31 23:08   ` Jakub Kicinski
2020-11-02  7:20     ` Hayes Wang
2020-11-02 19:47       ` Jakub Kicinski
2020-11-03  9:32         ` Greg Kroah-Hartman
2020-11-03  9:51           ` Hayes Wang
2020-11-03 16:15           ` Jakub Kicinski
2020-11-04  1:39             ` Hayes Wang
2020-11-04  1:44               ` Jakub Kicinski
2020-11-03  9:46 ` [PATCH net-next v3 0/2] drivers/net/usb: " Hayes Wang
2020-11-03  9:46   ` [PATCH net-next v3 1/2] include/linux/usb: new header file for the vendor ID of USB devices Hayes Wang
2020-11-03  9:55     ` Greg KH
2020-11-03  9:46   ` [PATCH net-next v3 2/2] net/usb/r8153_ecm: support ECM mode for RTL8153 Hayes Wang
2020-11-04  2:19 ` [PATCH net-next v2 RESEND] " Hayes Wang
2020-11-06  1:00   ` Jakub Kicinski
     [not found]   ` <CGME20201113152938eucas1p2c8500d9d3d0c892c7c2a2d56b32fedc0@eucas1p2.samsung.com>
2020-11-13 15:29     ` Marek Szyprowski [this message]
2020-11-16  6:52       ` [PATCH net-next] r8153_ecm: avoid to be prior to r8152 driver Hayes Wang
2020-11-16  9:18         ` Marek Szyprowski
2020-11-16 17:02           ` Jakub Kicinski
2020-11-17  1:50             ` Hayes Wang
2020-11-17 16:11               ` Jakub Kicinski
2020-11-18  1:21                 ` Hayes Wang
2020-11-18  6:43         ` [PATCH net-next v2] " Hayes Wang
2020-11-18  8:18           ` Marek Szyprowski
2020-11-19 16:50           ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7fd014f2-c9a5-e7ec-f1c6-b3e4bb0f6eb6@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=hayeswang@realtek.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=oliver@neukum.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®