From 01d1b99c9b2d67207050c89f70801178ba9f4f2a Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@konsulko.com>
Date: Fri, 11 Mar 2022 09:12:02 -0500
Subject: [PATCH] Convert CONFIG_NET_RETRY_COUNT to Kconfig

This converts the following to Kconfig:
   CONFIG_NET_RETRY_COUNT

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 README                                        |  7 -------
 arch/arm/mach-mvebu/include/mach/config.h     |  7 -------
 configs/am335x_baltos_defconfig               |  1 +
 configs/am335x_boneblack_vboot_defconfig      |  1 +
 configs/am335x_evm_defconfig                  |  1 +
 configs/am335x_evm_spiboot_defconfig          |  1 +
 configs/am335x_guardian_defconfig             |  1 +
 configs/am335x_hs_evm_defconfig               |  1 +
 configs/am335x_hs_evm_uart_defconfig          |  1 +
 configs/am335x_igep003x_defconfig             |  1 +
 configs/am335x_shc_defconfig                  |  1 +
 configs/am335x_shc_ict_defconfig              |  1 +
 configs/am335x_shc_netboot_defconfig          |  1 +
 configs/am335x_shc_sdboot_defconfig           |  1 +
 configs/am335x_sl50_defconfig                 |  1 +
 configs/am3517_evm_defconfig                  |  1 +
 configs/am43xx_evm_defconfig                  |  1 +
 configs/am43xx_evm_qspiboot_defconfig         |  1 +
 configs/am43xx_evm_rtconly_defconfig          |  1 +
 configs/am43xx_evm_usbhost_boot_defconfig     |  1 +
 configs/am43xx_hs_evm_defconfig               |  1 +
 configs/am57xx_evm_defconfig                  |  1 +
 configs/am57xx_hs_evm_defconfig               |  1 +
 configs/am57xx_hs_evm_usb_defconfig           |  1 +
 configs/at91sam9261ek_dataflash_cs0_defconfig |  1 +
 configs/at91sam9261ek_dataflash_cs3_defconfig |  1 +
 configs/at91sam9261ek_nandflash_defconfig     |  1 +
 configs/at91sam9g10ek_dataflash_cs0_defconfig |  1 +
 configs/at91sam9g10ek_dataflash_cs3_defconfig |  1 +
 configs/at91sam9g10ek_nandflash_defconfig     |  1 +
 configs/brppt1_mmc_defconfig                  |  1 +
 configs/brppt1_nand_defconfig                 |  1 +
 configs/brppt1_spi_defconfig                  |  1 +
 configs/brppt2_defconfig                      |  1 +
 configs/brsmarc1_defconfig                    |  1 +
 configs/brxre1_defconfig                      |  1 +
 configs/chiliboard_defconfig                  |  1 +
 configs/clearfog_defconfig                    |  1 +
 configs/clearfog_gt_8k_defconfig              |  1 +
 configs/cm_t335_defconfig                     |  1 +
 configs/colibri_pxa270_defconfig              |  1 +
 configs/controlcenterdc_defconfig             |  1 +
 configs/corvus_defconfig                      |  1 +
 configs/crs305-1g-4s-bit_defconfig            |  1 +
 configs/crs305-1g-4s_defconfig                |  1 +
 configs/crs326-24g-2s-bit_defconfig           |  1 +
 configs/crs326-24g-2s_defconfig               |  1 +
 configs/crs328-4c-20s-4s-bit_defconfig        |  1 +
 configs/crs328-4c-20s-4s_defconfig            |  1 +
 configs/da850evm_defconfig                    |  1 +
 configs/da850evm_direct_nor_defconfig         |  1 +
 configs/da850evm_nand_defconfig               |  1 +
 configs/db-88f6720_defconfig                  |  1 +
 configs/db-88f6820-amc_defconfig              |  1 +
 configs/db-88f6820-gp_defconfig               |  1 +
 configs/db-mv784mp-gp_defconfig               |  1 +
 configs/db-xc3-24g4xg_defconfig               |  1 +
 configs/devkit8000_defconfig                  |  1 +
 configs/dra7xx_evm_defconfig                  |  1 +
 configs/dra7xx_hs_evm_defconfig               |  1 +
 configs/dra7xx_hs_evm_usb_defconfig           |  1 +
 configs/draco_defconfig                       |  1 +
 configs/ds414_defconfig                       |  1 +
 configs/etamin_defconfig                      |  1 +
 configs/ethernut5_defconfig                   |  1 +
 configs/gurnard_defconfig                     |  1 +
 configs/helios4_defconfig                     |  1 +
 configs/k2e_evm_defconfig                     |  1 +
 configs/k2e_hs_evm_defconfig                  |  1 +
 configs/k2g_evm_defconfig                     |  1 +
 configs/k2g_hs_evm_defconfig                  |  1 +
 configs/k2hk_evm_defconfig                    |  1 +
 configs/k2hk_hs_evm_defconfig                 |  1 +
 configs/k2l_evm_defconfig                     |  1 +
 configs/k2l_hs_evm_defconfig                  |  1 +
 configs/maxbcm_defconfig                      |  1 +
 configs/meesc_dataflash_defconfig             |  1 +
 configs/meesc_defconfig                       |  1 +
 configs/mvebu_crb_cn9130_defconfig            |  1 +
 configs/mvebu_db-88f3720_defconfig            |  1 +
 configs/mvebu_db_armada8k_defconfig           |  1 +
 configs/mvebu_db_cn9130_defconfig             |  1 +
 configs/mvebu_espressobin-88f3720_defconfig   |  1 +
 configs/mvebu_mcbin-88f8040_defconfig         |  1 +
 configs/mvebu_puzzle-m801-88f8040_defconfig   |  1 +
 configs/omapl138_lcdk_defconfig               |  1 +
 configs/phycore-am335x-r2-regor_defconfig     |  1 +
 configs/phycore-am335x-r2-wega_defconfig      |  1 +
 configs/pic32mzdask_defconfig                 |  1 +
 configs/pxm2_defconfig                        |  1 +
 configs/rastaban_defconfig                    |  1 +
 configs/rut_defconfig                         |  1 +
 configs/sama7g5ek_mmc1_defconfig              |  1 +
 configs/sama7g5ek_mmc_defconfig               |  1 +
 configs/smartweb_defconfig                    |  1 +
 configs/snapper9260_defconfig                 |  1 +
 configs/snapper9g20_defconfig                 |  1 +
 configs/theadorable_debug_defconfig           |  1 +
 configs/thuban_defconfig                      |  1 +
 configs/ti816x_evm_defconfig                  |  1 +
 configs/turris_mox_defconfig                  |  1 +
 configs/turris_omnia_defconfig                |  1 +
 configs/uDPU_defconfig                        |  1 +
 configs/usb_a9263_dataflash_defconfig         |  1 +
 configs/vinco_defconfig                       |  1 +
 configs/x530_defconfig                        |  1 +
 include/configs/M5275EVB.h                    |  1 -
 include/configs/am335x_shc.h                  |  2 --
 include/configs/am3517_evm.h                  |  3 ---
 include/configs/am43xx_evm.h                  |  5 -----
 include/configs/am57xx_evm.h                  |  1 -
 include/configs/at91sam9261ek.h               |  1 -
 include/configs/bk4r1.h                       |  3 ---
 include/configs/bur_cfg_common.h              |  3 ---
 include/configs/cm_fx6.h                      |  1 -
 include/configs/colibri_pxa270.h              |  1 -
 include/configs/corvus.h                      |  1 -
 include/configs/da850evm.h                    |  7 -------
 include/configs/devkit8000.h                  |  1 -
 include/configs/dra7xx_evm.h                  |  3 ---
 include/configs/ethernut5.h                   |  1 -
 include/configs/meesc.h                       |  1 -
 include/configs/mvebu_armada-37xx.h           |  5 -----
 include/configs/mvebu_armada-8k.h             |  5 -----
 include/configs/omapl138_lcdk.h               |  7 -------
 include/configs/pic32mzdask.h                 |  1 -
 include/configs/sama7g5ek.h                   |  2 --
 include/configs/siemens-am33x-common.h        |  2 --
 include/configs/smartweb.h                    |  1 -
 include/configs/snapper9260.h                 |  1 -
 include/configs/snapper9g45.h                 |  1 -
 include/configs/ti814x_evm.h                  |  1 -
 include/configs/ti816x_evm.h                  |  2 --
 include/configs/ti_am335x_common.h            |  5 -----
 include/configs/ti_armv7_keystone2.h          |  1 -
 include/configs/turris_mox.h                  |  2 --
 include/configs/usb_a9263.h                   |  1 -
 include/configs/vinco.h                       |  1 -
 net/Kconfig                                   |  7 +++++++
 net/arp.c                                     |  8 +-------
 net/bootp.c                                   |  9 ++-------
 net/rarp.c                                    |  7 +------
 net/tftp.c                                    | 10 ++--------
 143 files changed, 117 insertions(+), 115 deletions(-)

diff --git a/README b/README
index 1f5aa5b38c..bab81c6eb4 100644
--- a/README
+++ b/README
@@ -1548,13 +1548,6 @@ The following options need to be configured:
 			FLAGADM
 
 - Error Recovery:
-		CONFIG_NET_RETRY_COUNT
-
-		This variable defines the number of retries for
-		network operations like ARP, RARP, TFTP, or BOOTP
-		before giving up the operation. If not defined, a
-		default value of 5 is used.
-
 		CONFIG_NFS_TIMEOUT
 
 		Timeout in milliseconds used in NFS protocol.
diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h
index 404589bf28..fb4e5af770 100644
--- a/arch/arm/mach-mvebu/include/mach/config.h
+++ b/arch/arm/mach-mvebu/include/mach/config.h
@@ -35,13 +35,6 @@
 /* Needed for SPI NOR booting in SPL */
 #define CONFIG_DM_SEQ_ALIAS		1
 
-/*
- * Ethernet Driver configuration
- */
-#ifdef CONFIG_CMD_NET
-#define CONFIG_NET_RETRY_COUNT	50
-#endif /* CONFIG_CMD_NET */
-
 /*
  * I2C related stuff
  */
diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index 90612e6e2c..5ad078ffaa 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index c79ffde91c..b9ec32eb46 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -43,6 +43,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 # CONFIG_SPL_BLK is not set
 CONFIG_BOOTCOUNT_LIMIT=y
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 33d0fb818f..535b269076 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -47,6 +47,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_SPL_ENV_IS_NOWHERE=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_CLK=y
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index f8acb7e1a9..50653ab913 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -43,6 +43,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_SPL_ENV_IS_NOWHERE=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_CLK=y
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index 8b3bd48b6c..ca3d01aea4 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -68,6 +68,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_SPL_ENV_IS_NOWHERE=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 CONFIG_REGMAP=y
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig
index 993fbbcd39..01a4c9ebc1 100644
--- a/configs/am335x_hs_evm_defconfig
+++ b/configs/am335x_hs_evm_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_CLK=y
diff --git a/configs/am335x_hs_evm_uart_defconfig b/configs/am335x_hs_evm_uart_defconfig
index ecb0526c33..0f59050030 100644
--- a/configs/am335x_hs_evm_uart_defconfig
+++ b/configs/am335x_hs_evm_uart_defconfig
@@ -44,6 +44,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_CLK=y
diff --git a/configs/am335x_igep003x_defconfig b/configs/am335x_igep003x_defconfig
index 39d354f9e2..3101cf4e60 100644
--- a/configs/am335x_igep003x_defconfig
+++ b/configs/am335x_igep003x_defconfig
@@ -68,6 +68,7 @@ CONFIG_ENV_UBI_VOLUME_REDUND="config_r"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
diff --git a/configs/am335x_shc_defconfig b/configs/am335x_shc_defconfig
index a5b251b356..212c884e62 100644
--- a/configs/am335x_shc_defconfig
+++ b/configs/am335x_shc_defconfig
@@ -53,6 +53,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
diff --git a/configs/am335x_shc_ict_defconfig b/configs/am335x_shc_ict_defconfig
index 19294a9432..00442d8ca8 100644
--- a/configs/am335x_shc_ict_defconfig
+++ b/configs/am335x_shc_ict_defconfig
@@ -54,6 +54,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
diff --git a/configs/am335x_shc_netboot_defconfig b/configs/am335x_shc_netboot_defconfig
index e1c8e3178f..2111495b99 100644
--- a/configs/am335x_shc_netboot_defconfig
+++ b/configs/am335x_shc_netboot_defconfig
@@ -54,6 +54,7 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
diff --git a/configs/am335x_shc_sdboot_defconfig b/configs/am335x_shc_sdboot_defconfig
index d0e1f96551..771ff1b8ba 100644
--- a/configs/am335x_shc_sdboot_defconfig
+++ b/configs/am335x_shc_sdboot_defconfig
@@ -53,6 +53,7 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig
index 21c67bd578..3fab49a4e3 100644
--- a/configs/am335x_sl50_defconfig
+++ b/configs/am335x_sl50_defconfig
@@ -59,6 +59,7 @@ CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_SYS_MMC_ENV_PART=2
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index e18bdeaa90..52c2a67498 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -55,6 +55,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 CONFIG_DM_PCA953X=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 716cf3ff2a..9ff8047ee6 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -46,6 +46,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_REGMAP=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index 31b564b7ba..31a2de5c15 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -38,6 +38,7 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_DFU_MMC=y
diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig
index a15a1713b8..0b6b182662 100644
--- a/configs/am43xx_evm_rtconly_defconfig
+++ b/configs/am43xx_evm_rtconly_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_DFU_MMC=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index fd0bd25b67..144ab21454 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -52,6 +52,7 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_REGMAP=y
diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig
index d4bebd2c01..87b4864bae 100644
--- a/configs/am43xx_hs_evm_defconfig
+++ b/configs/am43xx_hs_evm_defconfig
@@ -50,6 +50,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_REGMAP=y
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index 693766b946..0732aa1bdf 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -59,6 +59,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig
index 7d9e2549ce..cdfd437fb9 100644
--- a/configs/am57xx_hs_evm_defconfig
+++ b/configs/am57xx_hs_evm_defconfig
@@ -59,6 +59,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig
index 10106ab023..4277c96a7d 100644
--- a/configs/am57xx_hs_evm_usb_defconfig
+++ b/configs/am57xx_hs_evm_usb_defconfig
@@ -66,6 +66,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
index 28e48b23ee..11126d59a7 100644
--- a/configs/at91sam9261ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
@@ -39,6 +39,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
index 7110e92054..01c8d0ed45 100644
--- a/configs/at91sam9261ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
@@ -39,6 +39,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
index 22fd19e412..5674944870 100644
--- a/configs/at91sam9261ek_nandflash_defconfig
+++ b/configs/at91sam9261ek_nandflash_defconfig
@@ -37,6 +37,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/at91sam9g10ek_dataflash_cs0_defconfig b/configs/at91sam9g10ek_dataflash_cs0_defconfig
index 0eead5201a..cee1f9c6f7 100644
--- a/configs/at91sam9g10ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs0_defconfig
@@ -39,6 +39,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/at91sam9g10ek_dataflash_cs3_defconfig b/configs/at91sam9g10ek_dataflash_cs3_defconfig
index fd28775a51..f2724cd26d 100644
--- a/configs/at91sam9g10ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs3_defconfig
@@ -39,6 +39,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/at91sam9g10ek_nandflash_defconfig b/configs/at91sam9g10ek_nandflash_defconfig
index 60c80164d3..647a0e7d1d 100644
--- a/configs/at91sam9g10ek_nandflash_defconfig
+++ b/configs/at91sam9g10ek_nandflash_defconfig
@@ -37,6 +37,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig
index be3959ad7d..ac0fbd5c3f 100644
--- a/configs/brppt1_mmc_defconfig
+++ b/configs/brppt1_mmc_defconfig
@@ -75,6 +75,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_SYS_MMC_ENV_PART=2
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/brppt1_nand_defconfig b/configs/brppt1_nand_defconfig
index 0561e629ec..9df5121964 100644
--- a/configs/brppt1_nand_defconfig
+++ b/configs/brppt1_nand_defconfig
@@ -76,6 +76,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index 10749f0356..11d7d7bcde 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -82,6 +82,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/brppt2_defconfig b/configs/brppt2_defconfig
index fba4f08e08..38eedb4de4 100644
--- a/configs/brppt2_defconfig
+++ b/configs/brppt2_defconfig
@@ -67,6 +67,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_ARP_TIMEOUT=1500
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/brsmarc1_defconfig b/configs/brsmarc1_defconfig
index 5d1a8af135..771a42f638 100644
--- a/configs/brsmarc1_defconfig
+++ b/configs/brsmarc1_defconfig
@@ -82,6 +82,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/brxre1_defconfig b/configs/brxre1_defconfig
index ca29f9b6e4..35b2b6545e 100644
--- a/configs/brxre1_defconfig
+++ b/configs/brxre1_defconfig
@@ -74,6 +74,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_SYS_MMC_ENV_PART=2
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/chiliboard_defconfig b/configs/chiliboard_defconfig
index a50e732aef..ae101da9c2 100644
--- a/configs/chiliboard_defconfig
+++ b/configs/chiliboard_defconfig
@@ -46,6 +46,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 12d9c87794..5a97ef563f 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -43,6 +43,7 @@ CONFIG_CMD_MVEBU_BUBT=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_AHCI_MVEBU=y
diff --git a/configs/clearfog_gt_8k_defconfig b/configs/clearfog_gt_8k_defconfig
index fa24ad0918..f5c960b965 100644
--- a/configs/clearfog_gt_8k_defconfig
+++ b/configs/clearfog_gt_8k_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_AHCI_MVEBU=y
 CONFIG_DM_I2C=y
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index 7a65683a41..0b4912bba3 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_CMD_PCA953X=y
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig
index a955ba5b4d..e8ebe85118 100644
--- a/configs/colibri_pxa270_defconfig
+++ b/configs/colibri_pxa270_defconfig
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0x80000
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_DM=y
 CONFIG_PXA_MMC_GENERIC=y
 CONFIG_MTD_NOR_FLASH=y
