[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36baf6e7-fcd0-5516-6213-38a49aeb43da@gmail.com>
Date: Tue, 12 Nov 2019 13:34:31 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Vladimir Oltean <olteanv@...il.com>, jakub.kicinski@...ronome.com,
davem@...emloft.net, alexandre.belloni@...tlin.com
Cc: andrew@...n.ch, vivien.didelot@...il.com,
joergen.andreasen@...rochip.com, allan.nielsen@...rochip.com,
horatiu.vultur@...rochip.com, claudiu.manoil@....com,
netdev@...r.kernel.org, Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next 07/12] net: mscc: ocelot: separate the
implementation of switch reset
On 11/12/19 4:44 AM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
>
> The Felix switch has a different reset procedure, so a function pointer
> needs to be created and added to the ocelot_ops structure.
>
> The reset procedure has been moved into ocelot_init.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> drivers/net/ethernet/mscc/ocelot.c | 3 ++
> drivers/net/ethernet/mscc/ocelot.h | 1 +
> drivers/net/ethernet/mscc/ocelot_board.c | 37 +++++++++++++++---------
> 3 files changed, 28 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
> index 42da193a8240..0fe928026e61 100644
> --- a/drivers/net/ethernet/mscc/ocelot.c
> +++ b/drivers/net/ethernet/mscc/ocelot.c
> @@ -2294,6 +2294,9 @@ int ocelot_init(struct ocelot *ocelot)
> ocelot_vlan_init(ocelot);
> ocelot_ace_init(ocelot);
>
> + if (ocelot->ops->reset)
> + ocelot->ops->reset(ocelot);
We were not checking doing any error code checking, but arguably we know
should, any reason not to propagate the error code?
--
Florian
Powered by blists - more mailing lists