Re: [PATCH] net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC

2019-07-08 Thread Jiangfeng Xiao
On 2019/7/9 2:18, David Miller wrote: > From: David Miller > Date: Sun, 07 Jul 2019 22:18:05 -0700 (PDT) > >> From: Jiangfeng Xiao >> Date: Fri, 5 Jul 2019 14:10:03 +0800 >> >>> HI13X1 changed the offsets and bitmaps for tx_desc >>> registe

[PATCH v2 08/10] net: hisilicon: Offset buf address to adapt HI13X1_GMAC

2019-07-08 Thread Jiangfeng Xiao
that it is valid. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 5328219..c578934 100644

[PATCH v2 05/10] net: hisilicon: HI13X1_GMAX need dreq reset at first

2019-07-08 Thread Jiangfeng Xiao
HI13X1_GMAC delete request for soft reset at first, otherwise, the subsequent initialization will not take effect. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/net/ethernet

[PATCH v2 06/10] net: hisilicon: dt-bindings: Add an field of port-handle

2019-07-08 Thread Jiangfeng Xiao
In general, group is the same as the port, but some boards specify a special group for better load balancing of each processing unit. Signed-off-by: Jiangfeng Xiao --- Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v2 03/10] net: hisilicon: Cleanup for cast to restricted __be32

2019-07-08 Thread Jiangfeng Xiao
__be32 Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 31f13cf..d8f0619 100644 --- a/drivers/net

[PATCH v2 00/10] net: hisilicon: Add support for HI13X1 to hip04_eth

2019-07-08 Thread Jiangfeng Xiao
soc. So the macro of the register offset is redefined to adapt the HI13X1_GMAC. Clean up the sparse warning by the way. Change since v1: * Add a cover letter. Jiangfeng Xiao (10): net: hisilicon: Add support for HI13X1 to hip04_eth net: hisilicon: Cleanup for got restricted __be32 net

[PATCH v2 10/10] net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC

2019-07-08 Thread Jiangfeng Xiao
HI13X1 changed the offsets and bitmaps for tx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions

[PATCH v2 04/10] net: hisilicon: HI13X1_GMAX skip write LOCAL_PAGE_REG

2019-07-08 Thread Jiangfeng Xiao
HI13X1_GMAC changed the offsets and bitmaps for GE_TX_LOCAL_PAGE_REG registers in the same peripheral device on different models of the hip04_eth. With the default configuration, HI13X1_GMAC can also work without any writes to the GE_TX_LOCAL_PAGE_REG register. Signed-off-by: Jiangfeng Xiao

[PATCH v2 07/10] net: hisilicon: Add group field to adapt HI13X1_GMAC

2019-07-08 Thread Jiangfeng Xiao
In general, group is the same as the port, but some boards specify a special group for better load balancing of each processing unit. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH v2 09/10] net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC

2019-07-08 Thread Jiangfeng Xiao
HI13X1 changed the offsets and bitmaps for rx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet

[PATCH v2 02/10] net: hisilicon: Cleanup for got restricted __be32

2019-07-08 Thread Jiangfeng Xiao
:472:23: warning: incorrect type in assignment hip04_eth.c:472:23:expected unsigned int [usertype] wb_addr hip04_eth.c:472:23:got restricted __be32 [usertype] Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v2 01/10] net: hisilicon: Add support for HI13X1 to hip04_eth

2019-07-08 Thread Jiangfeng Xiao
Extend the hip04_eth driver to support HI13X1_GMAC. Enable it with CONFIG_HI13X1_GMAC option. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/Kconfig | 10 drivers/net/ethernet/hisilicon/hip04_eth.c | 37 -- 2 files changed, 40

Re: [PATCH v2 05/10] net: hisilicon: HI13X1_GMAX need dreq reset at first

2019-07-09 Thread Jiangfeng Xiao
On 2019/7/9 17:35, Sergei Shtylyov wrote: > Hello! > > On 09.07.2019 6:31, Jiangfeng Xiao wrote: > >> HI13X1_GMAC delete request for soft reset at first, >> otherwise, the subsequent initialization will not >> take effect. >> >> Signed-off-by: Jiangf

Re: [PATCH v2 05/10] net: hisilicon: HI13X1_GMAX need dreq reset at first

2019-07-09 Thread Jiangfeng Xiao
On 2019/7/9 21:48, Jiangfeng Xiao wrote: > > > On 2019/7/9 17:35, Sergei Shtylyov wrote: >> Hello! >> >> On 09.07.2019 6:31, Jiangfeng Xiao wrote: >> [...] >>> @@ -853,6 +867,15 @@ static int hip04_mac_probe(struct platform_devic

[PATCH] irqchip/gic: Add dependency for ARM_GIC_MAX_NR

2019-06-14 Thread Jiangfeng Xiao
CONFIG_ARM_GIC_MAX_NR is enabled by default. It is redundant in x86 and IA-64 where is without GIC. Signed-off-by: Jiangfeng Xiao --- drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 659c5e0..e338b471 100644

[PATCH] net: hisilicon: Use devm_platform_ioremap_resource

2019-07-12 Thread Jiangfeng Xiao
Use devm_platform_ioremap_resource instead of devm_ioremap_resource. Make the code simpler. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c| 7 ++- drivers/net/ethernet/hisilicon/hisi_femac.c | 7 ++- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 7

[PATCH v1 3/3] net: hisilicon: Fix dma_map_single failed on arm64

2019-08-03 Thread Jiangfeng Xiao
we use dma_map_single, the first parameter is to use the device of platform_device. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c

[PATCH v1 1/3] net: hisilicon: make hip04_tx_reclaim non-reentrant

2019-08-03 Thread Jiangfeng Xiao
nic - not syncing: Fatal exception in interrupt CPU3: stopping CPU: 3 PID: 0 Comm: swapper/3 Tainted: G DO4.4.185 #1 Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ether

[PATCH v1 2/3] net: hisilicon: fix hip04-xmit never return TX_BUSY

2019-08-03 Thread Jiangfeng Xiao
imum value of tx_count can reach (TX_DESC_NUM - 1), then hip04_mac_start_xmit can reurn NETDEV_TX_BUSY. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/d

[PATCH v1 0/3] net: hisilicon: Fix a few problems with hip04_eth

2019-08-03 Thread Jiangfeng Xiao
During the use of the hip04_eth driver, several problems were found, which solved the hip04_tx_reclaim reentry problem, fixed the problem that hip04_mac_start_xmit never returns NETDEV_TX_BUSY and the dma_map_single failed on the arm64 platform. Jiangfeng Xiao (3): net: hisilicon: make

Re: [PATCH v1 1/3] net: hisilicon: make hip04_tx_reclaim non-reentrant

2019-08-05 Thread Jiangfeng Xiao
On 2019/8/6 8:46, Jakub Kicinski wrote: > On Sat, 3 Aug 2019 20:31:39 +0800, Jiangfeng Xiao wrote: >> If hip04_tx_reclaim is interrupted while it is running >> and then __napi_schedule continues to execute >> hip04_rx_poll->hip04_tx_reclaim, reentrancy occurs >>

[PATCH] irqchip/gic: Add dependency for ARM_GIC

2019-06-27 Thread Jiangfeng Xiao
Not every arch has ARM_GIC, it is strange to see ARM_GIC_MAX_NR in the .config file of the x86 and IA-64 architecture. so fix build by adding necessary dependency. Signed-off-by: Jiangfeng Xiao --- drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip

Re: [PATCH] irqchip/gic: Add dependency for ARM_GIC

2019-06-27 Thread Jiangfeng Xiao
On 2019/6/27 22:20, Marc Zyngier wrote: > On 27/06/2019 15:11, Jiangfeng Xiao wrote: >> Not every arch has ARM_GIC, it is strange >> to see ARM_GIC_MAX_NR in the .config file >> of the x86 and IA-64 architecture. so fix >> build by adding necessary dependency. >

[PATCH] net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC

2019-07-05 Thread Jiangfeng Xiao
HI13X1 changed the offsets and bitmaps for tx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions

[PATCH 01/10] net: hisilicon: Add support for HI13X1 to hip04_eth

2019-07-05 Thread Jiangfeng Xiao
Extend the hip04_eth driver to support HI13X1_GMAC. Enable it with CONFIG_HI13X1_GMAC option. HI13X1 changed the offsets and bitmaps for registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/Kconfig

[PATCH 02/10] net: hisilicon: Cleanup for got restricted __be32

2019-07-05 Thread Jiangfeng Xiao
:472:23: warning: incorrect type in assignment hip04_eth.c:472:23:expected unsigned int [usertype] wb_addr hip04_eth.c:472:23:got restricted __be32 [usertype] Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 03/10] net: hisilicon: Cleanup for cast to restricted __be32

2019-07-05 Thread Jiangfeng Xiao
__be32 Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 31f13cf..d8f0619 100644 --- a/drivers/net

[PATCH 04/10] net: hisilicon: HI13X1_GMAX skip write LOCAL_PAGE_REG

2019-07-05 Thread Jiangfeng Xiao
HI13X1_GMAC changed the offsets and bitmaps for GE_TX_LOCAL_PAGE_REG registers in the same peripheral device on different models of the hip04_eth. With the default configuration, HI13X1_GMAC can also work without any writes to the GE_TX_LOCAL_PAGE_REG register. Signed-off-by: Jiangfeng Xiao

[PATCH 05/10] net: hisilicon: HI13X1_GMAX need dreq reset at first

2019-07-05 Thread Jiangfeng Xiao
HI13X1_GMAC delete request for soft reset at first, otherwise, the subsequent initialization will not take effect. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/net/ethernet

[PATCH 06/10] net: hisilicon: dt-bindings: Add an field of port-handle

2019-07-05 Thread Jiangfeng Xiao
In general, group is the same as the port, but some boards specify a special group for better load balancing of each processing unit. Signed-off-by: Jiangfeng Xiao --- Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH 07/10] net: hisilicon: Add group field to adapt HI13X1_GMAC

2019-07-05 Thread Jiangfeng Xiao
In general, group is the same as the port, but some boards specify a special group for better load balancing of each processing unit. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 10/10] net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC

2019-07-05 Thread Jiangfeng Xiao
HI13X1 changed the offsets and bitmaps for tx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions

[PATCH 08/10] net: hisilicon: Offset buf address to adapt HI13X1_GMAC

2019-07-05 Thread Jiangfeng Xiao
that it is valid. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 5328219..c578934 100644

[PATCH 09/10] net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC

2019-07-05 Thread Jiangfeng Xiao
HI13X1 changed the offsets and bitmaps for rx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet