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
This commit is contained in:
Piotr Pietruszewski 2023-08-10 15:43:21 +02:00 committed by Piotr Kubaj
parent 28d2e3b5de
commit 73fa89e041

View File

@ -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