--- old/usr/src/uts/common/io/ib/adapters/hermon/hermon_cmd.c	Sun Jun 11 17:03:21 2017
+++ new/usr/src/uts/common/io/ib/adapters/hermon/hermon_cmd.c	Sun Jun 11 17:03:21 2017
@@ -75,8 +75,6 @@
 	int		status, retry_cnt, retry_cnt2, hw_err;
 	uint16_t	token;
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdpost))
-
 	/* Determine if we are going to spin until completion */
 	if (cmdpost->cp_flags == HERMON_CMD_NOSLEEP_SPIN) {
 
@@ -113,7 +111,6 @@
 		if (status != HERMON_CMD_SUCCESS) {
 			return (status);
 		}
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdptr))
 
 		retry_cnt = HCA_PIO_RETRY_CNT;
 retry:
@@ -157,23 +154,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 Hermon
-		 * 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 HERMON_CMD_NOSLEEP.
 		 */
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*cmdptr))
 		mutex_enter(&cmdptr->cmd_comp_lock);
 		while (cmdptr->cmd_status == HERMON_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
@@ -341,7 +328,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;
 
 	return (HERMON_CMD_SUCCESS);
@@ -361,7 +347,6 @@
 	 * hermon_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 == HERMON_SLEEPFLAG_FOR_CONTEXT());
 
 	/* Determine correct mboxlist based on calling context */
@@ -603,20 +588,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 hermon_cmd_post(), we also
-			 * have the "__lock_lint" here to workaround warlock.
-			 * Warlock doesn't know that other parts of the Hermon
-			 * 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
-			 * HERMON_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
 		}
 	}
 
@@ -878,25 +853,15 @@
 		}
 
 		/*
-		 * Wait (on cv) for a command to become free.  Note: Just
-		 * as we do above in hermon_cmd_post(), we also have the
-		 * "__lock_lint" here to workaround warlock.  Warlock doesn't
-		 * know that other parts of the Hermon 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 HERMON_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 = HERMON_CMD_INVALID_STATUS;
@@ -995,13 +960,9 @@
 	 * with the single thread but in high interrupt context
 	 * (so that this mutex lock cannot be used).
 	 */
-#ifdef __lock_lint
-	mutex_enter(&state->hs_cmd_regs.hcr_lock);
-#else
 	if (!HERMON_IN_FASTREBOOT(state)) {
 		mutex_enter(&state->hs_cmd_regs.hcr_lock);
 	}
-#endif
 	hcr = state->hs_cmd_regs.hcr;
 
 	/*
@@ -1033,13 +994,9 @@
 		 * return a "timeout" error.
 		 */
 		if (++count > countmax) {
-#ifdef __lock_lint
-			mutex_exit(&state->hs_cmd_regs.hcr_lock);
-#else
 			if (!HERMON_IN_FASTREBOOT(state)) {
 				mutex_exit(&state->hs_cmd_regs.hcr_lock);
 			}
-#endif
 			cmn_err(CE_NOTE, "write_hcr: cannot start cmd");
 			return (HERMON_CMD_TIMEOUT_GOBIT);
 		}
@@ -1130,14 +1087,10 @@
 			 * then return a "timeout" error.
 			 */
 			if (++count > countmax) {
-#ifdef __lock_lint
-				mutex_exit(&state-> hs_cmd_regs.hcr_lock);
-#else
 				if (!HERMON_IN_FASTREBOOT(state)) {
 					mutex_exit(&state->
 					    hs_cmd_regs.hcr_lock);
 				}
-#endif
 				cmn_err(CE_NOTE,
 				    "write_hcr: cannot complete cmd");
 				return (HERMON_CMD_TIMEOUT_GOBIT);
@@ -1172,13 +1125,9 @@
 	}
 
 	/* Drop the "HCR access" lock */
-#ifdef __lock_lint
-	mutex_exit(&state->hs_cmd_regs.hcr_lock);
-#else
 	if (!HERMON_IN_FASTREBOOT(state)) {
 		mutex_exit(&state->hs_cmd_regs.hcr_lock);
 	}
-#endif
 	if (hw_error == B_TRUE) {
 		*hw_err = HCA_PIO_TRANSIENT;
 	} else {
@@ -1192,13 +1141,9 @@
 	return (status);
 
 pio_error:
-#ifdef __lock_lint
-	mutex_exit(&state->hs_cmd_regs.hcr_lock);
-#else
 	if (!HERMON_IN_FASTREBOOT(state)) {
 		mutex_exit(&state->hs_cmd_regs.hcr_lock);
 	}
-#endif
 	hermon_fm_ereport(state, HCA_SYS_ERR, HCA_ERR_NON_FATAL);
 	*hw_err = HCA_PIO_PERSISTENT;
 	return (HERMON_CMD_INVALID_STATUS);
@@ -2031,7 +1976,6 @@
 	 */
 	bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
 	    HERMON_CMD_MADDATA_OFFSET), portinfo, size);
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*portinfo))
 	HERMON_GETPORTINFO_SWAP(portinfo);
 
 getportinfo_fail:
@@ -2352,7 +2296,6 @@
 	 */
 	bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
 	    HERMON_CMD_MADDATA_OFFSET), nodeinfo, size);
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*nodeinfo))
 	HERMON_GETNODEINFO_SWAP(nodeinfo);
 
 getnodeinfo_fail:
@@ -2491,7 +2434,6 @@
 	 */
 	bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
 	    HERMON_CMD_MADDATA_OFFSET), guidinfo, size);
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*guidinfo))
 	HERMON_GETGUIDINFO_SWAP(guidinfo);
 
 getguidinfo_fail:
@@ -2563,7 +2505,6 @@
 	 */
 	bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
 	    HERMON_CMD_MADDATA_OFFSET), pkeytable, size);
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*pkeytable))
 	HERMON_GETPKEYTABLE_SWAP(pkeytable);
 
 getpkeytable_fail:
