[PATCH 1/8] net: dc2114x: add support for platforms that don't have pci controllers

2024-08-09 Thread Hanyuan Zhao
There're a few ethernet IP cores which have the same functions with dc2114x, and can be connected to CPU by AXI or other buses. This commit adds support for the platforms that do not have PCI controllers, using MMIO to communicate with the dc2114x IP core. Signed-off-by: Hanyuan

[PATCH 8/8] net: dc2114x: remove the pass all multicast flag in operation mode settings

2024-08-09 Thread Hanyuan Zhao
e. Signed-off-by: Hanyuan Zhao --- drivers/net/dc2114x.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index 11dea9b4d7..e1edda8e19 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net/dc2114x.c @@ -437,7 +437,16 @@

[PATCH 6/8] net: dc2114x: allow users to decide whether to detect the tx No Carrier errors

2024-08-09 Thread Hanyuan Zhao
Some IP cores of dc2114x or its variants do not comply so well with the behaviors described by the official document. A packet could be sent successfully but reported with No Carrier error. Latest drivers of this IP core have not detect this error anymore. Signed-off-by: Hanyuan Zhao

[PATCH 7/8] net: dc2114x: allow users to decide how to tx packets according to IP core

2024-08-09 Thread Hanyuan Zhao
prevent this bug if you are using IP cores with this issue, by using multiple tx descriptors and organizing them as a real well-defined ring buffer. Signed-off-by: Hanyuan Zhao --- drivers/net/Kconfig | 13 + drivers/net/dc2114x.c | 17 - 2 files changed, 29

[PATCH 5/8] net: dc2114x: remove unused lines and change the var and print types

2024-08-09 Thread Hanyuan Zhao
This commit fixes a problem that even though the network card does not report any issues in transmitting a setup frame, the driver prints the error status every time. Let's set it for debug use. Signed-off-by: Hanyuan Zhao --- drivers/net/dc2114x.c | 13 ++--- 1 file chang

[PATCH 4/8] net: dc2114x: add support for CPUs that have cache between the memory and the card

2024-08-09 Thread Hanyuan Zhao
. Signed-off-by: Hanyuan Zhao --- drivers/net/dc2114x.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index cf9f78163a..0b3000cc1d 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net/dc2114x.c @@ -1,6

[PATCH 2/8] net: dc2114x: get mac address from environment

2024-08-09 Thread Hanyuan Zhao
Let this old driver work like the other newer network card drivers, loading the MAC address from environment, which could be more flexible to set. Signed-off-by: Hanyuan Zhao --- drivers/net/dc2114x.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 3/8] net: dc2114x: set the card number to start at zero

2024-08-09 Thread Hanyuan Zhao
Otherwise the number might get kind of weird. Signed-off-by: Hanyuan Zhao --- drivers/net/dc2114x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index 7f0715429f..cf9f78163a 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net

[PATCH 1/1] riscv: add NULL check before calling strlen in the riscv cpu's get_desc()

2024-05-06 Thread Hanyuan Zhao
. Signed-off-by: Hanyuan Zhao --- drivers/cpu/riscv_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c index 9b1950efe0..d39a943cb8 100644 --- a/drivers/cpu/riscv_cpu.c +++ b/drivers/cpu/riscv_cpu.c @@ -24,7 +24,7 @@ static

[PATCH v3 3/3] cli: compile history code if and only if history config is selected

2024-03-04 Thread Hanyuan Zhao
CMD_HISTORY. Signed-off-by: Hanyuan Zhao --- This is v3 of patch series cli: allow users to disable history if unused at all. Please ignore the v2 version. --- Changes v1 -> v3: - Move the #ifdef CONFIG_CMD_HISTORY directives to this patch. These directives are still necessary when users

[PATCH v3 2/3] cli: allow users to determine history buffer allocation method

2024-03-04 Thread Hanyuan Zhao
we provide the users with both the two options. Signed-off-by: Hanyuan Zhao --- This is v3 of patch series cli: allow users to disable history if unused at all. Please ignore the v2 version. --- Changes v1 -> v3: - Add more detailed information about the CMD_HISTORY_USE_CALLOC option both

[PATCH v3 1/3] cli: panic when failed to allocate memory for the history buffer

2024-03-04 Thread Hanyuan Zhao
error information instead. Signed-off-by: Hanyuan Zhao --- This is v3 of patch series cli: allow users to disable history if unused at all. Please ignore the v2 version. --- Changes v1 -> v3: - Separate the first patch and let this patch be the panic one. --- common/cli_readline.c | 2 +-

[PATCH v2 1/1] cli: compile history code if and only if history config is selected

2024-03-04 Thread Hanyuan Zhao
CMD_HISTORY. Signed-off-by: Hanyuan Zhao --- This is v2 of patch series cli: allow users to disable history if unused at all --- Changes v1 -> v2: - Please ignore the inaccurate description about the history code compilations in the previous v2 patch: cli: panic when failed. - This patch

[PATCH v2 2/2] cli: allow users to determine history buffer allocation method

2024-03-03 Thread Hanyuan Zhao
we provide the users with both the two options. Signed-off-by: Hanyuan Zhao --- Changes v1 -> v2: - Add more detailed information about the CMD_HISTORY_USE_CALLOC option both in the Kconfig and the code. - Update the comments on global history array and flash running problems. ---

[PATCH v2 1/2] cli: panic when failed to allocate memory for the history buffer

2024-03-03 Thread Hanyuan Zhao
error information instead. Signed-off-by: Hanyuan Zhao --- This is v2 of patch series cli: allow users to disable history if unused at all --- Changes v1 -> v2: - Remove the lines surrounded by macro CONFIG_CMD_HISTORY, since if the user says N to CMD_HISTORY, the whole C file won't be

[PATCH 2/2] cli: allow users to determine history buffer allocation method

2024-02-17 Thread Hanyuan Zhao
we provide the users with both the two options. Signed-off-by: Hanyuan Zhao --- cmd/Kconfig | 8 common/cli_readline.c | 23 --- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index af4dbc95fc..d0140b6cbe 100644

[PATCH 1/2] cli: allow users to disable history if unused at all

2024-02-17 Thread Hanyuan Zhao
original CMD_HISTORY flag in Kconfig, users could unset the whole history function, and the memory usage could be eased, if the history function is not used at all. Signed-off-by: Hanyuan Zhao --- cmd/Kconfig | 1 + common/cli_readline.c | 44 --- 2