Skip to content

Commit

Permalink
ZZ: Fix System Attention Indicator location code
Browse files Browse the repository at this point in the history
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@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Apr 15, 2020
1 parent 3466474 commit 9547b3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hdata/slca.c
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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",
Expand Down

0 comments on commit 9547b3d

Please sign in to comment.