[PATCH net] net: marvell: prestera: fix port event handling on init

2021-04-20 Thread Vadym Kochan
From: Vadym Kochan For some reason there might be a crash during ports creation if port events are handling at the same time because fw may send initial port event with down state. The crash points to cancel_delayed_work() which is called when port went is down. Currently I did not find out

[PATCH net-next 2/7] net: marvell: prestera: disable events interrupt while handling

2021-02-03 Thread Vadym Kochan
There are change in firmware which requires that receiver will disable event interrupts before handling them and enable them after finish with handling. Events still may come into the queue but without receiver interruption. Signed-off-by: Vadym Kochan --- .../ethernet/marvell/prestera

[PATCH net-next 0/7] Marvell Prestera Switchdev misc updates

2021-02-03 Thread Vadym Kochan
LAG support Vadym Kochan (6): net: marvell: prestera: bump supported firmware version to 2.5 net: marvell: prestera: disable events interrupt while handling net: marvell: prestera: add support for AC3X 98DX3265 device net: marvell: prestera: move netdev topology validation to

[PATCH net-next 1/7] net: marvell: prestera: bump supported firmware version to 2.5

2021-02-03 Thread Vadym Kochan
New firmware version has some ABI and feature changes like: - LAG support - initial L3 support - changed events handling logic Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH net-next 4/7] net: marvell: prestera: move netdev topology validation to prestera_main

2021-02-03 Thread Vadym Kochan
Move handling of PRECHANGEUPPER event from prestera_switchdev to prestera_main which is responsible for basic netdev events handling and routing them to related module. Signed-off-by: Vadym Kochan --- .../ethernet/marvell/prestera/prestera_main.c | 29 +-- .../marvell/prestera

[PATCH net-next 5/7] net: marvell: prestera: add LAG support

2021-02-03 Thread Vadym Kochan
: Serhiy Boiko Signed-off-by: Vadym Kochan --- .../net/ethernet/marvell/prestera/prestera.h | 30 ++- .../ethernet/marvell/prestera/prestera_hw.c | 180 - .../ethernet/marvell/prestera/prestera_hw.h | 14 + .../ethernet/marvell/prestera/prestera_main.c | 247

[PATCH net-next 7/7] net: marvell: prestera: fix port event handling on init

2021-02-03 Thread Vadym Kochan
end trace 5eced933df3a080b ]--- Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c index 394

[PATCH net-next 6/7] net: marvell: prestera: align flood setting according to latest firmware version

2021-02-03 Thread Vadym Kochan
Latest FW IPC floow message format was changed to configure uc/mc flooding separately, so change code according to this. Signed-off-by: Vadym Kochan --- .../ethernet/marvell/prestera/prestera_hw.c | 37 +-- .../ethernet/marvell/prestera/prestera_hw.h | 3 +- .../marvell

[PATCH net-next 3/7] net: marvell: prestera: add support for AC3X 98DX3265 device

2021-02-03 Thread Vadym Kochan
Add PCI match for AC3X 98DX3265 device which is supported by the current driver and firmware. Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers

Re: [PATCH net-next 2/7] net: marvell: prestera: disable events interrupt while handling

2021-02-05 Thread Vadym Kochan
Hi Jakub, On Thu, Feb 04, 2021 at 09:10:12PM -0800, Jakub Kicinski wrote: > On Wed, 3 Feb 2021 18:54:53 +0200 Vadym Kochan wrote: > > There are change in firmware which requires that receiver will > > disable event interrupts before handling them and enable them > > after

