[PATCH net-next v3 6/6] net: dsa: enable selftest support for all switches by default

2021-04-19 Thread Oleksij Rempel
Most of generic selftest should be able to work with probably all ethernet controllers. The DSA switches are not exception, so enable it by default at least for DSA. This patch was tested with SJA1105 and AR9331. Signed-off-by: Oleksij Rempel --- include/net/dsa.h | 2 ++ net/dsa/Kconfig

[PATCH net-next v3 4/6] net: fec: make use of generic NET_SELFTESTS library

2021-04-19 Thread Oleksij Rempel
With this patch FEC on iMX will able to run generic net selftests Signed-off-by: Oleksij Rempel --- drivers/net/ethernet/freescale/Kconfig| 1 + drivers/net/ethernet/freescale/fec_main.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/freescale/Kconfig b

[PATCH net-next v3 3/6] net: add generic selftest support

2021-04-19 Thread Oleksij Rempel
HY - AR9331 ag71xx -> AR9331 switch -> AR9331 PHY Signed-off-by: Oleksij Rempel --- include/net/selftests.h | 12 ++ net/Kconfig | 4 + net/core/Makefile | 1 + net/core/selftests.c| 400 4 files changed, 417 insertions(+) cr

[PATCH net-next v3 5/6] net: ag71xx: make use of generic NET_SELFTESTS library

2021-04-19 Thread Oleksij Rempel
With this patch the ag71xx on Atheros AR9331 will able to run generic net selftests. Signed-off-by: Oleksij Rempel --- drivers/net/ethernet/atheros/Kconfig | 1 + drivers/net/ethernet/atheros/ag71xx.c | 20 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a

[PATCH net-next v3 2/6] net: phy: genphy_loopback: add link speed configuration

2021-04-19 Thread Oleksij Rempel
. Signed-off-by: Oleksij Rempel --- drivers/net/phy/phy.c| 3 ++- drivers/net/phy/phy_device.c | 28 ++-- include/linux/phy.h | 1 + 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index

[PATCH net-next v3 1/6] net: phy: execute genphy_loopback() per default on all PHYs

2021-04-19 Thread Oleksij Rempel
The generic loopback is really generic and is defined by the 802.3 standard, we should just mandate that drivers implement a custom loopback if the generic one cannot work. Suggested-by: Florian Fainelli Signed-off-by: Oleksij Rempel --- drivers/net/phy/phy_device.c | 7 +-- 1 file changed

[PATCH net-next v3 0/6] provide generic net selftest support

2021-04-19 Thread Oleksij Rempel
and all DSA switches. - add loopback support on more PHYs. This patch set provides diagnostic capabilities for some iMX, ag71xx or any DSA based devices. For proper functionality, PHY loopback support is needed. So far there is only initial infrastructure with basic tests. Oleksij Rempel (6

[PATCH v2 7/7] net: dsa: enable selftest support for all switches by default

2021-04-15 Thread Oleksij Rempel
Most of generic selftest should be able to work with probably all ethernet controllers. The DSA switches are not exception, so enable it by default at least for DSA. This patch was tested with SJA1105 and AR9331. Signed-off-by: Oleksij Rempel --- include/net/dsa.h | 2 ++ net/dsa/Kconfig

[PATCH v2 5/7] net: fec: make use of generic NET_SELFTESTS library

2021-04-15 Thread Oleksij Rempel
With this patch FEC on iMX will able to run generic net selftests Signed-off-by: Oleksij Rempel --- drivers/net/ethernet/freescale/Kconfig| 1 + drivers/net/ethernet/freescale/fec_main.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/freescale/Kconfig b

[PATCH v2 6/7] net: ag71xx: make use of generic NET_SELFTESTS library

2021-04-15 Thread Oleksij Rempel
With this patch the ag71xx on Atheros AR9331 will able to run generic net selftests. Signed-off-by: Oleksij Rempel --- drivers/net/ethernet/atheros/Kconfig | 1 + drivers/net/ethernet/atheros/ag71xx.c | 20 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a

[PATCH net-next v2 0/7] provide generic net selftest support

2021-04-15 Thread Oleksij Rempel
support is needed. So far there is only initial infrastructure with basic tests. Oleksij Rempel (7): net: phy: genphy_loopback: add link speed configuration net: phy: micrel: KSZ8081 & KSZ9031: add loopback support net: phy: at803x: AR8085 & AR9331: add loopback support net: add

[PATCH v2 4/7] net: add generic selftest support

2021-04-15 Thread Oleksij Rempel
HY - AR9331 ag71xx -> AR9331 switch -> AR9331 PHY Signed-off-by: Oleksij Rempel --- include/net/selftests.h | 12 ++ net/Kconfig | 4 + net/core/Makefile | 1 + net/core/selftests.c| 366 4 files changed, 383 insertions(+) cr

[PATCH v2 1/7] net: phy: genphy_loopback: add link speed configuration

2021-04-15 Thread Oleksij Rempel
. Signed-off-by: Oleksij Rempel --- drivers/net/phy/phy.c| 3 ++- drivers/net/phy/phy_device.c | 21 +++-- include/linux/phy.h | 1 + 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index fc2e7cb5b2e5

[PATCH v2 3/7] net: phy: at803x: AR8085 & AR9331: add loopback support

2021-04-15 Thread Oleksij Rempel
PHY loopback is needed for the ethernet controller self test support. This PHY was tested with the generic net sefltest in combination with FEC ethernet controller and AR9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/phy/at803x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v2 2/7] net: phy: micrel: KSZ8081 & KSZ9031: add loopback support