diff --git a/configs/controlcenterdc_defconfig b/configs/controlcenterdc_defconfig
index da8ed9aa0d..abbb5cc3d9 100644
--- a/configs/controlcenterdc_defconfig
+++ b/configs/controlcenterdc_defconfig
@@ -60,6 +60,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="ccdc.img"
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SCSI_AHCI=y
 CONFIG_DM_PCA953X=y
diff --git a/configs/corvus_defconfig b/configs/corvus_defconfig
index 4688e0ae0d..6ea76dbf4f 100644
--- a/configs/corvus_defconfig
+++ b/configs/corvus_defconfig
@@ -54,6 +54,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_DFU_NAND=y
diff --git a/configs/crs305-1g-4s-bit_defconfig b/configs/crs305-1g-4s-bit_defconfig
index 530ee83a0c..a5f0a218e1 100644
--- a/configs/crs305-1g-4s-bit_defconfig
+++ b/configs/crs305-1g-4s-bit_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_BLK=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
diff --git a/configs/crs305-1g-4s_defconfig b/configs/crs305-1g-4s_defconfig
index 2298eb4f68..b75c9f26d3 100644
--- a/configs/crs305-1g-4s_defconfig
+++ b/configs/crs305-1g-4s_defconfig
@@ -34,6 +34,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_BLK=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
diff --git a/configs/crs326-24g-2s-bit_defconfig b/configs/crs326-24g-2s-bit_defconfig
index 9d071f95d0..98a23d243e 100644
--- a/configs/crs326-24g-2s-bit_defconfig
+++ b/configs/crs326-24g-2s-bit_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_BLK=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
diff --git a/configs/crs326-24g-2s_defconfig b/configs/crs326-24g-2s_defconfig
index b13d9d6899..adaa1fc34b 100644
--- a/configs/crs326-24g-2s_defconfig
+++ b/configs/crs326-24g-2s_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_BLK=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
diff --git a/configs/crs328-4c-20s-4s-bit_defconfig b/configs/crs328-4c-20s-4s-bit_defconfig
index d81ac53168..7ec902ee98 100644
--- a/configs/crs328-4c-20s-4s-bit_defconfig
+++ b/configs/crs328-4c-20s-4s-bit_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_BLK=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
diff --git a/configs/crs328-4c-20s-4s_defconfig b/configs/crs328-4c-20s-4s_defconfig
index 55f2c87f63..18e3082213 100644
--- a/configs/crs328-4c-20s-4s_defconfig
+++ b/configs/crs328-4c-20s-4s_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_BLK=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index bbd140157d..09b39309e4 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -64,6 +64,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
index d40f8755e8..7e06782792 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -50,6 +50,7 @@ CONFIG_ENV_ADDR=0x60100000
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_DA8XX_GPIO=y
diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig
index 5d417a8da2..cdd69f4b8c 100644
--- a/configs/da850evm_nand_defconfig
+++ b/configs/da850evm_nand_defconfig
@@ -61,6 +61,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/db-88f6720_defconfig b/configs/db-88f6720_defconfig
index 72af1ecc05..363674594d 100644
--- a/configs/db-88f6720_defconfig
+++ b/configs/db-88f6720_defconfig
@@ -44,6 +44,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/db-88f6820-amc_defconfig b/configs/db-88f6820-amc_defconfig
index 46108f5195..000e7f0667 100644
--- a/configs/db-88f6820-amc_defconfig
+++ b/configs/db-88f6820-amc_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 # CONFIG_SPL_BLK is not set
 # CONFIG_BLOCK_CACHE is not set
diff --git a/configs/db-88f6820-gp_defconfig b/configs/db-88f6820-gp_defconfig
index 2e7ff3ba64..e7fd1a2fcc 100644
--- a/configs/db-88f6820-gp_defconfig
+++ b/configs/db-88f6820-gp_defconfig
@@ -47,6 +47,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_AHCI_MVEBU=y
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/db-mv784mp-gp_defconfig b/configs/db-mv784mp-gp_defconfig
index 29df9f6492..594555c5a9 100644
--- a/configs/db-mv784mp-gp_defconfig
+++ b/configs/db-mv784mp-gp_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SATA_MV=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
diff --git a/configs/db-xc3-24g4xg_defconfig b/configs/db-xc3-24g4xg_defconfig
index aa47b84563..dd087ffcdc 100644
--- a/configs/db-xc3-24g4xg_defconfig
+++ b/configs/db-xc3-24g4xg_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
 # CONFIG_MMC is not set
diff --git a/configs/devkit8000_defconfig b/configs/devkit8000_defconfig
index a0e423ddaa..e009f21ecd 100644
--- a/configs/devkit8000_defconfig
+++ b/configs/devkit8000_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index fdc9826d70..1aee9d742c 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -64,6 +64,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index db8716e2d1..728515d433 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -65,6 +65,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig
index 169b570048..9ebe45463c 100644
--- a/configs/dra7xx_hs_evm_usb_defconfig
+++ b/configs/dra7xx_hs_evm_usb_defconfig
@@ -61,6 +61,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index 16d2c6c6b8..d2186b006e 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -71,6 +71,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 # CONFIG_SPL_BLK is not set
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index fad924df32..41fa2cd7fe 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
index 15a43e7627..32800ec981 100644
--- a/configs/etamin_defconfig
+++ b/configs/etamin_defconfig
@@ -72,6 +72,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 # CONFIG_SPL_BLK is not set
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index 1bb0aa786e..b7169b1994 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -58,6 +58,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
index 26b97b290f..7def2253a5 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -37,6 +37,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_TFTP_TSIZE=y
 CONFIG_AT91_GPIO=y
 CONFIG_GENERIC_ATMEL_MCI=y
diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
index 5a7a60ccea..62965a41fd 100644
--- a/configs/helios4_defconfig
+++ b/configs/helios4_defconfig
@@ -43,6 +43,7 @@ CONFIG_CMD_MVEBU_BUBT=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_AHCI_MVEBU=y
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index eb8b945fa4..05cc3d7083 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig
index 45b6644f69..c8ea0bec89 100644
--- a/configs/k2e_hs_evm_defconfig
+++ b/configs/k2e_hs_evm_defconfig
@@ -38,6 +38,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 81fbf1da2b..440a76f443 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig
index c91f5c2703..4137733c0f 100644
--- a/configs/k2g_hs_evm_defconfig
+++ b/configs/k2g_hs_evm_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_DFU_MMC=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index dfe0291ab6..c66c36adf7 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
index e1b98a612e..c405e1e3d9 100644
--- a/configs/k2hk_hs_evm_defconfig
+++ b/configs/k2hk_hs_evm_defconfig
@@ -38,6 +38,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index d800ea15d8..d7bdf8ed24 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
diff --git a/configs/k2l_hs_evm_defconfig b/configs/k2l_hs_evm_defconfig
index 1776217e94..493fdb1fab 100644
--- a/configs/k2l_hs_evm_defconfig
+++ b/configs/k2l_hs_evm_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=32
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
diff --git a/configs/maxbcm_defconfig b/configs/maxbcm_defconfig
index 63d2637b4f..b9e133e4ba 100644
--- a/configs/maxbcm_defconfig
+++ b/configs/maxbcm_defconfig
@@ -36,6 +36,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/meesc_dataflash_defconfig b/configs/meesc_dataflash_defconfig
index 0d09d9104e..0e8a545ea1 100644
--- a/configs/meesc_dataflash_defconfig
+++ b/configs/meesc_dataflash_defconfig
@@ -31,6 +31,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/meesc_defconfig b/configs/meesc_defconfig
index e9f7288a0c..9e5eb5aeef 100644
--- a/configs/meesc_defconfig
+++ b/configs/meesc_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_PING=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/mvebu_crb_cn9130_defconfig b/configs/mvebu_crb_cn9130_defconfig
index 62aeafc5c6..ceb53c764a 100644
--- a/configs/mvebu_crb_cn9130_defconfig
+++ b/configs/mvebu_crb_cn9130_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_AHCI_MVEBU=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/mvebu_db-88f3720_defconfig b/configs/mvebu_db-88f3720_defconfig
index caf4261d0c..b4434187c0 100644
--- a/configs/mvebu_db-88f3720_defconfig
+++ b/configs/mvebu_db-88f3720_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_AHCI_MVEBU=y
 CONFIG_CLK=y
 CONFIG_CLK_MVEBU=y