Re: [net-next 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-05-30 Thread Vadym Kochan
Hi Ido, On Sat, May 30, 2020 at 05:29:28PM +0300, Ido Schimmel wrote: > On Thu, May 28, 2020 at 06:12:39PM +0300, Vadym Kochan wrote: > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely &

Re: [PATCH v2 2/2] nvmem: add ONIE NVMEM cells support

2020-06-01 Thread Vadym Kochan
Hi, On Mon, Jun 01, 2020 at 09:50:52AM +0100, Srinivas Kandagatla wrote: > > > On 30/05/2020 00:04, Vadym Kochan wrote: > > ONIE is a small operating system, pre-installed on bare metal network > > switches, that provides an environment for automated provisioning. > >

Re: [PATCH v2 2/2] nvmem: add ONIE NVMEM cells support

2020-06-01 Thread Vadym Kochan
On Mon, Jun 01, 2020 at 10:13:05AM +0100, Srinivas Kandagatla wrote: > > > On 01/06/2020 10:03, Vadym Kochan wrote: > > > > + > > > > + nvmem = of_nvmem_device_get(np, NULL); > > > > + if (IS_ERR(nvmem)) > > > > +

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-01 Thread Vadym Kochan
Hi Ido, On Sat, May 30, 2020 at 06:48:01PM +0300, Ido Schimmel wrote: > On Thu, May 28, 2020 at 06:12:40PM +0300, Vadym Kochan wrote: > [...] > Nit: "From" ? > > > + PRESTERA_DSA_CMD_FROM_CPU, > > +}; > > + > > +struct prestera_dsa_vlan { >

Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-07-31 Thread Vadym Kochan
Hi Andy, On Mon, Jul 27, 2020 at 03:59:13PM +0300, Andy Shevchenko wrote: > On Mon, Jul 27, 2020 at 3:23 PM Vadym Kochan wrote: > > > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a lar

Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-07-31 Thread Vadym Kochan
Hi Andy, On Fri, Jul 31, 2020 at 07:02:47PM +0300, Andy Shevchenko wrote: > On Fri, Jul 31, 2020 at 6:22 PM Vadym Kochan wrote: > > On Mon, Jul 27, 2020 at 03:59:13PM +0300, Andy Shevchenko wrote: > > > On Mon, Jul 27, 2020 at 3:23 PM Vadym Kochan > > > wrote: >

Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-20 Thread Vadym Kochan
Hi Andrew, On Fri, Aug 14, 2020 at 03:18:15PM +0200, Andrew Lunn wrote: > > > > Currently > > > > > > > > compatible = "marvell,prestera" > > > > > > > > is used as default, so may be > > > > > > > > you mean to support few matching including particular silicon too, like > > > > ? > > > >

[PATCH] net: marvell: prestera: add support for AC3X 98DX3265 device

2021-04-16 Thread Vadym Kochan
From: Vadym Kochan Add PCI match for AC3X 98DX3265 device which is supported by the current driver and firmware. Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/prestera

Re: [PATCH] net: marvell: prestera: add support for AC3X 98DX3265 device

2021-04-16 Thread Vadym Kochan
On Sat, Apr 17, 2021 at 02:02:02AM +0300, Vadym Kochan wrote: > From: Vadym Kochan > > Add PCI match for AC3X 98DX3265 device which is supported by the current > driver and firmware. > > Signed-off-by: Vadym Kochan > --- > drivers/net/ethernet/marvell/prestera/preste

[PATCH RESEND net-next] net: marvell: prestera: add support for AC3X 98DX3265 device

2021-04-16 Thread Vadym Kochan
From: Vadym Kochan Add PCI match for AC3X 98DX3265 device which is supported by the current driver and firmware. Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/prestera

Re: [RFC] net: core: devlink: add port_params_ops for devlink port parameters altering

2021-04-09 Thread Vadym Kochan
Hi Sridhar, On Fri, Apr 09, 2021 at 09:51:13AM -0700, Samudrala, Sridhar wrote: > On 4/9/2021 9:22 AM, Oleksandr Mazur wrote: > > I'd like to discuss a possibility of handling devlink port parameters > > with devlink port pointer supplied. > > > > Current design makes it impossible to distinguish

Re: [PATCH net-next 7/7] net: marvell: prestera: fix port event handling on init

2021-02-05 Thread Vadym Kochan
Hi Jakub, On Thu, Feb 04, 2021 at 09:19:34PM -0800, Jakub Kicinski wrote: > On Wed, 3 Feb 2021 18:54:58 +0200 Vadym Kochan wrote: > > For some reason there might be a crash during ports creation if port > > events are handling at the same time because fw may send initial >

Re: [RFC net-next 1/3] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX325x (AC3x)

2020-05-02 Thread Vadym Kochan
Hi Ido, On Thu, Mar 05, 2020 at 04:49:37PM +0200, Ido Schimmel wrote: > On Tue, Feb 25, 2020 at 04:30:54PM +0000, Vadym Kochan wrote: > > +int mvsw_pr_port_learning_set(struct mvsw_pr_port *port, bool learn) > > +{ > > + return mvsw_pr_hw_port_learning_set(port, learn);

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-06-10 Thread Vadym Kochan
On Wed, Jun 03, 2020 at 04:16:32PM +0200, Jiri Pirko wrote: > Thu, May 28, 2020 at 05:12:40PM CEST, vadym.koc...@plvision.eu wrote: > > [...] > > >+} > >+ > >+int prestera_hw_port_info_get(const struct prestera_port *port, > >+ u16 *fp_id, u32 *hw_id, u32 *dev_id) > > Pl

[PATCH 0/2] nvmem: add ONIE NVMEM cells provider

2020-05-27 Thread Vadym Kochan
logic because current logic only allows to add additional cells only before nvmem device registration. Vadym Kochan (2): nvmem: core: allow to register cells for existing device nvmem: add ONIE NVMEM cells support drivers/nvmem/Kconfig | 9 ++ drivers/nvmem/Makefile | 3

[PATCH 1/2] nvmem: core: allow to register cells for existing device

2020-05-27 Thread Vadym Kochan
Current implementation does not allow to register nvmem cells for existing device and requires that this will be done before device is registered. But there might a driver which provides only cells info which needs to be added for already registered nvmem device. Signed-off-by: Vadym Kochan

[PATCH 2/2] nvmem: add ONIE NVMEM cells support

2020-05-27 Thread Vadym Kochan
registers ONIE TLV attributes as NVMEM cells which can be accessed by other platform driver. Also it allows to use of_get_mac_address() to retrieve mac address for the netdev. Signed-off-by: Vadym Kochan --- drivers/nvmem/Kconfig | 9 + drivers/nvmem/Makefile | 3 + drivers/nvmem/onie

Re: linux-next: build failure after merge of the net-next tree

2020-09-30 Thread Vadym Kochan
Hi Stephen, On Thu, Oct 01, 2020 at 08:09:16AM +1000, Stephen Rothwell wrote: > Hi all, > [CUT] > > I am still getting this build failure ... > > -- I just 've checked linux-next/master and it builds fine at least with my custom config, do/how I need to handle this case ? I see the changes y

Re: [EXT] Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-25 Thread Vadym Kochan
o use? > > Andrew This 'compatible' string is just for parsing the DTS node related to this driver. There is no any relation in this name matching for fw compatibility but only to describe some properties which might be applied by the driver. Regards, Vadym Kochan

[net-next v5 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-08-25 Thread Vadym Kochan
of macro usage for sending fw requests in prestera_hw.c 10) Add base_mac setting as module parameter. base_mac is required for generation default port's mac. Vadym Kochan (6): net: marvell: prestera: Add driver for Prestera family ASIC devices net: marvell: prestera: Add PCI in

[net-next v5 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings

2020-08-25 Thread Vadym Kochan
Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan --- .../bindings/net/marvell,prestera.txt | 34

[net-next v5 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-25 Thread Vadym Kochan
loped-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Co-developed-by: Vadym Kochan Signed-off-by: Vadym Kochan --- PATCH v5: 1) Make SPDX license as separate comment 2) Change 'u8 *' -> 'void *' in prestera.h: struct prestera_device->{send_req,recv_msg} callba

[net-next v5 2/6] net: marvell: prestera: Add PCI interface support

2020-08-25 Thread Vadym Kochan
ABI is not changed. Firmware image file name contains only MAJOR and MINOR numbers to make driver be compatible with any PATCH version. Co-developed-by: Oleksandr Mazur Signed-off-by: Oleksandr Mazur Co-developed-by: Vadym Kochan Signed-off-by: Vadym Kochan --- PATCH v5: 1) Remove not-ne

