From: Grant Grundler <grundler@chromium.org>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] r8152: modify rtl_ops_init
Date: Thu, 2 Jun 2016 01:47:48 +0000 (UTC) [thread overview]
Message-ID: <loom.20160602T023221-736@post.gmane.org> (raw)
In-Reply-To: <1394712342-15778-86-Taiwan-albertk@realtek.com>
Hayes Wang <hayeswang <at> realtek.com> writes:
> Replace using VID/PID with using tp->version to initialize the ops.
Hayes,
This patch breaks new HW with existing drivers. more below.
>
> Signed-off-by: Hayes Wang <hayeswang <at> realtek.com>
> ---
> drivers/net/usb/r8152.c | 79 ++++++++++++++++++--------------------------
-----
> 1 file changed, 28 insertions(+), 51 deletions(-)
>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 4b6db8a..cf1b8a7 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> <at> <at> -3742,66 +3742,43 <at> <at> static void
rtl8153_unload(struct r8152 *tp)
> r8153_power_cut_en(tp, false);
> }
>
> -static int rtl_ops_init(struct r8152 *tp, const struct usb_device_id *id)
> +static int rtl_ops_init(struct r8152 *tp)
> {
> struct rtl_ops *ops = &tp->rtl_ops;
> - int ret = -ENODEV;
> -
> - switch (id->idVendor) {
> - case VENDOR_ID_REALTEK:
> - switch (id->idProduct) {
...
> default:
> + ret = -ENODEV;
> + netif_err(tp, probe, tp->netdev, "Unknown Device\n");
This hunk causes r8152 driver to refuse to bind to a device that was working
(AFAICT) before this change. This means every new version of the HW
requires a driver update for every kernel in every distribution that
incorporates this patch.
I've tried to "align" chromeos-3.18 branch with kernel.org r8152 driver:
I'm getting this output in dmesg:
r8152 2-1:1.0 (unnamed net_device) (uninitialized): Unknown version 0x6010
r8152 2-1:1.0 (unnamed net_device) (uninitialized): Unknown Device
Could you take a look at the hack I've uploaded for chromeos-3.18 kernel:
https://chromium-review.googlesource.com/348951
cheers,
grant
next prev parent reply other threads:[~2016-06-02 1:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 4:47 [PATCH net-next 0/3] r8152: rtl_ops_init modify Hayes Wang
2014-11-06 4:47 ` [PATCH net-next 1/3] r8152: move r8152b_get_version Hayes Wang
2014-11-06 4:47 ` [PATCH net-next 2/3] r8152: modify rtl_ops_init Hayes Wang
2016-06-02 1:47 ` Grant Grundler [this message]
2014-11-06 4:47 ` [PATCH net-next 3/3] r8152: remove the definitions of the PID Hayes Wang
2014-11-06 20:15 ` [PATCH net-next 0/3] r8152: rtl_ops_init modify 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=loom.20160602T023221-736@post.gmane.org \
--to=grundler@chromium.org \
--cc=linux-kernel@vger.kernel.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®