Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 May 2012 18:23:04 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r235023 - projects/iscsi_opt/sys/dev/iscsi/initiator
Message-ID:  <201205041823.q44IN47D016906@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Fri May  4 18:23:03 2012
New Revision: 235023
URL: http://svn.freebsd.org/changeset/base/235023

Log:
  use cam_flags for cam

Modified:
  projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c

Modified: projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c
==============================================================================
--- projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c	Fri May  4 18:12:53 2012	(r235022)
+++ projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c	Fri May  4 18:23:03 2012	(r235023)
@@ -371,8 +371,8 @@ isc_so_snd_upcall(struct socket *so, voi
 			printf("qfrozen_cnt went to bad value %d\n",
 			    sp->cam_sim->devq->send_queue.qfrozen_cnt[0]);
 	}
-	if (sp->cam_sim->devq->send_queue.qfrozen_cnt[0] > 0) {
-		sp->flags |= ISC_QUNFREEZE;
+	if (sp->cam_flags & ISC_QFROZEN) {
+		sp->cam_flags |= ISC_QUNFREEZE;
 
 		mtx_lock(&sp->io_mtx);
 		if (sp->flags & ISC_OWAITING)
@@ -646,12 +646,14 @@ ism_out(void *vp)
      sp->flags |= ISC_SM_RUNNING;
      sdebug(3, "started sp->flags=%x", sp->flags);
      do {
-	     CAM_LOCK(sp);
-	     if  (sp->flags & ISC_QUNFREEZE) {
-		     xpt_release_simq(sp->cam_sim, 1);
-		     sp->flags &= ~(ISC_QUNFREEZE|ISC_QFROZEN);
+	     if  (sp->cam_flags & ISC_QUNFREEZE) {
+		     CAM_LOCK(sp);
+		     if  (sp->cam_flags & ISC_QUNFREEZE) {
+			     xpt_release_simq(sp->cam_sim, 1);
+			     sp->cam_flags &= ~(ISC_QUNFREEZE|ISC_QFROZEN);
+		     }
+		     CAM_UNLOCK(sp);
 	     }
-	     CAM_UNLOCK(sp);
          if((sp->flags & ISC_HOLD) == 0) {
 		 error = 0;
 		 if (sx_try_xlock(&sp->tx_sx)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205041823.q44IN47D016906>