diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-08 17:29:06 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-08 17:29:06 +1100 |
commit | 71239ffb353db75bf2bf191949bbaa63cd44de1c (patch) | |
tree | 75ff86ebdcfa61370a4b43910045123b1c683795 /hw/ipmi | |
parent | ce6c2214be66c18a4c1d5db76888db4242cda586 (diff) | |
download | skiboot-71239ffb353db75bf2bf191949bbaa63cd44de1c.zip skiboot-71239ffb353db75bf2bf191949bbaa63cd44de1c.tar.gz skiboot-71239ffb353db75bf2bf191949bbaa63cd44de1c.tar.bz2 |
bmc_platform: fail PNOR access request if no bmc *before* we reserve it
Fixes: 5611389876a748e19b7593d4eb426ced7a6ed31f
Reported-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ipmi')
-rw-r--r-- | hw/ipmi/ipmi-sel.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c index b79959c..2cd4535 100644 --- a/hw/ipmi/ipmi-sel.c +++ b/hw/ipmi/ipmi-sel.c @@ -464,10 +464,6 @@ static void sel_pnor(uint8_t access) switch (access) { case REQUEST_PNOR: prlog(PR_NOTICE, "PNOR access requested\n"); - granted = flash_reserve(); - if (granted) - occ_pnor_set_owner(PNOR_OWNER_EXTERNAL); - if (bmc_platform->ipmi_oem_pnor_access_status == 0) { /** * @fwts-label PNORAccessYeahButNoBut @@ -479,6 +475,9 @@ static void sel_pnor(uint8_t access) break; } + granted = flash_reserve(); + if (granted) + occ_pnor_set_owner(PNOR_OWNER_EXTERNAL); /* Ack the request */ msg = ipmi_mkmsg_simple(bmc_platform->ipmi_oem_pnor_access_status, &granted, 1); ipmi_queue_msg(msg); |