lkml.org 
[lkml]   [2017]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [OpenWrt-Devel] [PATCH v3 0/6] staging: Introduce DPAA2 Ethernet Switch driver
From
On October 14, 2017 2:59:22 PM PDT, Linus Walleij <linus.walleij@linaro.org> wrote:
>On Sat, Oct 14, 2017 at 8:52 PM, Florian Fainelli
><f.fainelli@gmail.com> 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. Converting from swconfig to DSA is
>> actually quite simple, but like anything requires time and testing,
>and
>> access to hardware and ideally datasheet.
>
>Hm, I have a Realtek RB8366RB in this router on my desk.
>
>I guess that means I should just take the old switchdev-based
>SMI-driver and convert it to DSA.
>
>I bet I can do that :D

Yes, it really should not be too hard. The OpenWrt/LEDE driver had mostly the same semantics as what is needed for being a proper DSA driver. You should of course start simple: get basic switching working, then add statistics, VLAN, FDB, etc. 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 between the CPU and the switch.

>
>Well, I will try. Because it's blocking me to work on the Gemini
>ethernet driver.

Well usually the boot loader may leave the switch in a good enough state that you can work on the CPU controller mostly independently from dealing with the switch. This is not universally true, and a properly working bootloader should actually quiesce/reset both blocks prior to OS control.

Don't hesitate if you have questions.

Cheers.

--
Florian

\
 
 \ /
  Last update: 2017-10-15 00:12    [W:0.262 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site