Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-06-05 Thread Grygorii Strashko
Hi Andrew, Thanks a lot for you comments. On 06/02/2018 07:49 PM, Andrew Lunn wrote: > Hi Grygorii > >> Don't know howto: >> 1) add FDB entry with "blocked" flag - ALE can discard all packets with >> SRC/DST >> address = blocked MAC >> 2) add multicast MAC address with Supervisory Packet flag s

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-06-05 Thread Grygorii Strashko
On 06/02/2018 09:08 AM, Andrew Lunn wrote: > On Fri, Jun 01, 2018 at 04:29:08PM -0500, Grygorii Strashko wrote: >> Hi Ilias, > > >> Second, Thanks a lot for your great work. I'm still testing it with different >> use cases and trying to consolidate my re

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-06-05 Thread Grygorii Strashko
On 06/02/2018 07:26 PM, Andrew Lunn wrote: >> *After this patch set*: goal keep things working the same as max as >> possible and get rid of TI custom tool. > > We are happy to keep things the same, if they fit with the switchdev > model. Anything in your customer TI tool/model which does not f

Re: [PATCH net-next] drivers: net: davinci_mdio: fix potential NULL dereference in davinci_mdio_probe()

2020-04-28 Thread Grygorii Strashko
instead? We cannot use devm_platform_ioremap_resource() here, see Commit 03f66f067560 ("net: ethernet: ti: davinci_mdio: use devm_ioremap()") Correct, could you add fixed tag as above commit actually introduced an issue: devm_ioremap_resource() checks input parameters for null. Rev

[PATCH net-next v2 0/9] net: ethernet: ti: ale: add static configuration

2020-09-07 Thread Grygorii Strashko
cover/1301048/ Grygorii Strashko (9): net: ethernet: ti: ale: add cpsw_ale_get_num_entries api net: ethernet: ti: ale: add static configuration net: ethernet: ti: cpsw: use dev_id for ale configuration net: netcp: ethss: use dev_id for ale configuration net: ethernet: ti: am65-cpsw: use dev_i

[PATCH net-next v2 7/9] net: ethernet: ti: am65-cpsw: enable hw auto ageing

2020-09-07 Thread Grygorii Strashko
-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 13 + drivers/net/ethernet/ti/am65-cpsw-nuss.h | 1 + drivers/net/ethernet/ti/cpsw_ale.c | 61 +--- drivers/net/ethernet/ti/cpsw_ale.h | 1 + 4 files changed, 70 insertions(+), 6

[PATCH net-next v2 3/9] net: ethernet: ti: cpsw: use dev_id for ale configuration

2020-09-07 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI cpsw driver to use dev_id="cpsw" and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/etherne

Re: [PATCH net-next 9/9] net: ethernet: ti: ale: add support for multi port k3 cpsw versions

2020-09-07 Thread Grygorii Strashko
Hi Jakub, On 05/09/2020 03:10, Jakub Kicinski wrote: On Sat, 5 Sep 2020 02:09:24 +0300 Grygorii Strashko wrote: The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5 CPSW ALE, but has more extended functions and different ALE VLAN entry format. This patch adds support

[PATCH net-next v2 1/9] net: ethernet: ti: ale: add cpsw_ale_get_num_entries api

2020-09-07 Thread Grygorii Strashko
Add cpsw_ale_get_num_entries() API to return number of ALE table entries and update existing drivers to use it. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 10 ++ drivers/net/ethernet/ti/cpsw_ale.c | 5 + drivers/net/ethernet/ti

[PATCH net-next v2 4/9] net: netcp: ethss: use dev_id for ale configuration

2020-09-07 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI Keystone 2 NETCP driver to use dev_id and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/netcp_et

[PATCH net-next v2 8/9] net: ethernet: ti: ale: switch to use tables for vlan entry description

2020-09-07 Thread Grygorii Strashko
get/set access functions. It also allows to detect incorrect access to not available ALL entry fields. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 239 ++--- drivers/net/ethernet/ti/cpsw_ale.h | 3 + 2 files changed, 188 insertions(+), 54

[PATCH net-next v2 5/9] net: ethernet: ti: am65-cpsw: use dev_id for ale configuration

2020-09-07 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI TI AM65x/J721E CPSW NUSS driver to use dev_id. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH net-next v2 2/9] net: ethernet: ti: ale: add static configuration

2020-09-07 Thread Grygorii Strashko
ev_id identifier. This feature is not enabled by default until existing CPSW drivers will be modified by follow up patches. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 84 +- drivers/net/ethernet/ti/cpsw_ale.h | 1 + 2 files changed, 83 inser

