git: 73fa89e041ff - main - ix: Fix accessing wrong register
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Aug 2023 13:44:41 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/src/commit/?id=73fa89e041ffc3093178cb2bcc47a6adb7da7f42
commit 73fa89e041ffc3093178cb2bcc47a6adb7da7f42
Author: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
AuthorDate: 2023-08-10 13:43:21 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-08-10 13:43:21 +0000
ix: Fix accessing wrong register
Use IXGBE_GRC_BY_MAC(hw) macro instead of IXGBE_GRC as IXGBE_GRC's
address is different on Denverton platform.
This patch is part of change made in NetBSD kernel
by Masanobu Saitoh, NetBSD maintainer.
Differential Revision: https://reviews.freebsd.org/D19175
Approved by: erj
---
sys/dev/ixgbe/if_ix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index c2a911773f4b..e76bed13e607 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -2855,8 +2855,8 @@ ixgbe_setup_low_power_mode(if_ctx_t ctx)
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T &&
hw->phy.ops.enter_lplu) {
/* Turn off support for APM wakeup. (Using ACPI instead) */
- IXGBE_WRITE_REG(hw, IXGBE_GRC,
- IXGBE_READ_REG(hw, IXGBE_GRC) & ~(u32)2);
+ IXGBE_WRITE_REG(hw, IXGBE_GRC_BY_MAC(hw),
+ IXGBE_READ_REG(hw, IXGBE_GRC_BY_MAC(hw)) & ~(u32)2);
/*
* Clear Wake Up Status register to prevent any previous wakeup