diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-01-05 14:43:57 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-01-05 18:53:22 +0100 |
commit | 5bf0697f659b262d7d385ff5903f3b86611a8c35 (patch) | |
tree | 48ba7191b57bdcdc28e460a40ef4972494c8382d | |
parent | e72b8aa9234cbd4fee98b5a0e01901f66b58d5e1 (diff) |
device/infiniband: take interface down to set transport mode
With some drivers it is necessary to take the interface down to set
the transport mode.
https://bugzilla.redhat.com/show_bug.cgi?id=1281301
-rw-r--r-- | src/devices/nm-device-infiniband.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c index 50e1feb06d..5a8bfbd43c 100644 --- a/src/devices/nm-device-infiniband.c +++ b/src/devices/nm-device-infiniband.c @@ -74,7 +74,7 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) NMSettingInfiniband *s_infiniband; const char *transport_mode; char *mode_path; - gboolean ok; + gboolean ok, no_firmware = FALSE; g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); @@ -105,8 +105,11 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) } } + /* With some drivers the interface must be down to set transport mode */ + nm_device_take_down (dev, TRUE); ok = nm_platform_sysctl_set (NM_PLATFORM_GET, mode_path, transport_mode); g_free (mode_path); + nm_device_bring_up (dev, TRUE, &no_firmware); if (!ok) { *reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED; |