[PATCH net-next v2 9/9] net: ethernet: ti: ale: add support for multi port k3 cpsw versions

2020-09-07 Thread Grygorii Strashko
The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5 CPSW ALE, but has more extended functions and different ALE VLAN entry format. This patch adds support for for multi port TI J721E (CPSW9g) ALE variant. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti

[PATCH net-next v2 6/9] net: ethernet: ti: ale: make usage of ale dev_id mandatory

2020-09-07 Thread Grygorii Strashko
Hence all existing driver updated to use ALE dev_id the usage of ale dev_id can be made mandatory and cpsw_ale_create() can be updated to use "features" property from ALE static configuration. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_

Re: [PATCH net-next v2 2/9] net: ethernet: ti: ale: add static configuration

2020-09-09 Thread Grygorii Strashko
On 09/09/2020 05:28, David Miller wrote: From: Grygorii Strashko Date: Mon, 7 Sep 2020 17:31:36 +0300 + ale_dev_id = cpsw_ale_match_id(cpsw_ale_id_match, params->dev_id); + if (ale_dev_id) { + params->ale_entries = ale_dev_id->tbl_entries; +

[PATCH net-next v3 3/9] net: ethernet: ti: cpsw: use dev_id for ale configuration

2020-09-10 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI cpsw driver to use dev_id="cpsw" and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/etherne

[PATCH net-next v3 4/9] net: netcp: ethss: use dev_id for ale configuration

2020-09-10 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI Keystone 2 NETCP driver to use dev_id and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/netcp_et

[PATCH net-next v3 1/9] net: ethernet: ti: ale: add cpsw_ale_get_num_entries api

2020-09-10 Thread Grygorii Strashko
Add cpsw_ale_get_num_entries() API to return number of ALE table entries and update existing drivers to use it. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 10 ++ drivers/net/ethernet/ti/cpsw_ale.c | 5 + drivers/net/ethernet/ti

[PATCH net-next v3 9/9] net: ethernet: ti: ale: add support for multi port k3 cpsw versions

2020-09-10 Thread Grygorii Strashko
The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5 CPSW ALE, but has more extended functions and different ALE VLAN entry format. This patch adds support for for multi port TI J721E (CPSW9g) ALE variant. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti

[PATCH net-next v3 8/9] net: ethernet: ti: ale: switch to use tables for vlan entry description

2020-09-10 Thread Grygorii Strashko
get/set access functions. It also allows to detect incorrect access to not available ALL entry fields. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 239 ++--- drivers/net/ethernet/ti/cpsw_ale.h | 3 + 2 files changed, 188 insertions(+), 54

[PATCH net-next v3 7/9] net: ethernet: ti: am65-cpsw: enable hw auto ageing

2020-09-10 Thread Grygorii Strashko
-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 13 + drivers/net/ethernet/ti/am65-cpsw-nuss.h | 1 + drivers/net/ethernet/ti/cpsw_ale.c | 61 +--- drivers/net/ethernet/ti/cpsw_ale.h | 1 + 4 files changed, 70 insertions(+), 6

[PATCH net-next v3 6/9] net: ethernet: ti: ale: make usage of ale dev_id mandatory

2020-09-10 Thread Grygorii Strashko
Hence all existing driver updated to use ALE dev_id the usage of ale dev_id can be made mandatory and cpsw_ale_create() can be updated to use "features" property from ALE static configuration. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_

[PATCH net-next v3 2/9] net: ethernet: ti: ale: add static configuration

2020-09-10 Thread Grygorii Strashko
ev_id identifier. This feature is not enabled by default until existing CPSW drivers will be modified by follow up patches. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 82 ++ drivers/net/ethernet/ti/cpsw_ale.h | 1 + 2 files changed, 83 inser

[PATCH net-next v3 5/9] net: ethernet: ti: am65-cpsw: use dev_id for ale configuration

2020-09-10 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI TI AM65x/J721E CPSW NUSS driver to use dev_id. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH net-next v3 0/9] net: ethernet: ti: ale: add static configuration

2020-09-10 Thread Grygorii Strashko
s v2: https://lore.kernel.org/patchwork/cover/1301684/ v1: https://lore.kernel.org/patchwork/cover/1301048/ Grygorii Strashko (9): net: ethernet: ti: ale: add cpsw_ale_get_num_entries api net: ethernet: ti: ale: add static configuration net: ethernet: ti: cpsw: use dev_id for ale configur

[PATCH] net: ethernet: ti: cpsw_new: fix suspend/resume

2020-09-10 Thread Grygorii Strashko
Add missed suspend/resume callbacks to properly restore networking after suspend/resume cycle. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_

[PATCH net-next v2 1/9] net: ethernet: ti: am65-cpsw: move ale selection in pdata

2020-10-15 Thread Grygorii Strashko
In preparation of adding more multi-port K3 CPSW versions move ALE selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +++- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 1 + 2

[PATCH net-next v2 2/9] net: ethernet: ti: am65-cpsw: move free desc queue mode selection in pdata

2020-10-15 Thread Grygorii Strashko
In preparation of adding more multi-port K3 CPSW versions move free descriptor queue mode selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +++- drivers/net/ethernet/ti/am65

[PATCH net-next v2 4/9] net: ethernet: ti: cpsw_ale: add cpsw_ale_vlan_del_modify()

2020-10-15 Thread Grygorii Strashko
Add/export cpsw_ale_vlan_del_modify() and use it in cpsw_switchdev instead of generic cpsw_ale_del_vlan() to avoid mixing 8021Q and switchdev VLAN offload. This is preparation patch equired by follow up changes. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 24

[PATCH net-next v2 3/9] net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm()

2020-10-15 Thread Grygorii Strashko
Use cppi5_desc_is_tdcm() helper for teardown indicator detection instead of hard-coded value. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers

[PATCH net-next v2 0/9] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-15 Thread Grygorii Strashko
v1: https://lore.kernel.org/patchwork/cover/1315766/ Grygorii Strashko (9): net: ethernet: ti: am65-cpsw: move ale selection in pdata net: ethernet: ti: am65-cpsw: move free desc queue mode selection in pdata net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm() net: ethernet: ti: cps

[PATCH net-next v2 5/9] net: ethernet: ti: am65-cpsw: fix vlan offload for multi mac mode

2020-10-15 Thread Grygorii Strashko
_ale_del_vlan() to preserve existing legacy CPSW drivers functionality. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 +--- drivers/net/ethernet/ti/cpsw_ale.c | 19 +++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/driver

[PATCH net-next v2 6/9] net: ethernet: ti: am65-cpsw: keep active if cpts enabled

2020-10-15 Thread Grygorii Strashko
eep K3 CPSW active by forbidding PM runtime if CPTS is enabled. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index f

[PATCH net-next v2 9/9] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-15 Thread Grygorii Strashko
No packet switching between external ports happens. - every port supports the same features as current AM65x CPSW on external device. Signed-off-by: Grygorii Strashko --- changes in v2: - fixed the case when Port 1 is disabled. The first *available* netdev is used to assign RX/TX NAPI and DMA

[PATCH net-next v2 7/9] net: ethernet: ti: am65-cpsw: fix tx csum offload for multi mac mode

2020-10-15 Thread Grygorii Strashko
and removing .ndo_set_features() callback implementation, which was used only NETIF_F_HW_CSUM feature update purposes Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 30 +--- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/net/eth

[PATCH net-next v2 8/9] net: ethernet: ti: am65-cpsw: prepare xmit/rx path for multi-port devices in mac-only mode

2020-10-15 Thread Grygorii Strashko
() as every completed TX skb can have different ndev assigned (come from different netdevs). To avoid performance issues for existing one-port CPSW2g devices the above changes are done only for multi-port devices by splitting xmit path for one-port and multi-port devices. Signed-off-by: Grygorii

Re: [PATCH net-next v2 0/9] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-15 Thread Grygorii Strashko
On 16/10/2020 02:19, Grygorii Strashko wrote: Hi This series adds multi-port support in mac-only mode (multi MAC mode) to TI AM65x CPSW driver in preparation for enabling support for multi-port devices, like Main CPSW0 on K3 J721E SoC or future CPSW3g on K3 AM64x SoC. The multi MAC mode is

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Grygorii Strashko
On 29/07/2020 00:06, Petr Machata wrote: Kurt Kanzenbach writes: On Mon Jul 27 2020, Petr Machata wrote: So this looks good, and works, but I'm wondering about one thing. Thanks for testing. Your code (and evidently most drivers as well) use a different check than mlxsw, namely skb->

Re: [PATCH v3 5/9] ethernet: ti: am65-cpts: Use generic helper function

