]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/infiniband/hw/ipath/ipath_sysfs.c
Merge branch 'linus' into perfcounters/core
[mv-sheeva.git] / drivers / infiniband / hw / ipath / ipath_sysfs.c
index 7961d26404f15eb02295c6c293386735ecbae665..a6c8efbdc0c9b0e5a647c70875dd7f2d9edf8d71 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2007 QLogic Corporation. All rights reserved.
+ * Copyright (c) 2006, 2007, 2008 QLogic Corporation. All rights reserved.
  * Copyright (c) 2006 PathScale, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
@@ -34,6 +34,7 @@
 #include <linux/ctype.h>
 
 #include "ipath_kernel.h"
+#include "ipath_verbs.h"
 #include "ipath_common.h"
 
 /**
@@ -320,6 +321,8 @@ static ssize_t store_guid(struct device *dev,
 
        dd->ipath_guid = new_guid;
        dd->ipath_nguid = 1;
+       if (dd->verbs_dev)
+               dd->verbs_dev->ibdev.node_guid = new_guid;
 
        ret = strlen(buf);
        goto bail;
@@ -928,18 +931,17 @@ static ssize_t store_rx_polinv_enb(struct device *dev,
        u16 val;
 
        ret = ipath_parse_ushort(buf, &val);
-       if (ret < 0 || val > 1)
-               goto invalid;
+       if (ret >= 0 && val > 1) {
+               ipath_dev_err(dd,
+                       "attempt to set invalid Rx Polarity (enable)\n");
+               ret = -EINVAL;
+               goto bail;
+       }
 
        r = dd->ipath_f_set_ib_cfg(dd, IPATH_IB_CFG_RXPOL_ENB, val);
-       if (r < 0) {
+       if (r < 0)
                ret = r;
-               goto bail;
-       }
 
-       goto bail;
-invalid:
-       ipath_dev_err(dd, "attempt to set invalid Rx Polarity (enable)\n");
 bail:
        return ret;
 }