mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>,
	<monstr@monstr.eu>, <ralf@linux-mips.org>, <tglx@linutronix.de>,
	<jason@lakedaemon.net>, <marc.zyngier@arm.com>
Cc: <soren.brinkmann@xilinx.com>, <linux-kernel@vger.kernel.org>,
	<linux-mips@linux-mips.org>, <michal.simek@xilinx.com>,
	<netdev@vger.kernel.org>
Subject: Re: [Patch v4 09/12] net: ethernet: xilinx: Generate random mac if none found
Date: Fri, 2 Sep 2016 09:08:25 +0200	[thread overview]
Message-ID: <97b7241b-941e-006c-498f-2dbffdb9d951@xilinx.com> (raw)
In-Reply-To: <1472748665-47774-10-git-send-email-Zubair.Kakakhel@imgtec.com>

On 1.9.2016 18:51, Zubair Lutfullah Kakakhel wrote:
> At the moment, if the emaclite device doesn't find a mac address
> from any source, it simply uses 0x0 with a warning printed.
> 
> Instead of using a 0x0 mac address, use a randomly generated one.
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> 
> ---
> V3 -> V4
> Curly braces after if check for correct styling
> 
> V2 -> V3
> No change
> 
> V1 -> V2
> New patch
> ---
>  drivers/net/ethernet/xilinx/xilinx_emaclite.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> index 3cee84a..efc8d2e 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> @@ -1131,11 +1131,13 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
>  	lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong");
>  	mac_address = of_get_mac_address(ofdev->dev.of_node);
>  
> -	if (mac_address)
> +	if (mac_address) {
>  		/* Set the MAC address. */
>  		memcpy(ndev->dev_addr, mac_address, ETH_ALEN);
> -	else
> -		dev_warn(dev, "No MAC address found\n");
> +	} else {
> +		dev_warn(dev, "No MAC address found. Generating Random one\n");
> +		eth_hw_addr_random(ndev);
> +	}
>  
>  	/* Clear the Tx CSR's in case this is a restart */
>  	__raw_writel(0, lp->base_addr + XEL_TSR_OFFSET);
> 

You should remove these 2 emaclite patches and send them separately
because they should go via netdev tree.

Thanks,
Michal

  reply	other threads:[~2016-09-02  7:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 16:50 [Patch v4 00/12] microblaze/MIPS: xilfpga: intc and peripheral Zubair Lutfullah Kakakhel
2016-09-01 16:50 ` [Patch v4 01/12] microblaze: irqchip: Move intc driver to irqchip Zubair Lutfullah Kakakhel
2016-09-02  5:56   ` Michal Simek
2016-09-02  9:55     ` Zubair Lutfullah Kakakhel
2016-09-02  6:25   ` Michal Simek
2016-09-02 10:06     ` Zubair Lutfullah Kakakhel
2016-09-02 10:27       ` Michal Simek
2016-09-02 11:46         ` Zubair Lutfullah Kakakhel
2016-09-02 12:06           ` Michal Simek
2016-09-02 12:48             ` Jason Cooper
2016-09-02 13:28         ` Jason Cooper
2016-09-02 13:31       ` Marc Zyngier
2016-09-01 16:50 ` [Patch v4 02/12] irqchip: axi-intc: Clean up irqdomain argument and read/write Zubair Lutfullah Kakakhel
2016-09-01 17:15   ` Marc Zyngier
2016-09-02 10:47     ` Zubair Lutfullah Kakakhel
2016-09-02  1:25   ` kbuild test robot
2016-09-01 16:50 ` [Patch v4 03/12] irqchip: axi-intc: Rename get_irq to xintc_get_irq Zubair Lutfullah Kakakhel
2016-09-02  5:58   ` Michal Simek
2016-09-01 16:50 ` [Patch v4 04/12] irqchip: axi-intc: Add support for parent intc Zubair Lutfullah Kakakhel
2016-09-01 17:17   ` Marc Zyngier
2016-09-01 16:50 ` [Patch v4 05/12] MIPS: xilfpga: Use irqchip_init instead of the legacy way Zubair Lutfullah Kakakhel
2016-09-01 16:50 ` [Patch v4 06/12] MIPS: xilfpga: Use Xilinx AXI Interrupt Controller Zubair Lutfullah Kakakhel
2016-09-02  7:05   ` Michal Simek
2016-09-02  7:06     ` Michal Simek
2016-09-01 16:51 ` [Patch v4 07/12] MIPS: xilfpga: Update DT node and specify uart irq Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 08/12] MIPS: Xilfpga: Add DT node for AXI I2C Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 09/12] net: ethernet: xilinx: Generate random mac if none found Zubair Lutfullah Kakakhel
2016-09-02  7:08   ` Michal Simek [this message]
2016-09-01 16:51 ` [Patch v4 10/12] net: ethernet: xilinx: Enable emaclite for MIPS Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 11/12] MIPS: xilfpga: Add DT node for AXI emaclite Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 12/12] MIPS: xilfpga: Update defconfig Zubair Lutfullah Kakakhel

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=97b7241b-941e-006c-498f-2dbffdb9d951@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=Zubair.Kakakhel@imgtec.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=marc.zyngier@arm.com \
    --cc=monstr@monstr.eu \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=soren.brinkmann@xilinx.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome