[ewg] [PATCH] QLogic VNIC: Startup script changes.

Ramachandra K ramachandra.kuchimanchi at qlogic.com
Thu Jul 10 08:42:56 PDT 2008


From: Ramachandra K <ramachandra.kuchimanchi at qlogic.com>

QLogic VNIC startup script /etc/init.d/qlgc_vnic now takes care
of starting and stopping the QLogic VNIC service on host.

Signed-off-by: Ramachandra K <ramachandra.kuchimanchi at qlogic.com>
Signed-off-by: Poornima Kamath <poornima.kamath at qlogic.com>
Signed-off-by: Amar Mudrankit <amar.mudrankit at qlogic.com>
---

 ofed_scripts/openibd |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index b890d43..67a3b56 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -275,7 +275,7 @@ GEN1_UNLOAD_MODULES="ib_srp_target scsi_target ib_srp kdapltest_module ib_kdapl
 
 UNLOAD_MODULES="ib_mthca mlx4_enet mlx4_ib mlx4_core ib_ipath ipath_core ib_ehca iw_cxgb3 cxgb3"
 UNLOAD_MODULES="$UNLOAD_MODULES ib_ipoib ib_madeye ib_rds"
-UNLOAD_MODULES="$UNLOAD_MODULES rds ib_ucm kdapl ib_srp_target scsi_target ib_srpt ib_srp qlgc_vnic ib_iser ib_sdp"
+UNLOAD_MODULES="$UNLOAD_MODULES rds ib_ucm kdapl ib_srp_target scsi_target ib_srpt ib_srp ib_iser ib_sdp"
 UNLOAD_MODULES="$UNLOAD_MODULES rdma_ucm rdma_cm ib_addr ib_cm ib_local_sa findex"
 UNLOAD_MODULES="$UNLOAD_MODULES ib_sa ib_uverbs ib_umad ib_mad ib_core"
 
@@ -1033,29 +1033,7 @@ EOF
 
    # Create qlgc_vnic interfaces. This needs to be done after udevstart
     if [ "X${QLGC_VNIC_LOAD}" == "Xyes" ]; then
-            if [[ ! -e /dev/infiniband/umad0  &&  ! -e /dev/infiniband/umad1 ]]; then
-                echo "/dev/infiniband/umad0 or /dev/infiniband/umad1 not present."
-                echo "Cannot create QLogic VNIC interfaces."
-                echo_failure $"Bringing up QLogic VNIC interfaces"
-            elif is_module qlgc_vnic; then
-                echo "Setting up QLogic VNIC interfaces..."
-                qlgc_vnic_parser.pl -v > /dev/null 2>&1
-                res=$?
-                if [ $res != 0 ]; then
-                    if [ $res == 2 ]; then
-                        echo "Created QLogic VNIC interfaces but with errors. Please refer to /var/log/messages."
-                        echo_failure $"Bringing up QLogic VNIC interfaces"
-                    else
-                        echo "Error in parsing QLogic VNIC configuration file. Please refer to /var/log/messages."
-                        echo_failure $"Bringing up QLogic VNIC interfaces"
-                    fi
-                else
-                    echo_success $"Bringing up QLogic VNIC interfaces"
-                fi
-            else
-                echo "Module qlgc_vnic not loaded."
-                echo_failure $"Bringing up QLogic VNIC interfaces"
-            fi
+		/etc/init.d/qlgc_vnic start
     fi
 
     if [ X${RENICE_IB_MAD} == "Xyes" ]; then
@@ -1292,6 +1270,10 @@ stop()
                 fi
         fi
 
+		if [ -d /sys/class/infiniband_qlgc_vnic/ ]; then
+			/etc/init.d/qlgc_vnic stop 2>&1 1>/dev/null
+		fi
+
         # Unload modules
         if [ "$UNLOAD_MODULES" != "" ]; then
                 for mod in  $UNLOAD_MODULES




More information about the ewg mailing list