summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAviram Bar-Haim <aviramb@mellanox.com>2016-06-11 15:05:16 +0300
committerAviram Bar-Haim <aviramb@mellanox.com>2016-06-19 18:34:46 +0300
commita8c7bc2245c0b0b751e4378a685868af075bdb93 (patch)
tree0da4cd58b9cac2c716efe326b64c1551493748ce
parent1a8df66c73218c8a24993bc66d1a25766967bcdc (diff)
Add support for ConnectX-4 LX FW configurations
Notes
Notes (review): Code-Review+2: Aviram Bar-Haim <aviramb@mellanox.com> Workflow+1: Aviram Bar-Haim <aviramb@mellanox.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Sun, 19 Jun 2016 15:35:11 +0000 Reviewed-on: https://review.openstack.org/328617 Project: openstack/fuel-plugin-mellanox Branch: refs/heads/master
-rwxr-xr-xbootstrap/sync/usr/bin/mlnx_fw_upgrade13
1 files changed, 7 insertions, 6 deletions
diff --git a/bootstrap/sync/usr/bin/mlnx_fw_upgrade b/bootstrap/sync/usr/bin/mlnx_fw_upgrade
index f85f309..d60af49 100755
--- a/bootstrap/sync/usr/bin/mlnx_fw_upgrade
+++ b/bootstrap/sync/usr/bin/mlnx_fw_upgrade
@@ -51,7 +51,8 @@ fi
51if which mst; then 51if which mst; then
52 echo "Enabling SR-IOV in FW" >> $LOG_FILE 52 echo "Enabling SR-IOV in FW" >> $LOG_FILE
53 mst start >> $LOG_FILE 53 mst start >> $LOG_FILE
54 mlxconfig -d /dev/mst/mt4115_pciconf0 q |grep -q SRIOV_EN 54 dev=`mst status | grep 411 | awk '{print $1}'`
55 mlxconfig -d $dev q |grep -q SRIOV_EN
55 if [ $? -ne 0 ]; then 56 if [ $? -ne 0 ]; then
56 echo "Problem accessing FW configurations, skipping FW configurations." >> $LOG_FILE 57 echo "Problem accessing FW configurations, skipping FW configurations." >> $LOG_FILE
57 exit 0 58 exit 0
@@ -61,21 +62,21 @@ if which mst; then
61 62
62 # Verify link type (if forced) 63 # Verify link type (if forced)
63 if $FORCE_LINK_TYPE; then 64 if $FORCE_LINK_TYPE; then
64 mlxconfig -d /dev/mst/mt4115_pciconf0 q | grep LINK_TYPE_P1 | awk '{print $2}' | \ 65 mlxconfig -d $dev q | grep LINK_TYPE_P1 | awk '{print $2}' | \
65 grep $LINK_TYPE &> /dev/null 66 grep $LINK_TYPE &> /dev/null
66 if [ $? -ne 0 ]; then 67 if [ $? -ne 0 ]; then
67 echo "Setting Link type as $LINK_TYPE in FW" >> $LOG_FILE 68 echo "Setting Link type as $LINK_TYPE in FW" >> $LOG_FILE
68 mlxconfig -d /dev/mst/mt4115_pciconf0 -y set LINK_TYPE_P1=$LINK_TYPE \ 69 mlxconfig -d $dev -y set LINK_TYPE_P1=$LINK_TYPE \
69 LINK_TYPE_P2=$LINK_TYPE >> $LOG_FILE 70 LINK_TYPE_P2=$LINK_TYPE >> $LOG_FILE
70 reset_fw=true 71 reset_fw=true
71 fi 72 fi
72 fi 73 fi
73 74
74 # Verify MAX VFs num 75 # Verify MAX VFs num
75 mlxconfig -d /dev/mst/mt4115_pciconf0 q | grep NUM_OF_VFS | grep $MAX_VFS &> /dev/null 76 mlxconfig -d $dev q | grep NUM_OF_VFS | grep $MAX_VFS &> /dev/null
76 if [ $? -ne 0 ]; then 77 if [ $? -ne 0 ]; then
77 echo "Setting max VFs to $MAX_VFS in FW" >> $LOG_FILE 78 echo "Setting max VFs to $MAX_VFS in FW" >> $LOG_FILE
78 mlxconfig -d /dev/mst/mt4115_pciconf0 -y set SRIOV_EN=1 NUM_OF_VFS=$MAX_VFS \ 79 mlxconfig -d $dev -y set SRIOV_EN=1 NUM_OF_VFS=$MAX_VFS \
79 VF_LOG_BAR_SIZE=1 NUM_VF_MSIX=4 >> $LOG_FILE 80 VF_LOG_BAR_SIZE=1 NUM_VF_MSIX=4 >> $LOG_FILE
80 reset_fw=true 81 reset_fw=true
81 fi 82 fi
@@ -83,7 +84,7 @@ if which mst; then
83 # Reset ConnectX-4 FW 84 # Reset ConnectX-4 FW
84 if $reset_fw; then 85 if $reset_fw; then
85 echo "Reset FW on MLNX Card" >> $LOG_FILE 86 echo "Reset FW on MLNX Card" >> $LOG_FILE
86 mlxfwreset --device /dev/mst/mt4115_pciconf0 -y reset >> $LOG_FILE 87 mlxfwreset --device $dev -y reset >> $LOG_FILE
87 for i in $(ibdev2netdev |grep mlx5 |grep -i down |awk '{print $5}') 88 for i in $(ibdev2netdev |grep mlx5 |grep -i down |awk '{print $5}')
88 do 89 do
89 ifconfig $i up; 90 ifconfig $i up;