diff --git a/configs/mvebu_db_armada8k_defconfig b/configs/mvebu_db_armada8k_defconfig
index cd2942dff4..7548597619 100644
--- a/configs/mvebu_db_armada8k_defconfig
+++ b/configs/mvebu_db_armada8k_defconfig
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_AHCI_MVEBU=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/mvebu_db_cn9130_defconfig b/configs/mvebu_db_cn9130_defconfig
index 5f73d3907e..f9efe482ab 100644
--- a/configs/mvebu_db_cn9130_defconfig
+++ b/configs/mvebu_db_cn9130_defconfig
@@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_AHCI_MVEBU=y
 CONFIG_DM_GPIO_LOOKUP_LABEL=y
 CONFIG_DM_I2C=y
diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
index dc021aeacb..9dadfc9d44 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_AHCI_PCI=y
 CONFIG_AHCI_MVEBU=y
diff --git a/configs/mvebu_mcbin-88f8040_defconfig b/configs/mvebu_mcbin-88f8040_defconfig
index bc62590219..0bc3d7b66d 100644
--- a/configs/mvebu_mcbin-88f8040_defconfig
+++ b/configs/mvebu_mcbin-88f8040_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_AHCI_MVEBU=y
 CONFIG_DM_I2C=y
diff --git a/configs/mvebu_puzzle-m801-88f8040_defconfig b/configs/mvebu_puzzle-m801-88f8040_defconfig
index b16a9339db..9b7902bf30 100644
--- a/configs/mvebu_puzzle-m801-88f8040_defconfig
+++ b/configs/mvebu_puzzle-m801-88f8040_defconfig
@@ -45,6 +45,7 @@ CONFIG_MAC_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_AHCI_MVEBU=y
 CONFIG_DM_PCA953X=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index cdba0901cd..3defb58660 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -57,6 +57,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="zImage"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
diff --git a/configs/phycore-am335x-r2-regor_defconfig b/configs/phycore-am335x-r2-regor_defconfig
index e2a5731c5e..9e357241a5 100644
--- a/configs/phycore-am335x-r2-regor_defconfig
+++ b/configs/phycore-am335x-r2-regor_defconfig
@@ -59,6 +59,7 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
diff --git a/configs/phycore-am335x-r2-wega_defconfig b/configs/phycore-am335x-r2-wega_defconfig
index 9459787992..10b5ffd271 100644
--- a/configs/phycore-am335x-r2-wega_defconfig
+++ b/configs/phycore-am335x-r2-wega_defconfig
@@ -59,6 +59,7 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
diff --git a/configs/pic32mzdask_defconfig b/configs/pic32mzdask_defconfig
index 6380725729..d5008c4b1f 100644
--- a/configs/pic32mzdask_defconfig
+++ b/configs/pic32mzdask_defconfig
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_EFI_PARTITION is not set
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=500
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CLK=y
 CONFIG_MMC=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index 15c6bb3699..e7ea416f9a 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -70,6 +70,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 # CONFIG_SPL_BLK is not set
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index e905561cc3..9820088779 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -71,6 +71,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 # CONFIG_SPL_BLK is not set
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index 6c6be4ab18..1f110da198 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -71,6 +71,7 @@ CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 # CONFIG_SPL_BLK is not set
diff --git a/configs/sama7g5ek_mmc1_defconfig b/configs/sama7g5ek_mmc1_defconfig
index 96607ee03b..a491268734 100644
--- a/configs/sama7g5ek_mmc1_defconfig
+++ b/configs/sama7g5ek_mmc1_defconfig
@@ -45,6 +45,7 @@ CONFIG_ENV_IS_IN_FAT=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_CCF=y
diff --git a/configs/sama7g5ek_mmc_defconfig b/configs/sama7g5ek_mmc_defconfig
index 6c25e01bae..6891baac03 100644
--- a/configs/sama7g5ek_mmc_defconfig
+++ b/configs/sama7g5ek_mmc_defconfig
@@ -45,6 +45,7 @@ CONFIG_ENV_IS_IN_FAT=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_CCF=y
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 36593ecdc8..426b9394e2 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -56,6 +56,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_DFU_NAND=y
diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig
index bd8c17fad4..59ab0756a3 100644
--- a/configs/snapper9260_defconfig
+++ b/configs/snapper9260_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_FAT=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_TFTP_TSIZE=y
 CONFIG_AT91_GPIO=y
 CONFIG_CMD_PCA953X=y
diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig
index eb62cfdedd..4ed958d1c1 100644
--- a/configs/snapper9g20_defconfig
+++ b/configs/snapper9g20_defconfig
@@ -34,6 +34,7 @@ CONFIG_CMD_FAT=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_TFTP_TSIZE=y
 CONFIG_AT91_GPIO=y
 CONFIG_CMD_PCA953X=y
diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig
index ca897fe8f6..3b841b0c42 100644
--- a/configs/theadorable_debug_defconfig
+++ b/configs/theadorable_debug_defconfig
@@ -52,6 +52,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SATA_MV=y
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index 1e1d19e44b..b48575db4c 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -71,6 +71,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_SPL_DM=y
 # CONFIG_SPL_BLK is not set
diff --git a/configs/ti816x_evm_defconfig b/configs/ti816x_evm_defconfig
index 9631395d38..703f9fdcd0 100644
--- a/configs/ti816x_evm_defconfig
+++ b/configs/ti816x_evm_defconfig
@@ -52,6 +52,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_DM=y
 CONFIG_DM_I2C=y
diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig
index fde6882ef2..27bf740b4e 100644
--- a/configs/turris_mox_defconfig
+++ b/configs/turris_mox_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
 CONFIG_BUTTON=y
diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig
index a9d840e0de..ec9f766ab2 100644
--- a/configs/turris_omnia_defconfig
+++ b/configs/turris_omnia_defconfig
@@ -63,6 +63,7 @@ CONFIG_CMD_FS_UUID=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_AHCI_PCI=y
 CONFIG_AHCI_MVEBU=y
diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig
index ae25b5b74d..4bd5ec3414 100644
--- a/configs/uDPU_defconfig
+++ b/configs/uDPU_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_AHCI_MVEBU=y
 CONFIG_CLK=y
diff --git a/configs/usb_a9263_dataflash_defconfig b/configs/usb_a9263_dataflash_defconfig
index 2dccfb1b6a..1f34f3369a 100644
--- a/configs/usb_a9263_dataflash_defconfig
+++ b/configs/usb_a9263_dataflash_defconfig
@@ -37,6 +37,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
diff --git a/configs/vinco_defconfig b/configs/vinco_defconfig
index 9df9da4310..85e9f62227 100644
--- a/configs/vinco_defconfig
+++ b/configs/vinco_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RETRY_COUNT=20
 CONFIG_AT91_GPIO=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_GENERIC_ATMEL_MCI=y
diff --git a/configs/x530_defconfig b/configs/x530_defconfig
index e932db2805..d042134578 100644
--- a/configs/x530_defconfig
+++ b/configs/x530_defconfig
@@ -51,6 +51,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_ADDR=0x100000
 CONFIG_ARP_TIMEOUT=200
+CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h
index 78904acb7b..d95dd8ca86 100644
--- a/include/configs/M5275EVB.h
+++ b/include/configs/M5275EVB.h
@@ -58,7 +58,6 @@
 #define CONFIG_SYS_I2C_PINMUX_SET	(0x000F)
 
 #ifdef CONFIG_MCFFEC
-#	define CONFIG_NET_RETRY_COUNT	5
 #	define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif				/* FEC_ENET */
 
diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h
index 5ed4eb3b3c..7789c1c67c 100644
--- a/include/configs/am335x_shc.h
+++ b/include/configs/am335x_shc.h
@@ -168,6 +168,4 @@
 #undef CONFIG_DM_MMC
 #undef CONFIG_TIMER
 #endif
-
-#define CONFIG_NET_RETRY_COUNT         10
 #endif	/* ! __CONFIG_AM335X_SHC_H */
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 456ed43433..393e15ef10 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -14,9 +14,6 @@
 
 #include <configs/ti_omap3_common.h>
 
