--- old/usr/src/uts/common/io/ib/adapters/tavor/tavor_cmd.c	Sun Jun 11 17:03:32 2017
+++ new/usr/src/uts/common/io/ib/adapters/tavor/tavor_cmd.c	Sun Jun 11 17:03:32 2017
@@ -75,8 +75,6 @@
 
 	TAVOR_TNF_ENTER(tavor_cmd_post);
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdpost))
-
 	/* Determine if we are going to spin until completion */
 	if (cmdpost->cp_flags == TAVOR_CMD_NOSLEEP_SPIN) {
 
@@ -108,7 +106,6 @@
 			TAVOR_TNF_EXIT(tavor_cmd_post);
 			return (status);
 		}
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdptr))
 
 		/*
 		 * Set status to "TAVOR_CMD_INVALID_STATUS".  It is
@@ -133,23 +130,13 @@
 
 		/*
 		 * cv_wait() on the "command_complete" condition variable.
-		 * Note: We have the "__lock_lint" here to workaround warlock.
-		 * Since warlock doesn't know that other parts of the Tavor
-		 * may occasionally call this routine while holding their own
-		 * locks, it complains about this cv_wait.  In reality,
-		 * however, the rest of the driver never calls this routine
-		 * with a lock held unless they pass TAVOR_CMD_NOSLEEP.
 		 */
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*cmdptr))
 		mutex_enter(&cmdptr->cmd_comp_lock);
 		while (cmdptr->cmd_status == TAVOR_CMD_INVALID_STATUS) {
-#ifndef	__lock_lint
-			cv_wait(&cmdptr->cmd_comp_cv, &cmdptr->cmd_comp_lock);
 			/* NOTE: EXPECT SEVERAL THREADS TO BE WAITING HERE */
-#endif
+			cv_wait(&cmdptr->cmd_comp_cv, &cmdptr->cmd_comp_lock);
 		}
 		mutex_exit(&cmdptr->cmd_comp_lock);
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdptr))
 
 		/*
 		 * Wake up after command completes (cv_signal).  Read status
@@ -251,7 +238,6 @@
 	}
 
 	/* Store appropriate context in mbox_info */
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(mbox_info->mbi_sleep_context))
 	mbox_info->mbi_sleep_context = sleep_context;
 
 	TAVOR_TNF_EXIT(tavor_mbox_alloc);
@@ -274,7 +260,6 @@
 	 * tavor_mbox_alloc() time.  We check the stored context against the
 	 * current context here.
 	 */
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(mbox_info->mbi_sleep_context))
 	ASSERT(mbox_info->mbi_sleep_context == TAVOR_SLEEPFLAG_FOR_CONTEXT());
 
 	/* Determine correct mboxlist based on calling context */
@@ -579,20 +564,10 @@
 		mutex_enter(&mblist->mbl_lock);
 		while (mblist->mbl_entries_free == 0) {
 			/*
-			 * Wait (on cv) for a mailbox to become free.  Note:
-			 * Just as we do above in tavor_cmd_post(), we also
-			 * have the "__lock_lint" here to workaround warlock.
-			 * Warlock doesn't know that other parts of the Tavor
-			 * may occasionally call this routine while holding
-			 * their own locks, so it complains about this cv_wait.
-			 * In reality, however, the rest of the driver never
-			 * calls this routine with a lock held unless they pass
-			 * TAVOR_CMD_NOSLEEP.
+			 * Wait (on cv) for a mailbox to become free.
 			 */
 			mblist->mbl_waiters++;
-#ifndef	__lock_lint
 			cv_wait(&mblist->mbl_cv, &mblist->mbl_lock);
-#endif
 		}
 	}
 
@@ -887,25 +862,15 @@
 		}
 
 		/*
-		 * Wait (on cv) for a command to become free.  Note: Just
-		 * as we do above in tavor_cmd_post(), we also have the
-		 * "__lock_lint" here to workaround warlock.  Warlock doesn't
-		 * know that other parts of the Tavor may occasionally call
-		 * this routine while holding their own locks, so it complains
-		 * about this cv_wait.  In reality, however, the rest of the
-		 * driver never calls this routine with a lock held unless
-		 * they pass TAVOR_CMD_NOSLEEP.
+		 * Wait (on cv) for a command to become free.
 		 */
 		cmd_list->cml_waiters++;
