[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 v2 07/11] hw/net/lan9118: Rename tx_fifo_size -> tx_fifo_
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.1 v2 07/11] hw/net/lan9118: Rename tx_fifo_size -> tx_fifo_bytes |
Date: |
Tue, 9 Apr 2024 15:37:56 +0200 |
tx_fifo_size is a byte count, rename it to avoid confusion.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/net/lan9118.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index ba92681e2e..a983ce193b 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -251,7 +251,7 @@ struct lan9118_state {
int32_t eeprom_writable;
uint8_t eeprom[128];
- int32_t tx_fifo_size;
+ int32_t tx_fifo_bytes;
LAN9118Packet *txp;
LAN9118Packet tx_packet;
@@ -322,7 +322,7 @@ static const VMStateDescription vmstate_lan9118 = {
VMSTATE_UINT32(phy_int_mask, lan9118_state),
VMSTATE_INT32(eeprom_writable, lan9118_state),
VMSTATE_UINT8_ARRAY(eeprom, lan9118_state, 128),
- VMSTATE_INT32(tx_fifo_size, lan9118_state),
+ VMSTATE_INT32(tx_fifo_bytes, lan9118_state),
/* txp always points at tx_packet so need not be saved */
VMSTATE_STRUCT(tx_packet, lan9118_state, 0,
vmstate_lan9118_packet, LAN9118Packet),
@@ -456,7 +456,7 @@ static void lan9118_reset(DeviceState *d)
s->txp->cmd_b = 0xffffffffu;
s->txp->len = 0;
s->txp->fifo_used = 0;
- s->tx_fifo_size = TX_DATA_FIFO_BYTES;
+ s->tx_fifo_bytes = TX_DATA_FIFO_BYTES;
s->tx_status_fifo_used = 0;
s->rx_status_fifo_size = 704;
s->rx_fifo_size = 2640;
@@ -757,7 +757,7 @@ static void tx_fifo_push(lan9118_state *s, uint32_t val)
{
int n;
- if (s->txp->fifo_used == s->tx_fifo_size) {
+ if (s->txp->fifo_used == s->tx_fifo_bytes) {
s->int_sts |= TDFO_INT;
return;
}
@@ -1285,7 +1285,7 @@ static uint64_t lan9118_readl(void *opaque, hwaddr offset,
return (s->rx_status_fifo_used << 16) | (s->rx_fifo_used << 2);
case CSR_TX_FIFO_INF:
return (s->tx_status_fifo_used << 16)
- | (s->tx_fifo_size - s->txp->fifo_used);
+ | (s->tx_fifo_bytes - s->txp->fifo_used);
case CSR_PMT_CTRL:
return s->pmt_ctrl;
case CSR_GPIO_CFG:
--
2.41.0
- [PATCH-for-9.0 v2 00/11] hw/net/lan9118: Fix overflow in TX FIFO, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.0 v2 01/11] hw/net/lan9118: Replace magic '2048' value by MIL_TXFIFO_SIZE definition, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.0 v2 02/11] hw/net/lan9118: Fix overflow in MIL TX FIFO, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 03/11] hw/net/lan9118: Remove duplicated assignment, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 04/11] hw/net/lan9118: Replace magic '5' value by TX_FIF_SZ_RESET definition, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 06/11] hw/net/lan9118: Use TX_DATA_FIFO_BYTES definition, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 07/11] hw/net/lan9118: Rename tx_fifo_size -> tx_fifo_bytes,
Philippe Mathieu-Daudé <=
- [PATCH-for-9.1 v2 11/11] hw/net/lan9118: Rename rx_fifo_size -> rx_fifo_wordcount, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 05/11] hw/net/lan9118: Add definitions for FIFO allocated sizes, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 09/11] hw/net/lan9118: Rename rx_status_fifo_size -> rx_status_fifo_wordcount, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 10/11] hw/net/lan9118: Use RX_DATA_FIFO_BYTES definition, Philippe Mathieu-Daudé, 2024/04/09
- [PATCH-for-9.1 v2 08/11] hw/net/lan9118: Use RX_STATUS_FIFO_BYTES definition, Philippe Mathieu-Daudé, 2024/04/09