[PATCH v2 net-next] net: ethernet: mediatek: fix a typo bug in flow offloading

2021-04-17 Thread DENG Qingfang
ading support") Signed-off-by: DENG Qingfang --- v1 -> v2: Refined commit message according to Frank. drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethe

Re: [RFC v4 net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-15 Thread DENG Qingfang
On Tue, Apr 13, 2021 at 02:12:59PM +0100, Russell King - ARM Linux admin wrote: > On Tue, Apr 13, 2021 at 11:59:20AM +0800, DENG Qingfang wrote: > > Within 12 hours, I got some spontaneous link down/ups when EEE is enabled: > > > > [16334.236233] mt7530 mdio-bus

[PATCH net-next] net: ethernet: mediatek: fix typo in offload code

2021-04-15 Thread DENG Qingfang
.key_offset was assigned to .head_offset instead. Fix the typo. Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support") Signed-off-by: DENG Qingfang --- drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [RFC v4 net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-13 Thread DENG Qingfang
On Tue, Apr 13, 2021 at 02:52:59PM +0200, Andrew Lunn wrote: > > I guess this is depends whether the most usual case is to have all > > these interrupts being actively in use or not. Most interrupts only > > use a limited portion of their interrupt space at any given time. > > Allocating all

Re: [RFC v4 net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-12 Thread DENG Qingfang
On Mon, Apr 12, 2021 at 11:08:36PM +0800, DENG Qingfang wrote: > On Mon, Apr 12, 2021 at 07:04:49AM +, René van Dorst wrote: > > Hi Qingfang, > > > +static void mtk_phy_config_init(struct phy_device *phydev) > > > +{ > > > + /* Disable EEE */ >

Re: [PATCH RFC net-next 1/3] net: dsa: allow for multiple CPU ports

2021-04-12 Thread DENG Qingfang
On Mon, Apr 12, 2021 at 06:41:58AM +0200, Ansuel Smith wrote: > > So, drivers will read the name of every port and decide which CPU port > > does it use? > > > > Yes, this seems to be an acceptable path to follow. The driver can > provide a preferred CPU port or just tell DSA that every cpu is

Re: [RFC v4 net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-12 Thread DENG Qingfang
On Mon, Apr 12, 2021 at 09:21:12AM +0100, Marc Zyngier wrote: > On Mon, 12 Apr 2021 04:42:35 +0100, > DENG Qingfang wrote: > > > > Add support for MT7530 interrupt controller to handle internal PHYs. > > In order to assign an IRQ number to each PHY, the registration of M

Re: [RFC v4 net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-12 Thread DENG Qingfang
On Mon, Apr 12, 2021 at 07:04:49AM +, René van Dorst wrote: > Hi Qingfang, > > +static void mtk_phy_config_init(struct phy_device *phydev) > > +{ > > + /* Disable EEE */ > > + phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0); > > For my EEE patch I changed this line to: > >

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread DENG Qingfang
On Sun, Apr 11, 2021 at 09:50:17PM +0300, Vladimir Oltean wrote: > > So I'd be tempted to say 'tough luck' if all your ports are not up, and > the ones that are are assigned statically to the same CPU port. It's a > compromise between flexibility and simplicity, and I would go for > simplicity

[RFC v4 net-next 3/4] dt-bindings: net: dsa: add MT7530 interrupt controller binding

2021-04-11 Thread DENG Qingfang
Add device tree binding to support MT7530 interrupt controller. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn --- RFC v3 -> RFC v4: - Add #interrupt-cells property. Documentation/devicetree/bindings/net/dsa/mt7530.txt | 6 ++ 1 file changed, 6 insertions(+) diff --

[RFC v4 net-next 4/4] staging: mt7621-dts: enable MT7530 interrupt controller

2021-04-11 Thread DENG Qingfang
Enable MT7530 interrupt controller in the MT7621 SoC. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn --- RFC v3 -> RFC v4: - Add #interrupt-cells property. drivers/staging/mt7621-dts/mt7621.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/mt7621-dts/mt7

[RFC v4 net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-11 Thread DENG Qingfang
Add support for MT7530 interrupt controller to handle internal PHYs. In order to assign an IRQ number to each PHY, the registration of MDIO bus is also done in this driver. Signed-off-by: DENG Qingfang --- RFC v3 -> RFC v4: - No changes. drivers/net/dsa/Kconfig | 1 + drivers/net/dsa/mt7

[RFC v4 net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-11 Thread DENG Qingfang
Add support for MediaTek PHYs found in MT7530 and MT7531 switches. The initialization procedure is from the vendor driver, but due to lack of documentation, the function of some register values remains unknown. Signed-off-by: DENG Qingfang --- RFC v3 -> RFC v4: - Remove unused include. driv

[RFC v4 net-next 0/4] MT7530 interrupt support

2021-04-11 Thread DENG Qingfang
Add support for MT7530 interrupt controller. DENG Qingfang (4): net: phy: add MediaTek PHY driver net: dsa: mt7530: add interrupt support dt-bindings: net: dsa: add MT7530 interrupt controller binding staging: mt7621-dts: enable MT7530 interrupt controller .../devicetree/bindings/net

Re: [PATCH RFC net-next 1/3] net: dsa: allow for multiple CPU ports

2021-04-11 Thread DENG Qingfang
On Sat, Apr 10, 2021 at 03:34:47PM +0200, Ansuel Smith wrote: > Allow for multiple CPU ports in a DSA switch tree. By default the first > CPU port is assigned mimic the original assignement logic. A DSA driver > can define a function to declare a preferred CPU port based on the > provided port. If

Re: [RFC v3 net-next 0/4] MT7530 interrupt support

2021-04-08 Thread DENG Qingfang
Hi René, On Thu, Apr 8, 2021 at 10:02 PM René van Dorst wrote: > > Tested on Ubiquiti ER-X-SFP (MT7621) with 1 external phy which uses irq=POLL. > I wonder if the external PHY's IRQ can be registered in the devicetree. Change MT7530_NUM_PHYS to 6, and add the following to ER-X-SFP dts PHY node:

[RFC v3 net-next 4/4] staging: mt7621-dts: enable MT7530 interrupt controller

2021-04-08 Thread DENG Qingfang
Enable MT7530 interrupt controller in the MT7621 SoC. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn --- RFC v2 -> RFC v3: - No changes. drivers/staging/mt7621-dts/mt7621.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/driv

[RFC v3 net-next 3/4] dt-bindings: net: dsa: add MT7530 interrupt controller binding

2021-04-08 Thread DENG Qingfang
Add device tree binding to support MT7530 interrupt controller. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn --- RFC v2 -> RFC v3: - No changes. Documentation/devicetree/bindings/net/dsa/mt7530.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicet

[RFC v3 net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-08 Thread DENG Qingfang
Add support for MT7530 interrupt controller to handle internal PHYs. In order to assign an IRQ number to each PHY, the registration of MDIO bus is also done in this driver. Signed-off-by: DENG Qingfang --- RFC v2 -> RFC v3: - Rework IRQ request and free procedure. - Add irq_set_nested_thr

[RFC v3 net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-08 Thread DENG Qingfang
Add support for MediaTek PHYs found in MT7530 and MT7531 switches. The initialization procedure is from the vendor driver, but due to lack of documentation, the function of some register values remains unknown. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn --- RFC v2 -> RFC

[RFC v3 net-next 0/4] MT7530 interrupt support

2021-04-08 Thread DENG Qingfang
Add support for MT7530 interrupt controller. DENG Qingfang (4): net: phy: add MediaTek PHY driver net: dsa: mt7530: add interrupt support dt-bindings: net: dsa: add MT7530 interrupt controller binding staging: mt7621-dts: enable MT7530 interrupt controller .../devicetree/bindings/net

[RFC v2 net-next 4/4] staging: mt7621-dts: enable MT7530 interrupt controller

2021-04-06 Thread DENG Qingfang
Enable MT7530 interrupt controller in the MT7621 SoC. Signed-off-by: DENG Qingfang --- RFC v1 -> RFC v2: - No changes. drivers/staging/mt7621-dts/mt7621.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers/staging/mt7621-dts/mt7621.d

[RFC v2 net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-06 Thread DENG Qingfang
Add support for MT7530 interrupt controller to handle internal PHYs. In order to assign an IRQ number to each PHY, the registration of MDIO bus is also done in this driver. Signed-off-by: DENG Qingfang --- RFC v1 -> RFC v2: - Split MDIO and IRQ setup function drivers/net/dsa/Kconfig |

[RFC v2 net-next 3/4] dt-bindings: net: dsa: add MT7530 interrupt controller binding

2021-04-06 Thread DENG Qingfang
Add device tree binding to support MT7530 interrupt controller. Signed-off-by: DENG Qingfang --- RFC v1 -> RFC v2: - No changes. Documentation/devicetree/bindings/net/dsa/mt7530.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt

[RFC v2 net-next 0/4] MT7530 interrupt support

2021-04-06 Thread DENG Qingfang
Add support for MT7530 interrupt controller. DENG Qingfang (4): net: phy: add MediaTek PHY driver net: dsa: mt7530: add interrupt support dt-bindings: net: dsa: add MT7530 interrupt controller binding staging: mt7621-dts: enable MT7530 interrupt controller .../devicetree/bindings/net

[RFC v2 net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-06 Thread DENG Qingfang
Add support for MediaTek PHYs found in MT7530 and MT7531 switches. The initialization procedure is from the vendor driver, but due to lack of documentation, the function of some register values remains unknown. Signed-off-by: DENG Qingfang --- RFC v1 -> RFC v2: - Add PHY interface mode ch

Re: [RFC net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-06 Thread DENG Qingfang
On Tue, Apr 6, 2021 at 11:49 PM Andrew Lunn wrote: > O.K. So that makes it similar to the mv88e6xxx. With that driver, i > kept interrupt setup and mdio setup separate. I add the interrupt > controller first, and then do mdio setup, calling a helper to map the > PHY interrupts and assign them to

Re: [RFC net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-06 Thread DENG Qingfang
On Tue, Apr 6, 2021 at 11:47 PM Chun-Kuang Hu wrote: > > Hi, Qingfang: > > DENG Qingfang 於 2021年4月6日 週二 下午10:19寫道: > > --- a/drivers/net/phy/Kconfig > > +++ b/drivers/net/phy/Kconfig > > @@ -207,6 +207,11 @@ config MARVELL_88X_PHY > > Support for

Re: [RFC net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-06 Thread DENG Qingfang
On Tue, Apr 6, 2021 at 11:30 PM Andrew Lunn wrote: > > On Tue, Apr 06, 2021 at 10:18:17PM +0800, DENG Qingfang wrote: > > Add support for MT7530 interrupt controller to handle internal PHYs. > > Are the interrupts purely PHY interrupts? Or are there some switch > operat

Re: [RFC net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-06 Thread DENG Qingfang
On Tue, Apr 6, 2021 at 11:21 PM Andrew Lunn wrote: > > On Tue, Apr 06, 2021 at 10:18:16PM +0800, DENG Qingfang wrote: > > Add support for MediaTek PHYs found in MT7530 and MT7531 switches. > > Do you know if this PHY is available standalone? Not that I know of.

[RFC net-next 4/4] staging: mt7621-dts: enable MT7530 interrupt controller

2021-04-06 Thread DENG Qingfang
Enable MT7530 interrupt controller in the MT7621 SoC. Signed-off-by: DENG Qingfang --- drivers/staging/mt7621-dts/mt7621.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers/staging/mt7621-dts/mt7621.dtsi index 16fc94f65486..ebf8b0633e88

[RFC net-next 0/4] MT7530 interrupt support

2021-04-06 Thread DENG Qingfang
Add support for MT7530 interrupt controller. DENG Qingfang (4): net: phy: add MediaTek PHY driver net: dsa: mt7530: add interrupt support dt-bindings: net: dsa: add MT7530 interrupt controller binding staging: mt7621-dts: enable MT7530 interrupt controller .../devicetree/bindings/net

[RFC net-next 3/4] dt-bindings: net: dsa: add MT7530 interrupt controller binding

2021-04-06 Thread DENG Qingfang
Add device tree binding to support MT7530 interrupt controller. Signed-off-by: DENG Qingfang --- Documentation/devicetree/bindings/net/dsa/mt7530.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree

[RFC net-next 1/4] net: phy: add MediaTek PHY driver

2021-04-06 Thread DENG Qingfang
Add support for MediaTek PHYs found in MT7530 and MT7531 switches. The initialization procedure is from the vendor driver, but due to lack of documentation, the function of some register values remains unknown. Signed-off-by: DENG Qingfang --- drivers/net/phy/Kconfig| 5 ++ drivers/net

[RFC net-next 2/4] net: dsa: mt7530: add interrupt support

2021-04-06 Thread DENG Qingfang
Add support for MT7530 interrupt controller to handle internal PHYs. In order to assign an IRQ number to each PHY, the registration of MDIO bus is also done in this driver. Signed-off-by: DENG Qingfang --- drivers/net/dsa/mt7530.c | 203 +++ drivers/net/dsa

Re: [RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-22 Thread DENG Qingfang
On Fri, Mar 19, 2021 at 6:49 PM Vladimir Oltean wrote: > Why would you even want to look at the source net device for forwarding? > I'd say that if dp->bridge_dev is NULL in the xmit function, you certainly > want to bypass address learning if you can. Maybe also for link-local traffic. Also for

Re: [RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-19 Thread DENG Qingfang
On Fri, Mar 19, 2021 at 5:06 PM Vladimir Oltean wrote: > > This is a good point actually, which I thought about, but did not give a > lot of importance to for the moment. Either we go full steam ahead with > assisted learning on the CPU port for everybody, and we selectively > learn the addresses

Re: [RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-19 Thread DENG Qingfang
On Fri, Mar 19, 2021 at 01:18:27AM +0200, Vladimir Oltean wrote: > From: Vladimir Oltean > > DSA has gained the recent ability to deal gracefully with upper > interfaces it cannot offload, such as the bridge, bonding or team > drivers. When such uppers exist, the ports are still in standalone

Re: [PATCH net-next] net: dsa: mt7530: support MDB and bridge flag operations

2021-03-15 Thread DENG Qingfang
On Tue, Mar 16, 2021 at 5:15 AM Vladimir Oltean wrote: > > Actually this is just how Qingfang explained it: > https://patchwork.kernel.org/project/netdevbpf/patch/20210224081018.24719-1-dqf...@gmail.com/ > > I just assume that MT7530/7531 switches don't need to enable flooding on > user ports

[PATCH net-next] net: dsa: mt7530: support MDB and bridge flag operations

2021-03-15 Thread DENG Qingfang
Support port MDB and bridge flag operations. As the hardware can manage multicast forwarding itself, offload_fwd_mark can be unconditionally set to true. Signed-off-by: DENG Qingfang --- Changes since RFC: Replaced BR_AUTO_MASK with BR_FLOOD | BR_LEARNING drivers/net/dsa/mt7530.c | 124

dsa_master_find_slave()'s time complexity and potential performance hit

2021-03-02 Thread DENG Qingfang
Since commit 7b9a2f4bac68 ("net: dsa: use ports list to find slave"), dsa_master_find_slave() has been iterating over a linked list instead of accessing arrays, making its time complexity O(n). The said function is called frequently in DSA RX path, so it may cause a performance hit, especially for

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread DENG Qingfang
On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij wrote: > With my minor changes: > Tested-by: Linus Walleij How about using a mutex lock in port_bridge_{join,leave} ? In my opinion all functions that access multiple registers should be synchronized. > Yours, > Linus Walleij

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread DENG Qingfang
On Mon, Mar 1, 2021 at 9:55 PM Linus Walleij wrote: > > BTW where did you find this register? It's not in any of my > vendor driver code dumps. DD-WRT https://svn.dd-wrt.com/browser/src/linux/universal/linux-4.14/drivers/net/ethernet/ag7100/RTL8366RB_DRIVER/rtl8368s_reg.h#L581 > > Curious! > >

[PATCH net] net: dsa: tag_mtk: fix 802.1ad VLAN egress

2021-03-01 Thread DENG Qingfang
A different TPID bit is used for 802.1ad VLAN frames. Reported-by: Ilario Gelmetti Fixes: f0af34317f4b ("net: dsa: mediatek: combine MediaTek tag with VLAN tag") Signed-off-by: DENG Qingfang --- net/dsa/tag_mtk.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletion

[PATCH net] net: dsa: tag_rtl4_a: fix egress tags

2021-02-28 Thread DENG Qingfang
. It has been done by DSA core since commit a3b0b6479700. - A u16 pointer points to skb data. It should be __be16 for network byte order. - Typo in comments. "numer" -> "number". Fixes: 86dd9868b878 ("net: dsa: tag_rtl4_a: Support also egress tags") Signed-of

[PATCH net] net: dsa: mt7530: don't build GPIO support if !GPIOLIB

2021-02-25 Thread DENG Qingfang
exclude GPIO support if GPIOLIB is not enabled. Fixes: 429a0edeefd8 ("net: dsa: mt7530: MT7530 optional GPIO support") Reported-by: Arnd Bergmann Signed-off-by: DENG Qingfang --- drivers/net/dsa/mt7530.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/dsa/mt7530.c b/

Re: [PATCH 3/3] net: dsa: mt7530: add GPIOLIB dependency

2021-02-25 Thread DENG Qingfang
Hi Arnd, On Thu, Feb 25, 2021 at 10:40 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > The new gpio support may be optional at runtime, but it requires > building against gpiolib: > > ERROR: modpost: "gpiochip_get_data" [drivers/net/dsa/mt7530.ko] undefined! > ERROR: modpost:

Re: [RFC net-next] net: dsa: mt7530: support MDB and bridge flag operations

2021-02-25 Thread DENG Qingfang
Hi Vladimir, On Wed, Feb 24, 2021 at 4:42 PM Vladimir Oltean wrote: > > I think the comment is incorrect and this _enables_ flooding (which btw > is ok until we get the address filtering thing sorted out). The initial value of these FFP fields is all 1's (0xFF). Writing the CPU port bit here

[RFC net-next] net: dsa: mt7530: support MDB and bridge flag operations

2021-02-24 Thread DENG Qingfang
Support port MDB and bridge flag operations. As the hardware can manage multicast forwarding itself, offload_fwd_mark can be unconditionally set to true. Signed-off-by: DENG Qingfang --- Changes: Add bridge flag operations and resend as RFC drivers/net/dsa/mt7530.c | 123

[RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-02-23 Thread DENG Qingfang
Use port isolation registers to configure bridge offloading. Remove the VLAN init, as we have proper CPU tag and bridge offloading support now. Signed-off-by: DENG Qingfang --- This is not tested, as I don't have a RTL8366RB board. And I think there is potential race condition in port_bridge_

[PATCH net-next v2] net: dsa: mt7530: support MDB operations

2021-02-22 Thread DENG Qingfang
Support port MDB add to/delete from MT7530 ARL. As the hardware can manage multicast forwarding itself, trapping multicast traffic to the CPU is no longer required. Signed-off-by: DENG Qingfang --- v1 -> v2: fix commit message drivers/net/dsa/mt7530.c |

[PATCH net-next] net: dsa: mt7530: support MDB operations

2021-02-22 Thread DENG Qingfang
As the hardware can manage multicast forwarding itself, trapping multicast traffic to the CPU is no longer required. Signed-off-by: DENG Qingfang --- drivers/net/dsa/mt7530.c | 58 +--- net/dsa/tag_mtk.c| 14 +- 2 files changed, 56 insertions

[PATCH net] net: ag71xx: remove unnecessary MTU reservation

2021-02-17 Thread DENG Qingfang
2 bytes of the MTU are reserved for Atheros DSA tag, but DSA core has already handled that since commit dc0fe7d47f9f. Remove the unnecessary reservation. Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: DENG Qingfang --- drivers/net/ethernet/atheros/ag71xx.c |

Re: [PATCH net] net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add

2021-01-30 Thread DENG Qingfang
On Sun, Jan 31, 2021 at 8:39 AM Vladimir Oltean wrote: > > Tobias has a point in a way too, you should get used to adding the > 'master static' flags to your bridge fdb commands, otherwise weird > things like this could happen. The faulty code can only be triggered > when going through

[PATCH net] net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add

2021-01-30 Thread DENG Qingfang
Having multiple destination ports for a unicast address does not make sense. Make port_db_load_purge override existent unicast portvec instead of adding a new port bit. Fixes: 884729399260 ("net: dsa: mv88e6xxx: handle multiple ports in ATU") Signed-off-by: DENG Qingfang --- drive

Re: [PATCH net-next v2 1/2] dt-bindings: net: dsa: add MT7530 GPIO controller binding

2021-01-25 Thread DENG Qingfang
On Mon, Jan 25, 2021 at 11:52 PM Rob Herring wrote: > > Please add Acked-by/Reviewed-by tags when posting new versions. However, > there's no need to repost patches *only* to add the tags. The upstream > maintainer will do that for acks received on the version they apply. Sorry. Will do that

[PATCH net-next v2 1/2] dt-bindings: net: dsa: add MT7530 GPIO controller binding

2021-01-24 Thread DENG Qingfang
Add device tree binding to support MT7530 GPIO controller. Signed-off-by: DENG Qingfang --- Changes v1 -> v2: No changes. Documentation/devicetree/bindings/net/dsa/mt7530.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.

[PATCH net-next v2 2/2] net: dsa: mt7530: MT7530 optional GPIO support

2021-01-24 Thread DENG Qingfang
MT7530's LED controller can drive up to 15 LED/GPIOs. Add support for GPIO control and allow users to use its GPIOs by setting gpio-controller property in device tree. Signed-off-by: DENG Qingfang --- Changes v1 -> v2: Set Output Enable after changing direction to output to avoid signal gli

[PATCH net-next v2 0/2] dsa: add MT7530 GPIO support

2021-01-24 Thread DENG Qingfang
MT7530's LED controller can be used as GPIO controller. Add support for it. DENG Qingfang (2): dt-bindings: net: dsa: add MT7530 GPIO controller binding net: dsa: mt7530: MT7530 optional GPIO support .../devicetree/bindings/net/dsa/mt7530.txt| 6 + drivers/net/dsa/mt7530.c

Re: [PATCH net-next 2/2] drivers: net: dsa: mt7530: MT7530 optional GPIO support

2021-01-18 Thread DENG Qingfang
Hi Linus, On Mon, Jan 18, 2021 at 10:55 PM Linus Walleij wrote: > > So for offset 0..14 this becomes bits > 0, 1, 2, 4, 5, 6, 8, 9, 10, 12 ... 18 > > What is the logic in this and is it what you intend? Yes. Bit 0..2 are phy 0's LED 0..2, bit 4..6 are phy 1's LED 0..2, etc. > Please add a

Re: [PATCH net-next 0/2] dsa: add MT7530 GPIO support

2021-01-11 Thread DENG Qingfang
Hi Marek, On Mon, Jan 11, 2021 at 11:46 PM Marek Behún wrote: > > what modes does the LED support? Does it support blinking on rx/tx? > What about link status? Yes. But unfortunately they cannot be controlled individually, unless on GPIO mode. > I'd like to know because I am still working on

Re: [PATCH net-next 2/2] drivers: net: dsa: mt7530: MT7530 optional GPIO support

2021-01-11 Thread DENG Qingfang
On Mon, Jan 11, 2021 at 7:04 PM Russell King - ARM Linux admin wrote: > > FYI, Documentation/driver-api/gpio/consumer.rst says: > > For output GPIOs, the value provided becomes the initial output value. > This helps avoid signal glitching during system startup. > > Setting the pin to be an

[PATCH net-next 0/2] dsa: add MT7530 GPIO support

2021-01-10 Thread DENG Qingfang
MT7530's LED controller can be used as GPIO controller. Add support for it. DENG Qingfang (2): dt-bindings: net: dsa: add MT7530 GPIO controller binding drivers: net: dsa: mt7530: MT7530 optional GPIO support .../devicetree/bindings/net/dsa/mt7530.txt| 6 ++ drivers/net/dsa/mt7530.c

[PATCH net-next 2/2] drivers: net: dsa: mt7530: MT7530 optional GPIO support

2021-01-10 Thread DENG Qingfang
MT7530's LED controller can drive up to 15 LED/GPIOs. Add support for GPIO control and allow users to use its GPIOs by setting gpio-controller property in device tree. Signed-off-by: DENG Qingfang --- drivers/net/dsa/mt7530.c | 96 drivers/net/dsa

[PATCH net-next 1/2] dt-bindings: net: dsa: add MT7530 GPIO controller binding

2021-01-10 Thread DENG Qingfang
Add device tree binding to support MT7530 GPIO controller. Signed-off-by: DENG Qingfang --- Documentation/devicetree/bindings/net/dsa/mt7530.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings

Re: [PATCH] staging: mt7621-dts: remove obsolete switch node

2021-01-08 Thread DENG Qingfang
On Sat, Jan 9, 2021 at 2:25 AM Andrew Lunn wrote: > > On Fri, Jan 08, 2021 at 10:51:55AM +0800, DENG Qingfang wrote: > > This was for OpenWrt's swconfig driver, which never made it upstream, > > and was also superseded by MT7530 DSA driver. > > What about > Documentat

[PATCH] staging: mt7621-dts: remove obsolete switch node

2021-01-07 Thread DENG Qingfang
This was for OpenWrt's swconfig driver, which never made it upstream, and was also superseded by MT7530 DSA driver. Signed-off-by: DENG Qingfang --- drivers/staging/mt7621-dts/mt7621.dtsi | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers

Re: Registering IRQ for MT7530 internal PHYs

2021-01-06 Thread DENG Qingfang
Hi Andrew, On Wed, Dec 30, 2020 at 11:23 PM Andrew Lunn wrote: > > On Wed, Dec 30, 2020 at 09:42:09AM +, Marc Zyngier wrote: > > > +static irqreturn_t > > > +mt7530_irq(int irq, void *data) > > > +{ > > > + struct mt7530_priv *priv = data; > > > + bool handled = false; > > > + int phy;

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread DENG Qingfang
Hi Heiner, Thanks for your reply. On Wed, Dec 30, 2020 at 3:39 PM Heiner Kallweit wrote: > I don't think that's the best option. I'm well aware of that. > You may want to add a PHY driver for your chip. Supposedly it > supports at least PHY suspend/resume. You can use the RTL8366RB > PHY

Registering IRQ for MT7530 internal PHYs

2020-12-29 Thread DENG Qingfang
Hi, I added MT7530 IRQ support and registered its internal PHYs to IRQ. It works but my patch used two hacks. 1. Removed phy_drv_supports_irq check, because config_intr and handle_interrupt are not set for Generic PHY. 2. Allocated ds->slave_mii_bus before calling ds->ops->setup, because we

Re: [RFC PATCH net-next 3/3] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors

2020-11-08 Thread DENG Qingfang
y only cares about SWITCHDEV_FDB_ADD_TO_DEVICE events > received on its own interfaces, such as static FDB entries. > > Luckily we can change that, and DSA can listen to all switchdev FDB > add/del events in the system and figure out if those events were emitted > by a bridge that

Re: [PATCH net-next v2 0/7] net-next: dsa: mt7530: add support for MT7531

2020-08-18 Thread DENG Qingfang
Hi, Is port mirroring working? Port mirroring registers on MT7531 have moved, according to bpi's MT7531 reference manual. Please fix that as well.