File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
drivers/net/wireless/intel/iwlwifi Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 148
148
* during a error FW error.
149
149
*/
150
150
#define CSR_FUNC_SCRATCH_INIT_VALUE (0x01010101)
151
+ #define CSR_FUNC_SCRATCH_POWER_OFF_MASK 0xFFFF
151
152
152
153
/* Bits for CSR_HW_IF_CONFIG_REG */
153
154
#define CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP_DASH (0x0000000F)
Original file line number Diff line number Diff line change @@ -1736,11 +1736,13 @@ static int _iwl_pci_resume(struct device *device, bool restore)
1736
1736
* Scratch value was altered, this means the device was powered off, we
1737
1737
* need to reset it completely.
1738
1738
* Note: MAC (bits 0:7) will be cleared upon suspend even with wowlan,
1739
- * so assume that any bits there mean that the device is usable.
1739
+ * but not bits [15:8]. So if we have bits set in lower word, assume
1740
+ * the device is alive.
1740
1741
* For older devices, just try silently to grab the NIC.
1741
1742
*/
1742
1743
if (trans -> trans_cfg -> device_family >= IWL_DEVICE_FAMILY_BZ ) {
1743
- if (!iwl_read32 (trans , CSR_FUNC_SCRATCH ))
1744
+ if (!(iwl_read32 (trans , CSR_FUNC_SCRATCH ) &
1745
+ CSR_FUNC_SCRATCH_POWER_OFF_MASK ))
1744
1746
device_was_powered_off = true;
1745
1747
} else {
1746
1748
/*
You can’t perform that action at this time.
0 commit comments