From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161440AbcFBQ60 (ORCPT ); Thu, 2 Jun 2016 12:58:26 -0400 Received: from AUSXIPPS310.us.dell.com ([143.166.148.211]:36731 "EHLO ausxipps310.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161299AbcFBQ6W (ORCPT ); Thu, 2 Jun 2016 12:58:22 -0400 DomainKey-Signature: s=smtpout; d=dell.com; c=nofws; q=dns; h=X-LoopCount0:X-IronPort-AV:From:To:Cc:Subject:Date: Message-Id:X-Mailer; b=Orha7Ls6lBlYpcmTB/d6ctCfsh1bJ/6MTNrwJdc3SN8wBnXciRuhflIl JOafq2cq1cam5RNbZGTGk/WVnBbe9hZmxBPry3b9c8ZxdU9uievbDahGT sJC40XHHMzmdN2nK2/qQ3RWoJjReqqpTBWZOz0qDf0we5Y9mOIpoD2bam o=; X-LoopCount0: from 10.209.151.17 X-IronPort-AV: E=Sophos;i="5.26,407,1459832400"; d="scan'208";a="323070664" From: Mario Limonciello To: hayeswang@realtek.com Cc: LKML , Netdev , Linux USB , pali.rohar@gmail.com, anthony.wong@canonical.com, Greg KH , Mario Limonciello Subject: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Date: Thu, 2 Jun 2016 11:58:06 -0500 Message-Id: <1464886687-16284-1-git-send-email-mario_limonciello@dell.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adjusts a lot of concerns that have been raised on LKML. Changes from v1: * Lots of error checking around bad ACPI data * Only activate on Dell system vendor DMI string * Use hex2bin instead of inventing a wheel * Copy MAC to both dev_addr and sa_data * Track and set only for one NIC at a time * If MAC lookup failed (bad ACPI data or bad return) fall back to regular r8152 MAC setting routine. This has been tested with TB15, WD15 docks and Dell P/N 96NP5 dongle. It's also been tested with two devices that use r8152 simultaneously. Remaining discussion points: * Greg KH had asked this to only on machines that are known to have \\_SB.AMAC - I would rather avoid doing this because the list will just grow every year. I've added lots of error checking and restricted this to Dell. * There was also a request to move this to an x86 arch_get_platform_mac_address() implementation. - I haven't yet done this. If this is the right approach. I would like to know the proper place in arch/x86 to put this code. My initial thought was a new file in arch/x86/platform/intel Mario Limonciello (1): r8152: Add support for setting MAC to system's Auxiliary MAC address drivers/net/usb/r8152.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) -- 2.7.4