From dce856c1a16098fe7a1df2338df60073261da94a Mon Sep 17 00:00:00 2001
From: Vasilii Chernov <vchernov@inr.ru>
Date: Tue, 9 Feb 2016 17:32:11 +0100
Subject: Add write_register python wrap. Add no_set_check attribute to
 pcilib_view_t type

---
 pcitool/cli.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'pcitool/cli.c')

diff --git a/pcitool/cli.c b/pcitool/cli.c
index 8350d24..cb87dcb 100644
--- a/pcitool/cli.c
+++ b/pcitool/cli.c
@@ -1702,10 +1702,12 @@ int WriteRegister(pcilib_t *handle, const pcilib_model_description_t *model_info
         if ((model_info->registers[regid].mode&PCILIB_REGISTER_RW) == PCILIB_REGISTER_RW) {
             const char *format = (val.format?val.format:"%u");
 	    
+	    
 	    err = pcilib_read_register(handle, bank, reg, &verify);
 	    if (err) Error("Error reading back register %s for verification\n", reg);
-    
-	    if (verify != value) {
+		
+	    if (!((model_info->registers[regid].mode&PCILIB_REGISTER_NO_CHK) ==  PCILIB_REGISTER_NO_CHK) && 
+	        verify != value) {
 	        Error("Failed to write register %s: %lu is written and %lu is read back", reg, value, verify);
 	    } else {
 	        printf("%s = ", reg);
-- 
cgit v1.2.3