2020-07-30 Thread Grygorii Strashko
On 30/07/2020 11:00, Kurt Kanzenbach wrote: In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- drivers/net/ethernet/ti/am65-cpts.c | 37 +++-- 1 file changed, 9 insertions(

Re: [PATCH v3 5/9] ethernet: ti: am65-cpts: Use generic helper function

2020-07-31 Thread Grygorii Strashko
On 31/07/2020 14:48, Kurt Kanzenbach wrote: On Thu Jul 30 2020, Arnd Bergmann wrote: On Thu, Jul 30, 2020 at 11:41 AM Kurt Kanzenbach wrote: On Thu Jul 30 2020, Grygorii Strashko wrote: On 30/07/2020 11:00, Kurt Kanzenbach wrote: +msgtype = ptp_get_msgtype(hdr, ptp_class); +seqid

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Grygorii Strashko
On 31/07/2020 13:06, Kurt Kanzenbach wrote: On Thu Jul 30 2020, Petr Machata wrote: Kurt Kanzenbach writes: @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(const struct sk_buff *skb) } EXPORT_SYMBOL_GPL(ptp_classify_raw); +struct ptp_header *ptp_parse_header(struct sk_buff *skb,

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Grygorii Strashko
On 05/08/2020 00:07, Russell King - ARM Linux admin wrote: On Tue, Aug 04, 2020 at 11:56:12PM +0300, Grygorii Strashko wrote: On 31/07/2020 13:06, Kurt Kanzenbach wrote: On Thu Jul 30 2020, Petr Machata wrote: Kurt Kanzenbach writes: @@ -107,6 +107,37 @@ unsigned int ptp_classify_raw

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-04 Thread Grygorii Strashko
On 05/08/2020 00:44, Russell King - ARM Linux admin wrote: On Wed, Aug 05, 2020 at 12:34:47AM +0300, Grygorii Strashko wrote: On 05/08/2020 00:07, Russell King - ARM Linux admin wrote: On Tue, Aug 04, 2020 at 11:56:12PM +0300, Grygorii Strashko wrote: On 31/07/2020 13:06, Kurt Kanzenbach

Re: [PATCH v3 6/9] ethernet: ti: cpts: Use generic helper function

2020-08-05 Thread Grygorii Strashko
On 02/08/2020 23:22, Florian Fainelli wrote: On 7/30/2020 1:00 AM, Kurt Kanzenbach wrote: In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach --- [snip] - if (unlikely(ptp_class & PTP_CLASS_V1)

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-05 Thread Grygorii Strashko
On 05/08/2020 16:57, Kurt Kanzenbach wrote: On Wed Aug 05 2020, Grygorii Strashko wrote: I really do not want touch netcp, sry. There are other internal code based on this even if there is only one hooks in LKML now. + my comment above. OK, I see. The use of lists makes more sense now

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-06 Thread Grygorii Strashko
On 05/08/2020 12:29, Kurt Kanzenbach wrote: On Wed Aug 05 2020, Russell King - ARM Linux admin wrote: On Wed, Aug 05, 2020 at 01:04:31AM +0300, Grygorii Strashko wrote: On 05/08/2020 00:44, Russell King - ARM Linux admin wrote: On Wed, Aug 05, 2020 at 12:34:47AM +0300, Grygorii Strashko

Re: [PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload

2020-07-21 Thread Grygorii Strashko
hi David, On 18/07/2020 04:47, David Miller wrote: From: Grygorii Strashko Date: Fri, 17 Jul 2020 15:19:32 +0300 From: Murali Karicheri Currently drive supports taprio offload which is a tc feature offloaded to cpsw hardware. So driver has to set the hw feature flag, NETIF_F_HW_TC in the

[RESEND PATCH] ARM: dts: keystone-k2g-evm: fix rgmii phy-mode for ksz9031 phy

2020-07-24 Thread Grygorii Strashko
avior. Cc: Oleksij Rempel Cc: Andrew Lunn Cc: Philippe Schenker Fixes: bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") Signed-off-by: Grygorii Strashko --- Fix for one more broken TI board with KSZ9031 PHY. arch/arm/boot/dts/keystone-k2g-evm.dts | 2 +- 1

[PATCH] ARM: dts: keystone-k2g-evm: fix rgmii phy-mode for ksz9031 phy

2020-07-15 Thread Grygorii Strashko
avior. Cc: Oleksij Rempel Cc: Andrew Lunn Cc: Philippe Schenker Fixes: bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") Signed-off-by: Grygorii Strashko --- Fix for one more broken TI board with KSZ9031 PHY. arch/arm/boot/dts/keystone-k2g-evm.dts | 2 +- 1

[PATCH] net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload

2020-07-17 Thread Grygorii Strashko
APRIO offload support") Signed-off-by: Murali Karicheri Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nu

Re: [PATCH 1/2 v2] net: hsr: fix incorrect lsdu size in the tag of HSR frames for small frames

2020-07-17 Thread Grygorii Strashko
On 17/07/2020 17:55, Murali Karicheri wrote: For small Ethernet frames with size less than minimum size 66 for HSR vs 60 for regular Ethernet frames, hsr driver currently doesn't pad the frame to make it minimum size. This results in incorrect LSDU size being populated in the HSR tag for these

[PATCH net-next] net: ethernet: ti: am65-cpts: fix i2083 genf (and estf) Reconfiguration Issue

2020-08-28 Thread Grygorii Strashko
The new bit TX_GENF_CLR_EN has been added in AM65x SR2.0 to fix i2083 errata, which can be just set unconditionally for all SoCs. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpts.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH] net: ethernet: ti: am65-cpsw: fix rmii 100Mbit link mode

2020-08-30 Thread Grygorii Strashko
In RMII link mode it's required to set bit 15 IFCTL_A in MAC_SL MAC_CONTROL register to enable support for 100Mbit link speed. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Grygorii Strashko --- drivers/net/ethern

[PATCH net-next 1/9] net: ethernet: ti: ale: add cpsw_ale_get_num_entries api

2020-09-04 Thread Grygorii Strashko
Add cpsw_ale_get_num_entries() API to return number of ALE table entries and update existing drivers to use it. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 10 ++ drivers/net/ethernet/ti/cpsw_ale.c | 5 + drivers/net/ethernet/ti

[PATCH net-next 2/9] net: ethernet: ti: ale: add static configuration

2020-09-04 Thread Grygorii Strashko
ev_id identifier. This feature is not enabled by default until existing CPSW drivers will be modified by follow up patches. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 84 +- drivers/net/ethernet/ti/cpsw_ale.h | 1 + 2 files change

[PATCH net-next 0/9] net: ethernet: ti: ale: add static configuration

2020-09-04 Thread Grygorii Strashko
tries fields as the ALE VLAN entries are too much differ between different TI CPSW ALE versions. So, handling them using flags, defines and get/set functions are became over-complicated. Patch 1 - is preparation patch Grygorii Strashko (9): net: ethernet: ti: ale: add cpsw_ale_get_num_entries api

[PATCH net-next 4/9] net: netcp: ethss: use dev_id for ale configuration

2020-09-04 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI Keystone 2 NETCP driver to use dev_id and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/netcp_et

[PATCH net-next 5/9] net: ethernet: ti: am65-cpsw: use dev_id for ale configuration

2020-09-04 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI TI AM65x/J721E CPSW NUSS driver to use dev_id. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH net-next 3/9] net: ethernet: ti: cpsw: use dev_id for ale configuration

2020-09-04 Thread Grygorii Strashko
The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI cpsw driver to use dev_id="cpsw" and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko --- drivers/net/etherne

[PATCH net-next 7/9] net: ethernet: ti: am65-cpsw: enable hw auto ageing

2020-09-04 Thread Grygorii Strashko
-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 13 + drivers/net/ethernet/ti/am65-cpsw-nuss.h | 1 + drivers/net/ethernet/ti/cpsw_ale.c | 61 +--- drivers/net/ethernet/ti/cpsw_ale.h | 1 + 4 files changed, 70 insertions(+), 6

[PATCH net-next 9/9] net: ethernet: ti: ale: add support for multi port k3 cpsw versions

2020-09-04 Thread Grygorii Strashko
The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5 CPSW ALE, but has more extended functions and different ALE VLAN entry format. This patch adds support for for multi port TI J721E (CPSW9g) ALE variant. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti

[PATCH net-next 8/9] net: ethernet: ti: ale: switch to use tables for vlan entry description

2020-09-04 Thread Grygorii Strashko
get/set access functions. It also allows to detect incorrect access to not available ALL entry fields. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 239 ++--- drivers/net/ethernet/ti/cpsw_ale.h | 3 + 2 files changed, 188 insertions(+), 54

[PATCH net-next 6/9] net: ethernet: ti: ale: make usage of ale dev_id mandatory

2020-09-04 Thread Grygorii Strashko
Hence all existing driver updated to use ALE dev_id the usage of ale dev_id can be made mandatory and cpsw_ale_create() can be updated to use "features" property from ALE static configuration. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_

[PATCH net-next 0/8] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-01 Thread Grygorii Strashko
ffload for multi MAC mode Patch 6: Fixes CPTS context lose issue during PM runtime transition Patches 7-8: add multi-port support to TI AM65x CPSW Grygorii Strashko (8): net: ethernet: ti: am65-cpsw: move ale selection in pdata net: ethernet: ti: am65-cpsw: move free desc queue mode selection in p

[PATCH net-next 2/8] net: ethernet: ti: am65-cpsw: move free desc queue mode selection in pdata

2020-10-01 Thread Grygorii Strashko
In preparation of adding more multi-port K3 CPSW versions move free descriptor queue mode selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +++- drivers/net/ethernet/ti/am65

[PATCH net-next 5/8] net: ethernet: ti: am65-cpsw: fix vlan offload for multi mac mode

2020-10-01 Thread Grygorii Strashko
_ale_del_vlan() to preserve existing legacy CPSW drivers functionality. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 +--- drivers/net/ethernet/ti/cpsw_ale.c | 19 +++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/driver

[PATCH net-next 1/8] net: ethernet: ti: am65-cpsw: move ale selection in pdata

2020-10-01 Thread Grygorii Strashko
In preparation of adding more multi-port K3 CPSW versions move ALE selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +++- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 1 + 2

[PATCH net-next 3/8] net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm()

2020-10-01 Thread Grygorii Strashko
Use cppi5_desc_is_tdcm() helper for teardown indicator detection instead of hard-coded value. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers

[PATCH net-next 7/8] net: ethernet: ti: am65-cpsw: prepare xmit/rx path for multi-port devices in mac-only mode

2020-10-01 Thread Grygorii Strashko
completed TX skb can have different ndev assigned (come from different netdevs). Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 41 +--- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 1 + 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a

[PATCH net-next 6/8] net: ethernet: ti: am65-cpsw: keep active if cpts enabled

2020-10-01 Thread Grygorii Strashko
eep K3 CPSW active by forbidding PM runtime if CPTS is enabled. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index f

[PATCH net-next 8/8] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-01 Thread Grygorii Strashko
ng between external ports happens. - every port supports the same features as current AM65x CPSW on external device. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 111 ++- 1 file changed, 70 insertions(+), 41 deletions(-) diff --git a/d

[PATCH net-next 4/8] net: ethernet: ti: cpsw_ale: add cpsw_ale_vlan_del_modify()

2020-10-01 Thread Grygorii Strashko
Add/export cpsw_ale_vlan_del_modify() and use it in cpsw_switchdev instead of generic cpsw_ale_del_vlan() to avoid mixing 8021Q and switchdev VLAN offload. This is preparation patch equired by follow up changes. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 24

Re: [PATCH net-next 0/8] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-02 Thread Grygorii Strashko
On 02/10/2020 02:08, Jakub Kicinski wrote: On Thu, 1 Oct 2020 13:52:50 +0300 Grygorii Strashko wrote: This series adds multi-port support in mac-only mode (multi MAC mode) to TI AM65x CPSW driver in preparation for enabling support for multi-port devices, like Main CPSW0 on K3 J721E SoC or

Re: [PATCH net-next 0/8] net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode

2020-10-05 Thread Grygorii Strashko
On 03/10/2020 02:07, Jakub Kicinski wrote: On Fri, 2 Oct 2020 16:04:21 -0700 Jakub Kicinski wrote: On Fri, 2 Oct 2020 12:56:43 +0300 Grygorii Strashko wrote: On 02/10/2020 02:08, Jakub Kicinski wrote: On Thu, 1 Oct 2020 13:52:50 +0300 Grygorii Strashko wrote: This series adds multi-port

Re: [PATCH net-next 7/8] net: ethernet: ti: am65-cpsw: prepare xmit/rx path for multi-port devices in mac-only mode

2020-10-05 Thread Grygorii Strashko
On 03/10/2020 05:09, David Miller wrote: From: Grygorii Strashko Date: Thu, 1 Oct 2020 13:52:57 +0300 This patch adds multi-port support to TI AM65x CPSW driver xmit/rx path in preparation for adding support for multi-port devices, like Main CPSW0 on K3 J721E SoC or future CPSW3g on K3

[PATCH linux-next 05/10] ARM: dts: dra7: switch to use phy-gmii-sel

2018-11-25 Thread Grygorii Strashko
Switch to use phy-gmii-sel PHY instead of cpsw-phy-sel. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/dra7-l4.dtsi | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/dra7-l4.dtsi b/arch

[PATCH linux-next 09/10] dt-bindings: net: ti: deprecate cpsw-phy-sel bindings

2018-11-25 Thread Grygorii Strashko
The cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- Documentation/devicetree/bindings/net/cpsw-phy-sel.txt | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH linux-next 02/10] phy: ti: introduce phy-gmii-sel driver

