From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH 4/4] cpsw: add switchdev support Date: Thu, 24 May 2018 18:39:04 +0200 Message-ID: <20180524163904.GH5128@lunn.ch> References: <1527144984-31236-1-git-send-email-ilias.apalodimas@linaro.org> <1527144984-31236-5-git-send-email-ilias.apalodimas@linaro.org> <20180524131229.GC24557@lunn.ch> <20180524133234.GA15703@apalos> 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, francois.ozog@linaro.org, yogeshs@ti.com, spatton@ti.com To: Ilias Apalodimas Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:43937 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031968AbeEXQjF (ORCPT ); Thu, 24 May 2018 12:39:05 -0400 Content-Disposition: inline In-Reply-To: <20180524133234.GA15703@apalos> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, May 24, 2018 at 04:32:34PM +0300, Ilias Apalodimas wrote: > On Thu, May 24, 2018 at 03:12:29PM +0200, Andrew Lunn wrote: > > Device tree is supposed to describe the hardware. Using that hardware > > in different ways is not something you should describe in DT. > > > The new switchdev mode is applied with a .config option in the kernel. What you > see is pre-existing code, so i am not sure if i should change it in this > patchset. If you break the code up into a library and two drivers, it becomes a moot point. But what i don't like here is that the device tree says to do dual mac. But you ignore that and do sometime else. I would prefer that if DT says dual mac, and switchdev is compiled in, the probe fails with EINVAL. Rather than ignore something, make it clear it is invalid. Andrew