2021-04-15 Thread Oleksij Rempel
PHY loopback is needed for the ethernet controller self test support. This PHY was tested with the generic net sefltest in combination with FEC ethernet controller and SJA1105 switch. Signed-off-by: Oleksij Rempel --- drivers/net/phy/micrel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH v2 0/7] remove different PHY fixups

2021-04-13 Thread Oleksij Rempel
Hello, On Tue, Mar 30, 2021 at 12:04:50PM -0300, Fabio Estevam wrote: > Hi Andrew, > > On Tue, Mar 30, 2021 at 11:30 AM Andrew Lunn wrote: > > > Hi Fabio > > > > I think it should be merged, and we fixup anything which does break. > > We are probably at the point where more is broken by not mer

Re: [PATCH net-next v1 4/9] net: dsa: qca: ar9331: make proper initial port defaults

2021-04-03 Thread Oleksij Rempel
Am 04.04.21 um 02:16 schrieb Vladimir Oltean: > On Sat, Apr 03, 2021 at 01:48:43PM +0200, Oleksij Rempel wrote: >> Make sure that all external port are actually isolated from each other, >> so no packets are leaked. >> >> Signed-off-by: Oleksij Rempel >> --- >&

Re: [PATCH net-next v1 1/9] net: dsa: add rcv_post call back

2021-04-03 Thread Oleksij Rempel
Am 04.04.21 um 01:21 schrieb Vladimir Oltean: > On Sat, Apr 03, 2021 at 05:05:34PM +0300, Vladimir Oltean wrote: >> On Sat, Apr 03, 2021 at 01:48:40PM +0200, Oleksij Rempel wrote: >>> Some switches (for example ar9331) do not provide enough information >>> about forwa

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Oleksij Rempel
Am 04.04.21 um 02:02 schrieb Vladimir Oltean: > On Sat, Apr 03, 2021 at 07:14:56PM +0200, Oleksij Rempel wrote: >> Am 03.04.21 um 16:49 schrieb Andrew Lunn: >>>> @@ -31,6 +96,13 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff >>>> *skb, >

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Oleksij Rempel
Am 03.04.21 um 16:49 schrieb Andrew Lunn: >> @@ -31,6 +96,13 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff >> *skb, >> __le16 *phdr; >> u16 hdr; >> >> +if (dp->stp_state == BR_STATE_BLOCKING) { >> +/* TODO: should we reflect it in the stats? */ >> +

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Oleksij Rempel
On Sat, Apr 03, 2021 at 04:46:06PM +0300, Vladimir Oltean wrote: > On Sat, Apr 03, 2021 at 03:26:36PM +0200, Oleksij Rempel wrote: > > On Sat, Apr 03, 2021 at 04:03:18PM +0300, Vladimir Oltean wrote: > > > Hi Oleksij, > > > > > > On Sat, Apr 03, 2021 at 01

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Oleksij Rempel
On Sat, Apr 03, 2021 at 04:03:18PM +0300, Vladimir Oltean wrote: > Hi Oleksij, > > On Sat, Apr 03, 2021 at 01:48:41PM +0200, Oleksij Rempel wrote: > > The ar9331 switch is not forwarding IGMP and MLD packets if IGMP > > snooping is enabled. This patch is trying to mimic the

[PATCH net-next v1 5/9] net: dsa: qca: ar9331: add forwarding database support

2021-04-03 Thread Oleksij Rempel
This switch provides simple address resolution table, without VLAN or multicast specific information. With this patch we are able now to read, modify unicast and mulicast addresses. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 356 +++ 1 file

[PATCH net-next v1 7/9] net: dsa: qca: ar9331: add bridge support

2021-04-03 Thread Oleksij Rempel
This switch is providing forwarding matrix, with it we can configure individual bridges. Potentially we can configure more then one not VLAN based bridge on this HW. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 73 1 file changed, 73

[PATCH net-next v1 3/9] net: dsa: qca: ar9331: reorder MDIO write sequence

2021-04-03 Thread Oleksij Rempel
operation and overwrite result in one run. To make it work properly, we should do the second part of transfer before the first one is done. So far, this rule seems to work for all registers on this switch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 7 --- 1 file changed

[PATCH net-next v1 6/9] net: dsa: qca: ar9331: add ageing time support

2021-04-03 Thread Oleksij Rempel
This switch provides global ageing time configuration, so let DSA use it. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 4a98f14f31f4

[PATCH net-next v1 8/9] net: dsa: qca: ar9331: add STP support

2021-04-03 Thread Oleksij Rempel
rt in LISTENING and BLOCKING states. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 69 1 file changed, 69 insertions(+) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index bf9588574205..83b59e771a5f 100644 --- a/driver

[PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Oleksij Rempel
The ar9331 switch is not forwarding IGMP and MLD packets if IGMP snooping is enabled. This patch is trying to mimic the HW heuristic to take same decisions as this switch would do to be able to tell the linux bridge if some packet was prabably forwarded or not. Signed-off-by: Oleksij Rempel

[PATCH net-next v1 1/9] net: dsa: add rcv_post call back

2021-04-03 Thread Oleksij Rempel
and let the dsa framework set skb header pointers and then use preprocessed skb one step later withing the rcv_post call back. This patch is needed for ar9331 switch. Signed-off-by: Oleksij Rempel --- include/net/dsa.h | 2 ++ net/dsa/dsa.c | 4 net/dsa/port.c| 1 + 3 files changed

[PATCH net-next v1 0/9] ar9331: mainline some parts of switch functionality

2021-04-03 Thread Oleksij Rempel
Till now the ar9331 switch was supporting only port multiplexing mode. With this patch set we should be able to bridging, VLAN and STP Oleksij Rempel (9): net: dsa: add rcv_post call back net: dsa: tag_ar9331: detect IGMP and MLD packets net: dsa: qca: ar9331: reorder MDIO write sequence

[PATCH net-next v1 9/9] net: dsa: qca: ar9331: add vlan support

2021-04-03 Thread Oleksij Rempel
have multiple VLANs on top of multiple bridges. Hawing one VLAN on top of multiple bridges will fail on different levels, most probably DSA framework should warn if some one wont to make something likes this. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 255

[PATCH net-next v1 4/9] net: dsa: qca: ar9331: make proper initial port defaults

2021-04-03 Thread Oleksij Rempel
Make sure that all external port are actually isolated from each other, so no packets are leaked. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 145 ++- 1 file changed, 143 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/qca/ar9331

Re: [PATCH net-next v1 3/3] net: fec: add basic selftest support

2021-04-01 Thread Oleksij Rempel
On Wed, Mar 31, 2021 at 02:27:19PM +0200, Andrew Lunn wrote: > On Tue, Mar 30, 2021 at 03:54:07PM +0200, Oleksij Rempel wrote: > > Port some parts of the stmmac selftest to the FEC. This patch was tested > > on iMX6DL. > > With this tests it is possible to detect some basic i

[PATCH net-next v1 2/3] net: phy: at803x: AR8085: add loopback support

2021-03-30 Thread Oleksij Rempel
PHY loopback is needed for the ethernet controller self test support. This PHY was tested with the FEC sefltest. Signed-off-by: Oleksij Rempel --- drivers/net/phy/at803x.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy

[PATCH net-next v1 1/3] net: phy: micrel: KSZ8081: add loopback support

2021-03-30 Thread Oleksij Rempel
PHY loopback is needed for the ethernet controller self test support. This PHY was tested with the FEC sefltest. Signed-off-by: Oleksij Rempel --- drivers/net/phy/micrel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index a14a00328fa3

[PATCH net-next v1 0/3] provide basic selftest support for the ethernet FEC driver

2021-03-30 Thread Oleksij Rempel
This patch set provides diagnostic capabilities for some iMX based boards. So far I add only initial infrastructure with basic tests and fixed some PHY drivers. To validate this tests, I made some common missconfigurations like wrong RGMII type, not configured clock providers and so on. Oleksij

[PATCH net-next v1 3/3] net: fec: add basic selftest support

2021-03-30 Thread Oleksij Rempel
: Oleksij Rempel --- drivers/net/ethernet/freescale/Makefile | 2 +- drivers/net/ethernet/freescale/fec.h | 6 + drivers/net/ethernet/freescale/fec_main.c | 6 + .../net/ethernet/freescale/fec_selftests.c| 425 ++ 4 files changed, 438 insertions(+), 1 deletion

Re: [PATCH v2 0/7] remove different PHY fixups

2021-03-29 Thread Oleksij Rempel
On Mon, Mar 29, 2021 at 08:44:59AM +0800, Shawn Guo wrote: > On Wed, Mar 24, 2021 at 06:54:24AM +0100, Oleksij Rempel wrote: > > Hi Shawn, > > > > ping, do this patches need some ACK from some one? > > As this will break existing DTBs, I need more ACKs from people

Re: [PATCH v2 0/7] remove different PHY fixups

2021-03-23 Thread Oleksij Rempel
Hi Shawn, ping, do this patches need some ACK from some one? Regards, Oleksij On Tue, Mar 09, 2021 at 12:26:08PM +0100, Oleksij Rempel wrote: > changes v2: > - rebase against latest kernel > - fix networking on RIoTBoard > > This patch series tries to remove most of the imx6

[PATCH v2 0/7] remove different PHY fixups

2021-03-09 Thread Oleksij Rempel
boards, but contains a recommendation to fix the problem in a more portable and future-proof way. regards, Oleksij Oleksij Rempel (7): ARM: imx6q: remove PHY fixup for KSZ9031 ARM: imx6q: remove TX clock delay of ar8031_phy_fixup() ARM: imx6q: remove hand crafted PHY power up in

[PATCH v2 4/7] ARM: imx6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs

2021-03-09 Thread Oleksij Rempel
This configuration should be set over device tree. If this patch breaks network functionality on your system, enable the AT803X_PHY driver and set following device tree property in the PHY node: qca,clk-out-frequency = <12500>; Signed-off-by: Oleksij Rempel --- arch/arm/bo

[PATCH v2 1/7] ARM: imx6q: remove PHY fixup for KSZ9031

2021-03-09 Thread Oleksij Rempel
c = <1860>; This activates the internal delays for RX and TX, with the value as the fixup that is removed in this patch. Signed-off-by: Oleksij Rempel Acked-by: Philippe Schenker --- arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 2 +- arch/arm/mach-imx/mach-imx6q.c | 23

[PATCH v2 3/7] ARM: imx6q: remove hand crafted PHY power up in ar8035_phy_fixup()

2021-03-09 Thread Oleksij Rempel
The at803x_resume() handler in the at803x.c PHY driver powers up the PHY properly, so remove this fixup. If this patch breaks your system, enable the AT803X_PHY driver. Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6q.c | 5 - 1 file changed, 5 deletions(-) diff --git a/arch

[PATCH v2 6/7] ARM: imx6sx: remove Atheros AR8031 PHY fixup

2021-03-09 Thread Oleksij Rempel
}; vddh: vddh-regulator { regulator-name = "VDDH"; }; }; Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6sx.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/arch/arm/mach-imx/ma

[PATCH v2 7/7] ARM: imx7d: remove Atheros AR8031 PHY fixup

2021-03-09 Thread Oleksij Rempel
regulator-max-microvolt = <180>; }; vddh: vddh-regulator { regulator-name = "VDDH"; }; }; Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx7d.c | 22 -- 1 file changed, 22

[PATCH v2 2/7] ARM: imx6q: remove TX clock delay of ar8031_phy_fixup()

2021-03-09 Thread Oleksij Rempel
node: phy-mode = "rgmii-txid"; Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6q.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 78205f90da27..1abefe7e1c3a 100644 --- a/arch/arm/mach-imx/ma

[PATCH v2 5/7] ARM: imx6q: remove Atheros AR8035 SmartEEE fixup

2021-03-09 Thread Oleksij Rempel
= <24>; }; Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6q.c | 21 - 1 file changed, 21 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index d12b571a61ac..c9d7c29d95e1 100644 --- a/arch/arm/m

[PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-02-26 Thread Oleksij Rempel
/0x264) r10:834e5600 r9: r8: r7:82b44000 r6:82ab1f00 r5:834e5600 r4:83f27400 | [<809c64b8>] (sch_direct_xmit) from [<809c6c0c>] (__qdisc_run+0x4f0/0x534) To fix this problem, only set skb ownership to sockets which have still a ref count > 0. Cc: Oliver Hartkopp C

[PATCH net v3 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-02-24 Thread Oleksij Rempel
/0x264) r10:834e5600 r9: r8: r7:82b44000 r6:82ab1f00 r5:834e5600 r4:83f27400 | [<809c64b8>] (sch_direct_xmit) from [<809c6c0c>] (__qdisc_run+0x4f0/0x534) To fix this problem, only set skb ownership to sockets which have still a ref count > 0. Cc: Oliver Hartkopp C

[PATCH net v4 1/1] net: introduce CAN specific pointer in the struct net_device

2021-02-22 Thread Oleksij Rempel
6eef69b ("can: introduce CAN midlayer private and allocate it automatically") Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Fixes: 497a5757ce4e ("tun: switch to net core provided statistics counters") Signed-off-by: Oleksij Rempel --- drivers/net

Re: [PATCH net v3] net: introduce CAN specific pointer in the struct net_device