2018-11-25 Thread Grygorii Strashko
ren Signed-off-by: Grygorii Strashko --- drivers/phy/ti/Kconfig| 10 ++ drivers/phy/ti/Makefile | 1 + drivers/phy/ti/phy-gmii-sel.c | 349 ++ 3 files changed, 360 insertions(+) create mode 100644 drivers/phy/ti/phy-gmii-sel.c diff --git a

[PATCH] net: ethernet: ti: cpsw: allow to configure min tx packet size

2018-11-25 Thread Grygorii Strashko
("net: ethernet: ti: cpsw: fix min eth packet size") Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index ceaec56..15d563c 100644

[PATCH net-next] net: ethernet: ti: cpsw: drop vid0 configuration in dual_mac mode

2018-11-25 Thread Grygorii Strashko
gged packets in dual mac mode. Hence, drop vid0 configuration in dual mac mode as it's not required for dual mac mode functionality and, this way, make it possible to use priority tagged packet in dual mac mode. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 7 ++

[PATCH linux-next 03/10] dt-bindings: net: ti: cpsw: switch to use phy-gmii-sel phy

2018-11-25 Thread Grygorii Strashko
The cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings and update CPSW binding to use phy-gmii-sel PHY bindings. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- Documentation/devicetree/bindings/net/cpsw.txt

