[PATCH net-next v3 3/3] net: ethernet: mediatek: remove hwlro property in the device tree

2016-10-06 Thread Nelson Chang
Since the proper way to check the hw lro capability is by the chip id, hwlro property in the device tree should be removed. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- Documentation/devicetree/bindings/net/mediatek-net.txt | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH net-next v3 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-06 Thread Nelson Chang
Because hw lro started to be supported from MT7623, the proper way to check if the feature is capable is to judge by the chip id instead of by the dtsi. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 14 -- drive

[PATCH net-next v3 0/3] net: ethernet: mediatek: check the hw lro capability by the chip id instead of the dtsi

2016-10-06 Thread Nelson Chang
is capable is to judge by the chip id instead of by the dtsi. Nelson Chang (3): net: ethernet: mediatek: get the chip id by ETHDMASYS registers net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi net: ethernet: mediatek: remove hwlro property in the device

[PATCH net-next v3 1/3] net: ethernet: mediatek: get the chip id by ETHDMASYS registers

2016-10-06 Thread Nelson Chang
The driver gets the chip id by ETHSYS_CHIPID0_3/ETHSYS_CHIPID4_7 registers in mtk_probe(). Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 29 + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 + 2

RE: [PATCH net-next v2 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-05 Thread Nelson Chang
nal Message- From: David Laight [mailto:david.lai...@aculab.com] Sent: Wednesday, October 05, 2016 9:07 PM To: Nelson Chang (張家祥); sergei.shtyl...@cogentembedded.com; j...@phrozen.org; da...@davemloft.net Cc: n...@openwrt.org; netdev@vger.kernel.org; linux-media...@lists.infradead.org; nelso

RE: [PATCH net-next v2 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-05 Thread Nelson Chang
tembedded.com] Sent: Wednesday, October 05, 2016 8:18 PM To: Nelson Chang (張家祥); j...@phrozen.org; da...@davemloft.net Cc: n...@openwrt.org; netdev@vger.kernel.org; linux-media...@lists.infradead.org; nelsonch...@gmail.com Subject: Re: [PATCH net-next v2 2/3] net: ethernet: mediatek: get hw lro cap

RE: [PATCH net-next v2 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-05 Thread Nelson Chang
Hi Sergei, Thanks for your comments. Modified. Nelson -Original Message- From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] Sent: Wednesday, October 05, 2016 8:18 PM To: Nelson Chang (張家祥); j...@phrozen.org; da...@davemloft.net Cc: n...@openwrt.org; netdev

[PATCH net-next v2 RESEND 1/3] net: ethernet: mediatek: get the chip id by ETHDMASYS registers

2016-10-05 Thread Nelson Chang
The driver gets the chip id by ETHSYS_CHIPID0_3/ETHSYS_CHIPID4_7 registers in mtk_probe(). Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 29 + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 + 2

[PATCH net-next v2 RESEND 3/3] net: ethernet: mediatek: remove hwlro property in the device tree

2016-10-05 Thread Nelson Chang
Since the proper way to check the hw lro capability is by the chip id, hwlro property in the device tree should be removed. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- Documentation/devicetree/bindings/net/mediatek-net.txt | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH net-next v2 RESEND 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-05 Thread Nelson Chang
Because hw lro started to be supported from MT7623, the proper way to check if the feature is capable is to judge by the chip id instead of by the dtsi. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 12 ++-- drivers/net/et

[PATCH net-next v2 RESEND 0/3] net: ethernet: mediatek: check the hw lro capability by the chip id instead of the dtsi

2016-10-05 Thread Nelson Chang
. Nelson Chang (3): net: ethernet: mediatek: get the chip id by ETHDMASYS registers net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi net: ethernet: mediatek: remove hwlro property in the device tree .../devicetree/bindings/net/mediatek-net.txt | 2

[PATCH net-next v2 0/3] net: ethernet: mediatek: check the hw lro capability by the chip id instead of the dtsi

2016-10-05 Thread Nelson Chang
. Nelson Chang (3): net: ethernet: mediatek: get the chip id by ETHDMASYS registers net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi net: ethernet: mediatek: remove hwlro property in the device tree .../devicetree/bindings/net/mediatek-net.txt | 2

[PATCH net-next v2 3/3] net: ethernet: mediatek: remove hwlro property in the device tree

2016-10-05 Thread Nelson Chang
Since the proper way to check the hw lro capability is by the chip id, hwlro property in the device tree should be removed. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- Documentation/devicetree/bindings/net/mediatek-net.txt | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH net-next v2 1/3] net: ethernet: mediatek: get the chip id by ETHDMASYS registers

