Re: [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch

2023-08-11 Thread Ahmad Fatoum
On 11.08.23 13:53, Oleksij Rempel wrote: > Add support for Microchip KSZ9893 switch. No additional changes seems to > be needed. > > Signed-off-by: Oleksij Rempel Reviewed-by: Ahmad Fatoum > --- > drivers/net/ksz9477.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH v1] ARM: add Skov i'MX8MP based board support

2023-08-11 Thread Ahmad Fatoum
Hello Oleksij, On 11.08.23 13:48, Oleksij Rempel wrote: > Add support for the Skov i'MX8MP based system. > > Signed-off-by: Oleksij Rempel Reviewed-by: Ahmad Fatoum with change request in last paragraph below adressed. > +static int skov_imx8m_probe(struct device *dev) > +{ > + int

[PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch

2023-08-11 Thread Oleksij Rempel
Add support for Microchip KSZ9893 switch. No additional changes seems to be needed. Signed-off-by: Oleksij Rempel --- drivers/net/ksz9477.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c index 61142aa97b..a6a8144479 100644 ---

[PATCH v1 2/2] net: ksz9477: do not advertise EEE support

2023-08-11 Thread Oleksij Rempel
Do not advertise EEE support for all ksz9477 based chips. EEE needs proper handling which we can't guarantee with limited resources. At same time remove wrong comment and Gbit check. EEE is not coupled to Gbit and KSZ8565 supports EEE as well. So, it seems like there is nothing right on this

[PATCH v1] ARM: add Skov i'MX8MP based board support

2023-08-11 Thread Oleksij Rempel
Add support for the Skov i'MX8MP based system. Signed-off-by: Oleksij Rempel --- arch/arm/boards/Makefile |1 + arch/arm/boards/skov-imx8m/Makefile |4 + arch/arm/boards/skov-imx8m/board.c| 42 + .../flash-header-skov-imx8mp.imxcfg

[PATCH v2 07/11] net: phy: replace phy_{write,read,modify}_mmd_indirect with phy_{write,read,modify}_mmd

2023-08-11 Thread Marco Felsch
Make use of the phy_{write,read,modify}_mmd API to align the code with Linux. This also fixes the r8169 driver since this driver did not adapt the parameters while porting from Linux. Signed-off-by: Marco Felsch --- v2: - replace phy_*_mmd_indirect with phy_*_mmd

[PATCH v2 10/11] net: phy: at803x: add disable hibernation mode support

2023-08-11 Thread Marco Felsch
This commit is based on Linux commit: | commit 9ecf04016c87bcb33b44e24489d33618e2592f41 | Author: Wei Fang | Date: Thu Aug 18 11:00:54 2022 +0800 | | net: phy: at803x: add disable hibernation mode support | | When the cable is unplugged, the Atheros AR803x PHYs will enter |

[PATCH v2 04/11] net: phy: mmd_phy_indirect: align parameters with Linux

2023-08-11 Thread Marco Felsch
Switch the prtad and devad to align it with Linux to make porting from Linux less error prone. While on it rename prtad with regnum. Signed-off-by: Marco Felsch --- v2: - new patch drivers/net/phy/phy.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v2 05/11] net: phy: add phydev_{err,err_probe,info,warn,dbg} macros

2023-08-11 Thread Marco Felsch
Import Linux macros to make it easier to port drivers to barebox. Signed-off-by: Marco Felsch Reviewed-by: Ahmad Fatoum --- v2: - add afa's rb include/linux/phy.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index

[PATCH v2 01/11] ARM: boards: make use of MDIO_MMD register defines

2023-08-11 Thread Marco Felsch
Make use of the register definition instead of having magic numbers. No functional change. Signed-off-by: Marco Felsch Reviewed-by: Ahmad Fatoum --- v2: - added afa's rb arch/arm/boards/datamodul-edm-qmx6/board.c | 7 --- arch/arm/boards/embest-marsboard/board.c | 7 ---

[PATCH v2 11/11] net: phy: at803x: disable extended next page bit