2021-02-22 Thread Oleksij Rempel
Hi Jakub, On Mon, Feb 22, 2021 at 05:30:12PM -0800, Jakub Kicinski wrote: > On Mon, 22 Feb 2021 16:02:51 +0100 Oleksij Rempel wrote: > > Since 20dd3850bcf8 ("can: Speed up CAN frame receiption by using > > ml_priv") the CAN framework uses per device specific data in the

[PATCH net v2 2/2] can: fix ref count warning if socket was closed before skb was cloned

2021-02-22 Thread Oleksij Rempel
the previous patch) takes care of this. It will only clone the skb, if the sk is set and the refcount has not reached 0. Cc: Oliver Hartkopp Cc: Andre Naujoks Cc: Eric Dumazet Fixes: 0ae89beb283a ("can: add destructor for self generated skbs") Signed-off-by: Oleksij Rempel --- i

[PATCH net v2 1/2] skbuff: skb_clone_sk_optional(): add function to always clone a skb and increase refcount on sk if valid

2021-02-22 Thread Oleksij Rempel
: Oleksij Rempel --- include/linux/skbuff.h | 1 + net/core/skbuff.c | 27 +++ 2 files changed, 28 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6d0a33d1c0db..99d552017508 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h

[PATCH net v2 0/2] add support for skb with sk ref cloning

2021-02-22 Thread Oleksij Rempel
the same problem, see RFC patch 3 for details. regards, Oleksij Oleksij Rempel (2): skbuff: skb_clone_sk_optional(): add function to always clone a skb and increase refcount on sk if valid can: fix ref count warning if socket was closed before skb was cloned include/linux/can/skb.h

[PATCH net v1 2/3] can: fix ref count warning if socket was closed before skb was cloned

2021-02-22 Thread Oleksij Rempel
the previous patch) takes care of this. It will only clone the skb, if the sk is set and the refcount has not reached 0. Cc: Oliver Hartkopp Cc: Andre Naujoks Cc: Eric Dumazet Fixes: 0ae89beb283a ("can: add destructor for self generated skbs") Signed-off-by: Oleksij Rempel --- i

[PATCH net v1 1/3] skbuff: skb_clone_sk_optional(): add function to always clone a skb and increase refcount on sk if valid

2021-02-22 Thread Oleksij Rempel
: Oleksij Rempel --- include/linux/skbuff.h | 1 + net/core/skbuff.c | 27 +++ 2 files changed, 28 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6d0a33d1c0db..99d552017508 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h

[PATCH net v1 3/3] [RFC] mac80211: ieee80211_store_ack_skb(): make use of skb_clone_sk_optional()

2021-02-22 Thread Oleksij Rempel
This code is trying to clone the skb with optional skb->sk. But this will fail to clone the skb if socket was closed just after the skb was pushed into the networking stack. Fixes: a7528198add8 ("mac80211: support control port TX status reporting") Signed-off-by: Oleksij Rempel ---

[PATCH net v1 0/3] add support for skb with sk ref cloning

2021-02-22 Thread Oleksij Rempel
Hello, this series tries to fix a long standing problem in the CAN echo SKB handling. The problem shows up if an echo SKB for a SKB that references an already closed socket is created. It looks like the mac80211/tx.c has the same problem, see RFC patch 3 for details. regards, Oleksij Oleksij

[PATCH net v3] net: introduce CAN specific pointer in the struct net_device

2021-02-22 Thread Oleksij Rempel
6eef69b ("can: introduce CAN midlayer private and allocate it automatically") Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Fixes: 497a5757ce4e ("tun: switch to net core provided statistics counters") Signed-off-by: Oleksij Rempel --- drivers/net

Re: [PATCH net] net: ag71xx: remove unnecessary MTU reservation

2021-02-17 Thread Oleksij Rempel
river") > Signed-off-by: DENG Qingfang Reviewed-by: Oleksij Rempel Thank you! > --- > drivers/net/ethernet/atheros/ag71xx.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/atheros/ag71xx.c > b/drivers/net/

[RFC PATCH net v2] net: introduce CAN specific pointer in the struct net_device

2021-02-12 Thread Oleksij Rempel
6eef69b ("can: introduce CAN midlayer private and allocate it automatically") Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Fixes: 497a5757ce4e ("tun: switch to net core provided statistics counters") Signed-off-by: Oleksij Rempel --- drivers/net

Re: [PATCH v1 5/7] ARM i.MX6q: remove Atheros AR8035 SmartEEE fixup

2021-02-08 Thread Oleksij Rempel
On Wed, Feb 03, 2021 at 09:56:28AM +, Russell King - ARM Linux admin wrote: > On Wed, Feb 03, 2021 at 10:18:55AM +0100, Oleksij Rempel wrote: > > This fixup removes the Lpi_en bit. > > > > If this patch breaks functionality of your board, use following devic

