Re: [PATCH] net: arc_emac: fix arc_emac_rx() error paths

2017-12-19 Thread Alexander Kochetkov
> 19 дек. 2017 г., в 18:22, David Miller написал(а): > > From: Alexander Kochetkov > Date: Fri, 15 Dec 2017 20:20:06 +0300 > >> arc_emac_rx() has some issues found by code review. >> >> In case netdev_alloc_skb_ip_align() or dma_map_single() failure >>

[PATCH v2] net: arc_emac: fix arc_emac_rx() error paths

2017-12-19 Thread Alexander Kochetkov
not be provided to EMAC. Signed-off-by: Alexander Kochetkov --- Changes in v2: - Rebased against stable linux-4.14.y branch drivers/net/ethernet/arc/emac_main.c | 53 -- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/arc

[PATCH v2] net: arc_emac: restart stalled EMAC

2017-12-19 Thread Alexander Kochetkov
ake a broadcast storm. For example, running on PC 'ping' to some IP address triggers ARP-request storm. After some time (~10sec), EMAC on rk3188 will stall. Observed and tested on rk3188 radxarock. [1] https://en.wikipedia.org/wiki/Broadcast_radiation Signed-off-by: Alexander Kochetkov ---

[PATCH] net: arc_emac: fix arc_emac_rx() error paths

2017-12-15 Thread Alexander Kochetkov
not be provided to EMAC. Signed-off-by: Alexander Kochetkov --- drivers/net/ethernet/arc/emac_main.c | 53 -- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c index b2e0051

[PATCH] net: arc_emac: restart stalled EMAC

2017-12-15 Thread Alexander Kochetkov
ake a broadcast storm. For example, running on PC 'ping' to some IP address triggers ARP-request storm. After some time (~10sec), EMAC on rk3188 will stall. Observed and tested on rk3188 radxarock. [1] https://en.wikipedia.org/wiki/Broadcast_radiation Signed-off-by: Alexander Kochetkov -

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-25 Thread Alexander Kochetkov
Hello David! > 25 апр. 2017 г., в 17:36, David Miller написал(а): > > So... what are we doing here? > > My understanding is that this should fix the same problem that commit > 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto > negotiation on startup") fixed and that this mic

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-21 Thread Alexander Kochetkov
> 21 апр. 2017 г., в 17:18, Roger Quadros написал(а): > > I think the following commit broke functionality with interrupt driven PHYs > 3c293f4e08b5 ("net: phy: Trigger state machine on state change and not > polling.") Probably this one[1] broke, according to Alexandre’s commit[2]. And it was

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-20 Thread Alexander Kochetkov
p MAC startup time for boards with Micrel PHY on 3~5 sec (auto-negotiation time[2]). Could you check that also? Regards, Alexander. [1] https://lkml.org/lkml/2017/4/20/357 [2] http://www.ieee802.org/3/af/public/jan02/brown_1_0102.pdf > 20 апр. 2017 г., в 14:00, Alexander Kochetkov > написал(а

[PATCH v2] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-20 Thread Alexander Kochetkov
phy_start_aneg() to phy_start(). Also the patch add call to phy_stop() to arc_emac_stop() to allow the PHY device to be fully suspended when the interface is unused. Signed-off-by: Alexander Kochetkov --- Changes in v2: - Updated commit message to clarify changes drivers/net/ethernet/arc

[PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-20 Thread Alexander Kochetkov
HY and it won't get it. Signed-off-by: Alexander Kochetkov Cc: stable # v4.9+ --- drivers/net/phy/phy.c | 40 include/linux/phy.h |1 + 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy

[PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-20 Thread Alexander Kochetkov
] and this one patch will get upstream instead of patch[2]. Could you please test it? Regards, Alexander. [1] http://patchwork.ozlabs.org/patch/743773/ [2] https://lkml.org/lkml/2017/3/30/517 Alexander Kochetkov (1): net: phy: fix auto-negotiation stall due to unavailable interrupt dri

Re: [PATCH] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-19 Thread Alexander Kochetkov
): > > On 04/19/2017 05:29 PM, Alexander Kochetkov wrote: > >> The patch replace phy_start_aneg() with phy_start(). phy_start() call > > Replaces. > >> phy_start_aneg() as a part of startup sequence and allow recover from >> error (PHY_HALTED) state. >

Re: [PATCH] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-19 Thread Alexander Kochetkov
> 19 апр. 2017 г., в 19:32, Florian Fainelli написал(а): > > http://patchwork.ozlabs.org/patch/743773/ > > Roger can you also test Alexander's patch? If MAC use phy_start_aneg() instead of phy_start() my patch will not work as expected. Roger, if patch don’t work for you please check what MAC

