[PATCH net,stable 1/1] net: fec: correct the error path for regulator disable in probe

2020-08-13 Thread fugang . duan
From: Fugang Duan Correct the error path for regulator disable. Fixes: 9269e5560b26 ("net: fec: add phy-reset-gpios PROBE_DEFER check") Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[PATCH net,stable 1/1] net: ethernet: stmmac: free tx skb buffer in stmmac_resume()

2020-06-02 Thread fugang . duan
From: Fugang Duan When do suspend/resume test, there have WARN_ON() log dump from stmmac_xmit() funciton, the code logic: entry = tx_q->cur_tx; first_entry = entry; WARN_ON(tx_q->tx_skbuff[first_entry]); In normal case, tx_q->tx_skbuff[txq->cur_tx] should be

[PATCH v2 net 3/3] dt-bindings: net: imx-dwmac: Add NXP imx8 DWMAC glue layer

2020-05-28 Thread fugang . duan
From: Fugang Duan Add description for NXP imx8 families like imx8mp/imx8dxl that integrate the Synopsys gmac IP version 5.10a. Signed-off-by: Fugang Duan --- .../devicetree/bindings/net/imx-dwmac.txt | 56 +++ 1 file changed, 56 insertions(+) diff --git a/Documentation

[PATCH v2 net 2/3] net: ethernet: dwmac: add ethernet glue logic for NXP imx8 chip

2020-05-28 Thread fugang . duan
From: Fugang Duan NXP imx8 family like imx8mp/imx8dxl chips support Synopsys MAC 5.10a IP. This patch adds settings for NXP imx8 glue layer: - clocks - dwmac address width - phy interface mode selection - adjust rgmii txclk rate v2: - adjust code sequences in order to have reverse christmas

[PATCH v2 net 0/3] net: ethernet: dwmac: add ethernet glue logic for NXP imx8 chip

2020-05-28 Thread fugang . duan
From: Fugang Duan NXP imx8 family like imx8mp/imx8dxl chips support Synopsys MAC 5.10a IP, the patch set is to add ethernet DWMAC glue layer including clocks, dwmac address width, phy interface mode selection and rgmii txclk rate adjustment in runtime. v1 -> v2: - suggested by Andrew: add

[PATCH v2 net 1/3] stmmac: platform: add "snps, dwmac-5.10a" IP compatible string

2020-05-28 Thread fugang . duan
From: Fugang Duan Add "snps,dwmac-5.10a" compatible string for 5.10a version that can avoid to define some plat data in glue layer. Signed-off-by: Fugang Duan --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PATCH net v3 3/4] ARM: dts: imx: add ethernet stop mode property

2020-05-25 Thread fugang . duan
From: Fugang Duan - Update the imx6qdl gpr property to define gpr register offset and bit in DT. - Add imx6sx/imx6ul/imx7d ethernet stop mode property. Reviewed-by: Andrew Lunn Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- arch/arm/boot/dts/imx6sx.dtsi | 2 ++ arch

[PATCH net v3 4/4] ARM: dts: imx6qdl-sabresd: enable fec wake-on-lan

2020-05-25 Thread fugang . duan
From: Fugang Duan Enable ethernet wake-on-lan feature for imx6q/dl/qp sabresd boards since the PHY clock is supplied by external osc. Reviewed-by: Andrew Lunn Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm

[PATCH net v3 2/4] dt-bindings: fec: update the gpr property

2020-05-25 Thread fugang . duan
From: Fugang Duan - rename the 'gpr' property string to 'fsl,stop-mode'. - Update the property to define gpr register offset and bit in DT, since different instance have different gpr bit. v2: * rename 'gpr' property string to 'fsl,stop-mode'. Signed

[PATCH net v3 1/4] net: ethernet: fec: move GPR register offset and bit into DT

