Re: [PATCH 5/6] net: thunderx: bgx: Add log message when setting mac address

From: Sergei Shtylyov
Date: Mon Feb 08 2016 - 08:30:46 EST


Hello.

On 2/8/2016 3:07 PM, sunil.kovvuri@xxxxxxxxx wrote:

From: Robert Richter <rrichter@xxxxxxxxxx>

Signed-off-by: Robert Richter <rrichter@xxxxxxxxxx>
Signed-off-by: Sunil Goutham <sgoutham@xxxxxxxxxx>
---
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
[...]
@@ -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);

dev_er(), maybe?

ret = -EINVAL;
goto out;
}

+ dev_info(dev, "MAC address set to: %pM\n", mac);
+
memcpy(dst, mac, ETH_ALEN);
out:
return ret;
[...]

MBR, Sergei