-/* Ethernet */
-#define CONFIG_NET_RETRY_COUNT		10
-
 /* Board NAND Info. */
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_NAND_ECCPOS		{ 2,  3,  4,  5,  6,  7,  8,  9, 10, \
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 7bea61ec15..651eb19759 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -145,11 +145,6 @@
 
 #endif
 
-#ifndef CONFIG_SPL_BUILD
-/* CPSW Ethernet */
-#define CONFIG_NET_RETRY_COUNT		10
-#endif
-
 #define PHY_ANEG_TIMEOUT	8000 /* PHY needs longer aneg time at 1G */
 
 #define CONFIG_SYS_RX_ETH_BUFFER	64
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index ff0498acde..c36311e06d 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -45,7 +45,6 @@
 #define CONFIG_HSMMC2_8BIT
 
 /* CPSW Ethernet */
-#define CONFIG_NET_RETRY_COUNT		10
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs longer aneg time at 1G */
 
 /*
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 995b00953a..b6d0247d7c 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -66,7 +66,6 @@
 #define DM9000_DATA			(CONFIG_DM9000_BASE + 4)
 #define CONFIG_DM9000_USE_16BIT
 #define CONFIG_DM9000_NO_SROM
-#define CONFIG_NET_RETRY_COUNT		20
 #define CONFIG_RESET_PHY_R
 
 /* USB */
diff --git a/include/configs/bk4r1.h b/include/configs/bk4r1.h
index 14b3e52bac..762d1980bd 100644
--- a/include/configs/bk4r1.h
+++ b/include/configs/bk4r1.h
@@ -34,9 +34,6 @@
 
 /* Enable PREBOOT variable */
 
-/* Set ARP_TIMEOUT_COUNT to 3 repetitions */
-#define CONFIG_NET_RETRY_COUNT	5
-
 /* BK4r1 net init sets GPIO122/PTE17 to enable Ethernet */
 #define BK4_NET_INIT "run set_gpio122;"
 
diff --git a/include/configs/bur_cfg_common.h b/include/configs/bur_cfg_common.h
index 9d5a038de8..6985011763 100644
--- a/include/configs/bur_cfg_common.h
+++ b/include/configs/bur_cfg_common.h
@@ -23,9 +23,6 @@
 "setcurs 1 10;lcdputs serverip; setcurs 10 10; lcdputs ${serverip};" \
 "setenv stdout nc;setenv stdin nc;setenv stderr nc\0"
 
-/* Network defines */
-#define CONFIG_NET_RETRY_COUNT		10
-
 /* Network console */
 
 /* As stated above, the following choices are optional. */
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 9f12c06d6e..a02a180e7b 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -150,7 +150,6 @@
 #define CONFIG_FEC_XCV_TYPE		RGMII
 #define IMX_FEC_BASE			ENET_BASE_ADDR
 #define CONFIG_ETHPRIME			"FEC0"
-#define CONFIG_NET_RETRY_COUNT		5
 
 /* USB */
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h
index 6cb75e59d8..b34a5c9f24 100644
--- a/include/configs/colibri_pxa270.h
+++ b/include/configs/colibri_pxa270.h
@@ -50,7 +50,6 @@
 #define CONFIG_DM9000_BASE		0x08000000
 #define DM9000_IO			(CONFIG_DM9000_BASE)
 #define DM9000_DATA			(CONFIG_DM9000_BASE + 4)
-#define	CONFIG_NET_RETRY_COUNT		10
 #endif
 
 /*
diff --git a/include/configs/corvus.h b/include/configs/corvus.h
index 5347115a14..4c25c906e8 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -64,7 +64,6 @@
 
 /* Ethernet */
 #define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT		20
 #define CONFIG_AT91_WANTS_COMMON_PHY
 
 /* DFU class support */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index fa7afabd51..ff0cc35180 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -137,13 +137,6 @@
 #define CONFIG_SYS_NAND_ECCBYTES	10
 #endif
 
-/*
- * Network & Ethernet Configuration
- */
-#ifdef CONFIG_DRIVER_TI_EMAC
-#define CONFIG_NET_RETRY_COUNT	10
-#endif
-
 #ifdef CONFIG_MTD_NOR_FLASH
 #define CONFIG_SYS_FLASH_SECT_SZ	(128 << 10) /* 128KB */
 #define CONFIG_SYS_FLASH_BASE		DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 0637c7d988..16b3650132 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -35,7 +35,6 @@
 
 /* Hardware drivers */
 /* DM9000 */
-#define CONFIG_NET_RETRY_COUNT		20
 #define	CONFIG_DRIVER_DM9000		1
 #define	CONFIG_DM9000_BASE		0x2c000000
 #define	DM9000_IO			CONFIG_DM9000_BASE
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 711e37cb9b..4544373a82 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -55,9 +55,6 @@
 /* Enhance our eMMC support / experience. */
 #define CONFIG_HSMMC2_8BIT
 
-/* CPSW Ethernet */
-#define CONFIG_NET_RETRY_COUNT		10
-
 /*
  * Default to using SPI for environment, etc.
  * 0x000000 - 0x040000 : QSPI.SPL (256KiB)
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index ef91146d2c..860709a277 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -54,7 +54,6 @@
 /* JFFS2 */
 
 /* Ethernet */
-#define CONFIG_NET_RETRY_COUNT		20
 #define CONFIG_RMII
 #define CONFIG_PHY_ID			0
 #define CONFIG_MACB_SEARCH_PHY
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index e841c94696..df2902116c 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -68,7 +68,6 @@
 
 /* Ethernet */
 #define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT			20
 #undef CONFIG_RESET_PHY_R
 
 /* hw-controller addresses */
diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h
index 77f9d0e06c..06882fb51e 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -40,11 +40,6 @@
  */
 #define DEFAULT_ENV_IS_RW		/* required for configuring default fdtfile= */
 
-/*
- * Ethernet Driver configuration
- */
-#define CONFIG_NET_RETRY_COUNT	50
-
 #define CONFIG_USB_MAX_CONTROLLER_COUNT (3 + 3)
 
 /*
diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
index 049f00f7f0..8e325e8f4a 100644
--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -33,11 +33,6 @@
 
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 
-/*
- * Ethernet Driver configuration
- */
-#define CONFIG_NET_RETRY_COUNT	50
-
 #define CONFIG_USB_MAX_CONTROLLER_COUNT (3 + 3)
 
 /* USB ethernet */
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index e70f5fcfb3..512ddbc3d8 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -136,13 +136,6 @@
 #define CONFIG_SYS_NAND_ECCBYTES	10
 #endif
 
-/*
- * Network & Ethernet Configuration
- */
-#ifdef CONFIG_DRIVER_TI_EMAC
-#define CONFIG_NET_RETRY_COUNT	10
-#endif
-
 /*
  * U-Boot general configuration
  */
diff --git a/include/configs/pic32mzdask.h b/include/configs/pic32mzdask.h
index 7db27ab977..0a782b4ae4 100644
--- a/include/configs/pic32mzdask.h
+++ b/include/configs/pic32mzdask.h
@@ -48,7 +48,6 @@
  * Networking Configuration
  */
 #define CONFIG_SYS_RX_ETH_BUFFER	8
-#define CONFIG_NET_RETRY_COUNT		20
 
 /*--------------------------------------------------
  * USB Configuration
diff --git a/include/configs/sama7g5ek.h b/include/configs/sama7g5ek.h
index 2d5afabe28..bca7166cb9 100644
--- a/include/configs/sama7g5ek.h
+++ b/include/configs/sama7g5ek.h
@@ -24,6 +24,4 @@
 	 GENERATED_GBL_DATA_SIZE)
 #endif
 
-#define CONFIG_NET_RETRY_COUNT		50
-
 #endif
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 615458cde8..6235ad27bb 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -133,8 +133,6 @@
  * 0x442000 - 0x800000 : Userland
  */
 
-#define CONFIG_NET_RETRY_COUNT         10
-
 /* NAND support */
 #ifdef CONFIG_MTD_RAW_NAND
 /* UBI Support */
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 2a00bfa0d4..7aa6c400ba 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -86,7 +86,6 @@
  *
  */
 #define CONFIG_RMII			/* use reduced MII inteface */
-#define CONFIG_NET_RETRY_COUNT	20      /* # of DHCP/BOOTP retries */
 #define CONFIG_AT91_WANTS_COMMON_PHY
 
 /* BOOTP and DHCP options */
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 5820423a15..6861344095 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -39,7 +39,6 @@
 
 /* Ethernet */
 #define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT		20
 #define CONFIG_RESET_PHY_R
 #define CONFIG_AT91_WANTS_COMMON_PHY
 #define CONFIG_TFTP_PORT
diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h
index 2377190a04..069f4c2d24 100644
--- a/include/configs/snapper9g45.h
+++ b/include/configs/snapper9g45.h
@@ -40,7 +40,6 @@
 
 /* Ethernet */
 #define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT		20
 #define CONFIG_RESET_PHY_R
 #define CONFIG_AT91_WANTS_COMMON_PHY
 #define CONFIG_TFTP_PORT
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index 0f786abeb8..95434aa516 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -114,7 +114,6 @@
  */
 
 /* Ethernet */
-#define CONFIG_NET_RETRY_COUNT         10
 #define CONFIG_PHY_ET1011C_TX_CLK_FIX
 
 #endif	/* ! __CONFIG_TI814X_EVM_H */
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h
index 533673ba5d..05f787473a 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -68,8 +68,6 @@
 #define CONFIG_SPL_MAX_SIZE		(SRAM_SCRATCH_SPACE_ADDR - \
 					 CONFIG_SPL_TEXT_BASE)
 
-#define CONFIG_NET_RETRY_COUNT	10
-
 /* Since SPL did pll and ddr initialization for us,
  * we don't need to do it twice.
  */
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 10da123813..f8bd5558e5 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -25,11 +25,6 @@
 #endif
 #define CONFIG_SYS_NS16550_CLK		48000000
 
-#ifndef CONFIG_SPL_BUILD
-/* Network defines. */
-#define CONFIG_NET_RETRY_COUNT         10
-#endif
-
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
  * area between 0x402F0400 and 0x4030B800 as a download area and
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 0243016fcd..57f013cbf8 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -63,7 +63,6 @@
 #define CONFIG_SYS_SPI_CLK		ks_clk_get_rate(KS2_CLK1_6)
 
 /* Network Configuration */
-#define CONFIG_NET_RETRY_COUNT		32
 #define CONFIG_SYS_SGMII_REFCLK_MHZ	312
 #define CONFIG_SYS_SGMII_LINERATE_MHZ	1250
 #define CONFIG_SYS_SGMII_RATESCALE	2
diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h
index 2a34c8acaf..dc2fdcc654 100644
--- a/include/configs/turris_mox.h
+++ b/include/configs/turris_mox.h
@@ -21,8 +21,6 @@
 					  4000000, 4500000, 5000000, 5500000, \
 					  6000000 }
 
-#define CONFIG_NET_RETRY_COUNT		50
-
 #define CONFIG_USB_MAX_CONTROLLER_COUNT	6
 
 #define BOOT_TARGET_DEVICES(func) \
diff --git a/include/configs/usb_a9263.h b/include/configs/usb_a9263.h
index bc400292ca..128be9262a 100644
--- a/include/configs/usb_a9263.h
+++ b/include/configs/usb_a9263.h
@@ -45,7 +45,6 @@
 
 /* Ethernet */
 #define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT			20
 #define CONFIG_AT91_WANTS_COMMON_PHY
 
 /* USB */
diff --git a/include/configs/vinco.h b/include/configs/vinco.h
index 7bd48820ed..a6511b34f5 100644
--- a/include/configs/vinco.h
+++ b/include/configs/vinco.h
@@ -50,7 +50,6 @@
 
 /* Ethernet Hardware */
 #define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT		20
 #define CONFIG_MACB_SEARCH_PHY
 
 #ifdef CONFIG_SPI_BOOT
diff --git a/net/Kconfig b/net/Kconfig
index 683c2adf5a..2e32b556ad 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -12,6 +12,13 @@ config ARP_TIMEOUT
 	int "Milliseconds before trying ARP again"
 	default 5000
 
+config NET_RETRY_COUNT
+	int "Number of timeouts before giving up"
+	default 5
+	help
+	  This variable defines the number of retries for network operations
+	  like ARP, RARP, TFTP, or BOOTP before giving up the operation.
+
 config PROT_UDP
 	bool "Enable generic udp framework"
 	help
diff --git a/net/arp.c b/net/arp.c
index f29b867f13..37848ad32f 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -17,12 +17,6 @@
 
 #include "arp.h"
 
-#ifndef	CONFIG_NET_RETRY_COUNT
-# define ARP_TIMEOUT_COUNT	5	/* # of timeouts before giving up  */
-#else
-# define ARP_TIMEOUT_COUNT	CONFIG_NET_RETRY_COUNT
-#endif
-
 struct in_addr net_arp_wait_packet_ip;
 static struct in_addr net_arp_wait_reply_ip;
 /* MAC address of waiting packet's destination */
@@ -104,7 +98,7 @@ int arp_timeout_check(void)
 	if ((t - arp_wait_timer_start) > CONFIG_ARP_TIMEOUT) {
 		arp_wait_try++;
 
-		if (arp_wait_try >= ARP_TIMEOUT_COUNT) {
+		if (arp_wait_try >= CONFIG_NET_RETRY_COUNT) {
 			puts("\nARP Retry count exceeded; starting again\n");
 			arp_wait_try = 0;
 			net_set_state(NETLOOP_FAIL);
diff --git a/net/bootp.c b/net/bootp.c
index a896e1e5b5..a544bfcc23 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -31,7 +31,7 @@
 
 /*
  * The timeout for the initial BOOTP/DHCP request used to be described by a
- * counter of fixed-length timeout periods. TIMEOUT_COUNT represents
+ * counter of fixed-length timeout periods. CONFIG_NET_RETRY_COUNT represents
  * that counter
  *
  * Now that the timeout periods are variable (exponential backoff and retry)
@@ -39,12 +39,7 @@
  * execute that many retries, and keep sending retry packets until that time
  * is reached.
  */
-#ifndef CONFIG_NET_RETRY_COUNT
-# define TIMEOUT_COUNT	5		/* # of timeouts before giving up */
-#else
-# define TIMEOUT_COUNT	(CONFIG_NET_RETRY_COUNT)
-#endif
-#define TIMEOUT_MS	((3 + (TIMEOUT_COUNT * 5)) * 1000)
+#define TIMEOUT_MS	((3 + (CONFIG_NET_RETRY_COUNT * 5)) * 1000)
 
 #define PORT_BOOTPS	67		/* BOOTP server UDP port */
 #define PORT_BOOTPC	68		/* BOOTP client UDP port */
diff --git a/net/rarp.c b/net/rarp.c
index a676a4253b..231b6233c0 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -14,11 +14,6 @@
 #include "rarp.h"
 
 #define TIMEOUT 5000UL /* Milliseconds before trying BOOTP again */
-#ifndef	CONFIG_NET_RETRY_COUNT
-#define TIMEOUT_COUNT 5 /* # of timeouts before giving up  */
-#else
-#define TIMEOUT_COUNT (CONFIG_NET_RETRY_COUNT)
-#endif
 
 int rarp_try;
 
@@ -57,7 +52,7 @@ void rarp_receive(struct ip_udp_hdr *ip, unsigned len)
  */
 static void rarp_timeout_handler(void)
 {
-	if (rarp_try >= TIMEOUT_COUNT) {
+	if (rarp_try >= CONFIG_NET_RETRY_COUNT) {
 		puts("\nRetry count exceeded; starting again\n");
 		net_start_again();
 	} else {
diff --git a/net/tftp.c b/net/tftp.c
index 62a9648474..e1e359732e 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -27,12 +27,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define WELL_KNOWN_PORT	69
 /* Millisecs to timeout for lost pkt */
 #define TIMEOUT		5000UL
-#ifndef	CONFIG_NET_RETRY_COUNT
-/* # of timeouts before giving up */
-# define TIMEOUT_COUNT	10
-#else
-# define TIMEOUT_COUNT  (CONFIG_NET_RETRY_COUNT * 2)
-#endif
 /* Number of "loading" hashes per line (for checking the image size) */
 #define HASHES_PER_LINE	65
 
@@ -47,7 +41,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define TFTP_OACK	6
 
 static ulong timeout_ms = TIMEOUT;
-static int timeout_count_max = TIMEOUT_COUNT;
+static int timeout_count_max = (CONFIG_NET_RETRY_COUNT * 2);
 static ulong time_start;   /* Record time we started tftp */
 
 /*
@@ -60,7 +54,7 @@ static ulong time_start;   /* Record time we started tftp */
  * non-standard timeout behavior when initiating a TFTP transfer.
  */
 ulong tftp_timeout_ms = TIMEOUT;
-int tftp_timeout_count_max = TIMEOUT_COUNT;
+int tftp_timeout_count_max = (CONFIG_NET_RETRY_COUNT * 2);
 
 enum {
 	TFTP_ERR_UNDEFINED           = 0,
-- 
2.39.5