2016-10-05 Thread Nelson Chang
The driver gets the chip id by ETHSYS_CHIPID0_3/ETHSYS_CHIPID4_7 registers in mtk_probe(). Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 29 + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 + 2

[PATCH net-next v2 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-05 Thread Nelson Chang
Because hw lro started to be supported from MT7623, the proper way to check if the feature is capable is to judge by the chip id instead of by the dtsi. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 12 ++-- drivers/net/et

Re: [PATCH net-next 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-04 Thread Nelson Chang
o:j...@phrozen.org] Sent: Tuesday, October 04, 2016 3:19 AM To: Nelson Chang (張家祥); da...@davemloft.net Cc: netdev@vger.kernel.org; n...@openwrt.org; linux-media...@lists.infradead.org; nelsonch...@gmail.com Subject: Re: [PATCH net-next 2/3] net: ethernet: mediatek: get hw lro capability by the chip

RE: [PATCH net-next 1/3] net: ethernet: mediatek: get the chip id by ETHDMASYS registers

2016-10-04 Thread Nelson Chang
e *pdev) { ... err = mtk_get_chip_id(eth, >chip_id); if (err) return err; ... } Nelson -Original Message- From: John Crispin [mailto:j...@phrozen.org] Sent: Tuesday, October 04, 2016 3:17 AM To: Nelson Chang (張家祥); da...@da

[PATCH net-next 3/3] net: ethernet: mediatek: remove hwlro property in the device tree

2016-10-03 Thread Nelson Chang
Since the proper way to check the hw lro capability is by the chip id, hwlro property in the device tree should be removed. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- Documentation/devicetree/bindings/net/mediatek-net.txt | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH net-next 1/3] net: ethernet: mediatek: get the chip id by ETHDMASYS registers

2016-10-03 Thread Nelson Chang
The driver gets the chip id by ETHSYS_CHIPID0_3/ETHSYS_CHIPID4_7 registers in mtk_probe(). Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 27 +++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 + 2

[PATCH net-next 0/3] net: ethernet: mediatek: check the hw lro capability by the chip id instead of the dtsi

2016-10-03 Thread Nelson Chang
The series modify to check if hw lro is supported by the chip id. Because hw lro started to be supported from MT7623, the proper way to check if the feature is capable is to judge by the chip id instead of by the dtsi. Nelson Chang (3): net: ethernet: mediatek: get the chip id by ETHDMASYS

[PATCH net-next 2/3] net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi

2016-10-03 Thread Nelson Chang
Because hw lro started to be supported from MT7623, the proper way to check if the feature is capable is to judge by the chip id instead of by the dtsi. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 12 ++-- drivers/net/et

RE: [PATCH net-next 0/2] net: ethernet: mediatek: some bug fixes for PDAM and HW LRO

2016-09-27 Thread Nelson Chang
Got it. I'll notice that for later patches. Thanks David. -Original Message- From: David Miller [mailto:da...@davemloft.net] Sent: Tuesday, September 27, 2016 9:42 PM To: Nelson Chang (張家祥) Cc: j...@phrozen.org; n...@openwrt.org; netdev@vger.kernel.org; linux-media...@lists.infradead.org

RE: [PATCH net-next 2/2] net: ethernet: mediatek: bug fix to disable HW LRO

2016-09-26 Thread Nelson Chang
Hi Sergei, Because these modifications are both related to LRO relinquishments, I put them in a single patch. Nelson -Original Message- From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] Sent: Monday, September 26, 2016 7:21 PM To: Nelson Chang (張家祥); j...@phrozen.org

[PATCH net-next 1/2] net: ethernet: mediatek: add to stop PDMA while stopping the frame engine

2016-09-26 Thread Nelson Chang
Stop PDMA while the frame engine is going to stop. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/me

[PATCH net-next 2/2] net: ethernet: mediatek: bug fix to disable HW LRO

2016-09-26 Thread Nelson Chang
(1) Modify the register settings for LRO relinquishments (2) Jump out from the waiting loop while LRO relinquishments are done Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 +

[PATCH net-next 0/2] net: ethernet: mediatek: some bug fixes for PDAM and HW LRO

2016-09-26 Thread Nelson Chang
1) Add to stop PDMA while stopping the frame engine 2) Modify the register settings for LRO relinquishments 3) Jump out from the waiting loop while LRO relinquishments are done Nelson Chang (2): net: ethernet: mediatek: add to stop PDMA while stopping the frame engine net: ethernet

[PATCH net-next v3 0/3] net: ethernet: mediatek: add HW LRO functions

2016-09-17 Thread Nelson Chang
NETIF_F_LRO off while RX flow is programmed - Rephrase the dts property is a capability if the hardware supports LRO changes since v1: - Add HW LRO support - Add ethtool hooks to set LRO RX flows Nelson Chang (3): net: ethernet: mediatek: add HW LRO functions of PDMA RX rings net: ethernet

[PATCH net-next v3 3/3] net: ethernet: mediatek: add the dts property to set if the HW supports LRO

2016-09-17 Thread Nelson Chang
Add the dts property for the capability if the hardware supports LRO. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- Documentation/devicetree/bindings/net/mediatek-net.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindin

[PATCH net-next v3 2/3] net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO

2016-09-17 Thread Nelson Chang
set total four destination IPs, each GMAC (GMAC1/GMAC2) can set two IPs separately at most. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 236 1 file changed, 236 insertions(+) diff --git a/drivers/net/et

[PATCH net-next v3 1/3] net: ethernet: mediatek: add HW LRO functions of PDMA RX rings

2016-09-17 Thread Nelson Chang
. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 215 +--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 75 +- 2 files changed, 265 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/me

[PATCH net-next v2 0/3] net: ethernet: mediatek: add HW LRO functions

2016-09-17 Thread Nelson Chang
NETIF_F_LRO off while RX flow is programmed - Rephrase the dts property is a capability if the hardware supports LRO changes since v1: - Add HW LRO support - Add ethtool hooks to set LRO RX flows Nelson Chang (3): net: ethernet: mediatek: add HW LRO functions of PDMA RX rings net: ethernet

RE: [PATCH net-next v2 0/3] net: ethernet: mediatek: add HW LRO functions

2016-09-17 Thread Nelson Chang
Thanks David! I'll respin the patch and submit the newer version. -Original Message- From: David Miller [mailto:da...@davemloft.net] Sent: Saturday, September 17, 2016 9:46 PM To: Nelson Chang (張家祥) Cc: j...@phrozen.org; f.faine...@gmail.com; n...@openwrt.org; netdev@vger.kernel.org

[PATCH net-next v2 0/3] net: ethernet: mediatek: add HW LRO functions

2016-09-14 Thread Nelson Chang
changes since v1: - Add HW LRO support - Add ethtool hooks to set LRO RX flows Nelson Chang (3): net: ethernet: mediatek: add HW LRO functions of PDMA RX rings net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO net: ethernet: mediatek: add dts configuration

[PATCH net-next v2 1/3] net: ethernet: mediatek: add HW LRO functions of PDMA RX rings

2016-09-14 Thread Nelson Chang
. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 215 +--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 75 +- 2 files changed, 265 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/me

[PATCH net-next v2 3/3] net: ethernet: mediatek: add the dts property to set if the HW supports LRO

2016-09-14 Thread Nelson Chang
Add the dts property for the capability if the hardware supports LRO. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- Documentation/devicetree/bindings/net/mediatek-net.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/mediatek-net.

[PATCH net-next v2 2/3] net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO

2016-09-14 Thread Nelson Chang
set total four destination IPs, each GMAC (GMAC1/GMAC2) can set two IPs separately at most. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 236 1 file changed, 236 insertions(+) diff --git a/drivers/net/et

RE: [PATCH net-next 2/3] net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO

2016-09-13 Thread Nelson Chang
[mailto:f.faine...@gmail.com] Sent: Wednesday, September 14, 2016 2:27 AM To: Nelson Chang (張家祥); j...@phrozen.org; da...@davemloft.net Cc: n...@openwrt.org; netdev@vger.kernel.org; linux-media...@lists.infradead.org; nelsonch...@gmail.com Subject: Re: [PATCH net-next 2/3] net: ethernet: mediatek: add ethtool

RE: [PATCH net-next 3/3] net: ethernet: mediatek: add dts configuration to enable HW LRO

