From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Yeryomin Subject: Re: [PATCH 4/4] RFC: net: dsa: realtek-smi: Add Realtek SMI driver Date: Thu, 09 Nov 2017 14:49:32 +0200 Message-ID: References: <20171105231909.5599-1-linus.walleij@linaro.org> <20171105231909.5599-5-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org, =?UTF-8?Q?Antti_Sepp?= =?UTF-8?Q?=C3=A4l=C3=A4?= , Colin Leitner , Gabor Juhos To: Linus Walleij Return-path: Received: from s1l1v.rtu.lv ([213.175.92.62]:54527 "EHLO mail.pbx.lv" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752678AbdKIMtf (ORCPT ); Thu, 9 Nov 2017 07:49:35 -0500 In-Reply-To: <20171105231909.5599-5-linus.walleij@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: On 2017-11-06 01:19, Linus Walleij wrote: > This adds a driver core for the Realtek SMI chips and a subdriver > for the RTL8366RB. I just added this chip simply because it is > all I can test. > > The code is a massaged variant of the code that has been sitting > out-of-tree in OpenWRT for years in the absence of a proper switch > subsystem. I have tried to credit the original authors wherever > possible. > > The main changes I've done from the OpenWRT code: > - Added a callback to set the MAC address. > - Added an IRQ chip inside the RTL8366RB switch to demux and > handle the line state IRQs. > - Distributed the phy handling out to the PHY driver. > - Added some RTL8366RB code that was missing in the driver, > such as setting up "green ethernet" with a funny jam table > and forcing MAC5 (the CPU port) into 1 GBit. > Although it could be a good thing to bring this to mainline, I'm kind of pessimistic about supporting such switches in DSA/switchdev. IMO swconfig does a better job for now. Unless switchdev could be expanded to support other functions beyond VLAN, like port rate control, ACL, HW NAT (no switchdev L3 offload doesn't fit this), etc. Or at least provide some centralized API for others, like [1]. Or maybe I overlooked something and it can be done already? Regards, Roman Links: [1] https://marc.info/?l=linux-netdev&m=150972281109740