Can this fix make ofed-1.3?

Its a trivial change and allows iw_cxgb3 to get loaded like the other rdma modules...

Steve.


-------- Original Message --------
Subject: [ewg] [PATCH ofed-1.3] Load iw_cxgb3 as part of ofed init.
Date: Thu, 31 Jan 2008 09:21:18 -0600
From: Steve Wise <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC: ewg@lists.openfabrics.org


Vlad, can you please review this?  Is there anything else needed to get
iw_cxgb3 to be loaded at init time?  I tested the patched openibd and
it seems to work fine.

If this looks good to you, please pull this patch for ofed-1.3 from:

git://www.openfabrics.org/~swise/ofed-1.3 ofed_kernel

This change is long overdue...

Thanks,

Steve.

--------------

Load iw_cxgb3 as part of ofed init.

Signed-off-by: Steve Wise <[EMAIL PROTECTED]>
---

 ofed_scripts/ofa_kernel.spec |    6 ++++++
 ofed_scripts/openibd         |   19 +++++++++++++++----
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/ofed_scripts/ofa_kernel.spec b/ofed_scripts/ofa_kernel.spec
index 6184cfc..954dd0c 100755
--- a/ofed_scripts/ofa_kernel.spec
+++ b/ofed_scripts/ofa_kernel.spec
@@ -488,6 +488,12 @@ fi
        echo "MLX4_LOAD=yes" >> %{IB_CONF_DIR}/openib.conf
 %endif

+%if %{build_cxgb3}
+ echo >> %{IB_CONF_DIR}/openib.conf
+       echo "# Load CXGB3 modules" >> %{IB_CONF_DIR}/openib.conf
+       echo "CXGB3_LOAD=yes" >> %{IB_CONF_DIR}/openib.conf
+%endif
+
 %if %{build_ipoib}
echo >> %{IB_CONF_DIR}/openib.conf
        echo "# Load IPoIB" >> %{IB_CONF_DIR}/openib.conf
diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index 2553881..700c8ef 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -273,13 +273,13 @@ fi

GEN1_UNLOAD_MODULES="ib_srp_target scsi_target ib_srp kdapltest_module ib_kdapl ib_sdp ib_useraccess ib_useraccess_cm ib_cm ib_dapl_srv ib_ip2pr ib_ipoib ib_tavor mod_thh mod_rhh ib_dm_client ib_sa_client ib_client_query ib_poll ib_mad ib_core ib_services"

-UNLOAD_MODULES="ib_mthca mlx4_enet mlx4_ib mlx4_core ib_ipath ipath_core ib_ehca" +UNLOAD_MODULES="ib_mthca mlx4_enet mlx4_ib mlx4_core ib_ipath ipath_core ib_ehca iw_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 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"

-STATUS_MODULES="rdma_ucm ib_rds rds ib_srpt ib_srp qlgc_vnic ib_sdp rdma_cm ib_addr ib_local_sa findex ib_ipoib ib_ehca ib_ipath ipath_core mlx4_core mlx4_ib ib_mthca ib_uverbs ib_umad ib_ucm ib_sa ib_cm ib_mad ib_core" +STATUS_MODULES="rdma_ucm ib_rds rds ib_srpt ib_srp qlgc_vnic ib_sdp rdma_cm ib_addr ib_local_sa findex ib_ipoib ib_ehca ib_ipath ipath_core mlx4_core mlx4_ib ib_mthca ib_uverbs ib_umad ib_ucm ib_sa ib_cm ib_mad ib_core iw_cxgb3"

 ipoib_ha_pidfile=/var/run/ipoib_ha.pid
 srp_daemon_pidfile=/var/run/srp_daemon.pid
@@ -800,6 +800,17 @@ start()
         RC=$[ $RC + $my_rc ]
     fi

+    # Load iw_cxgb3 driver
+    if [ "X${CXGB3_LOAD}" == "Xyes" ]; then
+        fix_location_codes
+        /sbin/modprobe iw_cxgb3 > /dev/null 2>&1
+        my_rc=$?
+        if [ $my_rc -ne 0 ]; then
+                echo_failure $"Loading cxgb3 driver: "
+        fi
+        RC=$[ $RC + $my_rc ]
+    fi
+
     # Add node description to sysfs
     IBSYSDIR="/sys/class/infiniband"
     if [ -d ${IBSYSDIR} ]; then
@@ -1101,7 +1112,7 @@ unload()

         if is_module $mod; then
                case $mod in
-                       ib_mthca | mlx4_ib | ib_ipath | ib_ehca)
+                       ib_mthca | mlx4_ib | ib_ipath | ib_ehca | iw_cxgb3)
                                 rm_mod $mod
                                sleep 2
                        ;;
@@ -1273,7 +1284,7 @@ status()
 {
     local RC=0

- if is_module ib_mthca || is_module mlx4_core || is_module ib_ipath || is_module ib_ehca; then + if is_module ib_mthca || is_module mlx4_core || is_module ib_ipath || is_module ib_ehca || is_module iw_cxgb3; then
                echo
                echo "  HCA driver loaded"
                echo
_______________________________________________
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
_______________________________________________
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to