From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver Date: Mon, 18 Jun 2018 18:16:27 +0200 Message-ID: <20180618161627.GC5865@lunn.ch> References: <1528974690-31600-1-git-send-email-ilias.apalodimas@linaro.org> <1528974690-31600-5-git-send-email-ilias.apalodimas@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, grygorii.strashko@ti.com, ivan.khoronzhuk@linaro.org, nsekhar@ti.com, jiri@resnulli.us, ivecera@redhat.com, f.fainelli@gmail.com, francois.ozog@linaro.org, yogeshs@ti.com, spatton@ti.com, Jose.Abreu@synopsys.com To: Ilias Apalodimas Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:35535 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbeFRQQb (ORCPT ); Mon, 18 Jun 2018 12:16:31 -0400 Content-Disposition: inline In-Reply-To: <1528974690-31600-5-git-send-email-ilias.apalodimas@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: > @@ -2711,6 +2789,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, > if (of_property_read_bool(node, "dual_emac")) > data->switch_mode = CPSW_DUAL_EMAC; > > + /* switchdev overrides DTS */ > + if (IS_ENABLED(CONFIG_TI_CPSW_SWITCHDEV)) > + data->switch_mode = CPSW_SWITCHDEV; > + I know you discussed this a bit with Jiri, but i still think if 'dual_mac" is found, you should do dual mac. The DT clearly requests dual mac, and doing anything else is going to cause confusion. The device tree binding is ambiguous what should happen when dual-mac is missing. So i would only enable swithdev mode in that case. But ideally, it should be a new driver with a new binding. Andrew