From 8f911a7be6bc631d2f4185f7d71025bf97f260e9 Mon Sep 17 00:00:00 2001 From: Siddharth Vadapalli Date: Mon, 14 Aug 2023 10:23:47 +0530 Subject: net: Fix the displayed value of bytes transferred In the case of NETLOOP_SUCCESS, the decimal value of the u32 variable "net_boot_file_size" is printed using "%d", resulting in negative values being reported for large file sizes. Fix this by using "%u" to print the decimal value corresponding to the bytes transferred. Fixes: 1411157d8578 ("net: cosmetic: Fixup var names related to boot file") Signed-off-by: Siddharth Vadapalli Reviewed-by: Tom Rini --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/net.c b/net/net.c index 43abbac7c32..e6f61f0f8f6 100644 --- a/net/net.c +++ b/net/net.c @@ -716,7 +716,7 @@ restart: case NETLOOP_SUCCESS: net_cleanup_loop(); if (net_boot_file_size > 0) { - printf("Bytes transferred = %d (%x hex)\n", + printf("Bytes transferred = %u (%x hex)\n", net_boot_file_size, net_boot_file_size); env_set_hex("filesize", net_boot_file_size); env_set_hex("fileaddr", image_load_addr); -- cgit v1.2.3 From d2f37cc241c6b7a22cff88aedf7772b1bc0572d0 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 6 Sep 2023 23:30:07 +0200 Subject: net: eth: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut --- net/eth-uclass.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'net') diff --git a/net/eth-uclass.c b/net/eth-uclass.c index c393600fabc..4311f3fe6e8 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -556,32 +556,6 @@ static int eth_post_probe(struct udevice *dev) unsigned char env_enetaddr[ARP_HLEN]; char *source = "DT"; -#if defined(CONFIG_NEEDS_MANUAL_RELOC) - struct eth_ops *ops = eth_get_ops(dev); - static int reloc_done; - - if (!reloc_done) { - if (ops->start) - ops->start += gd->reloc_off; - if (ops->send) - ops->send += gd->reloc_off; - if (ops->recv) - ops->recv += gd->reloc_off; - if (ops->free_pkt) - ops->free_pkt += gd->reloc_off; - if (ops->stop) - ops->stop += gd->reloc_off; - if (ops->mcast) - ops->mcast += gd->reloc_off; - if (ops->write_hwaddr) - ops->write_hwaddr += gd->reloc_off; - if (ops->read_rom_hwaddr) - ops->read_rom_hwaddr += gd->reloc_off; - - reloc_done++; - } -#endif - priv->state = ETH_STATE_INIT; priv->running = false; -- cgit v1.2.3 From 09c8b8de021781103bad3e90c0bffc47d84af99e Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 6 Sep 2023 23:30:09 +0200 Subject: net: phy: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut --- net/eth_common.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'net') diff --git a/net/eth_common.c b/net/eth_common.c index c94a7ba6ae7..14d4c07b695 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -36,10 +36,6 @@ void eth_common_init(void) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB) miiphy_init(); #endif - -#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_PHYLIB) - phy_init(); -#endif #endif } -- cgit v1.2.3 From 1e94b46f73cedcebbff73799203f3266c5b28d90 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 14 Sep 2023 18:21:46 -0600 Subject: common: Drop linux/printk.h from common header This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass --- net/fastboot_udp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net') diff --git a/net/fastboot_udp.c b/net/fastboot_udp.c index d706928d168..d6907874787 100644 --- a/net/fastboot_udp.c +++ b/net/fastboot_udp.c @@ -8,6 +8,7 @@ #include #include #include +#include enum { FASTBOOT_ERROR = 0, -- cgit v1.2.3