From patchwork Mon Feb 8 12:07:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 8249181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 78E06BEEE5 for ; Mon, 8 Feb 2016 12:09:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A069C202EC for ; Mon, 8 Feb 2016 12:09:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4BE0203B8 for ; Mon, 8 Feb 2016 12:09:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSkbH-00013S-W9; Mon, 08 Feb 2016 12:07:28 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aSkZP-0007G5-7s for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2016 12:05:39 +0000 Received: by mail-pf0-x241.google.com with SMTP id 66so8579637pfe.2 for ; Mon, 08 Feb 2016 04:05:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fz9zI3vYjg4uW8684bRvykE6y3dQOwu/zXIry9Q1E44=; b=FTOVJrBNftXskNgYCKbtCljm8a5R+J+huP+EvrzuiYWgaJIengDISjShCVM3pjZof0 yL048gE9Ks+DxNIpbVqnghMVG7pdC3ZudELZSx+6cZR3AuNPvdADW6PfAkpu/vjz6Snd gntCRcar+mpcbjLso6mWHj73TSnv12HbZanHifa+NcE0ebWJ+06tvP6sNyG++Ir/gGV4 fuKpLYX+V1UUz7nyTEd79X1TOZJr+PCecxiPIIo3X5vGhLiI3Le5+dPBi9wWGZLVmHYw 7s6dcPYHlVOd6mskVgH6A8K4cualbTugQrbrxXe2Q4J8dCwl8xixo1fqEUS1LGibBDtw aS5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fz9zI3vYjg4uW8684bRvykE6y3dQOwu/zXIry9Q1E44=; b=e5Ac/C2zH5jp6Olukwczvynh+e7GW6FapfjEf27Z6zsmqRsf13dxH/v/AKSYp0TT+z kPxPIjCotT5PBhD4uA4VWLU7RdVDmEDNieFbXSQrJaIjF6C0coXPQJkOoXmeRsYA0x7e rA79bKddQrxArwHovwJhQv/9zDpEWTOU8bIP4Gfuj298YuEXcT4yA9vj4yd7Z3iB40p/ YyCPshw1WPRomDSZgntzVAJUosaWWq60yh14mSwjQQQThooEO4wRMAGkunOPITuKgZiY QbqvDDFjt/B72iZcjW6If+uzB6fZGJ/2uSEA9TLqOA7fkq2En6KY7835kaLsswMZS/zs YltQ== X-Gm-Message-State: AG10YORWdK5gJ0ImvXPA1HI+BekaYTj6LQcieLPT7x7sbEWRfTt4PqJZR8DLoHp5WzUYdQ== X-Received: by 10.98.93.2 with SMTP id r2mr25703532pfb.64.1454933114326; Mon, 08 Feb 2016 04:05:14 -0800 (PST) Received: from localhost.localdomain ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id 17sm43082945pfq.51.2016.02.08.04.05.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Feb 2016 04:05:13 -0800 (PST) From: sunil.kovvuri@gmail.com To: netdev@vger.kernel.org Subject: [PATCH 5/6] net: thunderx: bgx: Add log message when setting mac address Date: Mon, 8 Feb 2016 17:37:51 +0530 Message-Id: <1454933272-45005-6-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1454933272-45005-1-git-send-email-sunil.kovvuri@gmail.com> References: <1454933272-45005-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160208_040531_798682_58CBB79A X-CRM114-Status: GOOD ( 11.87 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Robert Richter , sgoutham@cavium.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robert.richter@caviumnetworks.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Robert Richter Signed-off-by: Robert Richter Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 111835b..cfee496 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -886,7 +886,8 @@ static void bgx_get_qlm_mode(struct bgx *bgx) #ifdef CONFIG_ACPI -static int acpi_get_mac_address(struct acpi_device *adev, u8 *dst) +static int acpi_get_mac_address(struct device *dev, struct acpi_device *adev, + u8 *dst) { u8 mac[ETH_ALEN]; int ret; @@ -897,10 +898,13 @@ static int acpi_get_mac_address(struct acpi_device *adev, u8 *dst) goto out; if (!is_valid_ether_addr(mac)) { + dev_warn(dev, "MAC address invalid: %pM\n", mac); ret = -EINVAL; goto out; } + dev_info(dev, "MAC address set to: %pM\n", mac); + memcpy(dst, mac, ETH_ALEN); out: return ret; @@ -911,14 +915,15 @@ static acpi_status bgx_acpi_register_phy(acpi_handle handle, u32 lvl, void *context, void **rv) { struct bgx *bgx = context; + struct device *dev = &bgx->pdev->dev; struct acpi_device *adev; if (acpi_bus_get_device(handle, &adev)) goto out; - acpi_get_mac_address(adev, bgx->lmac[bgx->lmac_count].mac); + acpi_get_mac_address(dev, adev, bgx->lmac[bgx->lmac_count].mac); - SET_NETDEV_DEV(&bgx->lmac[bgx->lmac_count].netdev, &bgx->pdev->dev); + SET_NETDEV_DEV(&bgx->lmac[bgx->lmac_count].netdev, dev); bgx->lmac[bgx->lmac_count].lmacid = bgx->lmac_count; out: