[PATCH] net: allwinner: remove redundant irqsave and irqrestore in hardIRQ

2020-09-21 Thread Barry Song
The comment "holders of db->lock must always block IRQs" and related code to do irqsave and irqrestore don't make sense since we are in a IRQ-disabled hardIRQ context. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Barry Song --- drivers/net/ethernet/allwinner/sun4i-em

[PATCH net-next] net: hns: use IRQ_NOAUTOEN to avoid irq is enabled due to request_irq

2020-09-10 Thread Barry Song
Rather than doing request_irq and then disabling the irq immediately, it should be safer to use IRQ_NOAUTOEN flag for the irq. It removes any gap between request_irq() and disable_irq(). Cc: Salil Mehta Reviewed-by: Yunsheng Lin Signed-off-by: Barry Song --- drivers/net/ethernet/hisilicon/hns

RE: [PATCH net] xsk: remove cheap_dma optimization

2020-07-08 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Christoph Hellwig > Sent: Wednesday, July 8, 2020 6:50 PM > To: Robin Murphy > Cc: Björn Töpel ; Christoph Hellwig ; > Daniel Borkmann ; maxi...@mellanox.com; > konrad.w...@ora

[PATCH 4/5] net: hns3: replace disable_irq by IRQ_NOAUTOEN flag

2020-06-17 Thread Barry Song
disable_irq() after request_irq() is still risk as there is a chance irq can come after request_irq() and before disable_irq(). this should be done by IRQ_NOAUTOEN flag. Signed-off-by: Barry Song --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 5/5] net: hns3: streaming dma buffer sync between cpu and device

2020-06-17 Thread Barry Song
Right now they are empty functions for our SoC since hardware can keep cache coherent, but it is still good to align with streaming DMA APIs as device drivers should not make an assumption of SoC. Reviewed-by: Yunsheng Lin Signed-off-by: Barry Song --- .../net/ethernet/hisilicon/hns3

[PATCH 3/5] net: hns3: rename buffer-related functions

2020-06-17 Thread Barry Song
This is for improving the readability. Signed-off-by: Barry Song --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3

[PATCH 1/5] net: hns3: remove unnecessary devm_kfree

2020-06-17 Thread Barry Song
since we are using device-managed function, it is unnecessary to free in probe. Signed-off-by: Barry Song --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net

[PATCH 2/5] net: hns3: pointer type of buffer should be void

2020-06-17 Thread Barry Song
Move the type of buffer address from unsigned char to void Signed-off-by: Barry Song --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon

[PATCH 0/5] net: hns3: a bundle of minor cleanup and fixes

2020-06-17 Thread Barry Song
some minor changes to either improve the readability or make the code align with linux APIs better. Barry Song (5): net: hns3: remove unnecessary devm_kfree net: hns3: pointer type of buffer should be void net: hns3: rename buffer-related functions net: hns3: replace disable_irq by

[PATCH] dm9000: fix a typo

2015-09-06 Thread Barry Song
From: Barry Song Signed-off-by: Barry Song --- drivers/net/ethernet/davicom/dm9000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index c0a7813..cf94b72 100644 --- a/drivers/net/ethernet