summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines
diff options
context:
space:
mode:
authorSaqib Khan <khansa@us.ibm.com>2017-03-13 12:37:16 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-03-20 10:50:54 +0000
commit8ca6161774df6e28085545ae9de7ad122296a17c (patch)
tree98712997e37211de5dc68bc5629680d8ac0b7892 /meta-openbmc-machines
parent4a03f88a79f728c2eb60e12419a2c8117bf02fe1 (diff)
downloadtalos-openbmc-8ca6161774df6e28085545ae9de7ad122296a17c.tar.gz
talos-openbmc-8ca6161774df6e28085545ae9de7ad122296a17c.zip
meta-witherspoon: vcs-control: Add retries and journal entries
- Added journal entry for retrying ucd driver rebinding - Added retry for finding the ucd driver entry - Added sleep time in between retires to resolve any timing issue Resolves openbmc/openbmc#1298 Change-Id: Id80f11e14d3f4ac59ead0ff171944ff83e8874b1 Signed-off-by: Saqib Khan <khansa@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines')
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh23
1 files changed, 18 insertions, 5 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh
index 0ce07ea37..49205cca2 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh
@@ -5,11 +5,21 @@
# 10/28/16 PGR -
# 11/10/16 PGR - unbind/bind UCD driver
+ucd_retries=5
+
# unbind ucd driver to permit i2cset
ucdpath="/sys/bus/i2c/drivers/ucd9000"
if [ -e $ucdpath ]
then
- ucd=`ls $ucdpath | grep 64`
+ i=0
+ until [ $i -ge $ucd_retries ] || [ ! -z $ucd ]; do
+ ucd=`ls $ucdpath | grep 64`
+ if [ $i -ge "1" ]; then
+ echo "Unable to find UCD driver. Retry number $i"
+ sleep 1
+ fi
+ i=$((i+1))
+ done
echo $ucd > $ucdpath/unbind
fi
@@ -27,12 +37,15 @@ i2cset -y 11 0x64 0x00 0x0F i
i2cset -y 11 0x64 0x02 0x1A i
# re-bind ucd driver
-ucd_retries="5"
if [ -e $ucdpath ]; then
- i=0
- until [ $i -ge $ucd_retries ] || [ -e $ucdpath/$ucd ]; do
- i=$((i+1))
+ j=0
+ until [ $j -ge $ucd_retries ] || [ -e $ucdpath/$ucd ]; do
+ j=$((j+1))
echo $ucd > $ucdpath/bind || ret=$?
+ if [ $j -gt 1 ]; then
+ echo "rebinding UCD driver. Retry number $j"
+ sleep 1
+ fi
done
if [ ! -e $ucdpath/$ucd ]; then exit $ret; fi
fi
OpenPOWER on IntegriCloud