2020-05-25 Thread fugang . duan
From: Fugang Duan The commit da722186f654 (net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wake on lan feature. But it introduces two issues here: - one SOC has two instances, they have different bit - different SOCs may have different

[PATCH net v3 0/4] net: ethernet: fec: move GPR reigster offset and bit into DT

2020-05-25 Thread fugang . duan
From: Fugang Duan The commit da722186f654 (net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wol feature support. It brings trouble to enable wol feature on imx6sx/imx6ul/imx7d platforms that have multiple ethernet instances with different

[PATCH net 2/2] dt-bindings: net: imx-dwmac: Add NXP imx8 DWMAC glue layer

2020-05-25 Thread Fugang Duan
Add description for NXP imx8 families like imx8mp/imx8dxl that integrate the Synopsys gmac IP version 5.10a. Signed-off-by: Fugang Duan --- .../devicetree/bindings/net/imx-dwmac.txt | 56 ++ 1 file changed, 56 insertions(+) diff --git a/Documentation/devicetree

[PATCH net 1/2] net: ethernet: dwmac: add Ethernet glue logic for NXP imx8 chip

2020-05-25 Thread Fugang Duan
NXP imx8 family like imx8mp/imx8dxl chips support Synopsys MAC 5.10a IP. This patch adds settings for NXP imx8 glue layer: - clocks - dwmac address width - phy interface mode selection - adjust rgmii txclk rate Signed-off-by: Fugang Duan --- drivers/net/ethernet/stmicro/stmmac/Kconfig | 13

[PATCH net 0/2] net: ethernet: dwmac: add Ethernet glue layer for NXP imx8 chip

2020-05-25 Thread Fugang Duan
NXP imx8mp/imx8dxl sillicon integrate Synopsys MAC 5.10a IP. The patch is to add Ethernet glue layer for NXP imx8 chips support. It mainly handles the platform things like clocks, dwmac address width, txclk rate adjustion and phy interface selection. Fugang Duan (2): net: ethernet: dwmac: add

[PATCH] stmmac: platform: add "snps,dwmac-5.10a" IP compatible string

2020-05-25 Thread Fugang Duan
Add "snps,dwmac-5.10a" compatible string for 5.10a version that can avoid to define some plat data in glue layer. Signed-off-by: Fugang Duan diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index bcda49d..f323

[PATCH net 1/1] net: stmmac: enable timestamp snapshot for required PTP packets in dwmac v5.10a

2020-05-25 Thread Fugang Duan
abling all events by setting register DWC_EQOS_TIME_STAMPING[SNAPTYPSEL] to 2’b01, clearing bit [TSEVNTENA] to 0’b0, which can support all required events. Signed-off-by: Fugang Duan --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PATCH net 1/1] net: stmmac: enable timestamp snapshot for required PTP packets in dwmac v5.10a

2020-05-25 Thread Fugang Duan
abling all events by setting register DWC_EQOS_TIME_STAMPING[SNAPTYPSEL] to 2’b01, clearing bit [TSEVNTENA] to 0’b0, which can support all required events. Signed-off-by: Fugang Duan --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PATCH net v2 3/4] ARM: dts: imx: add ethernet stop mode property

2020-05-25 Thread fugang . duan
From: Fugang Duan - Update the imx6qdl gpr property to define gpr register offset and bit in DT. - Add imx6sx/imx6ul/imx7d ethernet stop mode property. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- arch/arm/boot/dts/imx6sx.dtsi | 2 ++ arch/arm/boot/dts/imx6ul.dtsi

[PATCH net v2 2/4] dt-bindings: fec: update the gpr property

2020-05-25 Thread fugang . duan
From: Fugang Duan - rename the 'gpr' property string to 'fsl,stop-mode'. - Update the property to define gpr register offset and bit in DT, since different instance have different gpr bit. v2: * rename 'gpr' property string to 'fsl,stop-mode'. Signed

[PATCH net v2 4/4] ARM: dts: imx6qdl-sabresd: enable fec wake-on-lan

2020-05-25 Thread fugang . duan
From: Fugang Duan Enable ethernet wake-on-lan feature for imx6q/dl/qp sabresd boards since the PHY clock is supplied by exteranl osc. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/imx6qdl

[PATCH net v2 1/4] net: ethernet: fec: move GPR register offset and bit into DT

2020-05-25 Thread fugang . duan
From: Fugang Duan The commit da722186f654 (net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wake on lan feature. But it introduces two issues here: - one SOC has two instances, they have different bit - different SOCs may have different

[PATCH net v2 0/4] net: ethernet: fec: move GPR reigster offset and bit into DT

2020-05-25 Thread fugang . duan
From: Fugang Duan The commit da722186f654 (net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wol feature. It bring trouble to enable wol feature on imx6sx/imx6ul/imx7d platforms that have multiple ethernet instances with different GPR bit

[PATCH net 4/4] ARM: dts: imx6qdl-sabresd: enable fec wake-on-lan

2020-05-20 Thread fugang . duan
From: Fugang Duan Enable ethernet wake-on-lan feature for imx6q/dl/qp sabresd boards since the PHY clock is supplied by exteranl osc. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/imx6qdl

[PATCH net 3/4] ARM: dts: imx6: update fec gpr property to match new format

2020-05-20 Thread fugang . duan
From: Fugang Duan Update the gpr property to define gpr register offset and bit in DT. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index

[PATCH net 1/4] net: ethernet: fec: move GPR register offset and bit into DT

2020-05-20 Thread fugang . duan
From: Fugang Duan The commit da722186f654(net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wake on lan feature. But it introduces two issues here: - one SOC has two instances, they have different bit - different SOCs may have different

[PATCH net 0/4] net: ethernet: fec: move GPR reigster offset and bit into DT

2020-05-20 Thread fugang . duan
From: Fugang Duan The commit da722186f654(net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wake on lan feature. It bring trouble to enable wake-on-lan feature on other i.MX platforms because imx6ul/imx7d/imx8 has two instances, they have

[PATCH net 2/4] dt-bindings: fec: update the gpr property

2020-05-20 Thread fugang . duan
From: Fugang Duan Update the gpr property to define gpr register offset and bit in DT, since different instance have different gpr bit, and differnet SOC may have different gpr reigster offset. Signed-off-by: Fugang Duan --- Documentation/devicetree/bindings/net/fsl-fec.txt | 7 ++- 1

[PATCH net,stable 1/1] net: fec: free/restore resource in related probe error pathes

2018-01-03 Thread Fugang Duan
Fixes in probe error path: - Restore dev_id before failed_ioremap path. Fixes: ("net: fec: restore dev_id in the cases of probe error") - Call of_node_put(phy_node) before failed_phy path. Fixes: ("net: fec: Support phys probed from devicetree and fixed-link") Signed

[PATCH v3 net,stable 1/2] net: fec: restore dev_id in the cases of probe error

2018-01-03 Thread Fugang Duan
The static variable dev_id always plus one before netdev registerred. It should restore the dev_id value in the cases of probe error. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale

[PATCH v3 net,stable 2/2] net: fec: defer probe if regulator is not ready

2018-01-03 Thread Fugang Duan
Defer probe if regulator is not ready. E.g. some regulator is fixed regulator controlled by i2c expander gpio, the i2c device may be probed after the driver, then it should handle the case of defer probe error. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 4 1

[PATCH v3 net,stable 0/2] net: fec: clean up in the cases of probe error

2018-01-03 Thread Fugang Duan
The simple patches just clean up in the cases of probe error like restore dev_id and handle the defer probe when regulator is still not ready. v2: * Fabio Estevam's comment to suggest split v1 to separate patches. v3: * Restore dev_id before failed_ioremap path from Troy Kisky's commen

[PATCH v2 net,stable 2/2] net: fec: defer probe if regulator is not ready

2018-01-02 Thread Fugang Duan
Defer probe if regulator is not ready. E.g. some regulator is fixed regulator controlled by i2c expander gpio, the i2c device may be probed after the driver, then it should handle the case of defer probe error. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 4 1

[PATCH v2 net,stable 1/2] net: fec: restore dev_id in the cases of probe error

2018-01-02 Thread Fugang Duan
The static variable dev_id always plus one before netdev registerred. It should restore the dev_id value in the cases of probe error. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale

[PATCH v2 net,stable 0/2] net: fec: clean up in the cases of probe error

2018-01-02 Thread Fugang Duan
The simple patches just clean up in the cases of probe error like restore dev_id and handle the defer probe when regulator is still not ready. v2: * Fabio Estevam's comment to suggest split v1 to separate patches. Fugang Duan (2): net: fec: restore dev_id in the cases of probe error

[PATCH net,stable 1/1] net: fec: defer probe if regulator is not ready

2018-01-02 Thread Fugang Duan
Defer probe if regulator is not ready. E.g. some regulator is fixed regulator controlled by i2c expander gpio, the i2c device may be probed after the driver, then it should handle the case of defer probe error. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 5

[PATCH net,stable 1/1] net: fec: unmap the xmit buffer that are not transferred by DMA

2017-12-22 Thread Fugang Duan
d. So it should check the dma mapping buffer and unmap them. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 2d1b065..e1

[PATCH net-next 6/6] net: fec: add ERR007885 for i.MX6ul enet IP

2017-04-11 Thread Fugang Duan
The errata ERR007885 HW fix don't add to i.MX6ul ENET IP version, so add sw workaroud for the chip. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main

[PATCH net-next 1/6] net: fec: add return value check after calling .of_property_read_u32()

2017-04-11 Thread Fugang Duan
Add return value check after calling .of_property_read_u32() to avoid the warning reported by coverity. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b

[PATCH net-next 3/6] net: fec: pass ->dev to dma_alloc__coherent() API

2017-04-11 Thread Fugang Duan
In aarch64 system, it requires to trasfer ->dev to dma_alloc_coherent() API, otherwise allocate failed and print kernel warning. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ether

[PATCH net-next 2/6] net: fec: avoid BD pointer type cast to 32bit

2017-04-11 Thread Fugang Duan
In aarch64 system, the BD pointer is 64bit, and the high-order 32-bits of the address is effective, so replace usigned with (void *) type to aovid 64bit address is casted to 32bit in .fec_enet_get_nextdesc() and .fec_enet_get_prevdesc() functions. Signed-off-by: Fugang Duan --- drivers/net

[PATCH net-next 5/6] net: fec: correct the errata number comment typo

2017-04-11 Thread Fugang Duan
Correct the errata number ERR006358 comment typo. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 3cec94e

[PATCH net-next 4/6] net: fec: add phy-reset-gpios PROBE_DEFER check

2017-04-11 Thread Fugang Duan
Many boards use i2c/spi expander gpio as phy-reset-gpios and these gpios maybe registered after fec port, driver should check the return value of .of_get_named_gpio(). Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 26 ++ 1 file changed, 18

[PATCH net-next 0/6] net: fec: driver code clean

2017-04-11 Thread Fugang Duan
The patch series are for fec ethernet driver code clean up, each patch is independent. Patch #1,#4,#5 are code clean up. Patch #2,#3 are for aarch64 platform. Patch #6 is for i.MX6UL to add lost errata workaround. Fugang Duan (6): net: fec: add return value check after calling

RE: [PATCH v2 1/2] ARM: imx6: disable deeper idle states when FEC is active w/o HW workaround

2016-06-12 Thread Fugang Duan
From: Lucas Stach Sent: Thursday, June 09, 2016 5:35 PM > To: Fugang Duan ; Shawn Guo > Cc: devicet...@vger.kernel.org; patchwork-...@pengutronix.de; > ker...@pengutronix.de; linux-arm-ker...@lists.infradead.org; > netdev@vger.kernel.org > Subject: Re: [PATCH v2 1/2] ARM: imx6:

RE: [PATCH net-next RFT] net: fec: handle small PHY reset durations more precisely

2016-06-11 Thread Fugang Duan
From: Stefan Wahren Sent: Thursday, June 09, 2016 4:43 AM > To: David Miller ; Fugang Duan > > Cc: Fabio Estevam ; Lucas Stach > ; and...@lunn.ch; holgerschu...@gmail.com; Troy > Kisky ; linux-arm-ker...@lists.infradead.org; > netdev@vger.kernel.org; Stefan Wahren > Sub

RE: [PATCH][V2] net: fec: fix spelling mistakes and add missing newline

2016-06-06 Thread Fugang Duan
From: Colin King Sent: Monday, June 06, 2016 4:22 PM > To: Fugang Duan ; netdev@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > Subject: [PATCH][V2] net: fec: fix spelling mistakes and add missing newline > > From: Colin Ian King > > trivial fix to spelling mis

RE: [PATCH v2 1/2] ARM: imx6: disable deeper idle states when FEC is active w/o HW workaround

2016-06-06 Thread Fugang Duan
From: Holger Schurig Sent: Monday, June 06, 2016 7:04 PM > To: Fugang Duan ; Lucas Stach > ; Shawn Guo > Cc: devicet...@vger.kernel.org; netdev@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; ker...@pengutronix.de; patchwork- > l...@pengutronix.de > Subject: RE:

RE: [PATCH] net: fec: fix spelling mistake "coalesed" -> "coalesced"

2016-06-05 Thread Fugang Duan
From: Colin King Sent: Sunday, June 05, 2016 3:01 AM > To: Fugang Duan ; netdev@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > Subject: [PATCH] net: fec: fix spelling mistake "coalesed" -> "coalesced" > > From: Colin Ian King > > trivi

RE: [PATCH v2 1/2] ARM: imx6: disable deeper idle states when FEC is active w/o HW workaround

2016-06-05 Thread Fugang Duan
From: Lucas Stach Sent: Saturday, June 04, 2016 12:31 AM > To: Shawn Guo ; Fugang Duan > Cc: devicet...@vger.kernel.org; patchwork-...@pengutronix.de; > ker...@pengutronix.de; linux-arm-ker...@lists.infradead.org; > netdev@vger.kernel.org > Subject: [PATCH v2 1/2] ARM: imx6: disa

RE: [PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-05-08 Thread Fugang Duan
From: Troy Kisky Sent: Friday, April 22, 2016 10:01 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > ; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-05-08 Thread Fugang Duan
From: Troy Kisky Sent: Sunday, May 08, 2016 2:57 AM > To: Fugang Duan ; netdev@vger.kernel.org; > da...@davemloft.net; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH v2 0/3] net: ethtool: add ethtool_op_{get|set}_link_ksettings

2016-05-08 Thread Fugang Duan
Fom: Philippe Reynes Sent: Monday, May 09, 2016 5:45 AM > To: Fugang Duan ; da...@davemloft.net; > b...@decadent.org.uk; kan.li...@intel.com; de...@googlers.com; > adu...@mirantis.com; j...@mellanox.com; jacob.e.kel...@intel.com; > t...@herbertland.com; and...@lunn.ch > Cc: netdev@

RE: [PATCH] net: fec: only clear a queue's work bit if the queue was emptied

2016-05-03 Thread Fugang Duan
From: Uwe Kleine-König Sent: Tuesday, May 03, 2016 10:39 PM > To: Fugang Duan ; David S . Miller > > Cc: ker...@pengutronix.de; netdev@vger.kernel.org > Subject: [PATCH] net: fec: only clear a queue's work bit if the queue was > emptied > > In the receive path a qu

RE: [PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-04-25 Thread Fugang Duan
From: Fugang Duan Sent: Monday, April 25, 2016 9:58 AM > To: Troy Kisky ; netdev@vger.kernel.org; > da...@davemloft.net; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-04-24 Thread Fugang Duan
From: Troy Kisky Sent: Saturday, April 23, 2016 12:12 AM > To: Fugang Duan ; netdev@vger.kernel.org; > da...@davemloft.net; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-04-21 Thread Fugang Duan
From: Troy Kisky Sent: Friday, April 22, 2016 10:01 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > ; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH 2/3] phy: add generic function to support ksetting support

2016-04-14 Thread Fugang Duan
From: Philippe Reynes Sent: Friday, April 15, 2016 6:35 AM > To: da...@davemloft.net; de...@googlers.com; f.faine...@gmail.com; Fugang > Duan > Cc: linux-ker...@vger.kernel.org; netdev@vger.kernel.org; Philippe Reynes > > Subject: [PATCH 2/3] phy: add generic function to s

RE: [PATCH 3/3] fec: move to new ethtool api {get|set}_link_ksettings

2016-04-14 Thread Fugang Duan
From: Philippe Reynes Sent: Friday, April 15, 2016 6:35 AM > To: da...@davemloft.net; de...@googlers.com; f.faine...@gmail.com; Fugang > Duan > Cc: linux-ker...@vger.kernel.org; netdev@vger.kernel.org; Philippe Reynes > > Subject: [PATCH 3/3] fec: move to new ethto

RE: [PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-06 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, April 07, 2016 12:43 AM > To: Fugang Duan ; netdev@vger.kernel.org; > da...@davemloft.net; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net-next V3 05/16] net: fec: reduce interrupts

2016-04-06 Thread Fugang Duan
From: Troy Kisky Sent: Wednesday, April 06, 2016 10:26 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > ; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net-next V3 08/16] net: fec: set cbd_sc without relying on previous value

2016-04-06 Thread Fugang Duan
From: Troy Kisky Sent: Wednesday, April 06, 2016 10:26 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > ; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net-next V3 02/16] net: fec: remove unused interrupt FEC_ENET_TS_TIMER

2016-04-06 Thread Fugang Duan
From: Troy Kisky Sent: Wednesday, April 06, 2016 10:26 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > ; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net-next V3 03/16] net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it

2016-04-06 Thread Fugang Duan
From: Troy Kisky Sent: Wednesday, April 06, 2016 10:26 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > ; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-06 Thread Fugang Duan
From: Troy Kisky Sent: Wednesday, April 06, 2016 10:26 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > ; lzn...@gmail.com > Cc: Fabio Estevam ; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infra

RE: [PATCH] fec: Do not access unexisting register in Coldfire

2016-03-31 Thread Fugang Duan
From: Fabio Estevam Sent: Thursday, March 31, 2016 11:05 PM > To: da...@davemloft.net > Cc: Fugang Duan ; troy.ki...@boundarydevices.com; > g...@uclinux.org; netdev@vger.kernel.org; Fabio Estevam > > Subject: [PATCH] fec: Do not access unexisting register in Coldfire > >

RE: [PATCH] net: fec: stop the "rcv is not +last, " error messages

2016-03-31 Thread Fugang Duan
From: Fabio Estevam Sent: Thursday, March 31, 2016 6:57 PM > To: Fugang Duan > Cc: Greg Ungerer ; Troy Kisky > ; netdev@vger.kernel.org > Subject: Re: [PATCH] net: fec: stop the "rcv is not +last, " error messages > > Hi Andy, > > On Wed, Mar 30, 2016

RE: [PATCH] net: fec: stop the "rcv is not +last, " error messages

2016-03-30 Thread Fugang Duan
From: Fabio Estevam Sent: Thursday, March 31, 2016 2:37 AM > To: Greg Ungerer > Cc: Troy Kisky ; netdev@vger.kernel.org > Subject: Re: [PATCH] net: fec: stop the "rcv is not +last, " error messages > > Hi Greg, > > On Wed, Mar 30, 2016 at 12:24 AM, Greg Ungerer wrote: > > Hi Troy, > > > > Comm

RE: [PATCH RESEND] net:fec:Fix error checking in the function fec_enet_init

2016-03-06 Thread Fugang Duan
From: nick Sent: Sunday, March 06, 2016 11:50 AM > To: Fugang Duan ; da...@davemloft.net > Cc: b38...@freescale.com; and...@lunn.ch; fabio.este...@freescale.com; > l.st...@pengutronix.de; rmk+ker...@arm.linux.org.uk; trem...@gmail.com; > johan...@sipsolutions.net; u.kleine-koe...@pe

RE: [PATCH RESEND] net:fec:Fix error checking in the function fec_enet_init

2016-03-05 Thread Fugang Duan
net_device *ndev) > fep->tx_align = 0x3; > #endif > > - fec_enet_alloc_queue(ndev); > + ret = fec_enet_alloc_queue(ndev); > + if (ret) > + return ret; > > if (fep->bufdesc_ex) > fep->bufdesc_size = sizeof(struct bufdesc_ex); > -- > 2.1.4 Thanks. Acked-by: Fugang Duan

RE: [PATCH net-next V2 07/16] net: fec: set cbd_sc without relying on previous value

2016-03-05 Thread Fugang Duan
From: Troy Kisky Sent: Saturday, March 05, 2016 12:08 AM > To: Fugang Duan ; netdev@vger.kernel.org; > da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linu

RE: [PATCH net-next V2 13/16] net: fec: print more debug info in fec_timeout

2016-03-04 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, February 25, 2016 8:37 AM > To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linux-arm- > ker...@lists.infradead.org; l...@

RE: [PATCH net-next V2 07/16] net: fec: set cbd_sc without relying on previous value

2016-03-04 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, February 25, 2016 8:37 AM > To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linux-arm- > ker...@lists.infradead.org; l...@

RE: [PATCH net-next V2 08/16] net: fec: eliminate calls to fec_enet_get_prevdesc

2016-03-04 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, February 25, 2016 8:37 AM > To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linux-arm- > ker...@lists.infradead.org; l...@

RE: [PATCH net-next V2 06/16] net: fec: don't clear all rx queue bits when just one is being checked

2016-03-04 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, February 25, 2016 8:37 AM > To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linux-arm- > ker...@lists.infradead.org; l...@b

RE: [PATCH net-next V2 04/16] net: fec: reduce interrupts

2016-03-04 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, February 25, 2016 8:37 AM > To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linux-arm- > ker...@lists.infradead.org; l...@

