]> git.openfabrics.org - ~adrianc/mstflint.git/commitdiff
added support for swreset in mstflint
authorAdrian Chiris <adrianc@mellanox.com>
Wed, 8 Jul 2015 13:45:13 +0000 (16:45 +0300)
committerAdrian Chiris <adrianc@mellanox.com>
Wed, 8 Jul 2015 15:30:52 +0000 (18:30 +0300)
mtcr_ul/mtcr_ul.c

index 2a5127f5b37f423738877b08ae9fbdac4f5bd36b..ebe2f7b2b913c0df2c162b1de0e62214ef374c1c 100644 (file)
@@ -1255,8 +1255,18 @@ int mwrite4_block (mfile *mf, unsigned int offset, u_int32_t* data, int byte_len
 
 int msw_reset(mfile *mf)
 {
-    (void)mf; /* Warning */
+#ifndef NO_INBAND
+    switch (mf->access_type) {
+    case MTCR_ACCESS_INBAND:
+        return mib_swreset(mf);
+    default:
+        errno = EPERM;
+        return -1;
+    }
+#else
+    (void)mf;
     return -1;
+#endif
 }
 
 int mdevices(char *buf, int len, int mask)