[PATCH v1 7/7] ARM: imx7d: remove Atheros AR8031 PHY fixup

2021-02-03 Thread Oleksij Rempel
regulator-max-microvolt = <180>; }; vddh: vddh-regulator { regulator-name = "VDDH"; }; }; Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx7d.c | 22 -- 1 fil

[PATCH v1 1/7] ARM i.MX6q: remove PHY fixup for KSZ9031

2021-02-03 Thread Oleksij Rempel
c = <1860>; This activates the internal delays for RX and TX, with the value as the fixup that is removed in this patch. Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 2 +- arch/arm/mach-imx/mach-imx6q.c | 23 --- 2 files ch

[PATCH v1 0/7] remove different PHY fixups

2021-02-03 Thread Oleksij Rempel
and future-proof way. regards, Oleksij Oleksij Rempel (7): ARM i.MX6q: remove PHY fixup for KSZ9031 ARM i.MX6q: remove TX clock delay of ar8031_phy_fixup() ARM i.MX6q: remove hand crafted PHY power up in ar8035_phy_fixup() ARM i.MX6q: remove clk-out fixup for the Atheros AR8031 and AR8035

[PATCH v1 3/7] ARM i.MX6q: remove hand crafted PHY power up in ar8035_phy_fixup()

2021-02-03 Thread Oleksij Rempel
The at803x_resume() handler in the at803x.c PHY driver powers up the PHY properly, so remove this fixup. If this patch breaks your system, enable the AT803X_PHY driver. Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6q.c | 5 - 1 file changed, 5 deletions(-) diff --git a/arch

[PATCH v1 6/7] ARM: imx6sx: remove Atheros AR8031 PHY fixup

2021-02-03 Thread Oleksij Rempel
}; vddh: vddh-regulator { regulator-name = "VDDH"; }; }; Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6sx.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/arch/arm/mach-imx/ma

[PATCH v1 5/7] ARM i.MX6q: remove Atheros AR8035 SmartEEE fixup

2021-02-03 Thread Oleksij Rempel
off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6q.c | 21 - 1 file changed, 21 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index d12b571a61ac..c9d7c29d95e1 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-i

[PATCH v1 4/7] ARM i.MX6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs

2021-02-03 Thread Oleksij Rempel
This configuration should be set over device tree. If this patch breaks network functionality on your system, enable the AT803X_PHY driver and set following device tree property in the PHY node: qca,clk-out-frequency = <12500>; Signed-off-by: Oleksij Rempel --- arch/arm/mach-im

[PATCH v1 2/7] ARM i.MX6q: remove TX clock delay of ar8031_phy_fixup()

2021-02-03 Thread Oleksij Rempel
node: phy-mode = "rgmii-txid"; Signed-off-by: Oleksij Rempel --- arch/arm/mach-imx/mach-imx6q.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 78205f90da27..1abefe7e1c3a 100644 --- a/arch/arm/mach-imx/ma

[RFC PATCH net 1/2] net: introduce CAN specific pointer in the struct net_device

2021-01-15 Thread Oleksij Rempel
6eef69b ("can: introduce CAN midlayer private and allocate it automatically") Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Fixes: 497a5757ce4e ("tun: switch to net core provided statistics counters") Signed-off-by: Oleksij Rempel --- drivers/net/can/dev

[RFC PATCH net 2/2] net: can: j1939: fix check for valid CAN devices

2021-01-15 Thread Oleksij Rempel
the ARPHRD via ndev->type is not sufficient, since it can be set by user space to an arbitrary value for tun/tap devices. Since the ndev->type and ndev->can are now checked early, this patch removes obsolete checks further down the call stacks. Signed-off-by: Oleksij Rempel --- net/can/

[PATCH net-next v8 0/2] net: dsa: add stats64 support

2021-01-11 Thread Oleksij Rempel
remove changes v2: - use stats64 instead of get_ethtool_stats - add worked to poll for the stats Oleksij Rempel (2): net: dsa: add optional stats64 support net: dsa: qca: ar9331: export stats64 drivers/net/dsa/qca/ar9331.c | 163 ++- include/net/dsa.h

[PATCH net-next v8 1/2] net: dsa: add optional stats64 support

2021-01-11 Thread Oleksij Rempel
Allow DSA drivers to export stats64 Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean --- include/net/dsa.h | 4 +++- net/dsa/slave.c | 14 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index 4e60d2610f20

[PATCH net-next v8 2/2] net: dsa: qca: ar9331: export stats64

2021-01-11 Thread Oleksij Rempel
Add stats support for the ar9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 163 ++- 1 file changed, 162 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 4d49c5f2b790

Re: [PATCH v7 net-next 2/2] net: dsa: qca: ar9331: export stats64

