[PATCH v2 1/3] Move mvswitch 88E6060 driver to the ath25

Sergey Ryazanov ryazanov.s.a at gmail.com
Sat Dec 18 15:22:37 PST 2021


Hello Stefan,

On Sun, Dec 19, 2021 at 12:12 AM Stefan Lippers-Hollmann <s.l-h at gmx.de> wrote:
> On 2021-12-18, Sergey Ryazanov wrote:
>> On Sat, Dec 18, 2021 at 2:25 PM Bjørn Mork <bjorn at mork.no> wrote:
>>> Sergey Ryazanov <ryazanov.s.a at gmail.com> writes:
>>>> ath25 can not be switched to the DSA implementation due to lack of the
>>>> DTS support.
>>>
>>> I fully understand and accept that this isn't made a priority.  But the
>>> explanation is misleading. It's definitely *possible* to use a DSA
>>> driver without DTS.  There are examples in mainline.  So "cannot" is
>>> wrong.
>>
>> Yep, I know that in general a DSA switch can be configured via the
>> platform data as any other device. But in this particular case, the
>> particular 88E6060 switch support can not be switched to the DSA
>> implementation because the DSA implementation does not support
>> configuration via the platform data.
>>
>> I checked the kernel code and the OpenWrt patches and found the only
>> board with the 88E6060 switch and this board utilizes DTS for its
>> configuration:
>
> NET_DSA_MV88E6060 has already been used for this device (tl-wr941nd v2/
> v3) in ar71xx, using platform data
>
>
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd.c;hb=refs/heads/openwrt-19.07
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/config-4.14;h=9a524fae4316caa10431bd6b3b4dadbe8660f14c;hb=refs/heads/openwrt-19.07#l433
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/base-files/etc/board.d/02_network;h=44fce970c0fd8b4811242fac0b53764a09244a2f;hb=refs/heads/openwrt-19.07#l324

Thank you. My mistake was that I was looking for a  88E6060 specific
structure. Bjorn was kind and explained that a common structure
(struct dsa_chip_data) is used to configure the DSA. Your example now
completes the picture!

The last link should be:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/base-files/etc/board.d/02_network;h=44fce970c0fd8b4811242fac0b53764a09244a2f;hb=refs/heads/openwrt-19.07#l531

The 324 line contains a code for RB941-2ND, while the code for
TL-WR941ND begins on line 531.

> so it should be possible for ath25 as well, although the effort might
> not be worth it, considering the age and specifications of the target
> devices.

As it turned out, the kernel switching to the DSA is a relatively
simple task in itself. I see a couple additional complications related
to the building process, kernel initialization and user experience. To
properly support the DSA switch configuration, we need a board model
"autodetection" as well as per board image generation. At the moment
the ath25 have no framework for these tasks. It produces a single
generic image for all boards. So, we need to introduce per board image
generation and a kernel code for MIPS machines handling. Also the DSA
introduction will seriously disturb the user experience due to the
inability to smoothly update the network config. I just recall a lot
of talks after migration of other targets.

I personally no longer use ath25 devices and have no motivation to
deal with this not hard, but complex task. According to annual
discussions about the ath25 target decommission [1,2], there are
surprisingly a lot of users of these devices. Maybe someone of the
active users of these boards would like to get the ball rolling. So
our discussion today will be a good starting point for such a brave
man :)

1. https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg60168.html
2. https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg54812.html

-- 
Sergey



More information about the openwrt-devel mailing list