-#ifndef	__lock_lint
 		cv_wait(&cmd_list->cml_cv, &cmd_list->cml_lock);
-#endif
 	}
 
 	/* Grab the next available command from the list */
 	head = cmd_list->cml_head_indx;
 	*cmd_ptr = &cmd_list->cml_cmd[head];
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(**cmd_ptr))
 	next = (*cmd_ptr)->cmd_next;
 	prev = (*cmd_ptr)->cmd_prev;
 	(*cmd_ptr)->cmd_status = TAVOR_CMD_INVALID_STATUS;
@@ -1005,13 +970,9 @@
 	 * with the single thread but in high interrupt context
 	 * (so that this mutex lock cannot be used).
 	 */
-#ifdef __lock_lint
-	mutex_enter(&state->ts_cmd_regs.hcr_lock);
-#else
 	if (!TAVOR_IN_FASTREBOOT(state)) {
 		mutex_enter(&state->ts_cmd_regs.hcr_lock);
 	}
-#endif
 
 	hcr = state->ts_cmd_regs.hcr;
 
@@ -1039,13 +1000,9 @@
 		 * return a "timeout" error.
 		 */
 		if (++count > countmax) {
-#ifdef __lock_lint
-			mutex_exit(&state->ts_cmd_regs.hcr_lock);
-#else
 			if (!TAVOR_IN_FASTREBOOT(state)) {
 				mutex_exit(&state->ts_cmd_regs.hcr_lock);
 			}
-#endif
 			TNF_PROBE_0(tavor_write_hcr_timeout1, TAVOR_TNF_ERROR,
 			    "");
 			TAVOR_TNF_EXIT(tavor_write_hcr);
@@ -1106,14 +1063,10 @@
 			 * then return a "timeout" error.
 			 */
 			if (++count > countmax) {
-#ifdef __lock_lint
-				mutex_exit(&state-> ts_cmd_regs.hcr_lock);
-#else
 				if (!TAVOR_IN_FASTREBOOT(state)) {
 					mutex_exit(&state->
 					    ts_cmd_regs.hcr_lock);
 				}
-#endif
 				TNF_PROBE_0(tavor_write_hcr_timeout2,
 				    TAVOR_TNF_ERROR, "");
 				TAVOR_TNF_EXIT(tavor_write_hcr);
@@ -1140,13 +1093,9 @@
 	}
 
 	/* Drop the "HCR access" lock */
-#ifdef __lock_lint
-	mutex_exit(&state->ts_cmd_regs.hcr_lock);
-#else
 	if (!TAVOR_IN_FASTREBOOT(state)) {
 		mutex_exit(&state->ts_cmd_regs.hcr_lock);
 	}
-#endif
 
 	TAVOR_TNF_EXIT(tavor_write_hcr);
 	return (status);
@@ -1806,11 +1755,9 @@
 	 * swapping that may be necessary to flip any of the "portinfo"
 	 * fields
 	 */
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*portinfo))
 	bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
 	    TAVOR_CMD_MADDATA_OFFSET), portinfo, size);
 	TAVOR_GETPORTINFO_SWAP(portinfo);
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*portinfo))
 
 getportinfo_fail:
 	/* Free the mailbox */
@@ -2040,11 +1987,9 @@
 	 * Copy GetGUIDInfo response MAD into "guidinfo".  Do any endian
 	 * swapping that may be necessary to flip the "guidinfo" fields
 	 */
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*guidinfo))
 	bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
 	    TAVOR_CMD_MADDATA_OFFSET), guidinfo, size);
 	TAVOR_GETGUIDINFO_SWAP(guidinfo);
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*guidinfo))
 
 getguidinfo_fail:
 	/* Free the mailbox */
@@ -2119,11 +2064,9 @@
 	 * Copy GetPKeyTable response MAD into "pkeytable".  Do any endian
 	 * swapping that may be necessary to flip the "pkeytable" fields
 	 */
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*pkeytable))
 	bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
 	    TAVOR_CMD_MADDATA_OFFSET), pkeytable, size);
 	TAVOR_GETPKEYTABLE_SWAP(pkeytable);
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*pkeytable))
 
 getpkeytable_fail:
 	/* Free the mailbox */
