/* eg found case where write overlapping reconnect messed up credits */
        if (((optype & CIFS_OP_MASK) == CIFS_NEG_OP) && (*val != 0))
                trace_smb3_reconnect_with_invalid_credits(server->CurrentMid,
-                       server->hostname, *val);
+                       server->hostname, *val, add);
        if ((instance == 0) || (instance == server->reconnect_instance))
                *val += add;
        else
                cifs_dbg(FYI, "disabling oplocks\n");
                break;
        default:
+               trace_smb3_add_credits(server->CurrentMid,
+                       server->hostname, rc, add);
                cifs_dbg(FYI, "add %u credits total=%d\n", add, rc);
        }
 }
 
 DECLARE_EVENT_CLASS(smb3_credit_class,
        TP_PROTO(__u64  currmid,
                char *hostname,
-               int credits),
-       TP_ARGS(currmid, hostname, credits),
+               int credits,
+               int credits_to_add),
+       TP_ARGS(currmid, hostname, credits, credits_to_add),
        TP_STRUCT__entry(
                __field(__u64, currmid)
                __field(char *, hostname)
                __field(int, credits)
+               __field(int, credits_to_add)
        ),
        TP_fast_assign(
                __entry->currmid = currmid;
                __entry->hostname = hostname;
                __entry->credits = credits;
+               __entry->credits_to_add = credits_to_add;
        ),
-       TP_printk("server=%s current_mid=0x%llx credits=%d",
+       TP_printk("server=%s current_mid=0x%llx credits=%d credits_to_add=%d",
                __entry->hostname,
                __entry->currmid,
-               __entry->credits)
+               __entry->credits,
+               __entry->credits_to_add)
 )
 
 #define DEFINE_SMB3_CREDIT_EVENT(name)        \
 DEFINE_EVENT(smb3_credit_class, smb3_##name,  \
        TP_PROTO(__u64  currmid,                \
                char *hostname,                 \
-               int  credits),                  \
-       TP_ARGS(currmid, hostname, credits))
+               int  credits,                   \
+               int  credits_to_add),           \
+       TP_ARGS(currmid, hostname, credits, credits_to_add))
 
 DEFINE_SMB3_CREDIT_EVENT(reconnect_with_invalid_credits);
 DEFINE_SMB3_CREDIT_EVENT(credit_timeout);
+DEFINE_SMB3_CREDIT_EVENT(add_credits);
 
 #endif /* _CIFS_TRACE_H */
 
 
                        cifs_num_waiters_dec(server);
                        if (!rc) {
                                trace_smb3_credit_timeout(server->CurrentMid,
-                                       server->hostname, num_credits);
+                                       server->hostname, num_credits, 0);
                                cifs_server_dbg(VFS, "wait timed out after %d ms\n",
                                         timeout);
                                return -ENOTSUPP;
                                if (!rc) {
                                        trace_smb3_credit_timeout(
                                                server->CurrentMid,
-                                               server->hostname, num_credits);
+                                               server->hostname, num_credits,
+                                               0);
                                        cifs_server_dbg(VFS, "wait timed out after %d ms\n",
                                                 timeout);
                                        return -ENOTSUPP;