mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
Merge branch 'net-ipa-minor-bug-fixes'
Alex Elder says: ==================== net: ipa: minor bug fixes The four patches in this series fix some errors, though none of them cause any compile or runtime problems. The first changes the files included by "drivers/net/ipa/reg.h" to ensure everything it requires is included with the file. It also stops unnecessarily including another file. The prerequisites are apparently satisfied other ways, currently. The second adds two struct declarations to "gsi_reg.h", to ensure they're declared before they're used later in the file. Again, it seems these declarations are currently resolved wherever this file is included. The third removes register definitions that were added for IPA v5.0 that are not needed. And the last updates some validity checks for IPA v5.0 registers. No IPA v5.0 platforms are yet supported, so the issues resolved here were never harmful. Versions 2 and 3 of this series change the "Fixes" tags in patches so they supply legitimate commit hashes. ==================== Link: https://lore.kernel.org/r/20230316145136.1795469-1-elder@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
0c98b8bc48
@ -15,6 +15,14 @@ static bool gsi_reg_id_valid(struct gsi *gsi, enum gsi_reg_id reg_id)
|
||||
switch (reg_id) {
|
||||
case INTER_EE_SRC_CH_IRQ_MSK:
|
||||
case INTER_EE_SRC_EV_CH_IRQ_MSK:
|
||||
return gsi->version >= IPA_VERSION_3_5;
|
||||
|
||||
case HW_PARAM_2:
|
||||
return gsi->version >= IPA_VERSION_3_5_1;
|
||||
|
||||
case HW_PARAM_4:
|
||||
return gsi->version >= IPA_VERSION_5_0;
|
||||
|
||||
case CH_C_CNTXT_0:
|
||||
case CH_C_CNTXT_1:
|
||||
case CH_C_CNTXT_2:
|
||||
@ -43,7 +51,6 @@ static bool gsi_reg_id_valid(struct gsi *gsi, enum gsi_reg_id reg_id)
|
||||
case CH_CMD:
|
||||
case EV_CH_CMD:
|
||||
case GENERIC_CMD:
|
||||
case HW_PARAM_2:
|
||||
case CNTXT_TYPE_IRQ:
|
||||
case CNTXT_TYPE_IRQ_MSK:
|
||||
case CNTXT_SRC_CH_IRQ:
|
||||
|
@ -10,6 +10,10 @@
|
||||
|
||||
#include <linux/bits.h>
|
||||
|
||||
struct platform_device;
|
||||
|
||||
struct gsi;
|
||||
|
||||
/**
|
||||
* DOC: GSI Registers
|
||||
*
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2019-2022 Linaro Ltd.
|
||||
* Copyright (C) 2019-2023 Linaro Ltd.
|
||||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
@ -15,6 +15,17 @@ static bool ipa_reg_id_valid(struct ipa *ipa, enum ipa_reg_id reg_id)
|
||||
enum ipa_version version = ipa->version;
|
||||
|
||||
switch (reg_id) {
|
||||
case FILT_ROUT_HASH_EN:
|
||||
return version == IPA_VERSION_4_2;
|
||||
|
||||
case FILT_ROUT_HASH_FLUSH:
|
||||
return version < IPA_VERSION_5_0 && version != IPA_VERSION_4_2;
|
||||
|
||||
case FILT_ROUT_CACHE_FLUSH:
|
||||
case ENDP_FILTER_CACHE_CFG:
|
||||
case ENDP_ROUTER_CACHE_CFG:
|
||||
return version >= IPA_VERSION_5_0;
|
||||
|
||||
case IPA_BCR:
|
||||
case COUNTER_CFG:
|
||||
return version < IPA_VERSION_4_5;
|
||||
@ -32,14 +43,17 @@ static bool ipa_reg_id_valid(struct ipa *ipa, enum ipa_reg_id reg_id)
|
||||
case SRC_RSRC_GRP_45_RSRC_TYPE:
|
||||
case DST_RSRC_GRP_45_RSRC_TYPE:
|
||||
return version <= IPA_VERSION_3_1 ||
|
||||
version == IPA_VERSION_4_5;
|
||||
version == IPA_VERSION_4_5 ||
|
||||
version == IPA_VERSION_5_0;
|
||||
|
||||
case SRC_RSRC_GRP_67_RSRC_TYPE:
|
||||
case DST_RSRC_GRP_67_RSRC_TYPE:
|
||||
return version <= IPA_VERSION_3_1;
|
||||
return version <= IPA_VERSION_3_1 ||
|
||||
version == IPA_VERSION_5_0;
|
||||
|
||||
case ENDP_FILTER_ROUTER_HSH_CFG:
|
||||
return version != IPA_VERSION_4_2;
|
||||
return version < IPA_VERSION_5_0 &&
|
||||
version != IPA_VERSION_4_2;
|
||||
|
||||
case IRQ_SUSPEND_EN:
|
||||
case IRQ_SUSPEND_CLR:
|
||||
@ -51,10 +65,6 @@ static bool ipa_reg_id_valid(struct ipa *ipa, enum ipa_reg_id reg_id)
|
||||
case SHARED_MEM_SIZE:
|
||||
case QSB_MAX_WRITES:
|
||||
case QSB_MAX_READS:
|
||||
case FILT_ROUT_HASH_EN:
|
||||
case FILT_ROUT_CACHE_CFG:
|
||||
case FILT_ROUT_HASH_FLUSH:
|
||||
case FILT_ROUT_CACHE_FLUSH:
|
||||
case STATE_AGGR_ACTIVE:
|
||||
case LOCAL_PKT_PROC_CNTXT:
|
||||
case AGGR_FORCE_CLOSE:
|
||||
@ -76,8 +86,6 @@ static bool ipa_reg_id_valid(struct ipa *ipa, enum ipa_reg_id reg_id)
|
||||
case ENDP_INIT_RSRC_GRP:
|
||||
case ENDP_INIT_SEQ:
|
||||
case ENDP_STATUS:
|
||||
case ENDP_FILTER_CACHE_CFG:
|
||||
case ENDP_ROUTER_CACHE_CFG:
|
||||
case IPA_IRQ_STTS:
|
||||
case IPA_IRQ_EN:
|
||||
case IPA_IRQ_CLR:
|
||||
|
@ -60,9 +60,8 @@ enum ipa_reg_id {
|
||||
SHARED_MEM_SIZE,
|
||||
QSB_MAX_WRITES,
|
||||
QSB_MAX_READS,
|
||||
FILT_ROUT_HASH_EN, /* Not IPA v5.0+ */
|
||||
FILT_ROUT_CACHE_CFG, /* IPA v5.0+ */
|
||||
FILT_ROUT_HASH_FLUSH, /* Not IPA v5.0+ */
|
||||
FILT_ROUT_HASH_EN, /* IPA v4.2 */
|
||||
FILT_ROUT_HASH_FLUSH, /* Not IPA v4.2 nor IPA v5.0+ */
|
||||
FILT_ROUT_CACHE_FLUSH, /* IPA v5.0+ */
|
||||
STATE_AGGR_ACTIVE,
|
||||
IPA_BCR, /* Not IPA v4.5+ */
|
||||
@ -77,12 +76,12 @@ enum ipa_reg_id {
|
||||
TIMERS_PULSE_GRAN_CFG, /* IPA v4.5+ */
|
||||
SRC_RSRC_GRP_01_RSRC_TYPE,
|
||||
SRC_RSRC_GRP_23_RSRC_TYPE,
|
||||
SRC_RSRC_GRP_45_RSRC_TYPE, /* Not IPA v3.5+, IPA v4.5 */
|
||||
SRC_RSRC_GRP_67_RSRC_TYPE, /* Not IPA v3.5+ */
|
||||
SRC_RSRC_GRP_45_RSRC_TYPE, /* Not IPA v3.5+; IPA v4.5, IPA v5.0 */
|
||||
SRC_RSRC_GRP_67_RSRC_TYPE, /* Not IPA v3.5+; IPA v5.0 */
|
||||
DST_RSRC_GRP_01_RSRC_TYPE,
|
||||
DST_RSRC_GRP_23_RSRC_TYPE,
|
||||
DST_RSRC_GRP_45_RSRC_TYPE, /* Not IPA v3.5+, IPA v4.5 */
|
||||
DST_RSRC_GRP_67_RSRC_TYPE, /* Not IPA v3.5+ */
|
||||
DST_RSRC_GRP_45_RSRC_TYPE, /* Not IPA v3.5+; IPA v4.5, IPA v5.0 */
|
||||
DST_RSRC_GRP_67_RSRC_TYPE, /* Not IPA v3.5+; IPA v5.0 */
|
||||
ENDP_INIT_CTRL, /* Not IPA v4.2+ for TX, not IPA v4.0+ for RX */
|
||||
ENDP_INIT_CFG,
|
||||
ENDP_INIT_NAT, /* TX only */
|
||||
@ -206,14 +205,6 @@ enum ipa_reg_qsb_max_reads_field_id {
|
||||
GEN_QMB_1_MAX_READS_BEATS, /* IPA v4.0+ */
|
||||
};
|
||||
|
||||
/* FILT_ROUT_CACHE_CFG register */
|
||||
enum ipa_reg_filt_rout_cache_cfg_field_id {
|
||||
ROUTER_CACHE_EN,
|
||||
FILTER_CACHE_EN,
|
||||
LOW_PRI_HASH_HIT_DISABLE,
|
||||
LRU_EVICTION_THRESHOLD,
|
||||
};
|
||||
|
||||
/* FILT_ROUT_HASH_EN and FILT_ROUT_HASH_FLUSH registers */
|
||||
enum ipa_reg_filt_rout_hash_field_id {
|
||||
IPV6_ROUTER_HASH,
|
||||
|
@ -6,7 +6,8 @@
|
||||
#define _REG_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/bits.h>
|
||||
#include <linux/log2.h>
|
||||
#include <linux/bug.h>
|
||||
|
||||
/**
|
||||
* struct reg - A register descriptor
|
||||
|
Loading…
Reference in New Issue
Block a user