From: Oliver Neukum <oneukum@suse.com>
To: "Frédéric Parrenin" <frederic.parrenin@univ-grenoble-alpes.fr>,
Mario.Limonciello@dell.com, gregkh@linuxfoundation.org
Cc: bjorn@mork.no, linux-usb@vger.kernel.org
Subject: Support Mac address pass through on Dell DS1000 dock
Date: Thu, 22 Nov 2018 18:15:24 +0100 [thread overview]
Message-ID: <1542906924.18596.1.camel@suse.com> (raw)
On Do, 2018-11-22 at 12:06 +0100, Frédéric Parrenin wrote:
> Le 22/11/2018 à 11:22, Oliver Neukum a écrit :
> > On Mi, 2018-11-21 at 16:50 +0100, Frédéric Parrenin wrote:
> > > which over rides the Mac on the dock. So, the answer is, "it's not an
> > > issue if the dock supports it, as the laptop BIOS is what is determining
> > > if it is supported".
> > >
> > > So what is the truth?
> >
> > For pass thru you must meet multiple conditions:
> >
> > /* if this is not an RTL8153-AD, no eFuse mac passthru set,
> > * or system doesn't provide valid _SB.AMAC this will be
> > * be expected to non-zero
> > */>
> >
> > They can be manually verified. Do you need a debugging patch?
>
> OK, let us try a debugging patch.
Here you go.
PLease enable dynamic debugging for the driver and ramp up
your logging level.
Regards
Oliver
From 3661ff35782f7b26df3204f4f7a18929e0c74ff7 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Thu, 22 Nov 2018 18:08:43 +0100
Subject: [PATCH] rtl8152: debugging for MAC pass-through
This adds debugging statements for failure cases in MAC
pass-through
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/net/usb/r8152.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 7345a2258ee4..3ed52806164c 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1168,19 +1168,28 @@ static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa)
/* test for -AD variant of RTL8153 */
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0);
- if ((ocp_data & AD_MASK) != 0x1000)
+ if ((ocp_data & AD_MASK) != 0x1000) {
+ netif_dbg(tp, probe, tp->netdev,
+ "Not an AD type.\n");
return -ENODEV;
+ }
/* test for MAC address pass-through bit */
ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, EFUSE);
- if ((ocp_data & PASS_THRU_MASK) != 1)
+ if ((ocp_data & PASS_THRU_MASK) != 1) {
+ netif_dbg(tp, probe, tp->netdev,
+ "pass-through bit not set.\n");
return -ENODEV;
+ }
/* returns _AUXMAC_#AABBCCDDEEFF# */
status = acpi_evaluate_object(NULL, "\\_SB.AMAC", NULL, &buffer);
obj = (union acpi_object *)buffer.pointer;
- if (!ACPI_SUCCESS(status))
+ if (!ACPI_SUCCESS(status)) {
+ netif_warn(tp, probe, tp->netdev,
+ "pass-through firmware failure.\n");
return -ENODEV;
+ }
if (obj->type != ACPI_TYPE_BUFFER || obj->string.length != 0x17) {
netif_warn(tp, probe, tp->netdev,
"Invalid buffer for pass-thru MAC addr: (%d, %d)\n",
--
2.16.4
next reply other threads:[~2018-11-22 17:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 17:15 Oliver Neukum [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-11-23 9:04 Support Mac address pass through on Dell DS1000 dock Frédéric Parrenin
2018-11-26 14:21 Mario Limonciello
2018-11-26 18:47 Frédéric Parrenin
2018-11-26 18:55 Mario Limonciello
2018-11-26 18:57 Bjørn Mork
2018-11-26 20:08 Frédéric Parrenin
2018-11-26 20:27 Mario Limonciello
2018-11-26 21:00 Frédéric Parrenin
2018-11-27 10:39 Frédéric Parrenin
2018-11-27 15:19 Mario Limonciello
2018-11-27 16:31 Frédéric Parrenin
2018-11-27 20:27 Mario Limonciello
2018-11-29 10:36 Frédéric Parrenin
2018-11-29 14:10 Mario Limonciello
2018-11-30 16:15 Frédéric Parrenin
2019-01-04 16:15 Frédéric Parrenin
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=1542906924.18596.1.camel@suse.com \
--to=oneukum@suse.com \
--cc=Mario.Limonciello@dell.com \
--cc=bjorn@mork.no \
--cc=frederic.parrenin@univ-grenoble-alpes.fr \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@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;
as well as URLs for NNTP newsgroup(s).