File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,7 +219,10 @@ infiniband_status()
219219 device=" ${OCF_RESKEY_infiniband_device} :${OCF_RESKEY_infiniband_port} "
220220 fi
221221
222- ibstatus ${device} | grep -q ACTIVE
222+ case " ${OCF_RESKEY_infiniband_device} " in
223+ * ib* |* mlx* ) ibstatus ${device} | grep -q ACTIVE ;;
224+ * hfi* ) opainfo | grep -q Active ;;
225+ esac
223226}
224227
225228if_init () {
@@ -291,8 +294,11 @@ if_init() {
291294 fi
292295
293296 if [ -n " $OCF_RESKEY_infiniband_device " ]; then
294- # ibstatus is required if an infiniband_device is provided
295- check_binary ibstatus
297+ # ibstatus or opainfo is required if an infiniband_device is provided
298+ case " ${OCF_RESKEY_infiniband_device} " in
299+ * ib* |* mlx* ) check_binary ibstatus ;;
300+ * hfi* ) check_binary opainfo ;;
301+ esac
296302 fi
297303 return $OCF_SUCCESS
298304}
You can’t perform that action at this time.
0 commit comments