[DellEMC] Recovering the SSD upgrade status post reload in S6100 (#7688)
Why I did it To recover the SSD upgrade state in case, if ONIE-uninstall or ssd_fw_upgrade folder got deleted. To handle newer SSD version(S21506G - 3IE GPIO7 low devices). Also correcting the error messages for non-upgraded S6100s.
This commit is contained in:
parent
4955956b51
commit
04b6112132
@ -2,15 +2,20 @@
|
||||
SSD_FW_UPGRADE="/host/ssd_fw_upgrade"
|
||||
|
||||
_error_msg(){
|
||||
echo "The SSD on this unit is faulty. Do not power-cycle/reboot this unit!"
|
||||
echo "The SSD on this unit is $1. Do not power-cycle/reboot this unit!"
|
||||
echo "soft-/fast-/warm-reboot is allowed."
|
||||
logger -p user.crit -t DELL_S6100_SSD_MON "The SSD on this unit is faulty. Do not power-cycle/reboot this unit!"
|
||||
logger -p user.crit -t DELL_S6100_SSD_MON "The SSD on this unit is $1. Do not power-cycle/reboot this unit!"
|
||||
logger -p user.crit -t DELL_S6100_SSD_MON "soft-/fast-/warm-reboot is allowed."
|
||||
}
|
||||
|
||||
# Check SSD Status
|
||||
if [ -e $SSD_FW_UPGRADE/GPIO7_low ] || [ -e $SSD_FW_UPGRADE/GPIO7_error ] || [ -e $SSD_FW_UPGRADE/GPIO7_pending_upgrade ]; then
|
||||
_error_msg
|
||||
if [ -e $SSD_FW_UPGRADE/GPIO7_pending_upgrade ]; then
|
||||
_error_msg "running older firmware"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e $SSD_FW_UPGRADE/GPIO7_low ] || [ -e $SSD_FW_UPGRADE/GPIO7_error ]; then
|
||||
_error_msg "faulty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -25,7 +30,7 @@ if [ -e $SSD_FW_UPGRADE/GPIO7_high ]; then
|
||||
if [ $GPIO_STATUS == "0x01" ];then
|
||||
exit 0
|
||||
else
|
||||
_error_msg
|
||||
_error_msg "faulty"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -89,6 +89,14 @@ elif [ $SSD_FW_VERSION == "s141002g" ] || [ $SSD_FW_VERSION == "s16425cg" ]; the
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [ $SSD_FW_VERSION == "s210506g" ] || [ $SSD_UPGRADE_STATUS2 == "3" ]; then
|
||||
rm -rf $SSD_FW_UPGRADE/GPIO7_*
|
||||
touch $SSD_FW_UPGRADE/GPIO7_low
|
||||
logger -p user.crit -t DELL_S6100_SSD_MON "The SSD on this unit is faulty. Do not power-cycle/reboot this unit!"
|
||||
logger -p user.crit -t DELL_S6100_SSD_MON "soft-/fast-/warm-reboot is allowed."
|
||||
|
||||
echo "$0 `date` SSD entered loader mode in first mp_64 and upgraded to version s210506g after second mp_64." >> $SSD_UPGRADE_LOG
|
||||
|
||||
else
|
||||
if [ $SSD_UPGRADE_STATUS1 == "ff" ] && [ $SSD_UPGRADE_STATUS2 == "ff" ]; then
|
||||
rm -rf $SSD_FW_UPGRADE/GPIO7_*
|
||||
@ -116,6 +124,3 @@ echo "$0 `date` SMF Register 2 = $SSD_UPGRADE_STATUS2" >> $SSD_UPGRADE_LOG
|
||||
echo "$SMART_CMD" >> $SSD_UPGRADE_LOG
|
||||
echo "$iSMART_CMD" >> $SSD_UPGRADE_LOG
|
||||
sync
|
||||
# Clearing the upgrade status
|
||||
io_rd_wr.py --set --val 06 --offset 210; io_rd_wr.py --set --val 09 --offset 211; io_rd_wr.py --set --val ff --offset 213
|
||||
io_rd_wr.py --set --val 06 --offset 210; io_rd_wr.py --set --val 0A --offset 211; io_rd_wr.py --set --val ff --offset 213
|
||||
|
Reference in New Issue
Block a user