From patchwork Tue Apr 9 13:37:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 787209 Delivered-To: patch@linaro.org Received: by 2002:adf:fdd2:0:b0:346:15ad:a2a with SMTP id i18csp222157wrs; Tue, 9 Apr 2024 06:40:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW5QadxGhz+dojjDrDqdBW0Rk74OU5BOi5+skgw4F0dmjHmnfpGLO5aH8E9/jR0t/9cf64M8Hq6ydjiT6p2/pk3 X-Google-Smtp-Source: AGHT+IEsy2KDUzf2EblipinPMcd/8wkziNfxeju1w+3y+uhABP55xtxdCm0Px1VBr+sPmlf0VWcq X-Received: by 2002:a05:622a:4f:b0:431:38ea:1d42 with SMTP id y15-20020a05622a004f00b0043138ea1d42mr3633076qtw.30.1712670024235; Tue, 09 Apr 2024 06:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712670024; cv=none; d=google.com; s=arc-20160816; b=PeQBK/+IU41Hr9HzDK8She0E4nymhBMj/8OJ7VlexJZ0YB14kldiPUmfkJc3IzYTxI VlmikyuSoI1DDpl4Go1bKwNMQzw4Bqi/rZk8oIGNem9icKxqA0RLG8KlIlMfokuzgjdQ 410vg4YlD/wb4A6JpUMYQhMCQqyFXahjKX6yX+ZVwmoQt2hQMH+P/FiP3YhJhnikkvzY 8jUUJ2G6mucc8OQiDaNOjKwGHtHW1wI3bF4z2ZXjw8Pm6zP/ATq0uJUJsWOYinPBL8h6 /WuubIm8dbPHWWOTJNnJINsd2MsDnEgsqaxVYWlqPQhST4AxzV0b20exdH++rlFJrp87 jt9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LWebOFnaO2YfqkM2Zqjj72nsNguBU6W//GqzHg4t0x0=; fh=QOl9Xi9nQ721K4qxGgLCqy+fNk/yfBHdpOYFmb4mu2g=; b=tToVichfEw1jyBEL5YRse/eEhKQIcZRu1505daWHLSf628PJqRSvJojSAVN8YtXrdk Y8rK1ylybqY/qv7p8n1F9uMmT7uoJDgYb4z8ZBYioq7HRbvb4UdmTglJMOrs9wrTjQP0 vg3cIvjaJ22VSpYlF1V2Zkrg8WJeJ/J4QZbzgzuvjAtCExO/nVzcdxj1n7rPNryh4YYT IgVNa3fHLG51HE0GxAZKPXXRdGHnWYJ5Q34Ksj6Iix+1R9zC7fvkToxqWRDQEK4+PSKz nsXWPHKLnlogtb5/EHp+St5MyCy75U7yYN2kHt1j9FC4K++oWzWxTl4/ju+wpkYRU6Yx OxcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qmf28Bqt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l14-20020a05622a050e00b00431819d4ebfsi10731331qtx.521.2024.04.09.06.40.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Apr 2024 06:40:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qmf28Bqt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruBhE-0007Lc-Ao; Tue, 09 Apr 2024 09:39:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruBgX-0006Ah-KT for qemu-devel@nongnu.org; Tue, 09 Apr 2024 09:38:54 -0400 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruBgR-0008FV-Sq for qemu-devel@nongnu.org; Tue, 09 Apr 2024 09:38:46 -0400 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2d8b194341eso4265381fa.3 for ; Tue, 09 Apr 2024 06:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712669921; x=1713274721; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LWebOFnaO2YfqkM2Zqjj72nsNguBU6W//GqzHg4t0x0=; b=Qmf28Bqt9/Lk8VbUT/Uc313cTBuk3nl4lQP5KX8ZeS8GuAWTX2MbYz9C9XPSO4O1fF I77tuA9SO39o+EDBWIOhWNAgMVHe24e+xckBxIjBA4nBXBAYlmuPJpPbwUgmEGKlrzcJ G+UKytPg3lxUkcbdbDaR1r9HLiXABHva30zAQn7oWA0uu3vVuJKMXDKW3HuiOH3Dkk/5 tOhJT8LHescq/62o/EanEkYKghAPApMIjBMe3/1HNW6EDmND9hnM57KbmKRnYQn7QWD8 v2yjfdHMHYzUpfZsH4G4RWuj72D+b6mgKx2JF6CnH4hy9FYjCHG0n2i47lIv93BTa6CV U+4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712669921; x=1713274721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LWebOFnaO2YfqkM2Zqjj72nsNguBU6W//GqzHg4t0x0=; b=RXqqVXEP0dMmbbtPuq8Jyn+AXpxx+65JIORJei8SmnVfT3g8iZjsRBJZDsSGD5fcVi LWhu5w+7pKHjAZxxos/Vr/46XBf7IRHAyEqGH358EsJZU6/baI1dzIXT+Yi/JIp3FIs/ o7FOEt2ELR5xQckYgwryAfOqC+uf/o0qWfKvhiAaEejIe2iS19BFbTcEHZeFJ+rY0ICt DFLZLL7bDdSHVVTfJV9pFmdEgDVpN8D/6mTXKb92KRCn9DnkhcW688z3xoT5vE9f0vKf ApLOvdjbiHCjW6L6x8xdqld/gFJlV3cgZQrT+F8K7pIAbnpDLNVOhqyVpJzBuCkXw2xG E2yQ== X-Gm-Message-State: AOJu0YxxRqzdbGwjcNzMAXsXOIsfFjM5XEPy/QB9vIc1g7xK8GVPOTvr tDSjcJQTnTKsWYEJ5EbeLwlUfJg9MOpUG1bJBb+RpqaVZpjHJwA8oAnZa0Eakg1rkk6RmasAlkH E X-Received: by 2002:a05:651c:794:b0:2d8:67ee:2a44 with SMTP id g20-20020a05651c079400b002d867ee2a44mr6899106lje.8.1712669921293; Tue, 09 Apr 2024 06:38:41 -0700 (PDT) Received: from m1x-phil.lan ([176.176.160.134]) by smtp.gmail.com with ESMTPSA id t20-20020a05600c199400b0041691379a84sm1446429wmq.1.2024.04.09.06.38.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 09 Apr 2024 06:38:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Chuhong Yuan , Jason Wang , Alexander Bulekov , qemu-arm@nongnu.org, =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= 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 Message-ID: <20240409133801.23503-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240409133801.23503-1-philmd@linaro.org> References: <20240409133801.23503-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=philmd@linaro.org; helo=mail-lj1-x22e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org tx_fifo_size is a byte count, rename it to avoid confusion. Signed-off-by: Philippe Mathieu-Daudé --- 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: