Print this page
OS-7184 prototype
        
@@ -1392,14 +1392,15 @@
          */
         ASSERT(IAM_WRITER_ILL(ill));
 
         while (ill->ill_capab_pending_cnt != 0 &&
             (ill->ill_state_flags & ILL_CONDEMNED) == 0) {
-                mutex_enter(&ill->ill_dlpi_capab_lock);
+                /* This may enable blocked callers of ill_capability_done(). */
                 ipsq_exit(ill->ill_phyint->phyint_ipsq);
-                cv_wait(&ill->ill_dlpi_capab_cv, &ill->ill_dlpi_capab_lock);
-                mutex_exit(&ill->ill_dlpi_capab_lock);
+                /* Pause a bit (1msec) before we re-enter the squeue. */
+                delay(drv_usectohz(1000000));
+
                 /*
                  * If ipsq_enter() fails, someone set ILL_CONDEMNED
                  * while we dropped the squeue. Indicate such to the caller.
                  */
                 if (!ipsq_enter(ill, B_FALSE, CUR_OP))
@@ -3511,13 +3512,10 @@
         ill->ill_reachable_time = ND_REACHABLE_TIME;
         ill->ill_xmit_count = ND_MAX_MULTICAST_SOLICIT;
         ill->ill_max_buf = ND_MAX_Q;
         ill->ill_refcnt = 0;
 
-        cv_init(&ill->ill_dlpi_capab_cv, NULL, CV_DEFAULT, NULL);
-        mutex_init(&ill->ill_dlpi_capab_lock, NULL, MUTEX_DEFAULT, NULL);
-
         return (0);
 }
 
 /*
  * ill_init is called by ip_open when a device control stream is opened.
@@ -12933,21 +12931,18 @@
 
 void
 ill_capability_done(ill_t *ill)
 {
         ASSERT(ill->ill_capab_pending_cnt != 0);
+        ASSERT(IAM_WRITER_ILL(ill));
 
         ill_dlpi_done(ill, DL_CAPABILITY_REQ);
 
         ill->ill_capab_pending_cnt--;
         if (ill->ill_capab_pending_cnt == 0 &&
             ill->ill_dlpi_capab_state == IDCS_OK)
                 ill_capability_reset_alloc(ill);
-
-        mutex_enter(&ill->ill_dlpi_capab_lock);
-        cv_broadcast(&ill->ill_dlpi_capab_cv);
-        mutex_exit(&ill->ill_dlpi_capab_lock);
 }
 
 /*
  * Send all deferred DLPI messages without waiting for their ACKs.
  */