[Skiboot] [PATCH] ZZ: Fix System Attention Indicator location code
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Tue Apr 14 02:33:36 AEST 2020
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 <hegdevasant at linux.vnet.ibm.com>
---
hdata/slca.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hdata/slca.c b/hdata/slca.c
index dd4933505..131e815af 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",
--
2.21.1
More information about the Skiboot
mailing list