RE: [PATCH v6 RESEND] r8152: Add support for setting pass through MAC address on RTL8153-AD

From: Mario_Limonciello
Date: Tue Jul 12 2016 - 11:04:27 EST

> -----Original Message-----
> From: Michał Pecio [mailto:michal.pecio@xxxxxxxxx]
> Sent: Tuesday, July 12, 2016 2:03 AM
> To: David Miller <davem@xxxxxxxxxxxxx>
> Cc: Limonciello, Mario <Mario_Limonciello@xxxxxxxx>; linux-
> kernel@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-
> usb@xxxxxxxxxxxxxxx; anthony.wong@xxxxxxxxxxxxx
> Subject: Re: [PATCH v6 RESEND] r8152: Add support for setting pass through
> MAC address on RTL8153-AD
> > From: Mario Limonciello <mario_limonciello@xxxxxxxx>
> > Date: Mon, 11 Jul 2016 19:58:04 -0500
> >
> > > The RTL8153-AD supports a persistent system specific MAC address.
> > > This means a device plugged into two different systems with host
> > > side support will show different (but persistent) MAC addresses.
> > >
> > > This information for the system's persistent MAC address is burned
> > > in when the system HW is built and available under \_SB.AMAC in the
> > > DSDT at runtime.
> > >
> > > This technology is currently implemented in the Dell TB15 and WD15
> > > Type-C docks. More information is available here:
> > >
> > >
> > > Signed-off-by: Mario Limonciello <mario_limonciello@xxxxxxxx>
> >
> > Applied.
> Hi,
> Isn't it possible that the same ACPI name could be used for other
> vendor-specific extensions on other laptops and that r8152 will now
> wreak havoc there?
> Regards,
> MP

This has been discussed a bit previously in earlier submissions.

In short, this is an extreme corner case. Some changes were made
to diminish potential impact. The ACPI code is resolved only when
the specific variant of RTL8135 (-AD) has a bit set on the efuse.

The patch also explicitly checks the return type and contents of the
ACPI object and won't proceed if it's invalid.

The Type-C devices that provide this are currently only sold by Dell.
This of course may change one day if other OEM's add this
feature, but it just shows that device scope is limited.

For now the way this is implemented if Realtek does choose to
work with another OEM on this feature, there should be no
kernel code change necessary for interoperability of peripherals
on other OEM machines.

So in order to hit this hypothetical corner case today you would
need to be using a real world type-C device something such as a
Dell WD15 on another OEM's machine that has type-C and the exact
same ACPI object name that does $BADSTUFF other than return a

If that situation arises please alert me and I'll send a follow up
patch that whitelists this to match DMI vendor of only Dell