[PATCH linux-next 10/10] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver

2018-11-25 Thread Grygorii Strashko
Deprecate cpsw-phy-sel driver as it's been replaced with new TI phy-gmii-sel PHY driver. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/Kconfig | 6 +++--- drivers/net/ethernet/ti/cpsw.h | 6 ++ 2 files changed, 9 inser

[PATCH linux-next 04/10] net: ethernet: ti: cpsw: add support for port interface mode selection phy

2018-11-25 Thread Grygorii Strashko
Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index e4aa030..ceaec56 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b

[PATCH linux-next 07/10] ARM: dts: am4372: switch to use phy-gmii-sel

2018-11-25 Thread Grygorii Strashko
Switch to use phy-gmii-sel PHY instead of cpsw-phy-sel. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/am437x-l4.dtsi | 17 + arch/arm/boot/dts/am43x-epos-evm.dts | 5 + 2 files changed, 10 insertions(+), 12

[PATCH linux-next 08/10] ARM: dts: am335x: switch to use phy-gmii-sel

2018-11-25 Thread Grygorii Strashko
Switch to use phy-gmii-sel PHY instead of cpsw-phy-sel. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/am335x-baltos-ir2110.dts| 4 arch/arm/boot/dts/am335x-baltos-ir3220.dts| 4 arch/arm/boot/dts/am335x-baltos

