[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 06/48] igb: Clear IMS bits when committing ICR access
From: |
Akihiko Odaki |
Subject: |
[PATCH v4 06/48] igb: Clear IMS bits when committing ICR access |
Date: |
Wed, 26 Apr 2023 19:36:34 +0900 |
The datasheet says contradicting statements regarding ICR accesses so it
is not reliable to determine the behavior of ICR accesses. However,
e1000e does clear IMS bits when reading ICR accesses and Linux also
expects ICR accesses will clear IMS bits according to:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/igb/igb_main.c?h=v6.2#n8048
Fixes: 3a977deebe ("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
---
hw/net/igb_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index 96a118b6c1..eaca5bd2b6 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -2452,16 +2452,16 @@ igb_set_ims(IGBCore *core, int index, uint32_t val)
static void igb_commit_icr(IGBCore *core)
{
/*
- * If GPIE.NSICR = 0, then the copy of IAM to IMS will occur only if at
+ * If GPIE.NSICR = 0, then the clear of IMS will occur only if at
* least one bit is set in the IMS and there is a true interrupt as
* reflected in ICR.INTA.
*/
if ((core->mac[GPIE] & E1000_GPIE_NSICR) ||
(core->mac[IMS] && (core->mac[ICR] & E1000_ICR_INT_ASSERTED))) {
- igb_set_ims(core, IMS, core->mac[IAM]);
- } else {
- igb_update_interrupt_state(core);
+ igb_clear_ims_bits(core, core->mac[IAM]);
}
+
+ igb_update_interrupt_state(core);
}
static void igb_set_icr(IGBCore *core, int index, uint32_t val)
--
2.40.0
- [PATCH v4 00/48] igb: Fix for DPDK, Akihiko Odaki, 2023/04/26
- [PATCH v4 01/48] hw/net/net_tx_pkt: Decouple implementation from PCI, Akihiko Odaki, 2023/04/26
- [PATCH v4 02/48] hw/net/net_tx_pkt: Decouple interface from PCI, Akihiko Odaki, 2023/04/26
- [PATCH v4 03/48] e1000x: Fix BPRC and MPRC, Akihiko Odaki, 2023/04/26
- [PATCH v4 04/48] igb: Fix Rx packet type encoding, Akihiko Odaki, 2023/04/26
- [PATCH v4 05/48] igb: Do not require CTRL.VME for tx VLAN tagging, Akihiko Odaki, 2023/04/26
- [PATCH v4 06/48] igb: Clear IMS bits when committing ICR access,
Akihiko Odaki <=
- [PATCH v4 07/48] net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols(), Akihiko Odaki, 2023/04/26
- [PATCH v4 08/48] e1000e: Always copy ethernet header, Akihiko Odaki, 2023/04/26
- [PATCH v4 09/48] igb: Always copy ethernet header, Akihiko Odaki, 2023/04/26
- [PATCH v4 10/48] Fix references to igb Avocado test, Akihiko Odaki, 2023/04/26
- [PATCH v4 11/48] tests/avocado: Remove unused imports, Akihiko Odaki, 2023/04/26
- [PATCH v4 12/48] tests/avocado: Remove test_igb_nomsi_kvm, Akihiko Odaki, 2023/04/26
- [PATCH v4 13/48] hw/net/net_tx_pkt: Remove net_rx_pkt_get_l4_info, Akihiko Odaki, 2023/04/26
- [PATCH v4 14/48] net/eth: Rename eth_setup_vlan_headers_ex, Akihiko Odaki, 2023/04/26
- [PATCH v4 15/48] e1000x: Share more Rx filtering logic, Akihiko Odaki, 2023/04/26
- [PATCH v4 16/48] e1000x: Take CRC into consideration for size check, Akihiko Odaki, 2023/04/26