]> 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:20:49 +0000 (20:20 +0300)
commitf3130798d4cf95ef4010a327688e3bec9974d1a2
tree37034af1c649f3c4c24e01d5f36ade3e46fa65ad
parentcd7beea4a4c60426f9240f35fe0b4c6fed31d6f1
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