[PATCH linux-next 01/10] dt-bindings: phy: add cpsw port interface mode selection phy bindings

2018-11-25 Thread Grygorii Strashko
Add CPSW Port's Interface Mode Selection PHY (phy-gmii-sel) DT Bindings Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- .../devicetree/bindings/phy/ti-phy-gmii-sel.txt| 68 ++ 1 file changed, 68 insertions(+) create mode 1

[PATCH linux-next 06/10] ARM: dts: dm814x: switch to use phy-gmii-sel

2018-11-25 Thread Grygorii Strashko
Switch to use phy-gmii-sel PHY instead of cpsw-phy-sel. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko --- arch/arm/boot/dts/dm814x.dtsi | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/dm814x.dtsi b/arch/arm

[PATCH linux-next 00/10] net: ethernet: ti: cpsw: replace cpsw-phy-sel with phy driver

2018-11-25 Thread Grygorii Strashko
t_mode_ext(slave->data->gmii_sel_phy, PHY_MODE_ETHERNET, slave->data->phy_if); Note. CPSW Port interface has to be reconfigured every time netdev is opened for proper System Suspend support where CPSW can lose context. [1] https://patchwork.kernel.org/cover/10689739/ Cc: Kishon

Re: [PATCH net-next] net: ethernet: ti: cpsw: drop vid0 configuration in dual_mac modey

2018-11-26 Thread Grygorii Strashko
On 11/26/18 10:26 AM, Ivan Khoronzhuk wrote: > On Sun, Nov 25, 2018 at 05:46:26PM -0600, Grygorii Strashko wrote: >> In dual_mac mode CPSW driver uses vid1 and vid2 by default to implement >> dual mac mode wich are used to configure pvids for each external ports. >> But,

Re: [PATCH net-next] net: ethernet: ti: cpsw: drop vid0 configuration in dual_mac modey