[net-next v5 3/6] net: marvell: prestera: Add basic devlink support

2020-08-25 Thread Vadym Kochan
Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan --- PATCH v5: 1) Simplified some error path handling by simple return error code in: - prestera_dl_info_get(...) 2) Remove not-needed err assignment

[net-next v5 4/6] net: marvell: prestera: Add ethtool interface support

2020-08-25 Thread Vadym Kochan
: Serhiy Boiko Co-developed-by: Vadym Kochan Signed-off-by: Vadym Kochan --- PATCH v5: 1) Convert following error check: if (func(...)) or if (!func(...)) to use err variable: err = func(...) if (err) 2) Remove "," from termi

[net-next v5 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-08-25 Thread Vadym Kochan
timeout parameter is set globally per device Co-developed-by: Serhiy Boiko Signed-off-by: Serhiy Boiko Co-developed-by: Serhiy Pshyk Signed-off-by: Serhiy Pshyk Co-developed-by: Taras Chornyi Signed-off-by: Taras Chornyi Co-developed-by: Vadym Kochan Signed-off-by: Vadym Kochan --- PATCH v5

Re: [net-next v5 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-26 Thread Vadym Kochan
On Tue, Aug 25, 2020 at 05:20:03PM -0700, David Miller wrote: > From: Vadym Kochan > Date: Tue, 25 Aug 2020 15:20:08 +0300 > > > +int prestera_dsa_parse(struct prestera_dsa *dsa, const u8 *dsa_buf) > > +{ > > + __be32 *dsa_words = (__be32 *)dsa_buf; > &

pull: mrvl: add firmware for Prestera ASIC devices

2020-05-28 Thread Vadym Kochan
sion/linux-firmware.git mrvl-prestera for you to fetch changes up to 561100014bb60b17c070aaa5449ee9970afa6620: mrvl: add firmware for Prestera ASIC devices (2020-05-28 14:07:49 +0300) -------- Vadym Kochan (1): mrvl: add firmware for Pre

[net-next 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-05-28 Thread Vadym Kochan
tera_bridge_device which may confuse. - use refcount_t 9) Get rid of macro usage for sending fw requests in prestera_hw.c 10) Add base_mac setting as module parameter. base_mac is required for generation default port's mac. Vadym Kochan (6): net: marvell: prestera: Ad

[net-next 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-05-28 Thread Vadym Kochan
tera_bridge_device which may confuse. - use refcount_t 9) Get rid of macro usage for sending fw requests in prestera_hw.c 10) Add base_mac setting as module parameter. base_mac is required for generation default port's mac. Vadym Kochan (6): net: marvell: prestera: Ad

[net-next 2/6] net: marvell: prestera: Add PCI interface support

2020-05-28 Thread Vadym Kochan
not changed. Firmware image file name contains only MAJOR and MINOR numbers to make driver be compatible with any PATCH version. Signed-off-by: Oleksandr Mazur Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/Kconfig | 11 + .../net/ethernet/marvell/prestera/Makefile|

[net-next 4/6] net: marvell: prestera: Add ethtool interface support

2020-05-28 Thread Vadym Kochan
autoneg on - forward error correction feature is supported only on SFP ports, 10G speed - auto-negotiation and MDI-x features are not supported on Copper-to-Fiber SFP module Signed-off-by: Andrii Savka Signed-off-by: Serhiy Boiko Signed-off-by: Vadym Kochan --- .../net

[net-next 3/6] net: marvell: prestera: Add basic devlink support

2020-05-28 Thread Vadym Kochan
Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/Kconfig | 1 + .../net/ethernet/marvell/prestera/Makefile| 2 +- .../net/ethernet/marvell/prestera/prestera.h

[net-next 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-05-28 Thread Vadym Kochan
timeout parameter is set globally per device Signed-off-by: Serhiy Boiko Signed-off-by: Serhiy Pshyk Signed-off-by: Taras Chornyi Signed-off-by: Vadym Kochan --- .../net/ethernet/marvell/prestera/Makefile|3 +- .../net/ethernet/marvell/prestera/prestera.h | 33 +- .../ethernet/marvell

[net-next 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings

2020-05-28 Thread Vadym Kochan
Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan --- .../bindings/net/marvell,prestera.txt | 34

[net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-28 Thread Vadym Kochan
ii Savka Signed-off-by: Oleksandr Mazur Signed-off-by: Serhiy Boiko Signed-off-by: Serhiy Pshyk Signed-off-by: Taras Chornyi Signed-off-by: Volodymyr Mytnyk Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/Kconfig | 1 + drivers/net/ethernet/marvell/Makefile

[PATCH v2 0/2] nvmem: add ONIE NVMEM cells provider

2020-05-29 Thread Vadym Kochan
logic because current logic only allows to add additional cells only before nvmem device registration. v2: 1) Fixed wrong memcmp comparison Vadym Kochan (2): nvmem: core: allow to register cells for existing device nvmem: add ONIE NVMEM cells support drivers/nvmem/Kconfig | 9

[PATCH v2 1/2] nvmem: core: allow to register cells for existing device

2020-05-29 Thread Vadym Kochan
Current implementation does not allow to register nvmem cells for existing device and requires that this will be done before device is registered. But there might a driver which provides only cells info which needs to be added for already registered nvmem device. Signed-off-by: Vadym Kochan

[PATCH v2 2/2] nvmem: add ONIE NVMEM cells support

2020-05-29 Thread Vadym Kochan
registers ONIE TLV attributes as NVMEM cells which can be accessed by other platform driver. Also it allows to use of_get_mac_address() to retrieve mac address for the netdev. Signed-off-by: Vadym Kochan --- drivers/nvmem/Kconfig | 9 + drivers/nvmem/Makefile | 3 + drivers/nvmem/onie

Re: [net-next 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-29 Thread Vadym Kochan
Hi David, On Fri, May 29, 2020 at 05:18:39PM -0700, David Miller wrote: > > Please remove all of the __packed attributes. > > I looked at your data structures and all of them use fixed sized types > and are multiples of 4 so the __packed attribute is completely > unnecessary. > > The alignment

[net-next RFC v3 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-05-26 Thread Vadym Kochan
evice which may confuse. - use refcount_t 9) Get rid of macro usage for sending fw requests in prestera_hw.c 10) Add base_mac setting as module parameter. base_mac is required for generation default port's mac. Vadym Kochan (6): net: marvell: prestera: Add driver for Preste

[net-next RFC v3 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings

2020-05-26 Thread Vadym Kochan
Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan --- .../bindings/net/marvell,prestera.txt | 34

[net-next RFC v3 2/6] net: marvell: prestera: Add PCI interface support

2020-05-26 Thread Vadym Kochan
not changed. Firmware image file name contains only MAJOR and MINOR numbers to make driver be compatible with any PATCH version. Signed-off-by: Oleksandr Mazur Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/Kconfig | 11 + .../net/ethernet/marvell/prestera/Makefile|

[net-next RFC v3 3/6] net: marvell: prestera: Add basic devlink support

2020-05-26 Thread Vadym Kochan
Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/Kconfig | 1 + .../net/ethernet/marvell/prestera/Makefile| 2 +- .../net/ethernet/marvell/prestera/prestera.h

[net-next RFC v3 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-05-26 Thread Vadym Kochan
ii Savka Signed-off-by: Oleksandr Mazur Signed-off-by: Serhiy Boiko Signed-off-by: Serhiy Pshyk Signed-off-by: Taras Chornyi Signed-off-by: Volodymyr Mytnyk Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/Kconfig | 1 + drivers/net/ethernet/marvell/Makefile

[net-next RFC v3 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-05-26 Thread Vadym Kochan
timeout parameter is set globally per device Signed-off-by: Serhiy Boiko Signed-off-by: Serhiy Pshyk Signed-off-by: Taras Chornyi Signed-off-by: Vadym Kochan --- .../net/ethernet/marvell/prestera/Makefile|3 +- .../net/ethernet/marvell/prestera/prestera.h | 33 +- .../ethernet/marvell

[net-next RFC v3 4/6] net: marvell: prestera: Add ethtool interface support

2020-05-26 Thread Vadym Kochan
autoneg on - forward error correction feature is supported only on SFP ports, 10G speed - auto-negotiation and MDI-x features are not supported on Copper-to-Fiber SFP module Signed-off-by: Andrii Savka Signed-off-by: Serhiy Boiko Signed-off-by: Vadym Kochan --- .../net

Re: [net-next RFC v3 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-05-26 Thread Vadym Kochan
Thanks Jakub! I fixed these locally, should I wait a bit for other comments before sending next version ? On Tue, May 26, 2020 at 11:35:12AM -0700, Jakub Kicinski wrote: > On Tue, 26 May 2020 20:12:56 +0300 Vadym Kochan wrote: > > Marvell Prestera 98DX326x integrates up to 24 ports of

Re: [RFC net-next 1/3] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX325x (AC3x)

2020-05-04 Thread Vadym Kochan
Hi Ido, On Sat, May 02, 2020 at 06:20:49PM +0300, Vadym Kochan wrote: > Hi Ido, > > On Thu, Mar 05, 2020 at 04:49:37PM +0200, Ido Schimmel wrote: > > On Tue, Feb 25, 2020 at 04:30:54PM +0000, Vadym Kochan wrote: > > > +int mvsw_pr_port_learning_set(struct mvsw_p

Re: [PATCH v2 2/2] nvmem: add ONIE NVMEM cells support

2020-06-05 Thread Vadym Kochan
Hi Srinivas, On Mon, Jun 01, 2020 at 01:27:49PM +0300, Vadym Kochan wrote: > On Mon, Jun 01, 2020 at 10:13:05AM +0100, Srinivas Kandagatla wrote: > > > > > > On 01/06/2020 10:03, Vadym Kochan wrote: > > > > > + > > > > > + nvmem = of_nvm

Re: [PATCH net v6 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x)

2020-09-02 Thread Vadym Kochan
Sorry, I mistakenly used "net" instead of "net-next" as label. On Wed, Sep 02, 2020 at 06:04:36PM +0300, Vadym Kochan wrote: > Marvell Prestera 98DX3255 integrates up to 24 ports of 1GbE with 8 > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely

Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-04 Thread Vadym Kochan
Hi Willem, On Thu, Sep 03, 2020 at 05:22:24PM +0200, Willem de Bruijn wrote: > On Wed, Sep 2, 2020 at 5:37 PM Vadym Kochan wrote: > > > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a lar

Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-04 Thread Vadym Kochan
On Thu, Sep 03, 2020 at 06:35:34PM +0300, Andy Shevchenko wrote: > On Thu, Sep 3, 2020 at 6:23 PM Willem de Bruijn > wrote: > > On Wed, Sep 2, 2020 at 5:37 PM Vadym Kochan > > wrote: > > ... > > > > +static int prestera_is_valid_mac_addr(struct

Re: [PATCH net v6 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-09-04 Thread Vadym Kochan
On Thu, Sep 03, 2020 at 07:18:59PM +0200, Willem de Bruijn wrote: > On Wed, Sep 2, 2020 at 5:07 PM Vadym Kochan wrote: > > > > The following features are supported: > > > > - VLAN-aware bridge offloading > > - VLAN-unaware bridge offloading > >

Re: [PATCH v3 1/3] nvmem: core: allow to register cells during nvmem registration

2020-09-04 Thread Vadym Kochan
Hi Srinivas, On Fri, Sep 04, 2020 at 12:02:40PM +0100, Srinivas Kandagatla wrote: > Hi Vadym, > > Thanks for the patch, > On 31/08/2020 02:55, Vadym Kochan wrote: > > Add NVMEM_PRE_ADD notification step which is called before any cells > > binding - from lookup table o

[PATCH net v6 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x)

2020-09-02 Thread Vadym Kochan
truct prestera_bridge_device which may confuse. - use refcount_t 9) Get rid of macro usage for sending fw requests in prestera_hw.c 10) Add base_mac setting as module parameter. base_mac is required for generation default port's mac. Vadym Kochan (6): net: marvell: prester

[PATCH net v6 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-09-02 Thread Vadym Kochan
timeout parameter is set globally per device Co-developed-by: Serhiy Boiko Signed-off-by: Serhiy Boiko Co-developed-by: Serhiy Pshyk Signed-off-by: Serhiy Pshyk Co-developed-by: Taras Chornyi Signed-off-by: Taras Chornyi Signed-off-by: Vadym Kochan --- PATCH v5: 0) Add Co-developed tag

[PATCH net v6 4/6] net: marvell: prestera: Add ethtool interface support

2020-09-02 Thread Vadym Kochan
: Serhiy Boiko Signed-off-by: Vadym Kochan --- PATCH v5: 1) Convert following error check: if (func(...)) or if (!func(...)) to use err variable: err = func(...) if (err) 2) Remove "," from terminated enum entry. PATCH v4:

[PATCH net v6 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings

2020-09-02 Thread Vadym Kochan
Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan --- .../bindings/net/marvell,prestera.txt | 34

[PATCH net v6 3/6] net: marvell: prestera: Add basic devlink support

2020-09-02 Thread Vadym Kochan
Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan --- PATCH v5: 1) Simplified some error path handling by simple return error code in: - prestera_dl_info_get(...) 2) Remove not-needed err assignment

[PATCH net v6 2/6] net: marvell: prestera: Add PCI interface support

2020-09-02 Thread Vadym Kochan
ABI is not changed. Firmware image file name contains only MAJOR and MINOR numbers to make driver be compatible with any PATCH version. Co-developed-by: Oleksandr Mazur Signed-off-by: Oleksandr Mazur Signed-off-by: Vadym Kochan --- PATCH v5: 1) Remove not-needed packed & aligned at

[PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-02 Thread Vadym Kochan
loped-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Vadym Kochan --- PATCH v6: 1) Use rwlock to protect port list on create/delete stages. The list is mostly readable by fw event handler or packets receiver. 2) Remove not needed variable initializ

Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-04 Thread Vadym Kochan
Hi Andrew, On Fri, Sep 04, 2020 at 03:32:17PM +0200, Andrew Lunn wrote: > > > > +static int prestera_is_valid_mac_addr(struct prestera_port *port, u8 > > > > *addr) > > > > +{ > > > > + if (!is_valid_ether_addr(addr)) > > > > + return -EADDRNOTAVAIL; > > > > + > > > > +

[PATCH net-next v7 4/6] net: marvell: prestera: Add ethtool interface support

2020-09-04 Thread Vadym Kochan
: Serhiy Boiko Signed-off-by: Vadym Kochan --- PATCH v5: 1) Convert following error check: if (func(...)) or if (!func(...)) to use err variable: err = func(...) if (err) 2) Remove "," from terminated enum entry. PATCH v4:

[PATCH net-next v7 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings

2020-09-04 Thread Vadym Kochan
Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan --- .../bindings/net/marvell,prestera.txt | 34

[PATCH net-next v7 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-09-04 Thread Vadym Kochan
timeout parameter is set globally per device Co-developed-by: Serhiy Boiko Signed-off-by: Serhiy Boiko Co-developed-by: Serhiy Pshyk Signed-off-by: Serhiy Pshyk Co-developed-by: Taras Chornyi Signed-off-by: Taras Chornyi Signed-off-by: Vadym Kochan --- PATCH v7: 1) Add missing

[PATCH net-next v7 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-04 Thread Vadym Kochan
d-off-by: Taras Chornyi Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Vadym Kochan --- PATCH v7: 1) Use ether_addr_copy() in prestera_main.c:prestera_port_set_mac_address() instead of memcpy(). 2) Removed not needed device's DMA address r

[PATCH net-next v7 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x)

2020-09-04 Thread Vadym Kochan
chdev.c with following changes: - handle netdev events from prestera.c - use struct prestera_bridge for bridge objects, and get rid of struct prestera_bridge_device which may confuse. - use refcount_t 9) Get rid of macro usage for sending fw requests in prester

[PATCH net-next v7 3/6] net: marvell: prestera: Add basic devlink support

2020-09-04 Thread Vadym Kochan
Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan --- PATCH v5: 1) Simplified some error path handling by simple return error code in: - prestera_dl_info_get(...) 2) Remove not-needed err assignment

