From: Hayes Wang <hayeswang@realtek.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"oliver@neukum.org" <oliver@neukum.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2
Date: Tue, 5 Nov 2019 11:48:04 +0000 [thread overview]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2F18F4F92@RTITMBSVM03.realtek.com.tw> (raw)
In-Reply-To: <193EF03A-1EF7-4604-BF3A-61201A78D724@canonical.com>
Kai-Heng Feng [mailto:kai.heng.feng@canonical.com]
> Sent: Tuesday, November 05, 2019 7:18 PM
[...]
> >> } else {
> >> - /* test for RTL8153-BND and RTL8153-BD */
> >> - ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1);
> >> - if ((ocp_data & BND_MASK) == 0 && (ocp_data & BD_MASK) == 0) {
> >> - netif_dbg(tp, probe, tp->netdev,
> >> - "Invalid variant for MAC pass through\n");
> >> - return -ENODEV;
> >> + bypass_test = false;
> >> + mac_obj_name = "\\_SB.AMAC";
> >> + mac_obj_type = ACPI_TYPE_BUFFER;
> >> + mac_strlen = 0x17;
> >> + }
> >> +
> >> + if (!bypass_test) {
> >
> > Maybe you could combine this with the "else" above.
> > Then, the variable "bypass_test" could be removed.
>
> Ok, will do in V3.
>
> > And the declaration of "ocp_data" could be moved after the "else".
>
> Isn't putting declarations at the top of the function the preferred way?
I mean the ocp_data wouldn't be used out of the else,
so you could move the declaration to the inside of the else.
However, I don't think you have to send another patch for this.
Thanks.
Best Regards,
Hayes
prev parent reply other threads:[~2019-11-05 11:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 8:15 [PATCH v2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2 Kai-Heng Feng
2019-11-05 8:55 ` Hayes Wang
2019-11-05 11:18 ` Kai-Heng Feng
2019-11-05 11:48 ` Hayes Wang [this message]
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=0835B3720019904CB8F7AA43166CEEB2F18F4F92@RTITMBSVM03.realtek.com.tw \
--to=hayeswang@realtek.com \
--cc=davem@davemloft.net \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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).