From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [OpenWrt-Devel] [PATCH v3 0/6] staging: Introduce DPAA2 Ethernet Switch driver Date: Sat, 14 Oct 2017 15:11:09 -0700 Message-ID: <21A90A5D-3AD5-4281-8709-F25BAB6B1602@gmail.com> References: <1507194974-12050-1-git-send-email-razvan.stefanescu@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Razvan Stefanescu , OpenWrt Development List , "netdev@vger.kernel.org" , "devel@driverdev.osuosl.org" , ruxandra.radulescu@nxp.com, Arnd Bergmann , Greg KH , alexandru.marginean@nxp.com, "linux-kernel@vger.kernel.org" , Alexander Graf , Stuart Yoder , bogdan.purcareata@nxp.com, laurentiu.tudor@nxp.com, Andrew Lunn , Vivien Didelot To: Linus Walleij Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On October 14, 2017 2:59:22 PM PDT, Linus Walleij wrote: >On Sat, Oct 14, 2017 at 8:52 PM, Florian Fainelli > wrote: > >> The most deployed switch device drivers have been converted to DSA >> already: b53, qca8k (ar83xx in OpenWrt/LEDE) and mtk7530 are all in >> tree, and now we are getting new submissions from Michrochip to >support >> their pretty large KSZ series=2E Converting from swconfig to DSA is >> actually quite simple, but like anything requires time and testing, >and >> access to hardware and ideally datasheet=2E > >Hm, I have a Realtek RB8366RB in this router on my desk=2E > >I guess that means I should just take the old switchdev-based >SMI-driver and convert it to DSA=2E > >I bet I can do that :D Yes, it really should not be too hard=2E The OpenWrt/LEDE driver had mostl= y the same semantics as what is needed for being a proper DSA driver=2E You= should of course start simple: get basic switching working, then add stati= stics, VLAN, FDB, etc=2E OpenWrt/LEDE models switches as PHY device objects= which would not work upstream so you should have the driver be probed as a= MDIO/SPI/I2C (see b53 for example) and set up fixed-link properties betwee= n the CPU and the switch=2E > >Well, I will try=2E Because it's blocking me to work on the Gemini >ethernet driver=2E Well usually the boot loader may leave the switch in a good enough state t= hat you can work on the CPU controller mostly independently from dealing wi= th the switch=2E This is not universally true, and a properly working bootl= oader should actually quiesce/reset both blocks prior to OS control=2E Don't hesitate if you have questions=2E Cheers=2E --=20 Florian