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 148148 * during a error FW error.
149149 */
150150#define CSR_FUNC_SCRATCH_INIT_VALUE (0x01010101)
151+ #define CSR_FUNC_SCRATCH_POWER_OFF_MASK 0xFFFF
151152
152153/* Bits for CSR_HW_IF_CONFIG_REG */
153154#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)
17361736 * Scratch value was altered, this means the device was powered off, we
17371737 * need to reset it completely.
17381738 * 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.
17401741 * For older devices, just try silently to grab the NIC.
17411742 */
17421743 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 ))
17441746 device_was_powered_off = true;
17451747 } else {
17461748 /*
You can’t perform that action at this time.
0 commit comments