Re: [PATCH 2/7] realtek: rtl83xx-phy: decouple RTL8214FC media change and power config

2022-07-23 Thread Birger Koblitz
On 7/23/22 22:53, Jan Hoffmann wrote: Move RTL8214FC power configuration to newly created suspend and resume methods. A media change now only results in power configuration if the PHY is not suspended, to avoid powering up a port when the interface is currently not up. While at it, remove the rt

Re: [PATCH 4/7] realtek: clean up rtl838x MDIO busy wait loop

2022-07-23 Thread Birger Koblitz
On 7/23/22 22:53, Jan Hoffmann wrote: Don't use udelay to allow other kernel tasks to execute if the kernel has been built without preemption. Also determine the timeout based on jiffies instead of loop iterations. Tested on a D-Link DGS-1210-16. ___

Re: [PATCH 3/7] realtek: add SFP support for RTL8214FC PHY

2022-07-23 Thread Birger Koblitz
On 7/23/22 22:53, Jan Hoffmann wrote: Probe the SFP module during PHY initialization and implement insertion/removal handlers to automatically configure the media type of the respective port. Tested on a D-Link DGS-1210-16, which however needs updated .dts to make use of this feature. __

Re: Question about ancient TARGET_CFLAGS in rules.mk?

2022-07-23 Thread Jo-Philipp Wich
Hi, > I mean I know they are gigantic corner case where you can build an entire > house in the corner... But what are the drawbacks of such small fix? The > NULL check one for example seems pretty important... Adding that null check there seems redundant, any code path that could lead to blob_n

[PATCH 7/7] realtek: add support for HPE 1920 series

2022-07-23 Thread Jan Hoffmann
Hardware information: - - HPE 1920-8G: - RTL8380 SoC - 8 Gigabit RJ45 ports (built-in RTL8218B) - 2 SFP ports (built-in SerDes) - HPE 1920-16G / HPE 1920-24G (same board): - RTL8382 SoC - 16/24 Gigabit RJ45 ports (built-in RTL8218B, 1/2 external RTL8218D) - 4 SFP p

[PATCH 5/7] kernel: mtdsplit: add support for H3C VFS filesystem

2022-07-23 Thread Jan Hoffmann
The bootloader on some H3C devices (for example HPE 1920 switches) only supports booting from flash by reading an image from an "VFS" filesystem which spans most of the available flash. The filesystem size is hard- coded in the bootloader. However, as long as no write operations are performed in th

[PATCH 6/7] tools: add 7z host package

2022-07-23 Thread Jan Hoffmann
Add the 7zr command line tool, which is a version of the 7z application that only supports 7z archives. 7z is one of the two compression formats supported in H3C firmware images (the alternative would be ARJ). (Alternatively, the 7zr command line tool could also be built from a current version of

[PATCH 4/7] realtek: clean up rtl838x MDIO busy wait loop

2022-07-23 Thread Jan Hoffmann
Don't use udelay to allow other kernel tasks to execute if the kernel has been built without preemption. Also determine the timeout based on jiffies instead of loop iterations. This is especially important on devices containing a watchdog with a short timeout. Without this change, the watchdog is

[PATCH 1/7] realtek: rtl83xx-phy: fix RTL8214FC media change

2022-07-23 Thread Jan Hoffmann
Toggle power on the individual PHY instead of the package. Otherwise a media change always toggles power on the first port, and not the one that is being configured. Signed-off-by: Jan Hoffmann --- .../files-5.10/drivers/net/phy/rtl83xx-phy.c | 32 +-- 1 file changed, 16 inserti

[PATCH 2/7] realtek: rtl83xx-phy: decouple RTL8214FC media change and power config

2022-07-23 Thread Jan Hoffmann
Move RTL8214FC power configuration to newly created suspend and resume methods. A media change now only results in power configuration if the PHY is not suspended, to avoid powering up a port when the interface is currently not up. While at it, remove the rtl8380 prefix from function names, as thi

[PATCH 3/7] realtek: add SFP support for RTL8214FC PHY

2022-07-23 Thread Jan Hoffmann
Probe the SFP module during PHY initialization and implement insertion/removal handlers to automatically configure the media type of the respective port. Suggested-by: Birger Koblitz Signed-off-by: Jan Hoffmann --- .../files-5.10/drivers/net/phy/rtl83xx-phy.c | 26 ++- 1 file c

[PATCH 0/7] realtek: add HPE 1920 support

2022-07-23 Thread Jan Hoffmann
This adds support for three switches from the HPE 1920 series. It has been tested on HPE 1920-8G and HPE 1920-16G. Support for HPE 1920-24G is also included, as it uses the same board as the 16-port model. The patch series depends on the firmware-utils patch adding the mkh3cimg and mkh3cvfs tools

[PATCH firmware-utils] mkh3cimg/mkh3cvfs: add image/filesystem tools for H3C devices

2022-07-23 Thread Jan Hoffmann
mkh3cimg creates a firmware image. Firmware images for these devices can contain multiple files, but this tool is limited to creating images with a single application file. In the case of OpenWrt, this is going to contain the kernel image. Compressed files are supported by the image format, in this