]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/net/lan9118: Replace magic '2048' value by MIL_TXFIFO_SIZE definition
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 8 Apr 2024 10:44:22 +0000 (12:44 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 Apr 2024 17:32:12 +0000 (20:32 +0300)
commit4e6240e184cd6303b7275118c7d574c973a3be35
treebeff96f12d532dfe5f00f7969a4a89ee278208c0
parent516bdbc2341892fb3b3173ec393c6dfc9515608f
hw/net/lan9118: Replace magic '2048' value by MIL_TXFIFO_SIZE definition

The magic 2048 is explained in the LAN9211 datasheet (DS00002414A)
in chapter 1.4, "10/100 Ethernet MAC":

  The MAC Interface Layer (MIL), within the MAC, contains a
  2K Byte transmit and a 128 Byte receive FIFO which is separate
  from the TX and RX FIFOs. [...]

Note, the use of the constant in lan9118_receive() reveals that
our implementation is using the same buffer for both tx and rx.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20240409133801.23503-2-philmd@linaro.org>
(cherry picked from commit a45223467e4e185fff1c76a6483784fa379ded77)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/net/lan9118.c