Merge patch series "net fixes prior lwip"

Maxim Uvarov <maxim.uvarov@linaro.org> says:

Add small net fixes prior lwip patches.
This commit is contained in:
Tom Rini 2024-01-11 11:25:07 -05:00
commit 2ee7a8ec6f
12 changed files with 26 additions and 19 deletions

View File

@ -2196,6 +2196,8 @@ clean: $(clean-dirs)
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '*.ko.*' -o -name '*.su' -o -name '*.pyc' \
-o -name '*.dtb' -o -name '*.dtbo' \
-o -name '*.dtb.S' -o -name '*.dtbo.S' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.lex.c' -o -name '*.tab.[ch]' \
-o -name '*.asn1.[ch]' \

View File

@ -475,7 +475,7 @@ enum {
#ifndef __ASSEMBLY__
/* Function prototypes */
void mem_init(void);
void omap3_mem_init(void);
u32 is_mem_sdr(void);
u32 mem_ok(u32 cs);

View File

@ -216,7 +216,7 @@ void s_init(void)
void board_init_f(ulong dummy)
{
early_system_init();
mem_init();
omap3_mem_init();
/*
* Save the boot parameters passed from romcode.
* We cannot delay the saving further than this,

View File

@ -159,10 +159,10 @@ int dram_init_banksize(void)
}
/*
* mem_init() -
* omap3_mem_init() -
* - Initialize memory subsystem
*/
void mem_init(void)
void omap3_mem_init(void)
{
do_emif4_init();
}

View File

@ -4,7 +4,7 @@
*
* This file has been created after exctracting and consolidating
* the SDRC related content from mem.c and board.c, also created
* generic init function (mem_init).
* generic init function (omap3_mem_init).
*
* Copyright (C) 2004-2010
* Texas Instruments Incorporated - https://www.ti.com/
@ -232,11 +232,11 @@ int dram_init_banksize(void)
}
/*
* mem_init -
* omap3_mem_init -
* - Init the sdrc chip,
* - Selects CS0 and CS1,
*/
void mem_init(void)
void omap3_mem_init(void)
{
/* only init up first bank here */
do_sdrc_init(CS0, EARLY_INIT);

View File

@ -78,12 +78,6 @@
#ifndef __ASSEMBLY__
#include <asm/types.h>
enum endianness {
LITTLE_ENDIAN = 0,
BIG_ENDIAN,
UNKNOWN_ENDIANNESS
};
int socfpga_get_handoff_size(void *handoff_address);
int socfpga_handoff_read(void *handoff_address, void *table, u32 table_len);
#endif

View File

@ -10,6 +10,15 @@
#include <errno.h>
#include "log.h"
#ifndef __ASSEMBLY__
#include <asm/types.h>
enum endianness {
LITTLE_ENDIAN = 0,
BIG_ENDIAN,
UNKNOWN_ENDIANNESS
};
#endif
static enum endianness check_endianness(u32 handoff)
{
switch (handoff) {

View File

@ -256,7 +256,7 @@ int sandbox_eth_raw_os_send(void *packet, int length,
strerror(errno));
return -errno;
}
return retval;
return 0;
}
int sandbox_eth_raw_os_recv(void *packet, int *length,

View File

@ -453,7 +453,7 @@ static int rtl8139_recv_common(struct rtl8139_priv *priv, unsigned char *rxdata,
RTL_STS_RXBADALIGN)) ||
(rx_size < ETH_ZLEN) ||
(rx_size > ETH_FRAME_LEN + 4)) {
printf("rx error %hX\n", rx_status);
debug("rx error %hX\n", rx_status);
/* this clears all interrupts still pending */
rtl8139_reset(priv);
return 0;

View File

@ -403,7 +403,7 @@ static int smc911x_send(struct udevice *dev, void *packet, int length)
ret = smc911x_send_common(priv, packet, length);
return ret ? 0 : -ETIMEDOUT;
return ret ? -ETIMEDOUT : 0;
}
static int smc911x_recv(struct udevice *dev, int flags, uchar **packetp)

View File

@ -45,11 +45,11 @@
#define PCIE_ARGS "pcie_args=pci=pcie_bus_safe pcie_ports=native vfio_pci.disable_idle_d3=1\0"
#ifdef CONFIG_BCM_SF2_ETH
#define ETH_ADDR "ethaddr=00:0A:F7:95:65:A4\0"
#define BCM_ETH_ADDR "ethaddr=00:0A:F7:95:65:A4\0"
#define NET_ARGS "bgmac_platform.ethaddr=${ethaddr} " \
"ip=${ipaddr}::${gatewayip}:${netmask}::${ethif}:off"
#else
#define ETH_ADDR
#define BMC_ETH_ADDR
#define NET_ARGS
#endif
@ -749,7 +749,7 @@
OS_LOG_LEVEL \
EXTRA_ARGS \
PCIE_ARGS \
ETH_ADDR \
BMC_ETH_ADDR \
RESERVED_MEM \
SETBOOTARGS \
UPDATEME_FLASH_PARAMS \

View File

@ -99,6 +99,8 @@ def test_net_pre_commands(u_boot_console):
if init_pci:
u_boot_console.run_command('pci enum')
u_boot_console.run_command('net list')
@pytest.mark.buildconfigspec('cmd_dhcp')
def test_net_dhcp(u_boot_console):
"""Test the dhcp command.