%define build_cxgb4 %(if ( echo %{configure_options} | grep "with-cxgb4-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
%define build_nes %(if ( echo %{configure_options} | grep "with-nes-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
%define build_mlx4 %(if ( echo %{configure_options} | grep "with-mlx4-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
+%define build_mlx5 %(if ( echo %{configure_options} | grep "with-mlx5-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
%define build_mlx4_en %(if ( echo %{configure_options} | grep "with-mlx4_en-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
%define build_qlgc_vnic %(if ( echo %{configure_options} | grep "with-qlgc_vnic-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
%define build_nfsrdma %(if ( echo %{configure_options} | grep "with-nfsrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
+%define build_ocrdma %(if ( echo %{configure_options} | grep "with-ocrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
%{!?LIB_MOD_DIR: %define LIB_MOD_DIR /lib/modules/%{KVERSION}/updates}
install -d $RPM_BUILD_ROOT/sbin
install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/sysctl_perf_tuning $RPM_BUILD_ROOT/sbin
-%if %{build_mlx4}
+%if %{build_mlx4} || %{build_mlx5}
install -d $RPM_BUILD_ROOT/%{_bindir}
install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ibdev2netdev $RPM_BUILD_ROOT/%{_bindir}
%endif
echo "MLX4_LOAD=yes" >> %{RDMA_CONF_DIR}/openib.conf
%endif
+%if %{build_mlx5}
+ echo >> %{IB_CONF_DIR}/openib.conf
+ echo "# Load MLX5 modules" >> %{IB_CONF_DIR}/openib.conf
+ echo "MLX5_LOAD=yes" >> %{IB_CONF_DIR}/openib.conf
+%endif
+
%if %{build_mlx4_en}
echo >> %{RDMA_CONF_DIR}/openib.conf
echo "# Load MLX4_EN module" >> %{RDMA_CONF_DIR}/openib.conf
echo "QLGC_VNIC_LOAD=yes" >> %{RDMA_CONF_DIR}/openib.conf
%endif
+%if %{build_ocrdma}
+ echo >> %{RDMA_CONF_DIR}/openib.conf
+ echo "# Load OCRDMA modules" >> %{RDMA_CONF_DIR}/openib.conf
+ echo "OCRDMA_LOAD=yes" >> %{RDMA_CONF_DIR}/openib.conf
+%endif
+
fi # 1 : closed
# END of post
/etc/modprobe.d/ib_sdp.conf
%endif
%endif
-%if %{build_mlx4}
+%if %{build_mlx4} || %{build_mlx5}
%{_bindir}/ibdev2netdev
%endif
%if %{build_mlx4_en}
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 mlx5_ib mlx5_core mlx4_ib ib_ipath ipath_core ib_ehca iw_nes cxgb3i iw_cxgb3 cxgb3 iw_cxgb4 cxgb4"
+UNLOAD_MODULES="ib_mthca mlx5_ib mlx5_core mlx4_ib ib_ipath ipath_core ib_ehca iw_nes cxgb3i iw_cxgb3 cxgb3 iw_cxgb4 cxgb4 ocrdma"
UNLOAD_MODULES="$UNLOAD_MODULES ib_qib"
UNLOAD_MODULES="$UNLOAD_MODULES ib_ipoib ib_madeye ib_rds"
UNLOAD_MODULES="$UNLOAD_MODULES rds_rdma rds_tcp rds ib_ucm kdapl ib_srp_target scsi_target ib_srpt ib_srp ib_iser ib_sdp"
UNLOAD_MODULES="$UNLOAD_MODULES ib_sa ib_uverbs ib_umad ib_mad ib_core"
STATUS_MODULES="rdma_ucm ib_rds rds rds_rdma rds_tcp 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 mlx4_en mlx5_core mlx5_ib ib_mthca ib_uverbs ib_umad ib_ucm ib_sa ib_cm ib_mad ib_core iw_cxgb3 iw_cxgb4 iw_nes"
-STATUS_MODULES="$STATUS_MODULES ib_qib"
+STATUS_MODULES="$STATUS_MODULES ib_qib ocrdma"
ipoib_ha_pidfile=/var/run/ipoib_ha.pid
srp_daemon_pidfile=/var/run/srp_daemon.pid
RC=$[ $RC + $my_rc ]
fi
+ # Load Emulex One Connect driver
+ if [ "X${OCRDMA_LOAD}" == "Xyes" ]; then
+ load_module ocrdma
+ my_rc=$?
+ if [ $my_rc -ne 0 ]; then
+ echo_failure $"Loading Emulex One Connect driver: "
+ elif [ -s ${_truescale} ]; then
+ . ${_truescale} start
+ fi
+ RC=$[ $RC + $my_rc ]
+ fi
+
ib_set_node_desc > /dev/null 2>&1 &
load_module ib_umad