From: "Bjørn Mork" <bjorn@mork.no>
To: hayeswang <hayeswang@realtek.com>
Cc: <oliver@neukum.org>, <netdev@vger.kernel.org>,
"'nic_swsd'" <nic_swsd@realtek.com>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Subject: Re: [PATCH net-next v2 6/6] r8152: support RTL8153
Date: Fri, 03 Jan 2014 08:49:46 +0100 [thread overview]
Message-ID: <8738l58pyd.fsf@nemi.mork.no> (raw)
In-Reply-To: <605671F106F540BA9665A195CACB78A0@realtek.com.tw> (hayeswang@realtek.com's message of "Fri, 3 Jan 2014 10:56:02 +0800")
hayeswang <hayeswang@realtek.com> writes:
> Bjørn Mork [mailto:bjorn@mork.no]
>> Sent: Thursday, January 02, 2014 10:25 PM
>> To: Hayeswang
>> Cc: oliver@neukum.org; netdev@vger.kernel.org; nic_swsd;
>> linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org
>> Subject: Re: [PATCH net-next v2 6/6] r8152: support RTL8153
>>
> [...]
>> > +#if defined(CONFIG_USB_RTL8152) ||
>> defined(CONFIG_USB_RTL8152_MODULE)
>> > +/* Samsung USB Ethernet Adapters */
>> > +{
>> > + USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID,
>> 0xa101, USB_CLASS_COMM,
>> > + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
>> > + .driver_info = 0,
>> > +},
>> > +#endif
>>
>>
>> We don't play the if-other-driver-is-enabled for any other of the
>> blacklisted devices, including other devices supported by the RTL8152
>> driver. Why do we need it here?
>
> The USB nic have two configurations. One is the config 2 which is the ECM
> mode and uses the driver of cdc_ether. The other is the config 1 which use
> the driver of r8152.
Sorry, but then this makes even less sense. The active USB
configuration is user selectable and you should make any of them work if
possible. Why can't the drivers figure out this at runtime?
> When the dangle is plugged, I find the configuration
> is 2 and the ECM driver would be loaded.
The USB core will normally select cfg #1, but prefers classful
configurations over vendor-specific ones. It will loop through all
possible configurations looking at the first interface of each of them,
and then select the first one with a class different from 0xff.
So what you write above indicates that the first interface of cfg #1 is
vendor specific. But this doesn't seem to match the r815x driver, so I
don't quite understand the layout here.
In any case, if your device provides two _different_ functions in
different configurations, but using the exact class, subclass and
protocol, then I'd call that device buggy. If at least one of these are
different, then it shouldn't be a problem making the respective drivers
match these functions.
> By this way, you could select
> which mode you want to run. Some people would select ECM mode for
> performance, and the other would select r8152 for power saving.
Build time driver selection is useless. All distros will enable all
drivers. End users don't build kernels. That ended sometime around the
release of Linux 2.2
Bjørn
next prev parent reply other threads:[~2014-01-03 7:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 2:34 [PATCH net-next 0/6] Support new chip Hayes Wang
[not found] ` <1388111649-1014-1-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2013-12-27 2:34 ` [PATCH net-next 1/6] r8152: move rtl8152_unload and ocp_reg_write Hayes Wang
2013-12-27 2:34 ` [PATCH net-next 2/6] r8152: modify the method of accessing PHY Hayes Wang
2013-12-27 2:34 ` [PATCH net-next 3/6] r8152: change some definitions Hayes Wang
2013-12-27 18:57 ` Francois Romieu
2013-12-27 2:34 ` [PATCH net-next 4/6] r8152: add rtl_ops Hayes Wang
2013-12-27 17:28 ` David Miller
2013-12-27 2:34 ` [PATCH net-next 5/6] r8152: split rtl8152_enable Hayes Wang
2013-12-27 2:37 ` [PATCH net-next 6/6] r8152: support RTL8153 Hayes Wang
2013-12-27 19:08 ` Francois Romieu
2014-01-02 3:22 ` [PATCH net-next v2 0/6] support new chip Hayes Wang
2014-01-02 3:22 ` [PATCH net-next v2 1/6] r8152: move rtl8152_unload and ocp_reg_write Hayes Wang
2014-01-02 3:22 ` [PATCH net-next v2 2/6] r8152: modify the method of accessing PHY Hayes Wang
2014-01-02 3:22 ` [PATCH net-next v2 3/6] r8152: change some definitions Hayes Wang
2014-01-02 3:22 ` [PATCH net-next v2 4/6] r8152: add rtl_ops Hayes Wang
2014-01-02 3:22 ` [PATCH net-next v2 5/6] r8152: split rtl8152_enable Hayes Wang
2014-01-02 3:25 ` [PATCH net-next v2 6/6] r8152: support RTL8153 Hayes Wang
2014-01-02 14:25 ` Bjørn Mork
2014-01-03 2:56 ` hayeswang
2014-01-03 7:49 ` Bjørn Mork [this message]
2014-01-06 3:20 ` hayeswang
2014-01-06 9:21 ` Bjørn Mork
2014-01-07 12:35 ` hayeswang
[not found] ` <749DBDC9792E47BBA5884BEC7CF2D639-Rasf1IRRPZGoECsaD+WFmw@public.gmane.org>
2014-01-08 18:24 ` Ben Hutchings
[not found] ` <1388632963-1341-1-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2014-01-02 3:55 ` [PATCH net-next v2 0/6] support new chip David Miller
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=8738l58pyd.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=hayeswang@realtek.com \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).