RE: [PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id

2016-03-03 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, March 03, 2016 12:14 AM > To: Fugang Duan ; netdev@vger.kernel.org; > da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linu

RE: [PATCH] net: fec: Rename "phy-reset-active-low" property

2016-03-03 Thread Fugang Duan
;failed to get phy-reset-gpios: %d\n", > err); > return; > } > msleep(msec); > - gpio_set_value_cansleep(phy_reset, !active_low); > + gpio_set_value_cansleep(phy_reset, !active_high); > } > #else /* CONFIG_OF */ > static void fec_reset_phy(struct platform_device *pdev) > -- > 2.7.2 Rename "phy-reset-active-low" to "phy-reset-active-high" is more reasonable, not confuse us. Thanks. Acked-by: Fugang Duan

RE: [PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id

2016-03-02 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, February 25, 2016 8:37 AM > To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linux-arm- > ker...@lists.infradead.org; l...

RE: [PATCH net-next V2 04/16] net: fec: reduce interrupts

2016-03-02 Thread Fugang Duan
From: Troy Kisky Sent: Thursday, February 25, 2016 8:37 AM > To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com > Cc: fabio.este...@freescale.com; l.st...@pengutronix.de; and...@lunn.ch; > trem...@gmail.com; li...@arm.linux.org.uk; linux-arm- > ker...@lists.infradead.org; l...@

RE: [PATCH net-next V2 02/16] net: fec: pass rxq to fec_enet_rx_queue instead of queue_id

2016-03-02 Thread Fugang Duan
budget - pkt_received, queue_id); > + rxq = fep->rx_queue[FEC_ENET_GET_QUQUE(queue_id)]; > + pkt_received += fec_rxq(ndev, fep, rxq, budget - > pkt_received); > } > return pkt_received; > } > -- > 2.5.0 This is one clean up patch that you introduce struct bufdesc_prop. Acked-by: Fugang Duan