[PATCH net-next v7 2/6] net: marvell: prestera: Add PCI interface support

2020-09-04 Thread Vadym Kochan
ixes, firmware ABI is not changed. Firmware image file name contains only MAJOR and MINOR numbers to make driver be compatible with any PATCH version. Co-developed-by: Oleksandr Mazur Signed-off-by: Oleksandr Mazur Signed-off-by: Vadym Kochan --- PATCH v5: 1) Remove not-needed packed &

Re: [PATCH net-next v7 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-07 Thread Vadym Kochan
Hi Andy, On Fri, Sep 04, 2020 at 10:12:07PM +0300, Andy Shevchenko wrote: > On Fri, Sep 4, 2020 at 7:52 PM Vadym Kochan wrote: > > > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a lar

Re: [net-next v5 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-30 Thread Vadym Kochan
Hi David, On Wed, Aug 26, 2020 at 07:34:46AM -0700, David Miller wrote: > From: Vadym Kochan > Date: Wed, 26 Aug 2020 11:17:44 +0300 > > > Initially there was (in RFC patch set), not locking, but _rcu list API > > used, because the port list is modified only by 1 writer

Re: [net-next v5 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-08-30 Thread Vadym Kochan
Hi Chris, On Wed, Aug 26, 2020 at 04:30:35AM +, Chris Packham wrote: > Hi Vadym, > > On 26/08/20 12:20 am, Vadym Kochan wrote: > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a lar

[PATCH v3 0/3] nvmem: add ONIE NVMEM cells provider

2020-08-30 Thread Vadym Kochan
registration which does not allow to use it on handing NVMEM_PRE_ADD event. v2: 1) Fixed wrong memcmp comparison Vadym Kochan (3): nvmem: core: allow to register cells during nvmem registration nvmem: add ONIE NVMEM cells support misc: eeprom: at24: register nvmem only after eeprom is ready to

[PATCH v3 2/3] nvmem: add ONIE NVMEM cells support

2020-08-30 Thread Vadym Kochan
registers ONIE TLV attributes as NVMEM cells which can be accessed by other platform driver. Also it allows to use of_get_mac_address() to retrieve mac address for the netdev. Signed-off-by: Vadym Kochan --- v3: 1) Update onie-cells.c by using nvmem notification to parse and register cells

[PATCH v3 1/3] nvmem: core: allow to register cells during nvmem registration

2020-08-30 Thread Vadym Kochan
this notification step. Signed-off-by: Vadym Kochan --- v3: 1) Update core.c changes by extending notification mechanism by adding new NVMEM_PRE_ADD event id which is called before lookup table cells binding, this allows for notification handler to register cells which

[PATCH v3 3/3] misc: eeprom: at24: register nvmem only after eeprom is ready to use

2020-08-30 Thread Vadym Kochan
: Vadym Kochan --- v3: 1) at24 driver enables regulator and pm state machine after nvmem registration which does not allow to use it on handing NVMEM_PRE_ADD event. drivers/misc/eeprom/at24.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/misc

Re: [PATCH v3 3/3] misc: eeprom: at24: register nvmem only after eeprom is ready to use

2020-08-31 Thread Vadym Kochan
Hi Bartosz, On Mon, Aug 31, 2020 at 07:21:39PM +0200, Bartosz Golaszewski wrote: > On Mon, Aug 31, 2020 at 3:56 AM Vadym Kochan wrote: > > > > During nvmem_register() the nvmem core sends notifications when: > > > > - cell added > > - nvmem added >

Re: [PATCH net-next v7 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-09-08 Thread Vadym Kochan
On Fri, Sep 04, 2020 at 10:12:07PM +0300, Andy Shevchenko wrote: > On Fri, Sep 4, 2020 at 7:52 PM Vadym Kochan wrote: > > > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely > &

[RFT net] net: ipa: fix u32_replace_bits by u32p_xxx version

2020-09-08 Thread Vadym Kochan
Looks like u32p_replace_bits() should be used instead of u32_replace_bits() which does not modifies the value but returns the modified version. Fixes: 2b9feef2b6c2 ("soc: qcom: ipa: filter and routing tables") Signed-off-by: Vadym Kochan --- Found it while grepping of u32_replace_bi

Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-14 Thread Vadym Kochan
Hi Jonathan, On Thu, Aug 13, 2020 at 09:03:22AM +0100, Jonathan McDowell wrote: > On Mon, Jul 27, 2020 at 03:22:37PM +0300, Vadym Kochan wrote: > > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > > ports of 10GbE uplinks or 2 ports of 40Gbps stackin

Re: [PATCH v2 2/2] nvmem: add ONIE NVMEM cells support

2020-08-14 Thread Vadym Kochan
Hi Srinivas, On Mon, Jun 15, 2020 at 12:06:11PM +0100, Srinivas Kandagatla wrote: > > > On 05/06/2020 11:53, Vadym Kochan wrote: > > > One of the example is atmel eeprom (at24), but there might be different > > > devices. > > > > > > But can you pl

Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-14 Thread Vadym Kochan
On Fri, Aug 14, 2020 at 01:05:36PM +0100, Jonathan McDowell wrote: > On Fri, Aug 14, 2020 at 11:20:54AM +0300, Vadym Kochan wrote: > > On Thu, Aug 13, 2020 at 09:03:22AM +0100, Jonathan McDowell wrote: > > > On Mon, Jul 27, 2020 at 03:22:37PM +0300, Vadym Kochan wrote: > &

Re: [PATCH net] net: marvell: prestera: fix error return code in prestera_pci_probe()

2020-11-13 Thread Vadym Kochan
;wq) { > + err = -ENOMEM; > goto err_wq_alloc; > + } > > INIT_WORK(&fw->evt_work, prestera_fw_evt_work_fn); Thank you! Just in case it is needed: Reviewed-by: Vadym Kochan Acked-by: Vadym Kochan

Re: linux-next: Tree for Nov 3 (drivers/net/ethernet/marvell/prestera/prestera_switchdev.o)

2020-11-06 Thread Vadym Kochan
o: in function > `prestera_bridge_port_event': > prestera_switchdev.c:(.text+0x2ebd): undefined reference to `br_vlan_enabled' > > > Also please add drivers/net/ethernet/marvell/prestera/ to the > MAINTAINERS file. > > thanks. Thanks for catching this, will send fix via the "net" tree. Regards, Vadym Kochan

[PATCH net] net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m

2020-11-06 Thread Vadym Kochan
Fix it by adding 'BRIDGE || BRIDGE=n' dependency. Fixes: e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver implementation") Reported-by: Randy Dunlap Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/Kconfig | 1 + 1 file changed, 1 insertion(+) dif

[net-next v3 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x)

2020-07-25 Thread Vadym Kochan
Get rid of macro usage for sending fw requests in prestera_hw.c 10) Add base_mac setting as module parameter. base_mac is required for generation default port's mac. Vadym Kochan (6): net: marvell: prestera: Add driver for Prestera family ASIC devices net: marvell: prestera:

[net-next v3 2/6] net: marvell: prestera: Add PCI interface support

2020-07-25 Thread Vadym Kochan
not changed. Firmware image file name contains only MAJOR and MINOR numbers to make driver be compatible with any PATCH version. Signed-off-by: Oleksandr Mazur Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/Kconfig | 11 + .../net/ethernet/marvell/prestera/Makefile|

[net-next v3 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-07-25 Thread Vadym Kochan
ii Savka Signed-off-by: Oleksandr Mazur Signed-off-by: Serhiy Boiko Signed-off-by: Serhiy Pshyk Signed-off-by: Taras Chornyi Signed-off-by: Volodymyr Mytnyk Signed-off-by: Vadym Kochan --- PATCHv3: 1) Simplify __be32 type casting in prestera_dsa.c: prestera_dsa_parse(...) drivers/net/

[net-next v3 5/6] net: marvell: prestera: Add Switchdev driver implementation

2020-07-25 Thread Vadym Kochan
timeout parameter is set globally per device Signed-off-by: Serhiy Boiko Signed-off-by: Serhiy Pshyk Signed-off-by: Taras Chornyi Signed-off-by: Vadym Kochan --- .../net/ethernet/marvell/prestera/Makefile|3 +- .../net/ethernet/marvell/prestera/prestera.h | 33 +- .../ethernet/marvell

  1   2   >