netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Hancock <hancock@sedsystems.ca>
To: netdev@vger.kernel.org
Cc: anirudh@xilinx.com, John.Linn@xilinx.com, andrew@lunn.ch,
	Robert Hancock <hancock@sedsystems.ca>
Subject: [PATCH net-next v4 14/20] net: axienet: Make missing MAC address non-fatal
Date: Wed,  5 Jun 2019 14:42:27 -0600	[thread overview]
Message-ID: <1559767353-17301-15-git-send-email-hancock@sedsystems.ca> (raw)
In-Reply-To: <1559767353-17301-1-git-send-email-hancock@sedsystems.ca>

Failing initialization on a missing MAC address property is excessive.
We can just fall back to using a random MAC instead, which at least
leaves the interface in a functioning state.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index fba59c5..7b38819 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1733,8 +1733,9 @@ static int axienet_probe(struct platform_device *pdev)
 	/* Retrieve the MAC address */
 	mac_addr = of_get_mac_address(pdev->dev.of_node);
 	if (IS_ERR(mac_addr)) {
-		dev_err(&pdev->dev, "could not find MAC address\n");
-		goto free_netdev;
+		dev_warn(&pdev->dev, "could not find MAC address property: %ld\n",
+			 PTR_ERR(mac_addr));
+		mac_addr = NULL;
 	}
 	axienet_set_mac_address(ndev, mac_addr);
 
-- 
1.8.3.1


  parent reply	other threads:[~2019-06-05 20:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 20:42 [PATCH net-next v4 00/20] Xilinx axienet driver updates (v4) Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 01/20] net: axienet: Fix casting of pointers to u32 Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 02/20] net: axienet: Use standard IO accessors Robert Hancock
2019-06-06 14:12   ` Andrew Lunn
2019-06-05 20:42 ` [PATCH net-next v4 03/20] net: axienet: fix MDIO bus naming Robert Hancock
2019-06-06 14:12   ` Andrew Lunn
2019-06-05 20:42 ` [PATCH net-next v4 04/20] net: axienet: add X86 and ARM as supported platforms Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 05/20] net: axienet: Use clock framework to get device clock rate Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 06/20] net: axienet: fix teardown order of MDIO bus Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 07/20] net: axienet: Re-initialize MDIO registers properly after reset Robert Hancock
2019-06-06 21:05   ` David Miller
2019-06-05 20:42 ` [PATCH net-next v4 08/20] net: axienet: Cleanup DMA device reset and halt process Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 09/20] net: axienet: Make RX/TX ring sizes configurable Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 10/20] net: axienet: Add DMA registers to ethtool register dump Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 11/20] net: axienet: Support shared interrupts Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 12/20] net: axienet: Add optional support for Ethernet core interrupt Robert Hancock
2019-06-06 21:06   ` David Miller
2019-06-05 20:42 ` [PATCH net-next v4 13/20] net: axienet: Fix race condition causing TX hang Robert Hancock
2019-06-05 20:42 ` Robert Hancock [this message]
2019-06-05 20:42 ` [PATCH net-next v4 15/20] net: axienet: stop interface during shutdown Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 16/20] net: axienet: document device tree mdio child node Robert Hancock
2019-06-06 14:16   ` Andrew Lunn
2019-06-05 20:42 ` [PATCH net-next v4 17/20] net: axienet: Fix MDIO bus parent node detection Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 18/20] net: axienet: document axistream-connected attribute Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 19/20] net: axienet: make use of axistream-connected attribute optional Robert Hancock
2019-06-05 20:42 ` [PATCH net-next v4 20/20] net: axienet: convert to phylink API Robert Hancock
2019-06-06 21:07   ` David Miller
2019-06-06 21:03 ` [PATCH net-next v4 00/20] Xilinx axienet driver updates (v4) David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1559767353-17301-15-git-send-email-hancock@sedsystems.ca \
    --to=hancock@sedsystems.ca \
    --cc=John.Linn@xilinx.com \
    --cc=andrew@lunn.ch \
    --cc=anirudh@xilinx.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).