Re: [PATCH v5 4/6] net: dsa: microchip: ksz8795: add support for ksz88xx chips

2021-02-01 Thread Michael Grzeschik
Hi Tristam! On Wed, Dec 16, 2020 at 06:33:06AM +, tristram...@microchip.com wrote: static void ksz8_r_vlan_table(struct ksz_device *dev, u16 vid, u32 *vlan) { - int index; - u16 *data; - u16 addr; + u16 addr = vid / dev->phy_port_cnt; u64 buf; - data

Re: [PATCH v5 3/6] net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct

2020-12-15 Thread Michael Grzeschik
Gentle Ping. Did you find time to look into my other patches of the series. I really would like to send the next version. Thanks! On Mon, Dec 07, 2020 at 10:44:15PM +0100, Michael Grzeschik wrote: On Mon, Dec 07, 2020 at 08:02:57PM +, tristram...@microchip.com wrote: In order to get this

Re: [PATCH v5 3/6] net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct

2020-12-07 Thread Michael Grzeschik
be set depending on the chips register layout. Signed-off-by: Michael Grzeschik --- v1 -> v4: - extracted this change from bigger previous patch v4 -> v5: - added missing variables in ksz8_r_vlan_entries - moved shifts, masks and registers to arrays indexed by enums -

[PATCH v5 4/6] net: dsa: microchip: ksz8795: add support for ksz88xx chips

2020-12-07 Thread Michael Grzeschik
We add support for the ksz8863 and ksz8873 chips which are using the same register patterns but other offsets as the ksz8795. Signed-off-by: Michael Grzeschik --- v1 -> v4: - extracted this change from bigger previous patch v4 -> v5: - added clear of reset bit for ksz8863 rese

[PATCH v5 6/6] dt-bindings: net: dsa: document additional Microchip KSZ8863/8873 switch

2020-12-07 Thread Michael Grzeschik
It is a 3-Port 10/100 Ethernet Switch. One CPU-Port and two Switch-Ports. Cc: devicet...@vger.kernel.org Reviewed-by: Andrew Lunn Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v3: - nothing changes - already Acked-by Rob Herring

[PATCH v5 3/6] net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct

2020-12-07 Thread Michael Grzeschik
z8.h b/drivers/net/dsa/microchip/ksz8.h new file mode 100644 index 0..d3e89c27e22aa --- /dev/null +++ b/drivers/net/dsa/microchip/ksz8.h @@ -0,0 +1,69 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Microchip KSZ8XXX series register access + * + * Copyright (C) 2019 Pengutronix, Michael Grz

[PATCH v5 1/6] net: dsa: microchip: ksz8795: change drivers prefix to be generic

2020-12-07 Thread Michael Grzeschik
The driver can be used on other chips of this type. To reflect this we rename the drivers prefix from ksz8795 to ksz8. Signed-off-by: Michael Grzeschik --- v1 -> v4: - extracted this change from bigger previous patch v4 -> v5: - removed extra unavailable variables in ksz8_r_vlan_e

[PATCH v5 2/6] net: dsa: microchip: ksz8795: move cpu_select_interface to extra function

2020-12-07 Thread Michael Grzeschik
This patch moves the cpu interface selection code to a individual function specific for ksz8795. It will make it simpler to customize the code path for different switches supported by this driver. Signed-off-by: Michael Grzeschik --- v1 -> v5: - extracted this from previous bigger pa

[PATCH v5 0/6] microchip: add support for ksz88x3 driver family

2020-12-07 Thread Michael Grzeschik
/20200508154343.6074-1-m.grzesc...@pengutronix.de/ v4: https://lore.kernel.org/netdev/20200803054442.20089-1-m.grzesc...@pengutronix.de/ Michael Grzeschik (6): net: dsa: microchip: ksz8795: change drivers prefix to be generic net: dsa: microchip: ksz8795: move cpu_select_interface to extra function

[PATCH v5 5/6] net: dsa: microchip: Add Microchip KSZ8863 SPI based driver support

2020-12-07 Thread Michael Grzeschik
Add KSZ88X3 driver support. We add support for the KXZ88X3 three port switches using the SPI Interface. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - this glue was not implemented v2 -> v3: - this glue was part of previous bigger patch v3 -> v4: - this

[PATCH v2 02/11] net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment

2020-12-01 Thread Michael Grzeschik
The port_cnt assignment will be done again in the init function. This patch removes the previous assignment in the detect function. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - unchanged --- drivers/net/dsa/microchip/ksz8795.c

[PATCH v2 10/11] net: dsa: microchip: ksz8795: use port_cnt instead of TOTOAL_PORT_NUM

2020-12-01 Thread Michael Grzeschik
Signed-off-by: Michael Grzeschik --- v1: - based on "[PATCH v4 05/11] net: dsa: microchip: ksz8795: dynamica allocate memory for flush_dyn_mac_table" - lore: https://lore.kernel.org/netdev/20200803054442.20089-6-m.grzesc...@pengutronix.de/ v1 -> v2: - renamed patch t

[PATCH v2 08/11] net: dsa: microchip: ksz8795: align port_cnt usage with other microchip drivers

2020-12-01 Thread Michael Grzeschik
Signed-off-by: Michael Grzeschik --- v1 -> v2: - improved comment in port_cnt assignment, rather than removing it --- drivers/net/dsa/microchip/ksz8795.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microc

[PATCH v2 00/11] net: dsa: microchip: make ksz8795 driver more versatile

2020-12-01 Thread Michael Grzeschik
This series changes the ksz8795 driver to use more dynamic variables instead of static defines. The purpose is to prepare the driver to be used with other microchip switches with a similar layout. Michael Grzeschik (11): net: dsa: microchip: ksz8795: remove unused last_port variable net: dsa

[PATCH v2 03/11] net: dsa: microchip: ksz8795: move variable assignments from detect to init

2020-12-01 Thread Michael Grzeschik
This patch moves all variable assignments to the init function. It leaves the detect function for its single purpose to detect which chip version is found. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - unchanged --- drivers/net/

[PATCH v2 01/11] net: dsa: microchip: ksz8795: remove unused last_port variable

2020-12-01 Thread Michael Grzeschik
The variable last_port is not used anywhere, this patch removes it. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - unchanged --- drivers/net/dsa/microchip/ksz8795.c| 1 - drivers/net/dsa/microchip/ksz_common.h | 1 - 2 fi

[PATCH v2 05/11] net: dsa: microchip: ksz8795: use mib_cnt where possible

2020-12-01 Thread Michael Grzeschik
. Keeping it in a separate variable instead of using ARRAY_SIZE everywhere instead makes the driver more flexible for future use of devices with different amount of counters. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - fixed missing dev variable in ksz8795_get_stri

[PATCH v2 09/11] net: dsa: microchip: remove usage of mib_port_count

2020-12-01 Thread Michael Grzeschik
The variable mib_port_cnt has the same meaning as port_cnt. This driver removes the extra variable and is using port_cnt everywhere instead. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - unchanged --- drivers/net/dsa/microchip/ksz8

[PATCH v2 04/11] net: dsa: microchip: ksz8795: use reg_mib_cnt where possible

2020-12-01 Thread Michael Grzeschik
The extra define SWITCH_COUNTER_NUM is a copy of the KSZ8795_COUNTER_NUM define. This patch initializes reg_mib_cnt with KSZ8795_COUNTER_NUM, makes use of reg_mib_cnt everywhere instead and removes the extra define. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael

[PATCH v2 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-12-01 Thread Michael Grzeschik
different switches. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1: - based on "[PATCH v4 04/11] net: dsa: microchip: ksz8795: use port_cnt where possible" - lore: https://lore.kernel.org/netdev/20200803054442.20089-5-m.grzesc...@pengutronix.de

[PATCH v2 07/11] net: dsa: microchip: remove superfluous num_ports assignment

2020-12-01 Thread Michael Grzeschik
The variable num_ports is already assigned in the init function. The drivers individual init function already handles the different purpose of port_cnt vs port_cnt + 1. This patch removes the extra assignment of the variable. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik

[PATCH v2 11/11] net: dsa: microchip: ksz8795: use num_vlans where possible

2020-12-01 Thread Michael Grzeschik
The value of the define VLAN_TABLE_ENTRIES can be derived from num_vlans. This patch is using the variable num_vlans instead and removes the extra define. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - unchanged --- drivers/net/

Re: [PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-11-19 Thread Michael Grzeschik
On Thu, Nov 19, 2020 at 01:29:15AM +0100, Andrew Lunn wrote: case BR_STATE_DISABLED: data |= PORT_LEARN_DISABLE; - if (port < SWITCH_PORT_NUM) + if (port < dev->phy_port_cnt) member = 0; break; So this,

Re: [PATCH 05/11] net: dsa: microchip: ksz8795: use mib_cnt where possible

2020-11-18 Thread Michael Grzeschik
Hi Andrew! On Thu, Nov 19, 2020 at 01:20:47AM +0100, Andrew Lunn wrote: On Wed, Nov 18, 2020 at 11:03:51PM +0100, Michael Grzeschik wrote: The variable mib_cnt is assigned with TOTAL_SWITCH_COUNTER_NUM. This value can also be derived from the array size of mib_names. This patch uses this

[PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt where possible

2020-11-18 Thread Michael Grzeschik
Since the driver can be used on more switches it needs to use flexible port count where ever possible. Signed-off-by: Michael Grzeschik --- v1: - based on "[PATCH v4 04/11] net: dsa: microchip: ksz8795: use port_cnt where possible" - lore: https://lore.kernel.

[PATCH 10/11] net: dsa: microchip: ksz8795: dynamic allocate memory for flush_dyn_mac_table

2020-11-18 Thread Michael Grzeschik
To get the driver working with other chips using different port counts the dyn_mac_table should be flushed depending on the amount of physical ports. Signed-off-by: Michael Grzeschik --- v1: - based on "[PATCH v4 05/11] net: dsa: microchip: ksz8795: dynamica allocate memor

[PATCH 05/11] net: dsa: microchip: ksz8795: use mib_cnt where possible

2020-11-18 Thread Michael Grzeschik
. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c | 8 drivers/net/dsa/microchip/ksz8795_reg.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index 04a571bde7e6a4f

[PATCH 02/11] net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment

2020-11-18 Thread Michael Grzeschik
The port_cnt assignment will be done again in the init function. This patch removes the previous assignment in the detect function. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz8795.c

[PATCH 08/11] net: dsa: microchip: ksz8795: align port_cnt usage with other microchip drivers

2020-11-18 Thread Michael Grzeschik
The ksz8795 driver is using port_cnt differently to the other microchip DSA drivers. It sets it to the external physical port count, than the whole port count (including the cpu port). This patch is aligning the variables purpose with the other microchip drivers. Signed-off-by: Michael Grzeschik

[PATCH 04/11] net: dsa: microchip: ksz8795: use reg_mib_cnt where possible

2020-11-18 Thread Michael Grzeschik
The extra define SWITCH_COUNTER_NUM is a copy of the KSZ8795_COUNTER_NUM define. This patch initializes reg_mib_cnt with KSZ8795_COUNTER_NUM, makes use of reg_mib_cnt everywhere instead and removes the extra define. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c

[PATCH 01/11] net: dsa: microchip: ksz8795: remove unused last_port variable

2020-11-18 Thread Michael Grzeschik
The variable last_port is not used anywhere, this patch removes it. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c| 1 - drivers/net/dsa/microchip/ksz_common.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net

[PATCH 11/11] net: dsa: microchip: ksz8795: use num_vlans where possible

2020-11-18 Thread Michael Grzeschik
The value of the define VLAN_TABLE_ENTRIES can be derived from num_vlans. This patch is using the variable num_vlans instead and removes the extra define. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c | 2 +- drivers/net/dsa/microchip/ksz8795_reg.h | 1 - 2 files

[PATCH 09/11] net: dsa: microchip: remove usage of mib_port_count

2020-11-18 Thread Michael Grzeschik
The variable mib_port_cnt has the same meaning as port_cnt. This driver removes the extra variable and is using port_cnt everywhere instead. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c| 11 +-- drivers/net/dsa/microchip/ksz9477.c| 12

[PATCH 00/11] net: dsa: microchip: make ksz8795 driver more dynamic

2020-11-18 Thread Michael Grzeschik
This series changes the ksz8795 driver to use more dynamic variables instead of static defines. The purpose is to prepare the driver to be used with other microchip switches with a similar layout. Michael Grzeschik (11): net: dsa: microchip: ksz8795: remove unused last_port variable net: dsa

[PATCH 03/11] net: dsa: microchip: ksz8795: move variable assignments from detect to init

2020-11-18 Thread Michael Grzeschik
This patch moves all variable assignments to the init function. It leaves the detect function for its single purpose to detect which chip version is found. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[PATCH 07/11] net: dsa: microchip: remove superfluous num_ports asignment

2020-11-18 Thread Michael Grzeschik
The variable num_ports is already assigned in the init function. This patch removes the extra assignment of the variable. Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/ksz8795.c | 2 -- drivers/net/dsa/microchip/ksz9477.c | 2 -- 2 files changed, 4 deletions(-) diff --git a

[PATCH v4 02/11] dt-bindings: net: mdio-gpio: add compatible for microchip,mdio-smi0

2020-08-02 Thread Michael Grzeschik
Acked-by: Rob Herring Signed-off-by: Michael Grzeschik --- v1 -> v2: - patch not present v2 -> v3: - first patch v3 -> v4: - no changes Documentation/devicetree/bindings/net/mdio-gpio.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/mdio-gp

[PATCH v4 03/11] net: tag: ksz: Add KSZ8863 tag code

2020-08-02 Thread Michael Grzeschik
Add DSA tag code for Microchip KSZ8863 switch. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - fixed __be16 handling v2 -> v3: - no changes v3 -> v4: - changed handling to only one padding byte include/net/dsa.h | 2 ++ net/dsa/tag_k

[PATCH v4 11/11] dt-bindings: net: dsa: document additional Microchip KSZ8863/8873 switch

2020-08-02 Thread Michael Grzeschik
It is a 3-Port 10/100 Ethernet Switch. One CPU-Port and two Switch-Ports. Cc: devicet...@vger.kernel.org Reviewed-by: Andrew Lunn Acked-by: Rob Herring Signed-off-by: Michael Grzeschik --- v1 -> v3: - nothing changes - already Acked-by Rob Herring v1 -> v4: - nothing c

[PATCH v4 01/11] net: phy: Add support for microchip SMI0 MDIO bus

2020-08-02 Thread Michael Grzeschik
: Michael Grzeschik --- v1 -> v2: - patch not present v2 -> v3: - first patch v3 -> v4: - added override_c22_op drivers/net/phy/mdio-bitbang.c | 8 ++-- drivers/net/phy/mdio-gpio.c| 9 + include/linux/mdio-bitbang.h | 3 +++ 3 files changed, 18 insertions(+), 2

[PATCH v4 07/11] net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct

2020-08-02 Thread Michael Grzeschik
ter access through SMI + * + * Copyright (C) 2019 Pengutronix, Michael Grzeschik + */ + +#ifndef __KSZ8XXX_H +#define __KSZ8XXX_H + +struct ksz_regs { + int ind_ctrl_0; + int ind_data_8; + int ind_data_check; + int ind_data_hi; + int ind_data_lo; + int ind_mib_ch

[PATCH v4 06/11] net: dsa: microchip: ksz8795: change drivers prefix to be generic

2020-08-02 Thread Michael Grzeschik
The driver can be used on other chips of this type. To reflect this we rename the drivers prefix from ksz8795 to ksz8. Signed-off-by: Michael Grzeschik --- v1 -> v4: - extracted this change from bigger previous patch drivers/net/dsa/microchip/ksz8795.c |

[PATCH v4 09/11] net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support

2020-08-02 Thread Michael Grzeschik
Add KSZ88X3 driver support. We add support for the KXZ88X3 three port switches using the Microchip SMI Interface. They are supported using the MDIO-Bitbang Interface. Signed-off-by: Michael Grzeschik --- v1 -> v2: - this code was part of previuos patch v2 -> v3: - this code was p

[PATCH v4 04/11] net: dsa: microchip: ksz8795: use port_cnt where possible

2020-08-02 Thread Michael Grzeschik
Since the driver can be used on more switches it needs to use flexible port count whereever possible. Signed-off-by: Michael Grzeschik --- v1 -> v4: - extracted this change from bigger previous patch drivers/net/dsa/microchip/ksz8795.c | 16 1 file changed, 8 insertions(+)

[PATCH v4 10/11] net: dsa: microchip: Add Microchip KSZ8863 SPI based driver support

2020-08-02 Thread Michael Grzeschik
Add KSZ88X3 driver support. We add support for the KXZ88X3 three port switches using the SPI Interface. Signed-off-by: Michael Grzeschik --- v1 -> v2: - this glue was not implemented v2 -> v3: - this glue was part of previous bigger patch v3 -> v4: - this glue was moved to this separ

[PATCH v4 08/11] net: dsa: microchip: ksz8795: add support for ksz88xx chips

2020-08-02 Thread Michael Grzeschik
We add support for the ksz8863 and ksz8873 chips which are using the same register patterns but other offsets as the ksz8795. Signed-off-by: Michael Grzeschik --- v1 -> v4: - extracted this change from bigger previous patch drivers/net/dsa/microchip/ksz8795.c |

[PATCH v4 00/11] microchip: add support for ksz88x3 driver family

2020-08-02 Thread Michael Grzeschik
): net: phy: Add support for microchip SMI0 MDIO bus Michael Grzeschik (10): dt-bindings: net: mdio-gpio: add compatible for microchip,mdio-smi0 net: tag: ksz: Add KSZ8863 tag code net: dsa: microchip: ksz8795: use port_cnt where possible net: dsa: microchip: ksz8795: dynamic allocate memory

[PATCH v4 05/11] net: dsa: microchip: ksz8795: dynamic allocate memory for flush_dyn_mac_table

2020-08-02 Thread Michael Grzeschik
To get the driver working with other chips using different port counts the dyn_mac_table should be flushed depending on the amount of physical ports. Signed-off-by: Michael Grzeschik --- v1 -> v4: - extracted this change from bigger previous patch drivers/net/dsa/microchip/ksz8795.c

Re: [PATCH v3 1/5] net: phy: Add support for microchip SMI0 MDIO bus

2020-05-11 Thread Michael Grzeschik
On Sat, May 09, 2020 at 10:28:05AM -0700, Florian Fainelli wrote: On 5/8/2020 8:43 AM, Michael Grzeschik wrote: From: Andrew Lunn SMI0 is a mangled version of MDIO. The main low level difference is the MDIO C22 OP code is always 0, not 0x2 or 0x1 for Read/Write. The read/write information

Re: [PATCH v3 4/5] ksz: Add Microchip KSZ8863 SMI/SPI based driver support

2020-05-11 Thread Michael Grzeschik
On Sat, May 09, 2020 at 06:56:56PM +0200, Andrew Lunn wrote: On Fri, May 08, 2020 at 05:43:42PM +0200, Michael Grzeschik wrote: Add KSZ88X3 driver support. We add support for the KXZ88X3 three port switches using the Microchip SMI Interface. They are currently only supported using the MDIO

Re: [PATCH v3 3/5] net: tag: ksz: Add KSZ8863 tag code

2020-05-11 Thread Michael Grzeschik
On Sat, May 09, 2020 at 06:41:05PM +0200, Andrew Lunn wrote: +/* For ingress (Host -> KSZ8863), 1 byte is added before FCS. + * --- + * DA(6bytes)|SA(6bytes)||Data(nbytes)|tag0(1byte)|tag1(1byte)|FCS(4bytes) + * -

[PATCH v3 5/5] dt-bindings: net: dsa: document additional Microchip KSZ8863/8873 switch

2020-05-08 Thread Michael Grzeschik
It is a 3-Port 10/100 Ethernet Switch. One CPU-Port and two Switch-Ports. Cc: devicet...@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Michael Grzeschik --- v1 -> v3: - nothing changes - already Acked-by Rob Herring Documentation/devicetree/bindings/net/dsa/ksz.txt | 2 ++

[PATCH v3 1/5] net: phy: Add support for microchip SMI0 MDIO bus

2020-05-08 Thread Michael Grzeschik
: Michael Grzeschik --- drivers/net/phy/mdio-bitbang.c | 7 ++- drivers/net/phy/mdio-gpio.c| 13 + include/linux/mdio-bitbang.h | 2 ++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c index

[PATCH v3 2/5] dt-bindings: net: mdio-gpio: add compatible for microchip,mdio-smi0

2020-05-08 Thread Michael Grzeschik
Microchip SMI0 Mode is a special mode, where the MDIO Read/Write commands are part of the PHY Address and the OP Code is always 0. We add the compatible for this special mode of the bitbanged mdio driver. Cc: devicet...@vger.kernel.org Signed-off-by: Michael Grzeschik --- Documentation

[PATCH v3 0/5] microchip: add support for ksz88x3 driver family

2020-05-08 Thread Michael Grzeschik
): net: phy: Add support for microchip SMI0 MDIO bus Michael Grzeschik (4): dt-bindings: net: mdio-gpio: add compatible for microchip,mdio-smi0 net: tag: ksz: Add KSZ8863 tag code ksz: Add Microchip KSZ8863 SMI/SPI based driver support dt-bindings: net: dsa: document additional Microchip

[PATCH v3 4/5] ksz: Add Microchip KSZ8863 SMI/SPI based driver support

2020-05-08 Thread Michael Grzeschik
. Signed-off-by: Michael Grzeschik --- RFC -> v1: - added Microchip SMI to description - added select MDIO_BITBANG - added return error code handling in mdiobus_read/write - fixed the stp state handling - moved tag handling code to seperate patch

[PATCH v3 3/5] net: tag: ksz: Add KSZ8863 tag code

2020-05-08 Thread Michael Grzeschik
Add DSA tag code for Microchip KSZ8863 switch. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik --- v1 -> v2: - fixed __be16 handling v2 -> v3: - nothing include/net/dsa.h | 2 ++ net/dsa/tag_ksz.c | 57 +++ 2 files chang

Re: [PATCH] arcnet: provide a buffer big enough to actually receive packets

2019-09-23 Thread Michael Grzeschik
al > size. > > The problem was noticed by the stack protector which makes the kernel > oops. > > Cc: sta...@vger.kernel.org # v2.4.0+ > Signed-off-by: Uwe Kleine-König Acked-by: Michael Grzeschik > --- > Hello, > > the problem exists in v2.4.0 already, I didn't

Re: ARCNET Contemporary Controls PCI20EX PCIe Card

2019-05-17 Thread Michael Grzeschik
On Fri, May 17, 2019 at 07:03:19PM +, Kenton, Stephen M. wrote: > I've got some old optical (as in eyeglasses) equipment that only talks > over ARCNET that I want to get up and running. The PEX PCIe-to-PCI > bridge is on the card with the SMC COM20022 and lspci sees them > > 02:00.0 PCI brid

Re: [RFC 2/3] ksz: Add Microchip KSZ8873 SMI-DSA driver

2019-05-10 Thread Michael Grzeschik
On Thu, May 09, 2019 at 04:48:44PM +0200, Andrew Lunn wrote: > On Wed, May 08, 2019 at 11:13:29PM +0200, Michael Grzeschik wrote: > > Cc: tristram...@microchip.com > > Signed-off-by: Michael Grzeschik > > --- > > drivers/net/dsa/microchip/Kconfig | 16 + >

Re: [RFC 1/3] mdio-bitbang: add SMI0 mode support

2019-05-10 Thread Michael Grzeschik
On Thu, May 09, 2019 at 04:29:25PM +0200, Andrew Lunn wrote: > On Wed, May 08, 2019 at 11:13:28PM +0200, Michael Grzeschik wrote: > > Some microchip phys support the Serial Management Interface Protocol > > (SMI) for the configuration of the extended register set. We add > >

[RFC 2/3] ksz: Add Microchip KSZ8873 SMI-DSA driver

2019-05-08 Thread Michael Grzeschik
Cc: tristram...@microchip.com Signed-off-by: Michael Grzeschik --- drivers/net/dsa/microchip/Kconfig | 16 + drivers/net/dsa/microchip/Makefile |2 + drivers/net/dsa/microchip/ksz8863.c | 1026 +++ drivers/net/dsa/microchip/ksz8863_reg.h | 605

[RFC 3/3] dt-bindings: net: dsa: document additional Microchip KSZ8863 family switches

2019-05-08 Thread Michael Grzeschik
Document additional Microchip KSZ8863 family switches. Show how KSZ8863 switch should be configured as the host port is port 3. Cc: devicet...@vger.kernel.org Signed-off-by: Michael Grzeschik --- .../devicetree/bindings/net/dsa/ksz.txt | 44 +++ 1 file changed, 44

[RFC 1/3] mdio-bitbang: add SMI0 mode support

2019-05-08 Thread Michael Grzeschik
: Sam Ravnborg Signed-off-by: Michael Grzeschik --- drivers/net/phy/mdio-bitbang.c | 10 ++ include/linux/phy.h| 12 2 files changed, 22 insertions(+) diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c index 5136275c8e739..a978f8a9a172b

[RFC 0/3] microchip: add support for ksz8863 driver family

2019-05-08 Thread Michael Grzeschik
the stack was bootet and configured appropriate via: ip link add name br0 type bridge ip link set dev eth1 master br0 ip link set dev eth2 master br0 @Tristam: Could you have a look if something obious was misconfigured? Michael Grzeschik (3): mdio-bitbang: add SMI0 mode support ksz: Add

LinkMD Feature on KSZ8873MLL

2019-02-04 Thread Michael Grzeschik
Hi Nicolas We are currently debugging an issue with the KSZ8873 with the LinkMD Feature to measure Cable-Failures. We implemented all steps described in corresponding section of the Datasheet: 3.1.12 LINKMD ® CABLE DIAGNOSTICS It is also already clear that this feature is only available to the

Re: TJA1100 100Base-T1 PHY features via ethtool?

2018-08-14 Thread Michael Grzeschik
On Mon, Aug 13, 2018 at 12:53:35PM -0700, Florian Fainelli wrote: > On 08/13/2018 12:35 PM, Michael Grzeschik wrote: > > Hi David, > > > > I use a special 100Base-T1 phy (NXP TJA1100 [1]) that has some features > > like: > > > > - enabling/dis

TJA1100 100Base-T1 PHY features via ethtool?

2018-08-13 Thread Michael Grzeschik
Hi David, I use a special 100Base-T1 phy (NXP TJA1100 [1]) that has some features like: - enabling/disabling test modes - fault detection - switching managed/autonomous mode - signal quality indication - ... I already implemented the support of the features with the ethtool --get/set-phy-tunable

[PATCH v2 0/2] net: macb: add error handling on probe and

2017-11-08 Thread Michael Grzeschik
This series adds more error handling to the macb driver. Michael Grzeschik (2): net: macb: add of_phy_deregister_fixed_link to error paths net: macb: add of_node_put to error paths drivers/net/ethernet/cadence/macb_main.c | 9 + 1 file changed, 9 insertions(+) -- 2.11.0

[PATCH v2 1/2] net: macb: add of_phy_deregister_fixed_link to error paths

2017-11-08 Thread Michael Grzeschik
We add the call of_phy_deregister_fixed_link to all associated error paths for memory clean up. Signed-off-by: Michael Grzeschik --- v2: removed extra parenthesis drivers/net/ethernet/cadence/macb_main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/cadence

[PATCH v2 2/2] net: macb: add of_node_put to error paths

2017-11-08 Thread Michael Grzeschik
We add the call of_node_put(bp->phy_node) to all associated error paths for memory clean up. Signed-off-by: Michael Grzeschik --- v2: removed extra of_node_put from macb_remove drivers/net/ethernet/cadence/macb_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ether

Re: [PATCH 1/2] net: macb: add of_phy_deregister_fixed_link to error paths

2017-11-08 Thread Michael Grzeschik
On Wed, Nov 08, 2017 at 01:22:57PM +0900, David Miller wrote: > From: Michael Grzeschik > Date: Mon, 6 Nov 2017 12:10:04 +0100 > > > We add the call of_phy_deregister_fixed_link to all associated > > error paths for memory clean up. > > > >

[PATCH v2] net: macb: add of_node_put to error paths

2017-11-07 Thread Michael Grzeschik
We add the call of_node_put(bp->phy_node) to all associated error paths for memory clean up. Signed-off-by: Michael Grzeschik --- v1 -> v2: removed extra of_node_put from macb_remove drivers/net/ethernet/cadence/macb_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

Re: [PATCH 2/2] net: macb: add of_node_put to error paths

2017-11-07 Thread Michael Grzeschik
On Tue, Nov 07, 2017 at 10:27:20AM +0100, Nicolas Ferre wrote: > On 06/11/2017 at 12:10, Michael Grzeschik wrote: > > We add the call of_node_put(bp->phy_node) to all associated error > > paths for memory clean up. > > > > Signed-off-by: Michael Grzeschik >

[PATCH 2/2] net: macb: add of_node_put to error paths

2017-11-06 Thread Michael Grzeschik
We add the call of_node_put(bp->phy_node) to all associated error paths for memory clean up. Signed-off-by: Michael Grzeschik --- drivers/net/ethernet/cadence/macb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ether

[PATCH 1/2] net: macb: add of_phy_deregister_fixed_link to error paths

2017-11-06 Thread Michael Grzeschik
We add the call of_phy_deregister_fixed_link to all associated error paths for memory clean up. Signed-off-by: Michael Grzeschik --- drivers/net/ethernet/cadence/macb_main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net

[PATCH 1/4] arcnet: add err_skb package for package status feedback

2017-06-28 Thread Michael Grzeschik
We need to track the status of our queued packages. This way the driving process knows if failed packages need to be retransmitted. For this purpose we queue the transferred/failed packages back into the err_skb message queue added with some status information. Signed-off-by: Michael Grzeschik

[PATCH 2/4] arcnet: com20020-pci: add attribute to readback backplane status

2017-06-28 Thread Michael Grzeschik
We add the sysfs interface the read back the backplane status of the interface. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020

[PATCH 0/4] arcnet: Collection of latest features

2017-06-28 Thread Michael Grzeschik
extra sysfs attribute. In the last patch we add another card type PCIFB2. Michael Grzeschik (4): arcnet: add err_skb package for package status feedback arcnet: com20020-pci: add attribute to readback backplane status arcnet: com20020-pci: handle backplane mode depending on card type arcnet

[PATCH 3/4] arcnet: com20020-pci: handle backplane mode depending on card type

2017-06-28 Thread Michael Grzeschik
We read the backplane mode of each subcard from bits 2 and 3 of the misc register. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c index

[PATCH 4/4] arcnet: com20020-pci: add support for PCIFB2 card

2017-06-28 Thread Michael Grzeschik
We add support for the PCIFB2 card from EAE. Beside other cards, this card has the backplane mode enabled by default. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/net

[PATCH 1/5] arcnet: change irq handler to lock irqsave

2017-06-28 Thread Michael Grzeschik
(sock_sendmsg) from [] (SyS_sendto+0xb8/0xe0) [ 42.213978] [] (SyS_sendto) from [] (SyS_send+0x18/0x20) [ 42.221388] [] (SyS_send) from [] (ret_fast_syscall+0x0/0x1c) Signed-off-by: Michael Grzeschik --- v1 -> v2: removed unneeded zero assignment of flags --- drivers/net/arcnet/arc

[PATCH 0/5] arcnet: Collection of latest fixes

2017-06-28 Thread Michael Grzeschik
missing assignments that improves the code footprint. Colin Ian King (1): Trivial fix to spelling mistake in arc_printk message Michael Grzeschik (4): arcnet: change irq handler to lock irqsave arcnet: com20020: remove needless base_addr assignment arcnet: com20020-pci: fix dev_id

[PATCH 3/5] arcnet: com20020: remove needless base_addr assignment

2017-06-28 Thread Michael Grzeschik
The assignment is superfluous. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c index 13d9ad4b3f5c9..78043a9c5981e 100644 --- a/drivers/net/arcnet/com20020.c

[PATCH 4/5] arcnet: com20020-pci: fix dev_id calculation

2017-06-28 Thread Michael Grzeschik
The dev_id was miscalculated. Only the two bits 4-5 are relevant for the MA1 card. PCIARC1 and PCIFB2 use the four bits 4-7 for id selection. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 5/5] arcnet: com20020-pci: add missing pdev setup in netdev structure

2017-06-28 Thread Michael Grzeschik
We add the pdev data to the pci devices netdev structure. This way the interface get consistent device names in the userspace (udev). Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/arcnet/com20020-pci.c b

[PATCH 2/5] Trivial fix to spelling mistake in arc_printk message

2017-06-28 Thread Michael Grzeschik
From: Colin Ian King Signed-off-by: Colin Ian King Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/capmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c index a80f4eb9262d5..b780be6f41ff9 100644 --- a

Re: [GIT PULL] arcnet: fixes and features

2017-06-28 Thread Michael Grzeschik
Hi, On Fri, Jun 23, 2017 at 01:54:03PM -0400, David Miller wrote: > From: Michael Grzeschik > Date: Thu, 22 Jun 2017 17:31:02 +0200 > > > are available in the git repository at: > > > > pub...@git.pengutronix.de:/mgr/linux.git tags/arcnet-for-mainline > >

Re: [PATCH] arcnet: fix spelling mistake "Ackknowledge" -> "Acknowledge"

2017-06-26 Thread Michael Grzeschik
On Sun, Jun 25, 2017 at 10:15:06PM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in arc_printk message > > Signed-off-by: Colin Ian King > --- > drivers/net/arcnet/capmode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/

[PATCH v2] net: macb: add fixed-link node support

2017-06-23 Thread Michael Grzeschik
In case the MACB is directly connected to a non-mdio PHY/device, it should be possible to provide a fixed link configuration in the DT. Signed-off-by: Michael Grzeschik --- v1 -> v2: - moved of_phy_connect case and phy_connect_direct into if else cases - mo

[PATCH 8/8] arcnet: com20020-pci: add support for PCIFB2 card

2017-06-22 Thread Michael Grzeschik
We add support for the PCIFB2 card from EAE. Beside other cards, this card has the backplane mode enabled by default. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/net

[PATCH 7/8] arcnet: com20020-pci: handle backplane mode depending on card type

2017-06-22 Thread Michael Grzeschik
We read the backplane mode of each subcard from bits 2 and 3 of the misc register. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c index

[PATCH 4/8] arcnet: com20020-pci: add missing pdev setup in netdev structure

2017-06-22 Thread Michael Grzeschik
We add the pdev data to the pci devices netdev structure. This way the interface get consistent device names in the userspace (udev). Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/arcnet/com20020-pci.c b

[PATCH 3/8] arcnet: com20020: remove needless base_addr assignment

2017-06-22 Thread Michael Grzeschik
The assignment is superfluous. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c index 13d9ad4b3f5c9..78043a9c5981e 100644 --- a/drivers/net/arcnet/com20020.c

[PATCH 5/8] arcnet: com20020-pci: fix dev_id calculation

2017-06-22 Thread Michael Grzeschik
The dev_id was miscalculated. Only the two bits 4-5 are relevant for the MA1 card. PCIARC1 and PCIFB2 use the four bits 4-7 for id selection. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 1/8] arcnet: change irq handler to lock irqsave

2017-06-22 Thread Michael Grzeschik
(sock_sendmsg) from [] (SyS_sendto+0xb8/0xe0) [ 42.213978] [] (SyS_sendto) from [] (SyS_send+0x18/0x20) [ 42.221388] [] (SyS_send) from [] (ret_fast_syscall+0x0/0x1c) Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/arcnet.c | 7 --- 1 file changed, 4 insertions(+), 3 deletion

[GIT PULL] arcnet: fixes and features

2017-06-22 Thread Michael Grzeschik
Michael Grzeschik (8): arcnet: change irq handler to lock irqsave arcnet: add err_skb package for package status feedback arcnet: com20020: remove needless base_addr assignment arcnet: com20020-pci: add missing pdev setup in netdev structure arcnet: com20020-pci: fix

[PATCH 2/8] arcnet: add err_skb package for package status feedback

2017-06-22 Thread Michael Grzeschik
We need to track the status of our queued packages. This way the driving process knows if failed packages need to be retransmitted. For this purpose we queue the transferred/failed packages back into the err_skb message queue added with some status information. Signed-off-by: Michael Grzeschik

[PATCH 6/8] arcnet: com20020-pci: add attribute to readback backplane status

2017-06-22 Thread Michael Grzeschik
We add the sysfs interface the read back the backplane status of the interface. Signed-off-by: Michael Grzeschik --- drivers/net/arcnet/com20020-pci.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020

Re: [PATCH] net: macb: add fixed-link node support

2017-06-20 Thread Michael Grzeschik
Hi Nicolas, On Mon, Jun 19, 2017 at 12:54:10PM +0200, Nicolas Ferre wrote: > Le 16/06/2017 à 10:55, Michael Grzeschik a écrit : > > In case the MACB is directly connected to a > > non-mdio PHY/device, it should be possible to provide > > a fixed link configuration in the DT

  1   2   >