On Thu, Jun 14, 2018 at 01:30:28PM +0200, Jiri Pirko wrote: > Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: > > [...] > > >@@ -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; > > So you force CPSW_SWITCHDEV mode if the CONFIG_TI_CPSW_SWITCHDEV is > enabled. That does not sound right. I think that user should tell what > mode does he want regardless what the kernel config is. We discussed this during the V1 of the RFC. Yes it doesn't seem good, but the device currently configures the modes using DTS (which is not correct). I choose the .config due to that. I can't think of anything better, but i am open to suggestions
Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver
- [RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW Ilias Apalodimas
- [RFC v2, net-next, PATCH 1/4] net/cpsw: move common... Ilias Apalodimas
- [RFC v2, net-next, PATCH 3/4] net/cpsw: prepare cps... Ilias Apalodimas
- [RFC v2, net-next, PATCH 2/4] net/cpsw_ale: add fun... Ilias Apalodimas
- [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: a... Ilias Apalodimas
- Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_swit... Jiri Pirko
- Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_... Ilias Apalodimas
- Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_swit... Jiri Pirko
- Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_... Ilias Apalodimas
- Re: [RFC v2, net-next, PATCH 4/4] net/c... Jiri Pirko
- Re: [RFC v2, net-next, PATCH 4/4] ... Ilias Apalodimas
- Re: [RFC v2, net-next, PATCH 4... Grygorii Strashko
- Re: [RFC v2, net-next, PAT... Jiri Pirko
- Re: [RFC v2, net-next, PAT... Ivan Vecera
- Re: [RFC v2, net-next, PAT... Ilias Apalodimas
- Re: [RFC v2, net-next, PAT... Ivan Vecera
- Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_swit... Andrew Lunn
- Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_... Ilias Apalodimas
- Re: [RFC v2, net-next, PATCH 4/4] net/c... Grygorii Strashko