[PATCH] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-19 Thread Alexander Kochetkov
The patch replace phy_start_aneg() with phy_start(). phy_start() call phy_start_aneg() as a part of startup sequence and allow recover from error (PHY_HALTED) state. Also added call phy_stop() to arc_emac_remove() to stop PHY state machine when MAC is down. Signed-off-by: Alexander Kochetkov

Re: [PATCH] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-19 Thread Alexander Kochetkov
Just found similar problem fixed in another PHY. See commit 99f81afc139c ("phy: micrel: Disable auto negotiation on startup») > 19 апр. 2017 г., в 16:46, Alexander Kochetkov > написал(а): > > The problem I fix related to SMSC LAN8710/LAN8720 PHY handled using > interru

[PATCH] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-19 Thread Alexander Kochetkov
interrupt. Signed-off-by: Alexander Kochetkov --- drivers/net/phy/phy.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 7cc1b7d..da8f03d 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1169,6 +1169,18

[PATCHv2 2/2] net: arc_emac: don't pass multicast packets to kernel in non-multicast mode

2016-11-14 Thread Alexander Kochetkov
The patch disable capturing multicast packets when multicast mode disabled for ethernet ('ifconfig eth0 -multicast'). In that case no multicast packet will be passed to kernel. Signed-off-by: Alexander Kochetkov --- Changes in v2: Add Signed-off-by text. Removed deleted line

[PATCHv2 1/2] net: arc_emac: annonce IFF_MULTICAST support

2016-11-14 Thread Alexander Kochetkov
cast mode enabled by default. Signed-off-by: Alexander Kochetkov --- Changes in v2: Add Signed-off-by text. drivers/net/ethernet/arc/emac_main.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c index b0da969..

[PATCH 1/2] net: arc_emac: annonce IFF_MULTICAST support

2016-11-14 Thread Alexander Kochetkov
Multicast support was implemented by commit 775dd682e2b0ec7 ('arc_emac: implement promiscuous mode and multicast filtering'). It can be enabled explicity using 'ifconfig eth0 multicast'. The patch is needed in order to remove explicit configuration as most devices has multicast mode enabled by def

[PATCH 2/2] net: arc_emac: don't pass multicast packets to kernel in non-multicast mode

2016-11-14 Thread Alexander Kochetkov
The patch disable capturing multicast packets when multicast mode disabled for ethernet ('ifconfig eth0 -multicast'). In that case no multicast packet will be passed to kernel. --- drivers/net/ethernet/arc/emac_main.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dri

Fixes for rockchip EMAC

2016-02-09 Thread Alexander Kochetkov
Hello! Here is a set of 3 patches what fix koops, memory leak and rockchip EMAC hang. Tested on radxarock lite. [PATCH 1/3] net: arc_emac: fix koops caused by sk_buff free [PATCH 2/3] net: arc_emac: reset txbd_curr and txbd_dirty pointers [PATCH 3/3] net: arc_emac: fix sk_buff leak

[PATCH 2/3] net: arc_emac: reset txbd_curr and txbd_dirty pointers to zero

2016-02-09 Thread Alexander Kochetkov
EMAC reset internal tx ring pointer to zero at statup. txbd_curr and txbd_dirty can be different from zero. That cause ethernet transfer hang (no packets transmitted). In order to reproduce, run on device: ifconfig eth0 down ifconfig eth0 up Signed-off-by: Alexander Kochetkov --- CC

[PATCH 1/3] net: arc_emac: fix koops caused by sk_buff free

2016-02-09 Thread Alexander Kochetkov
34.619075] [] (kthread) from [] (ret_from_fork+0x14/0x3c) [ 34.626317] Code: e8bd8010 e3a0 e12fff1e e92d4010 (e59030a4) [ 34.632572] ---[ end trace cca5a3d86a82249a ]--- Signed-off-by: Alexander Kochetkov --- CC: sta...@vger.kernel.org # 3.18.x- --- drivers/net/ethernet/arc/emac_main.c |

[PATCH 3/3] net: arc_emac: fix sk_buff leak

2016-02-09 Thread Alexander Kochetkov
EMAC could be disabled, while there is some sb_buff in use. That buffers got lost for linux. In order to reproduce run on device during active ethernet work: ifconfig eth0 down Signed-off-by: Alexander Kochetkov --- CC: sta...@vger.kernel.org # 3.18.x- --- drivers/net/ethernet/arc