Re: [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer

2018-04-03 Thread Sean Wang
On Tue, 2018-04-03 at 10:02 -0700, Florian Fainelli wrote: > On 04/02/2018 07:18 PM, Sean Wang wrote: > > On Mon, 2018-04-02 at 16:24 -0700, Florian Fainelli wrote: > >> We would be passing 0 instead of NULL as the rsp argument to > >> mt7530_fdb_cmd(), fix that. > &

Re: [PATCH net] net: dsa: mt7530: Use NULL instead of plain integer

2018-04-02 Thread Sean Wang
On Mon, 2018-04-02 at 16:24 -0700, Florian Fainelli wrote: > We would be passing 0 instead of NULL as the rsp argument to > mt7530_fdb_cmd(), fix that. > Acked-by: Sean Wang <sean.w...@mediatek.com> BTW, does the part of the commit message should be updated with "passi

Re: [net-next] phylib: Add device reset GPIO support causes DSA MT7530 acquires reset-gpios fails

2017-12-17 Thread Sean Wang
On Fri, 2017-12-15 at 11:10 +0100, Andrew Lunn wrote: > On Fri, Dec 15, 2017 at 02:55:03PM +0800, Sean Wang wrote: > > Hi Sergei, > > > > Recently I found the patch commit bafbdd527d56 (phylib: Add device reset > > GPIO support) would have the impact on MT7530 drive

[net-next] phylib: Add device reset GPIO support causes DSA MT7530 acquires reset-gpios fails

2017-12-14 Thread Sean Wang
Hi Sergei, Recently I found the patch commit bafbdd527d56 (phylib: Add device reset GPIO support) would have the impact on MT7530 driver. Which causes the DSA MT7530 device (it's the child node under mdio bus) gets the reset-gpios fails because the same GPIO seems already be held in the earlier

Re: [PATCH net-next 2/3] net: dsa: mediatek: combine MediaTek tag with VLAN tag

2017-12-12 Thread Sean Wang
On Tue, 2017-12-12 at 09:28 +0100, Andrew Lunn wrote: > On Tue, Dec 12, 2017 at 03:21:21PM +0800, Sean Wang wrote: > > On Thu, 2017-12-07 at 16:30 +0100, Andrew Lunn wrote: > > > > @@ -25,20 +28,37 @@ static struct sk_buff *mtk_tag_xmit(struct

Re: [PATCH net-next 1/3] net: dsa: mediatek: add VLAN support for MT7530

2017-12-12 Thread Sean Wang
On Tue, 2017-12-12 at 09:24 +0100, Felix Fietkau wrote: > On 2017-12-07 07:06, sean.w...@mediatek.com wrote: > > From: Sean Wang <sean.w...@mediatek.com> > > > > MT7530 can treat each port as either VLAN-unware port or VLAN-ware port > Shouldn't that be VLAN-u

Re: [PATCH net-next 2/3] net: dsa: mediatek: combine MediaTek tag with VLAN tag

2017-12-11 Thread Sean Wang
On Thu, 2017-12-07 at 16:30 +0100, Andrew Lunn wrote: > > @@ -25,20 +28,37 @@ static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb, > > { > > struct dsa_port *dp = dsa_slave_to_port(dev); > > u8 *mtk_tag; > > + bool is_vlan_skb = true; > > .. > > > + /* Mark tag attribute on

Re: [PATCH net-next 1/3] net: dsa: mediatek: add VLAN support for MT7530

2017-12-11 Thread Sean Wang
Hi, Andrew All sounds reasonable. All will be fixed in the next version. Sean On Thu, 2017-12-07 at 16:24 +0100, Andrew Lunn wrote: > > static void > > +mt7530_port_set_vlan_unware(struct dsa_switch *ds, int port) > > +{ > > + struct mt7530_priv *priv = ds->priv; > > + int i; > >

RE: [PATCH 02/15] drivers, net, ethernet: convert mtk_eth.dma_refcnt from atomic_t to refcount_t

2017-10-21 Thread Sean Wang
On Fri, 2017-10-20 at 10:37 +, Reshetova, Elena wrote: > > On Fri, 2017-10-20 at 10:23 +0300, Elena Reshetova wrote: > > > atomic_t variables are currently used to implement reference > > > counters with the following properties: > > > - counter is initialized to 1 using atomic_set() > > > -

Re: [PATCH 02/15] drivers, net, ethernet: convert mtk_eth.dma_refcnt from atomic_t to refcount_t

2017-10-20 Thread Sean Wang
On Fri, 2017-10-20 at 10:23 +0300, Elena Reshetova wrote: > atomic_t variables are currently used to implement reference > counters with the following properties: > - counter is initialized to 1 using atomic_set() > - a resource is freed upon counter reaching zero > - once counter reaches zero,

Re: [PATCH net] net: dsa: Initialize ds->cpu_port_mask earlier

2017-07-25 Thread Sean Wang
working. Just make sure that > ds->cpu_port_mask is set prior to the first call to get_tag_protocol, > thus restoring the expected contract. In case of error, the CPU port bit > is cleared. > > Fixes: 14be36c2c96c ("net: dsa: Initialize all CPU and enabled ports masks in > dsa_d

Re: [PATCH] net: ethernet: mediatek: remove useless code in mtk_poll_tx()

2017-07-18 Thread Sean Wang
break; > - } > > if (skb != (struct sk_buff *)MTK_DMA_DUMMY_DESC) { > bytes[mac] += skb->len; Acked-by: Sean Wang <sean.w...@mediatek.com>

Re: [PATCH net-next v2 1/4] dt-bindings: net: mediatek: add support for MediaTek MT7623 and MT7622 SoC

2017-07-17 Thread Sean Wang
On Mon, 2017-07-17 at 15:38 +0200, Andrew Lunn wrote: > On Mon, Jul 17, 2017 at 06:06:22PM +0800, sean.w...@mediatek.com wrote: > > From: Sean Wang <sean.w...@mediatek.com> > > > > The patch adds the supplements in the dt-binding document for MediaTek > > M

Re: [PATCH net-next 2/4] net-next: mediatek: add platform data to adapt into various hardware

2017-07-14 Thread Sean Wang
On Wed, 2017-07-12 at 16:50 +0200, Andrew Lunn wrote: > > +static int mtk_clk_enable(struct mtk_eth *eth) > > +{ > > + int clk, ret; > > + > > + for (clk = 0; clk < MTK_CLK_MAX ; clk++) { > > + if (eth->clks[clk]) { > > + ret = clk_prepare_enable(eth->clks[clk]); >

Re: [PATCH] net: ethernet: mediatek: remove useless code in mtk_probe()

2017-07-08 Thread Sean Wang
Hi, Gustavo It indeed is useless at the current time point. but actually I will add new SoC support to the driver in the next week, which requires the variable match :-( Sean On Fri, 2017-07-07 at 15:23 -0500, Gustavo A. R. Silva wrote: > Remove useless local variables _match_,

Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-03-28 Thread Sean Wang
Hi Andrew On Fri, 2017-03-24 at 15:19 +0100, Andrew Lunn wrote: > On Tue, Mar 21, 2017 at 05:35:10PM +0800, sean.w...@mediatek.com wrote: > > Hi Sean > > > + /* Lower Tx Driving */ > > + for (i = 0 ; i < 6 ; i++) > > Could MT7530_CPU_PORT be used here? > I should create meaningful

Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-03-28 Thread Sean Wang
Hi Andrew, Add comment as below inline On Fri, 2017-03-24 at 15:02 +0100, Andrew Lunn wrote: > Hi Sean > > > + regmap = devm_regmap_init(ds->dev, NULL, priv, > > + _regmap_config); > > + if (IS_ERR(regmap)) > > + dev_warn(priv->dev, "phy regmap

Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-03-27 Thread Sean Wang
Hi Florian, Thank for taking your time on reviewing. Add comment as inline. On Wed, 2017-03-22 at 11:39 -0700, Florian Fainelli wrote: > On 03/21/2017 02:35 AM, sean.w...@mediatek.com wrote: > > From: Sean Wang <sean.w...@mediatek.com> > > > > MT7530 is a 7-po

Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-03-23 Thread Sean Wang
Hi Andrew, The purpose for the regmap table registered is to provide a way which helps us to look up a specific register on the switch through regmap-debugfs. And not all ranges of register is defined so I only include the meaningful ones in a sparse way for the table. Sean On

Re: [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch

2017-03-14 Thread Sean Wang
On Tue, 2017-03-14 at 00:11 +0100, Andrew Lunn wrote: > > +static int > > +mt7530_setup(struct dsa_switch *ds) > > +{ > > + struct mt7530_priv *priv = ds->priv; > > + int ret, i, phy_mode; > > + u8 cpup_mask = 0; > > + u32 id, val; > > + struct regmap *regmap; > > + > > + /* Make sure

Re: [PATCH net-next 1/4] dt-bindings: net: dsa: add Mediatek MT7530 binding

2017-03-14 Thread Sean Wang
On Mon, 2017-03-13 at 09:47 -0700, Florian Fainelli wrote: > On 03/13/2017 09:11 AM, sean.w...@mediatek.com wrote: > > From: Sean Wang <sean.w...@mediatek.com> > > > > Add device-tree binding for Mediatek MT7530 switch. > > > > Cc: devicet...@vger.kernel.o

Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler

2017-03-14 Thread Sean Wang
On Mon, 2017-03-13 at 12:59 -0400, Vivien Didelot wrote: > Hi Sean, > > sean.w...@mediatek.com writes: > > > + mtk_tag[1] = (1 << p->port) & MTK_HDR_XMIT_DP_BIT_MASK; > > This won't apply, the port index in now stored in p->dp->index. > > Thanks, > > Vivien Hi Vivien, It seems

Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler

2017-03-14 Thread Sean Wang
On Mon, 2017-03-13 at 09:35 -0700, Florian Fainelli wrote: > On 03/13/2017 09:11 AM, sean.w...@mediatek.com wrote: > > From: Sean Wang <sean.w...@mediatek.com> > > > > Add the support for the 4-bytes tag for DSA port distinguishing inserted > > allowing receivin

Re: [PATCH net-next 1/4] dt-bindings: net: dsa: add Mediatek MT7530 binding

2017-03-14 Thread Sean Wang
On Mon, 2017-03-13 at 17:36 +0100, Andrew Lunn wrote: > > +- mediatek,reset-pin: Phandle to the pinctrl node used for the reset. Which > > + must be required if the property mediatek,mcm of specified as > > + "disabled". See > > + Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt

Re: [PATCH net-next v2 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII

2016-09-22 Thread Sean Wang
Date: Thu, 22 Sep 2016 14:30:53 +0300, Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> wrote: >>Hello. > >On 9/22/2016 5:33 AM, sean.w...@mediatek.com wrote: > >> From: Sean Wang <sean.w...@mediatek.com> >> >> adds PHY-mode "trgmii"

Re: [PATCH net-next] Documentation: devicetree: revise ethernet device-tree binding about TRGMII

2016-09-22 Thread Sean Wang
Date: Thu, 22 Sep 2016 19:48:47 +0300, Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> wrote: >On 09/22/2016 07:16 PM, sean.w...@mediatek.com wrote: > >> From: Sean Wang <sean.w...@mediatek.com> >> >> fix typo in mediatek-net.txt and add phy-mode "trg

Re: [PATCH net-next v2 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0

2016-09-22 Thread Sean Wang
Date: Thu, 22 Sep 2016 14:28:36 +0300, Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> wrote: >Hello. > >On 9/22/2016 5:33 AM, sean.w...@mediatek.com wrote: > >> From: Sean Wang <sean.w...@mediatek.com> >> >> Add the dts property for the capability

Re: [PATCH net-next 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0

2016-09-21 Thread Sean Wang
Date: Wed, 21 Sep 2016 16:17:20 +0200, Andrew Lunn <and...@lunn.ch> wrote: >On Wed, Sep 21, 2016 at 02:16:30PM +0800, Sean Wang wrote: >> Date: Tue, 20 Sep 2016 21:37:58 +0200, Andrew Lunn <and...@lunn.ch> wrote: >> >On Tue, Sep 20, 2016 at 03:59:20PM +0800

Re: [PATCH net-next 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII

2016-09-21 Thread Sean Wang
Date: Tue, 20 Sep 2016 14:23:24 -0700, Florian Fainelli <f.faine...@gmail.com> wrote: >On 09/20/2016 12:59 AM, sean.w...@mediatek.com wrote: >> From: Sean Wang <sean.w...@mediatek.com> >> >> adds PHY-mode "trgmii" as an extension for the operati

Re: [PATCH net-next 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0

2016-09-21 Thread Sean Wang
Date: Tue, 20 Sep 2016 21:37:58 +0200, Andrew Lunn <and...@lunn.ch> wrote: >On Tue, Sep 20, 2016 at 03:59:20PM +0800, sean.w...@mediatek.com wrote: >> From: Sean Wang <sean.w...@mediatek.com> >> >> Add the dts property for the capability if TRGMII supported on GAM

Re: [PATCH net v2 9/9] net: ethernet: mediatek: fix error handling inside mtk_mdio_init

2016-08-29 Thread Sean Wang
Date: Mon, 29 Aug 2016 15:15:58 +0200,Andrew Lunn wrote: >On Mon, Aug 29, 2016 at 01:03:23PM +0800, sean.w...@mediatek.com wrote: >> From: Sean Wang <sean.w...@mediatek.com> >> >> return -ENODEV if no child is found in MDIO bus. > >Hi Sean > >Why is it an er

Re: [RESEND PATCH net 06/10] net: ethernet: mediatek: fix the loss

2016-08-28 Thread Sean Wang
Date: Fri, 26 Aug 2016 16:17:59 +0200, Andrew Lunn wrote: >> Hi Andrew, >> >> Here pinctrl is used to setup what function the group of the pins is >> for. > >Agreed. > >> The group of the pins could be configured for the function provided >> by the SoC, such as general purpose I/O or specific

Re: [RESEND PATCH net 07/10] net: ethernet: mediatek: fix issue of driver removal with interface is up

2016-08-25 Thread Sean Wang
Date: Thu, 25 Aug 2016 15:35:34 +0200, John Crispin wrote: >On 25/08/2016 12:44, Sean Wang wrote: >> 1) mtk_stop() must be called to stop for freeing DMA resources >> acquired and restoring state changed by mtk_open() when module >> removal. >> >> 2) grou

Re: [RESEND PATCH net 02/10] net: ethernet: mediatek: fix incorrect

2016-08-25 Thread Sean Wang
On Date: Thu, 25 Aug 2016 15:49:10 +0200, John Crispin wrote: >On 25/08/2016 12:44, Sean Wang wrote: >> If the return value of devm_clk_get is EPROBE_DEFER, we should >> defer probing the driver. The change is verified and works based >> on 4.8-rc1 staying with the latest clk

Re: [RESEND PATCH net 06/10] net: ethernet: mediatek: fix the loss

2016-08-25 Thread Sean Wang
On Thu, 25 Aug 2016 15:30:34 +0200, Andrew Lunn wrote: >On Thu, Aug 25, 2016 at 06:44:57PM +0800, Sean Wang wrote: >> ommited the setting about pin-mux which results in incorrect signals >> being routed on GMAC2. > >Hi Sean > >Please could you explain this some more.

[RESEND PATCH net 05/10] net: ethernet: mediatek: fix logic unbalance between probe and remove

2016-08-25 Thread Sean Wang
original mdio_cleanup is not in the symmetric place against where mdio_init is, so relocate mdio_cleanup to the right one. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[RESEND PATCH net 02/10] net: ethernet: mediatek: fix incorrect return value of devm_clk_get with EPROBE_DEFER

2016-08-25 Thread Sean Wang
If the return value of devm_clk_get is EPROBE_DEFER, we should defer probing the driver. The change is verified and works based on 4.8-rc1 staying with the latest clk-next code for MT7623. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.

[RESEND PATCH net 03/10] net: ethernet: mediatek: fix API usage with skb_free_frag

2016-08-25 Thread Sean Wang
use skb_free_frag() instead of legacy put_page() Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/me

[RESEND PATCH net 00/10] net: ethernet: mediatek: a couple of fixes

2016-08-25 Thread Sean Wang
a couple of fixes come out from integrating with linux-4.8 rc1 they all are verified and workable on linux-4.8 rc1 Sean Wang (10): net: ethernet: mediatek: fix fails from TX housekeeping due to incorrect port setup net: ethernet: mediatek: fix incorrect return value of devm_clk_get

[RESEND PATCH net 10/10] net: ethernet: mediatek: fix error handling inside mtk_mdio_init

2016-08-25 Thread Sean Wang
return -ENODEV if no child is found in MDIO bus. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/me

[RESEND PATCH net 07/10] net: ethernet: mediatek: fix issue of driver removal with interface is up

2016-08-25 Thread Sean Wang
in the later series of patches. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/me

[RESEND PATCH net 04/10] net: ethernet: mediatek: remove redundant free_irq for devm_request_irq allocated irq

2016-08-25 Thread Sean Wang
these irqs are not used for shared irq and disabled during ethernet stops. irq requested by devm_request_irq is safe to be freed automatically on driver detach. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 -- 1 file changed, 2 del

[RESEND PATCH net 06/10] net: ethernet: mediatek: fix the loss of pin-mux setting for GMAC2

2016-08-25 Thread Sean Wang
ommited the setting about pin-mux which results in incorrect signals being routed on GMAC2. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 14 ++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +++ 2 files changed, 17 inse

[RESEND PATCH net 01/10] net: ethernet: mediatek: fix fails from TX housekeeping due to incorrect port setup

2016-08-25 Thread Sean Wang
which net device the SKB is complete for depends on the forward port on txd4 on the corresponding TX descriptor, but the information isn't set up well in case of SKB fragments that would lead to watchdog timeout from the upper layer, so fix it up. Signed-off-by: Sean Wang <sean.w...@mediatek.

[RESEND PATCH net 08/10] net: ethernet: mediatek: fix the missing of_node_put() after node is used done inside mtk_mdio_init

2016-08-25 Thread Sean Wang
This patch adds the missing of_node_put() after finishing the usage of of_get_child_by_name. Signed-off-by: Sean Wang <sean.w...@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_so

[RESEND PATCH net 09/10] net: ethernet: mediatek: use devm_mdiobus_alloc instead of mdiobus_alloc inside mtk_mdio_init

2016-08-25 Thread Sean Wang
a lot of parts in the driver uses devm_* APIs to gain benefits from the device resource management, so devm_mdiobus_alloc is also used instead of mdiobus_alloc to have more elegant code flow. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.

[PATCH net-next v3 0/2] Add enhancements to RX path

2016-08-16 Thread Sean Wang
nd add indents before comments. Sean Wang (2): net: ethernet: mediatek: enhance RX path by reducing the frequency of the memory barrier used net: ethernet: mediatek: enhance RX path by aggregating more SKBs into NAPI drivers/net/ethernet/mediatek/mtk_eth_soc.c

[PATCH net-next v3 2/2] net: ethernet: mediatek: enhance RX path by aggregating more SKBs into NAPI

2016-08-16 Thread Sean Wang
The patch adds support for aggregating more SKBs feed into NAPI in order to get more benefits from generic receive offload (GRO) by peeking at the RX ring status and moving more packets right before returning from NAPI RX polling handler if NAPI budgets are still available. Signed-off-by: Sean

[PATCH net-next v3 1/2] net: ethernet: mediatek: enhance RX path by reducing the frequency of the memory barrier used

2016-08-16 Thread Sean Wang
based on the setup with one port using Giga PHY and 256 RX descriptors for DMA to move. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/me

[PATCH net v3 1/3] net: ethernet: mediatek: fix RMII mode and add REVMII supported by GMAC

2016-08-15 Thread Sean Wang
The patch fixes up the incorrect setup of reduced MII (RMII) on GMAC and adds the supplement for the setup of reverse MII (REVMII) on GMAC , and rearranges the error handling for invalid PHY argument. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/me

[PATCH net v3 0/3] Fix warning and issue

2016-08-15 Thread Sean Wang
This patch set fixes the following warning and issues v1 -> v2: Fix message typos and add coverletter v2 -> v3: Split from the previous series for submitting bug fixes as a series targeting 'net' Sean Wang (3): net: ethernet: mediatek: fix RMII mode and add REVMII supported by GMAC

[PATCH net v3 2/3] net: ethernet: mediatek: fix flow control settings on GMAC0 is not being enabled properly

2016-08-15 Thread Sean Wang
proper handling on the both GMAC with the shared common logic. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/me

[PATCH net v3 3/3] net: ethernet: mediatek: fix runtime warning raised by inconsistent struct device pointers passed to DMA API

2016-08-15 Thread Sean Wang
. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index e

[PATCH v2 3/5] net: ethernet: mediatek: fix runtime warning raised by inconsistent struct device pointers passed to DMA API

2016-08-15 Thread Sean Wang
. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index e

[PATCH v2 5/5] net: ethernet: mediatek: enhance RX path by aggregating more skbs into NAPI

2016-08-15 Thread Sean Wang
The patch adds support for aggregating more skbs feed into NAPI in order to get more benifits from generic receive offload (GRO) by peeking at the RX ring status and moving more packets right before returning from NAPI RX polling handler if NAPI budgets are still available. Signed-off-by: Sean

[PATCH v2 1/5] net: ethernet: mediatek: add REVMII and fix RMII mode supported by GMAC

2016-08-15 Thread Sean Wang
The patch adds the supplement for the setup of reverse MII (REVMII) on GMAC, fixes up the incorrect setup of reduced MII (RMII) on GMAC and rearranges the error handling for invalid phy argument. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth

[PATCH v2 2/5] net: ethernet: mediatek: fix flow control settings on GMAC0 is not being enabled properly

2016-08-15 Thread Sean Wang
er handling on the both GMAC with the shared common logic. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/me

[PATCH v2 0/5] Fix warning, issue and give some enhancements

2016-08-15 Thread Sean Wang
This patch set fixes the following warning and issues and gives some enhancements about RX path handling. v1 -> v2: fix message typos and add coverletter Sean Wang (5): net: ethernet: mediatek: add REVMII and fix RMII mode supported by GMAC net: ethernet: mediatek: fix flow cont

[PATCH v2 4/5] net: ethernet: mediatek: enhance RX path by reducing the frequency of the memory barrier used

2016-08-15 Thread Sean Wang
on the setup with one port using gigaphy and 256 RX descriptors for DMA to move. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/me

[PATCH 5/5] net: ethernet: mediatek: enable rx path by aggregrating more skbs

2016-08-15 Thread Sean Wang
The patch adds support for aggregrating more skbs feed into NAPI in order to get benifits from generic receive offload (GRO) by peeking at the RX ring status and moving more packet right before returning from NAPI rx handler if NAPI budgets is still available. Signed-off-by: Sean Wang <sea

[PATCH 4/5] net: ethernet: mediatek: enable rx path by reducing memory barrier

2016-08-15 Thread Sean Wang
gigaphy and 256 rx descriptors for DMA to move. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/et

[PATCH 1/5] net: ethernet: mediatek: add REVMII and fix RMII modes supported by GMAC

2016-08-15 Thread Sean Wang
The patch adds the supplement for the setup of reverse MII (REVMII) on GMAC, fixes up incorrect setup of reduced mii (RMII) on GMAC and rearranges the error handling path for invalid phy argument. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth

[PATCH 3/5] net: ethernet: mediatek: fixed runtime warning raised by inconsistent struct device pointers passed to DMA API

2016-08-15 Thread Sean Wang
. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index e

[PATCH 2/5] net: ethernet: mediatek: fixed flow control settings on GMAC0 is not being enabled properly

2016-08-15 Thread Sean Wang
er handling on the both GMAC with the shared common logic. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/me

[PATCH 2/2] net: ethernet: mediatek: add the missing of_node_put() after node is used done

2016-08-13 Thread Sean Wang
This patch adds the missing of_node_put() after finishing the usage of of_parse_phandle() or of_node_get() used by fixed_phy. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[PATCH 1/2] net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing

2016-08-13 Thread Sean Wang
To fix runtime warning with lockdep is enabled due that u64_stats_sync is not initialized well, so add it. Signed-off-by: Sean Wang <sean.w...@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/me