Skip to content

Commit 126ec41

Browse files
gabaydjmberg-intel
authored andcommitted
wifi: iwlwifi: Force SCU_ACTIVE for specific platforms
Firmware 0x2F7 assert observed in Dell platforms when using GL HW. This issue is mitigated by setting SCU_FORCE_ACTIVE during platform low power states. Driver shall indicate firmware to force SCU active by setting bit 29 in context info prph scratch control flags. This mitigation is limited to Dell platforms with GL HW only. Signed-off-by: Daniel Gabay <[email protected]> Reviewed-by: Ofer Kimelman <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.3d0c56c2bb1a.I97d9da402890d2085b5698666cceffc417b6b6df@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent fc61222 commit 126ec41

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-context-info-gen3.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
22
/*
3-
* Copyright (C) 2018, 2020-2023 Intel Corporation
3+
* Copyright (C) 2018, 2020-2024 Intel Corporation
44
*/
55
#ifndef __iwl_context_info_file_gen3_h__
66
#define __iwl_context_info_file_gen3_h__
@@ -56,6 +56,8 @@ enum iwl_prph_scratch_mtr_format {
5656
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K: 8kB RB size
5757
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K: 12kB RB size
5858
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K: 16kB RB size
59+
* @IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE: Indicate fw to set SCU_FORCE_ACTIVE
60+
* upon reset.
5961
*/
6062
enum iwl_prph_scratch_flags {
6163
IWL_PRPH_SCRATCH_IMR_DEBUG_EN = BIT(1),
@@ -71,6 +73,7 @@ enum iwl_prph_scratch_flags {
7173
IWL_PRPH_SCRATCH_RB_SIZE_EXT_8K = 8 << 20,
7274
IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K = 9 << 20,
7375
IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K = 10 << 20,
76+
IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE = BIT(29),
7477
};
7578

7679
/*

drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22
/*
3-
* Copyright (C) 2018-2023 Intel Corporation
3+
* Copyright (C) 2018-2024 Intel Corporation
44
*/
5+
#include <linux/dmi.h>
56
#include "iwl-trans.h"
67
#include "iwl-fh.h"
78
#include "iwl-context-info-gen3.h"
89
#include "internal.h"
910
#include "iwl-prph.h"
1011

12+
static const struct dmi_system_id dmi_force_scu_active_approved_list[] = {
13+
{ .ident = "DELL",
14+
.matches = {
15+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
16+
},
17+
},
18+
{ .ident = "DELL",
19+
.matches = {
20+
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
21+
},
22+
},
23+
/* keep last */
24+
{}
25+
};
26+
27+
static bool iwl_is_force_scu_active_approved(void)
28+
{
29+
return !!dmi_check_system(dmi_force_scu_active_approved_list);
30+
}
31+
1132
static void
1233
iwl_pcie_ctxt_info_dbg_enable(struct iwl_trans *trans,
1334
struct iwl_prph_scratch_hwm_cfg *dbg_cfg,
@@ -128,6 +149,14 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
128149
if (trans->trans_cfg->imr_enabled)
129150
control_flags |= IWL_PRPH_SCRATCH_IMR_DEBUG_EN;
130151

152+
if (CSR_HW_REV_TYPE(trans->hw_rev) == IWL_CFG_MAC_TYPE_GL &&
153+
iwl_is_force_scu_active_approved()) {
154+
control_flags |= IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE;
155+
IWL_DEBUG_FW(trans,
156+
"Context Info: Set SCU_FORCE_ACTIVE (0x%x) in control_flags\n",
157+
IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE);
158+
}
159+
131160
/* initialize RX default queue */
132161
prph_sc_ctrl->rbd_cfg.free_rbd_addr =
133162
cpu_to_le64(trans_pcie->rxq->bd_dma);

0 commit comments

Comments
 (0)