2023-08-11 Thread Marco Felsch
This commit ports Linux commit: | commit 3c51fa5d2afe7a4909b53af5019635326389dd29 | Author: Russell King | Date: Tue Jan 12 22:59:43 2021 + | | net: phy: ar803x: disable extended next page bit | | This bit is enabled by default and advertises support for extended | next page

[PATCH v2 08/11] net: phy: add deprecation warning to phy_{read,write,modify}_mmd_indirect

2023-08-11 Thread Marco Felsch
Add deprecation warnings and point to the new APIs user should use instead. Signed-off-by: Marco Felsch --- v2: - new patch drivers/net/phy/phy.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 4cabb436e461..ad02732ff93b 100644

[PATCH v2 06/11] net: phy: import phy_{read,write,modify}_mmd helpers from Linux

2023-08-11 Thread Marco Felsch
Linux have added helper functions to access and modify the mmd registers. The helpers are clause22/45 agnostic and can handle both the same way. Since barebox does not have clause45 support we need to inform the user that this is not supported at the moment. Therefore we also need the is_c45 flag

[PATCH v2 03/11] net: phy: fix struct member comments

2023-08-11 Thread Marco Felsch
Nothing special just add the missing @ which is useful for the documentation generation. Signed-off-by: Marco Felsch --- v2: - new patch include/linux/phy.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/phy.h b/include/linux/phy.h index

[PATCH v2 02/11] net: phy: micrel: make use of MDIO_MMD register defines

2023-08-11 Thread Marco Felsch
Make use of the register definition instead of having magic numbers. No functional change. Signed-off-by: Marco Felsch Reviewed-by: Ahmad Fatoum --- v2: - added afa's rb drivers/net/phy/micrel.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH v2 09/11] net: phy: at803x: disable SmartEEE

2023-08-11 Thread Marco Felsch
The SmartEEE functionality can cause strange connection issues. Disable it unconditional and leave it to the OS to enable it again. Signed-off-by: Marco Felsch --- v2: - always disable smarteee (afa) - adapt commit message drivers/net/phy/at803x.c | 19 ++- 1 file changed, 18

[PATCH 4/5] net: designware: eqos: fix NULL pointer dereference on LLDP packets

2023-08-11 Thread Oleksij Rempel
If promisc mode is enabled (which is enabled for DSA switches by default) a LLDP frame received by barebox will trigger following panic: DABT (current EL) exception (ESR 0x9600014b) at 0x elr: bfd967d8 lr : bfd963e0 x0 : x1 : 00e9 x2

[PATCH 3/5] net: designware: eqos: add comment about external clock dependencies for the soft reset

2023-08-11 Thread Oleksij Rempel
This part of code is not error proof and may fail depending on implementation state of external HW. I hope this note help to find bugs later. Signed-off-by: Oleksij Rempel --- drivers/net/designware_eqos.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/designware_eqos.c

[PATCH 2/5] net: designware: eqos: fix non-working promisc mode when set before interface start

2023-08-11 Thread Oleksij Rempel
Promisc mode is not working if set before starting interface. This seen more with DSA switch driver when having many interfaces and different MACs. Make promisc mode work by saving configs before soft reset, then use them after reset. Signed-off-by: Oleksij Rempel ---

[PATCH 1/5] net: designware: eqos: initialize MAC address specific DMA channel configuration

2023-08-11 Thread Oleksij Rempel
Make sure we use predictable DMA Channel Select configuration. Otherwise bad thins may happen. So fart this fix is not related to any know issue and was noticed by investigating other bugs. Signed-off-by: Oleksij Rempel --- drivers/net/designware_eqos.c | 5 + 1 file changed, 5

[PATCH 5/5] net: designware: eqos: do not receive pause frames

2023-08-11 Thread Oleksij Rempel
Normally we need to care only about packets with not local MAC address destination. It is needed to support HW setups with multiple MAC addresses forwarded over one MAC. For example systems using DSA switch as port multiplexer. In this case one single MAC should handle packets with different MAC