nfp: print a message when mutex wait is interrupted
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 11 Apr 2018 23:47:36 +0000 (16:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Apr 2018 01:57:27 +0000 (21:57 -0400)
When waiting for an NFP mutex is interrupted print a message
to make root causing later error messages easier.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_mutex.c

index f7b9581..cb28ac0 100644 (file)
@@ -211,8 +211,11 @@ int nfp_cpp_mutex_lock(struct nfp_cpp_mutex *mutex)
                        break;
 
                err = msleep_interruptible(timeout_ms);
-               if (err != 0)
+               if (err != 0) {
+                       nfp_info(mutex->cpp,
+                                "interrupted waiting for NFP mutex\n");
                        return -ERESTARTSYS;
+               }
 
                if (time_is_before_eq_jiffies(warn_at)) {
                        warn_at = jiffies + NFP_MUTEX_WAIT_NEXT_WARN * HZ;