Comment 34 for bug 1827961

Revision history for this message
Christian Schaubschläger (thymallus) wrote :

Hello!

I have a Lenovo Thinkpad Thunderbolt 3 Dock Gen 2 connected to a Dell Latitude 5400. I'm running a vanilla 5.8.16 kernel. MAC pass-through does not work out of the box. I've narrowed the problem down to the following:

Here is the part of the code from the vanilla kernel that does not work in my setup:

drivers/net/usb/r8152.c: static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa):
        ...
        if (test_bit(LENOVO_MACPASSTHRU, &tp->flags)) {
                mac_obj_name = "\\MACA";
                mac_obj_type = ACPI_TYPE_STRING;
                mac_strlen = 0x16;
        } else {
        ...

With the code above, vendor_mac_passthru_addr_read exits without success here:

        ....
        status = acpi_evaluate_object(NULL, mac_obj_name, NULL, &buffer);
        obj = (union acpi_object *)buffer.pointer;
        if (!ACPI_SUCCESS(status))
        {
                return -ENODEV;
        }
        ...

If I change the first code snippet to this:

        ...
        if (test_bit(LENOVO_MACPASSTHRU, &tp->flags)) {
                mac_obj_name = "\\_SB.AMAC";
                mac_obj_type = ACPI_TYPE_BUFFER;
                mac_strlen = 0x17;
        } else {
        ...

MAC pass-through works fine!

I don't know if this is true for all Lenovo Thinkpad Thunderbolt 3 Docks, I only have this one.

Regards,
Christian