2016-09-13 Thread Nelson Chang
, September 14, 2016 2:25 AM To: Nelson Chang (張家祥); j...@phrozen.org; da...@davemloft.net Cc: n...@openwrt.org; netdev@vger.kernel.org; linux-media...@lists.infradead.org; nelsonch...@gmail.com Subject: Re: [PATCH net-next 3/3] net: ethernet: mediatek: add dts configuration to enable HW LRO On 09/13/2016

[PATCH net-next 1/3] net: ethernet: mediatek: add HW LRO functions of PDMA RX rings

2016-09-13 Thread Nelson Chang
. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 215 +--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 75 +- 2 files changed, 265 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/me

[PATCH net-next 3/3] net: ethernet: mediatek: add dts configuration to enable HW LRO

2016-09-13 Thread Nelson Chang
Add the configuration of HW LRO in the binding document. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- Documentation/devicetree/bindings/net/mediatek-net.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/mediatek-net.

[PATCH net-next 2/3] net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO

2016-09-13 Thread Nelson Chang
set total four destination IPs, each GMAC (GMAC1/GMAC2) can set two IPs separately at most. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 218 1 file changed, 218 insertions(+) diff --git a/drivers/net/et

[PATCH net-next 0/3] net: ethernet: mediatek: add HW LRO functions

2016-09-13 Thread Nelson Chang
The patches add the large receive offload (LRO) functions by hardware and the ethtool functions to configure RX flows of HW LRO. Nelson Chang (3): net: ethernet: mediatek: add HW LRO functions of PDMA RX rings net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO

[PATCH net-next v4 1/2] net: ethernet: mediatek: modify to use the PDMA instead of the QDMA for Ethernet RX

2016-08-25 Thread Nelson Chang
Because the PDMA has richer features than the QDMA for Ethernet RX (such as multiple RX rings, HW LRO, etc.), the patch modifies to use the PDMA to handle Ethernet RX. Acked-by: John Crispin <j...@phrozen.org> Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/

[PATCH net-next v4 2/2] net: ethernet: mediatek: modify GDM to send packets to the PDMA for RX

2016-08-25 Thread Nelson Chang
Because we change to use the PDMA as the Ethernet RX DMA engine, the patch modifies to set GDM to send packets to PDMA for RX. Acked-by: John Crispin <j...@phrozen.org> Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +-- 1

[PATCH net-next v4 0/2] net: ethernet: mediatek: modify to use the PDMA for Ethernet RX

2016-08-25 Thread Nelson Chang
and interrupt settings in mtk_poll_rx() changes since v1: - Modify to use the PDMA instead of the QDMA for Ethernet RX Nelson Chang (2): net: ethernet: mediatek: modify to use the PDMA instead of the QDMA for Ethernet RX net: ethernet: mediatek: modify GDM to send packets to the PDMA for RX drivers

[PATCH net-next v3 1/2] net: ethernet: mediatek: modify to use the PDMA instead of the QDMA for Ethernet RX

2016-08-24 Thread Nelson Chang
Because the PDMA has richer features than the QDMA for Ethernet RX (such as multiple RX rings, HW LRO, etc.), the patch modifies to use the PDMA to handle Ethernet RX. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.

[PATCH net-next v3 0/2] net: ethernet: mediatek: modify to use the PDMA for Ethernet RX

2016-08-24 Thread Nelson Chang
This patch set fixes the following issues v1 -> v2: Fix the bugs of PDMA cpu index and interrupt settings in mtk_poll_rx() v2 -> v3: Add GDM hardware settings to send packets to PDMA for RX Nelson Chang (2): net: ethernet: mediatek: modify to use the PDMA instead of the QDMA for Et

[PATCH net-next v2] net: ethernet: mediatek: modify to use the PDMA instead of the QDMA for Ethernet RX

2016-08-24 Thread Nelson Chang
Because the PDMA has richer features than the QDMA for Ethernet RX (such as multiple RX rings, HW LRO, etc.), the patch modifies to use the PDMA to handle Ethernet RX. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.

[PATCH net-next] net: ethernet: mediatek: modify to use the PDMA instead of the QDMA for Ethernet RX

2016-08-24 Thread Nelson Chang
Because the PDMA has richer features than the QDMA for Ethernet RX (such as multiple RX rings, HW LRO, etc.), the patch modifies to use the PDMA to handle Ethernet RX. Signed-off-by: Nelson Chang <nelson.ch...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.