summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-12-09 22:25:24 -0700
committerTom Warren <twarren@nvidia.com>2014-12-18 13:21:41 -0700
commitc94bbfdf516e0ebaf2cb08025174f224c0b391f0 (patch)
treecf71138d93d960e172a1d05278d29fc72136f34d
parentd1e5b4065ee14a6dbabd9318a8f73194c6536d6e (diff)
downloadu-boot-imx-c94bbfdf516e0ebaf2cb08025174f224c0b391f0.zip
u-boot-imx-c94bbfdf516e0ebaf2cb08025174f224c0b391f0.tar.gz
u-boot-imx-c94bbfdf516e0ebaf2cb08025174f224c0b391f0.tar.bz2
net: rtl8169: Honor CONFIG_SYS_RX_ETH_BUFFER
According to the top-level README file, this configuration setting can be used to override the number of receive buffers that an ethernet NIC uses. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
-rw-r--r--drivers/net/rtl8169.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index c3ce175..955b2e1 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -79,7 +79,11 @@ static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
#define NUM_TX_DESC 1 /* Number of Tx descriptor registers */
-#define NUM_RX_DESC 4 /* Number of Rx descriptor registers */
+#ifdef CONFIG_SYS_RX_ETH_BUFFER
+ #define NUM_RX_DESC CONFIG_SYS_RX_ETH_BUFFER
+#else
+ #define NUM_RX_DESC 4 /* Number of Rx descriptor registers */
+#endif
#define RX_BUF_SIZE 1536 /* Rx Buffer size */
#define RX_BUF_LEN 8192