2018-11-26 Thread Grygorii Strashko
On 11/26/18 2:07 PM, Ivan Khoronzhuk wrote: > On Mon, Nov 26, 2018 at 12:57:20PM -0600, Grygorii Strashko wrote: >> >> >> On 11/26/18 10:26 AM, Ivan Khoronzhuk wrote: >>> On Sun, Nov 25, 2018 at 05:46:26PM -0600, Grygorii Strashko wrote: >>>> In dual_

Re: [PATCH linux-next 09/10] dt-bindings: net: ti: deprecate cpsw-phy-sel bindings

2018-11-27 Thread Grygorii Strashko
On 11/26/18 1:58 PM, Rob Herring wrote: > On Sun, Nov 25, 2018 at 06:15:30PM -0600, Grygorii Strashko wrote: >> The cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so >> deprecate cpsw-phy-sel bindings. >> >> Cc: Kishon Vijay Abraham I >> Cc

Re: [PATCH] net: ethernet: ti: cpsw: allow to configure min tx packet size

2018-11-27 Thread Grygorii Strashko
Hi Andrew, On 11/25/18 8:27 PM, Andrew Lunn wrote: > On Sun, Nov 25, 2018 at 05:43:15PM -0600, Grygorii Strashko wrote: >> For proper VLAN packets forwarding CPSW driver uses min tx packet size of >> 64bytes (VLAN_ETH_ZLEN, excluding ETH_FCS) which was corrected by >> comm

Re: [PATCH] net: ethernet: ti: cpsw: allow to configure min tx packet size

2018-11-28 Thread Grygorii Strashko
On 11/27/18 10:49 PM, Andrew Lunn wrote: >> [1] https://e2e.ti.com/support/arm/sitara_arm/f/791/t/701669 > > Reading this, the interesting part is: > > My guess would be that the driver would have to track the > configuration of the switch hardware to correctly pad the > fram

Re: [PATCH net-next] net: ethernet: ti: cpsw: drop vid0 configuration in dual_mac modey

2018-11-28 Thread Grygorii Strashko
On 11/26/18 2:07 PM, Ivan Khoronzhuk wrote: > On Mon, Nov 26, 2018 at 12:57:20PM -0600, Grygorii Strashko wrote: >> >> >> On 11/26/18 10:26 AM, Ivan Khoronzhuk wrote: >>> On Sun, Nov 25, 2018 at 05:46:26PM -0600, Grygorii Strashko wrote: >>>> In dual_

Re: [PATCH] net: ethernet: ti: cpsw: allow to configure min tx packet size

2018-11-28 Thread Grygorii Strashko
Hi Andrew, On 11/28/18 4:02 PM, Andrew Lunn wrote: >> This is dynamic configuration related to ALE VLAN entries and >> I do not see the way to support its auto-detection with current driver, >> unfortunately. > > I think you can subscribe to switchdev events which will tell you. Thanks a lot for

Re: [PATCH net-next] net: ethernet: ti: cpsw: drop vid0 configuration in dual_mac modey

2018-11-29 Thread Grygorii Strashko
On 11/29/18 9:26 AM, Ivan Khoronzhuk wrote: > On Wed, Nov 28, 2018 at 03:15:46PM -0600, Grygorii Strashko wrote: >> >> >> On 11/26/18 2:07 PM, Ivan Khoronzhuk wrote: >>> On Mon, Nov 26, 2018 at 12:57:20PM -0600, Grygorii Strashko wrote: >>>> >>>

Re: [PATCH] net: ethernet: ti: cpsw: allow to configure min tx packet size

2018-11-29 Thread Grygorii Strashko
Hi All, On 11/28/18 7:22 PM, David Miller wrote: > From: Andrew Lunn > Date: Thu, 29 Nov 2018 01:28:35 +0100 > >> On Wed, Nov 28, 2018 at 04:43:40PM -0600, Grygorii Strashko wrote: >>> Hi Andrew, >>> >>> On 11/28/18 4:02 PM, Andrew Lunn wrote: >>

Re: [PATCH net-next 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-15 Thread Grygorii Strashko
On 05/15/2018 04:59 PM, Florian Fainelli wrote: A number of drivers have the following pattern: if (np) of_mdiobus_register() else mdiobus_register() which the implementation of of_mdiobus_register() now takes care of. Remove that pattern in drivers that strictly adhere to it.

[PATCH net-next] net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value

2018-05-15 Thread Grygorii Strashko
bus.c:342: 'bus_find_device' explicitly returns a NULL value. cpsw-phy-sel.c:181: 'dev' is dereferenced by passing argument 1 to function 'dev_get_drvdata'. device.h:1024: 'dev' is passed to function 'dev_get_drvdata'. device.h:1026: &#

<    1   2   3   4   5   6   7   >