2021-01-11 Thread Oleksij Rempel
On Sat, Jan 09, 2021 at 02:21:43AM +0200, Vladimir Oltean wrote: > On Fri, Jan 08, 2021 at 06:32:28AM +0100, Oleksij Rempel wrote: > > May be the "net: dsa: add optional stats64 support" can already be > > taken? > > I'm not sure that I see the point. David a

Re: [PATCH v7 net-next 2/2] net: dsa: qca: ar9331: export stats64

2021-01-07 Thread Oleksij Rempel
On Thu, Jan 07, 2021 at 03:36:45PM +0100, Andrew Lunn wrote: > > +static void ar9331_get_stats64(struct dsa_switch *ds, int port, > > + struct rtnl_link_stats64 *s) > > +{ > > + struct ar9331_sw_priv *priv = (struct ar9331_sw_priv *)ds->priv; > > + struct ar9331_sw_port

[PATCH v7 net-next 0/2] net: dsa: add stats64 support

2021-01-07 Thread Oleksij Rempel
worked to poll for the stats Oleksij Rempel (2): net: dsa: add optional stats64 support net: dsa: qca: ar9331: export stats64 drivers/net/dsa/qca/ar9331.c | 163 ++- include/net/dsa.h| 4 +- net/dsa/slave.c | 14 ++- 3 files changed

[PATCH v7 net-next 2/2] net: dsa: qca: ar9331: export stats64

2021-01-07 Thread Oleksij Rempel
Add stats support for the ar9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 164 ++- 1 file changed, 163 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 4d49c5f2b790

[PATCH v7 net-next 1/2] net: dsa: add optional stats64 support

2021-01-07 Thread Oleksij Rempel
Allow DSA drivers to export stats64 Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean --- include/net/dsa.h | 4 +++- net/dsa/slave.c | 14 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index 4e60d2610f20

Re: general protection fault in j1939_netdev_notify (2)

2020-12-21 Thread Oleksij Rempel
On Mon, Dec 21, 2020 at 01:25:47PM +0100, Oliver Hartkopp wrote: > > > On 20.12.20 15:37, Oleksij Rempel wrote: > > Hello Oliver, > > > > On Sun, Dec 20, 2020 at 02:18:27PM +0100, Oliver Hartkopp wrote: > > > Hello Oleksij, > > > > > > I

Re: general protection fault in j1939_netdev_notify (2)

2020-12-20 Thread Oleksij Rempel
Hello Oliver, On Sun, Dec 20, 2020 at 02:18:27PM +0100, Oliver Hartkopp wrote: > Hello Oleksij, > > I assume there is some ndev->ml_priv value set - but not from a CAN > netdevice. it is kind of CAN device :) > What was the reason to fiddle with the 'priv' stuff in j1939_netdev_notify() > befor

[PATCH v6 net-next 1/2] net: dsa: add optional stats64 support

2020-12-19 Thread Oleksij Rempel
Allow DSA drivers to export stats64 Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean --- include/net/dsa.h | 4 +++- net/dsa/slave.c | 14 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index 4e60d2610f20

[PATCH v6 net-next 0/2] net: dsa: add stats64 support

2020-12-19 Thread Oleksij Rempel
* helpers. changes v4: - do no read MIBs withing stats64 call - change polling frequency to 0.3Hz changes v3: - fix wrong multiplication - cancel port workers on remove changes v2: - use stats64 instead of get_ethtool_stats - add worked to poll for the stats Oleksij Rempel (2): net: dsa: add

