]> 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 13:45:13 +0000 (16:45 +0300)
mtcr_ul/mtcr_ul.c

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