diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_sysfs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_sysfs.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c index 7961d26404f1..2e6d2aab2600 100644 --- a/drivers/infiniband/hw/ipath/ipath_sysfs.c +++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/ctype.h> | 34 | #include <linux/ctype.h> |
35 | 35 | ||
36 | #include "ipath_kernel.h" | 36 | #include "ipath_kernel.h" |
37 | #include "ipath_verbs.h" | ||
37 | #include "ipath_common.h" | 38 | #include "ipath_common.h" |
38 | 39 | ||
39 | /** | 40 | /** |
@@ -320,6 +321,8 @@ static ssize_t store_guid(struct device *dev, | |||
320 | 321 | ||
321 | dd->ipath_guid = new_guid; | 322 | dd->ipath_guid = new_guid; |
322 | dd->ipath_nguid = 1; | 323 | dd->ipath_nguid = 1; |
324 | if (dd->verbs_dev) | ||
325 | dd->verbs_dev->ibdev.node_guid = new_guid; | ||
323 | 326 | ||
324 | ret = strlen(buf); | 327 | ret = strlen(buf); |
325 | goto bail; | 328 | goto bail; |
@@ -928,18 +931,17 @@ static ssize_t store_rx_polinv_enb(struct device *dev, | |||
928 | u16 val; | 931 | u16 val; |
929 | 932 | ||
930 | ret = ipath_parse_ushort(buf, &val); | 933 | ret = ipath_parse_ushort(buf, &val); |
931 | if (ret < 0 || val > 1) | 934 | if (ret >= 0 && val > 1) { |
932 | goto invalid; | 935 | ipath_dev_err(dd, |
936 | "attempt to set invalid Rx Polarity (enable)\n"); | ||
937 | ret = -EINVAL; | ||
938 | goto bail; | ||
939 | } | ||
933 | 940 | ||
934 | r = dd->ipath_f_set_ib_cfg(dd, IPATH_IB_CFG_RXPOL_ENB, val); | 941 | r = dd->ipath_f_set_ib_cfg(dd, IPATH_IB_CFG_RXPOL_ENB, val); |
935 | if (r < 0) { | 942 | if (r < 0) |
936 | ret = r; | 943 | ret = r; |
937 | goto bail; | ||
938 | } | ||
939 | 944 | ||
940 | goto bail; | ||
941 | invalid: | ||
942 | ipath_dev_err(dd, "attempt to set invalid Rx Polarity (enable)\n"); | ||
943 | bail: | 945 | bail: |
944 | return ret; | 946 | return ret; |
945 | } | 947 | } |