[PATCH v6 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-19 Thread Oleksij Rempel
Add stats support for the ar9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 163 ++- 1 file changed, 162 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 4d49c5f2b790

Re: [PATCH v2] net: dsa: qca: ar9331: fix sleeping function called from invalid context bug

2020-12-16 Thread Oleksij Rempel
On Sat, Dec 12, 2020 at 03:25:58PM +0200, Vladimir Oltean wrote: > On Fri, Dec 11, 2020 at 12:03:17PM +0100, Oleksij Rempel wrote: > > With lockdep enabled, we will get following warning: > > > > ar9331_switch ethernet.1:10 lan0 (uninitialized): PHY > > [!ahb!ethernet

[PATCH v2] net: dsa: qca: ar9331: fix sleeping function called from invalid context bug

2020-12-11 Thread Oleksij Rempel
a00!mdio!switch@10:02] driver [Qualcomm Atheros AR9331 built-in PHY] (irq=13) DSA: tree 0 setup To fix it, it is better to move access to MDIO register to the .irq_bus_sync_unlock call back. Fixes: ec6698c272de ("net: dsa: add support for Atheros AR9331 built-in switch") Signed-of

[PATCH v5 net-next 0/2] net: dsa: add stats64 support

2020-12-11 Thread Oleksij Rempel
of get_ethtool_stats - add worked to poll for the stats Oleksij Rempel (2): net: dsa: add optional stats64 support net: dsa: qca: ar9331: export stats64 drivers/net/dsa/qca/ar9331.c | 256 ++- include/net/dsa.h| 3 + net/dsa/slave.c

[PATCH v5 1/2] net: dsa: add optional stats64 support

2020-12-11 Thread Oleksij Rempel
Allow DSA drivers to export stats64 Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean --- include/net/dsa.h | 3 +++ net/dsa/slave.c | 14 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index 4e60d2610f20

[PATCH v5 2/2] net: dsa: qca: ar9331: export stats64

2020-12-11 Thread Oleksij Rempel
Add stats support for the ar9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 256 ++- 1 file changed, 255 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 4d49c5f2b790

Re: [PATCH v4 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-09 Thread Oleksij Rempel
Hi George, On Fri, Dec 04, 2020 at 04:04:07PM -0600, George McCollister wrote: > On Fri, Dec 4, 2020 at 8:59 AM Oleksij Rempel wrote: > > > > Add stats support for the ar9331 switch. > > > > Signed-off-by: Oleksij Rempel > > --- > &

Re: [PATCH net v1] net: dsa: qca: ar9331: fix sleeping function called from invalid context bug

2020-12-09 Thread Oleksij Rempel
On Fri, Dec 04, 2020 at 04:00:35PM +0100, Marc Kleine-Budde wrote: > On 12/4/20 3:57 PM, Oleksij Rempel wrote: > [...] > > > > +static void ar9331_sw_irq_bus_sync_unlock(struct irq_data *d) > > { > > struct ar9331_sw_priv *priv = irq_data_get_irq_chip_data(d);

[PATCH v1] ARM: imx: mach-imx6ul: remove 14x14 EVK specific PHY fixup

2020-12-09 Thread Oleksij Rempel
clocks = <&clks IMX6UL_CLK_ENET_REF>; clock-names = "rmii-ref"; ... }; The board which was referred in the initial patch is already fixed. See: arch/arm/boot/dts/imx6ul-14x14-evk.dtsi Signed-off-by: Oleksij Rempel ---

[PATCH net v1] net: dsa: qca: ar9331: fix sleeping function called from invalid context bug

2020-12-04 Thread Oleksij Rempel
a00!mdio!switch@10:02] driver [Qualcomm Atheros AR9331 built-in PHY] (irq=13) DSA: tree 0 setup To fix it, it is better to move access to MDIO register to the .irq_bus_sync_unlock call back. Fixes: ec6698c272de ("net: dsa: add support for Atheros AR9331 built-in switch") Signed-o

[PATCH v4 net-next 0/2] net: dsa: add stats64 support

2020-12-04 Thread Oleksij Rempel
changes v4: - do no read MIBs withing stats64 call - change polling frequency to 0.3Hz changes v3: - fix wrong multiplication - cancel port workers on remove changes v2: - use stats64 instead of get_ethtool_stats - add worked to poll for the stats Oleksij Rempel (2): net: dsa: add optional

[PATCH v4 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-04 Thread Oleksij Rempel
Add stats support for the ar9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/qca/ar9331.c | 247 ++- 1 file changed, 246 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index 605d7b675216

[PATCH v4 net-next 1/2] net: dsa: add optional stats64 support

2020-12-04 Thread Oleksij Rempel
Allow DSA drivers to export stats64 Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean --- include/net/dsa.h | 3 +++ net/dsa/slave.c | 14 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index 4e60d2610f20

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-04 Thread Oleksij Rempel
On Thu, Dec 03, 2020 at 08:01:40PM +0200, Vladimir Oltean wrote: > On Thu, Dec 03, 2020 at 06:53:20PM +0100, Oleksij Rempel wrote: > > It is possible to poll it more frequently, but it make no reals sense > > on this low power devices. > > Frankly I thought you understoo

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Oleksij Rempel
On Thu, Dec 03, 2020 at 08:35:17AM -0800, Jakub Kicinski wrote: > On Thu, 3 Dec 2020 09:50:11 +0100 Oleksij Rempel wrote: > > @Jakub, > > > > > You can't take sleeping locks from .ndo_get_stats64. > > > > > > Also regmap may sleep? > >

Re: [PATCH v3 net-next 2/2] net: dsa: qca: ar9331: export stats64

2020-12-03 Thread Oleksij Rempel
Hello Jakub and Andrew, > Ah, I missed the v3 (like most reviewers it seems :)). No problem, I moved your replies from v2 tread to this mail. On Wed, Dec 02, 2020 at 10:42:07AM -0800, Jakub Kicinski wrote: > On Wed, 2 Dec 2020 15:09:04 +0100 Oleksij Rempel wrote: > > Add stats sup

  1   2   3   >