netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>, <monstr@monstr.eu>,
	<michal.simek@xilinx.com>, <punnaia@xilinx.com>
Subject: Re: [PATCH 3/4] net/macb: fix capabilities configuration
Date: Mon, 30 Mar 2015 08:33:59 +0200	[thread overview]
Message-ID: <5518EE57.8050808@atmel.com> (raw)
In-Reply-To: <20150328000235.30337361@bbrezillon>

Le 28/03/2015 00:02, Boris Brezillon a écrit :
> Hi Nicolas,
> 
> On Fri, 27 Mar 2015 16:34:11 +0100
> Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> 
>> Capabilities configuration by macb_configure_caps() was moved far too late by
>> 421d9df0628b (net/macb: merge at91_ether driver into macb driver) which would
>> lead to badly configured hardware.
> 
> Indeed, the macb_configure_caps function is called a bit too late,
> but ...
> 
>> So, move this function to early probe and modify its prototype to re-gain its
>> original behavior.
>> DT data retrieval is also moved to simplify the probe code flow.
> 
> ... I'm not happy with these changes.
> I tried to keep  specific init steps of macb and at91_ether separated
> and you're moving macb_configure_caps call (not required on at91_ether
> HW) into macb_probe (the common probe part).

Well, this function is about configuring the capabilities of the
hardware both from the configuration registers and the device tree
entries (this last source applies to all flavors of hardware).

I only see advantages to set these flags early (Cf. above).

> How about moving macb_configure_caps a bit earlier in the macb_init
> function [1] ?

No, it won't be sufficient. The very first function needing the
capabilities set is macb_get_hwaddr() which is pretty early in macb_probe().


Bye,

> Best Regards,
> 
> Boris
> 
> [1]http://code.bulix.org/8gyi6b-88141
> 


-- 
Nicolas Ferre

  reply	other threads:[~2015-03-30  6:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 15:34 [PATCH 0/4] net/macb: fixes after big driver update Nicolas Ferre
2015-03-27 15:34 ` [PATCH 1/4] net/macb: only probe queues once and use stored values Nicolas Ferre
2015-03-27 16:24   ` Cyrille Pitchen
2015-03-30  6:30     ` Nicolas Ferre
2015-03-27 22:36   ` Boris Brezillon
2015-03-27 15:34 ` [PATCH 2/4] net/macb: add comment in macb_probe_queues Nicolas Ferre
2015-03-27 15:34 ` [PATCH 3/4] net/macb: fix capabilities configuration Nicolas Ferre
2015-03-27 23:02   ` Boris Brezillon
2015-03-30  6:33     ` Nicolas Ferre [this message]
2015-03-27 15:34 ` [PATCH 4/4] net/macb: trivial: correct wording of for caps Nicolas Ferre

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=5518EE57.8050808@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=netdev@vger.kernel.org \
    --cc=punnaia@xilinx.com \
    /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).