RE: [PATCH net-next V2 01/16] net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set

2016-03-02 Thread Fugang Duan
f (int_events & FEC_ENET_RXF_1) > fep->work_rx |= (1 << 0); > if (int_events & FEC_ENET_RXF_2) > fep->work_rx |= (1 << 1); > > - if (int_events & FEC_ENET_TXF) > + if (int_events & FEC_ENET_TXF_0) > fep->work_tx |= (1 << 2); > if (int_events & FEC_ENET_TXF_1) > fep->work_tx |= (1 << 0); > -- > 2.5.0 Acked-by: Fugang Duan

RE: [PATCH] MAINTAINERS: add maintainer entry for FREESCALE FEC ethernet driver

2016-03-02 Thread Fugang Duan
From: Fugang Duan Sent: Wednesday, March 02, 2016 5:25 PM > To: da...@davemloft.net > Cc: netdev@vger.kernel.org; Fugang Duan > Subject: [PATCH] MAINTAINERS: add maintainer entry for FREESCALE FEC > ethernet driver > > Add a maintainer entry for FREESCALE FEC ethernet driver a

[PATCH] MAINTAINERS: add maintainer entry for FREESCALE FEC ethernet driver

2016-03-02 Thread Fugang Duan
Add a maintainer entry for FREESCALE FEC ethernet driver and add myself as a maintainer. Signed-off-by: Fugang Duan --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0499f9e..4d4b18f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4552,6

