From 9547b3da44d546f0083dd3aeb5436226fccf81e3 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Mon, 13 Apr 2020 22:03:36 +0530 Subject: [PATCH] ZZ: Fix System Attention Indicator location code We are using SAI indicator location from SLCA to represent System Attention Indicator location code. In P9, this is mapped to op-panel location code. op-panel has identify and fault LEDs as well. Our SPCN command lists op-panel location code as well. Hence we get below OPAL warning. OPAL msglog: FSPLED: duplicate location code U78D3.001.WT0004T-D1 Because of above issue we are not creating device tree node for D1 identify/fault indicators. We have System Attention Indicator at enclosure level as well.. which is replica of attention indicator in op-panel. Hence use System VPD location code to represent attention indicator. Note that we have dedicated MBOX command to read/update System Attention Indicator which doesn't need location code. Hence we are fine with this change. Signed-off-by: Vasant Hegde Signed-off-by: Oliver O'Halloran --- hdata/slca.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hdata/slca.c b/hdata/slca.c index dd49335058eb..131e815af2d0 100644 --- a/hdata/slca.c +++ b/hdata/slca.c @@ -87,6 +87,7 @@ static const struct slca_entry *slca_get_sai_entry(void) int count; unsigned int i; struct HDIF_common_hdr *slca_hdr; + uint16_t sai_fru_id = SLCA_SAI_INDICATOR_ID; slca_hdr = get_hdif(&spira.ntuples.slca, SLCA_HDIF_SIG); if (!slca_hdr) { @@ -100,6 +101,9 @@ static const struct slca_entry *slca_get_sai_entry(void) return NULL; } + if (proc_gen >= proc_gen_p9 && dt_find_by_path(dt_root, "fsps")) + sai_fru_id = SLCA_SYSTEM_VPD_ID; + for (i = 0; i < count; i++) { const struct slca_entry *s_entry; unsigned int entry_sz; @@ -108,7 +112,7 @@ static const struct slca_entry *slca_get_sai_entry(void) i, &entry_sz); if (s_entry && VPD_ID(s_entry->fru_id[0], - s_entry->fru_id[1]) == SLCA_SAI_INDICATOR_ID) { + s_entry->fru_id[1]) == sai_fru_id) { prlog(PR_TRACE, "SLCA: SAI index: 0x%x\n", s_entry->my_index); prlog(PR_TRACE, "SLCA: SAI location code: %s\n",