[PATCH net v2 1/1] net: fec: add netif status check before set mac address

2015-09-09 Thread Fugang Duan
netif status check to avoid registers access when clocks are gated off. Until eth0 up the new MAC address are wrote into related registers. V2: As Lucas Stach's suggestion, add a comment in the code to explain why it needed. CC: Lucas Stach CC: Florian Fainelli Signed-off-by: Fugang

[PATCH net-next 1/1] net: fec: add netif status check before set mac address

2015-09-08 Thread Fugang Duan
netif status check to avoid registers access when clocks are gated off. Until eth0 up the new MAC address are wrote into related registers. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/freescale

[PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet

2015-09-02 Thread Fugang Duan
ve fully cleaned the receive ring, while still allowing an interrupt to be raised if we receive another packet. The position of this is critical: we must do this prior to reading the next packet status to avoid potentially dropping an interrupt when a packet is still pending. Acked-by: Fugang

[PATCH v1 4/6] ARM: dts: imx: pinfunc: add GPIO1 pin define for i.MX7d

2015-08-18 Thread Fugang Duan
Add GPIO1 pin define for i.MX7d. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx7d-pinfunc.h | 115 ++ 1 file changed, 115 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-pinfunc.h b/arch/arm/boot/dts/imx7d-pinfunc.h index a8d8149..8b3cf2bc 100644

[PATCH v1 2/6] ARM: imx7d: add imx7d iomux-gpr field define

2015-08-18 Thread Fugang Duan
Add imx7d iomux-gpr field define. Signed-off-by: Fugang Duan --- include/linux/mfd/syscon/imx7-iomuxc-gpr.h | 49 ++ 1 file changed, 49 insertions(+) diff --git a/include/linux/mfd/syscon/imx7-iomuxc-gpr.h b/include/linux/mfd/syscon/imx7-iomuxc-gpr.h new file mode

[PATCH v1 1/6] net: phy: broadcom: add bcm54220 phy ID

2015-08-18 Thread Fugang Duan
Add bcm54220 phy ID entry. Signed-off-by: Fugang Duan --- include/linux/brcmphy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h index 697ca77..20bed15 100644 --- a/include/linux/brcmphy.h +++ b/include/linux/brcmphy.h @@ -16,6 +16,7

[PATCH v1 6/6] ARM: dts: imx7d-sdb: add fec1 and fec2 support

2015-08-18 Thread Fugang Duan
Enable fec1 and fec2 for i.MX7d-sdb board. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx7d-sdb.dts | 76 - 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts index 4d1a4b9

[PATCH v1 5/6] ARM: dts: imx7d: add fec1 and fec2 support for i.MX7d soc

2015-08-18 Thread Fugang Duan
Add fec1 and fec2 nodes for i.MX7d soc. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx7d.dtsi | 36 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi index b738ce0..7631492 100644 --- a/arch/arm

[PATCH v1 0/6] Add fec1 and fec2 support for i.MX7d sdb board

2015-08-18 Thread Fugang Duan
: i.MX7d sdb board install bcm54220 phy, i.MX7d arm2 board install AR8031 phy. For the two phys, there needs extra phy setting, so package the setting to fixup. Patch#4~6: Add fec dts node and pinmux setting in dts file. Fugang Duan (6): net: phy: broadcom: add bcm54220 phy ID ARM

[PATCH v1 3/6] ARM: imx: add enet init for i.MX7D platform

2015-08-18 Thread Fugang Duan
Add enet phy fixup, clock source init for i.MX7D platform. Signed-off-by: Fugang Duan --- arch/arm/mach-imx/mach-imx7d.c | 75 -- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach

[PATCH v1 net-next 1/1] net: fec: add stop mode request on/off implemention

2015-07-22 Thread Fugang Duan
the specifix GPR register offset and MASK bit can be transferred from DTS. Signed-off-by: Fugang Duan --- Documentation/devicetree/bindings/net/fsl-fec.txt | 3 + drivers/net/ethernet/freescale/fec.h | 8 +++ drivers/net/ethernet/freescale/fec_main.c | 87 +++

[PATCH net-next v1 1/1] net: fec: init MAC prior to mii bus probe

2015-06-23 Thread Fugang Duan
f, all initialized MAC registers reset to default, so in the case, it must init MAC prior to mii bus probe. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/d

[PATCH net-next 1/1] net: fec: ptp: correct the ENET_ATCOR value

2015-06-05 Thread Fugang Duan
From: Fugang Duan The current driver adjust freq formula is: fe * diff = ppb * pc Note: fe: ENET ref clock frequency in Hz diff = inc_corr - inc: difference between default increment and correction increment ppb: parts per billion adjustment from base pc: correction period (in number of