From owner-svn-src-projects@FreeBSD.ORG Fri May 4 18:23:04 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72770106566B; Fri, 4 May 2012 18:23:04 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E2A68FC18; Fri, 4 May 2012 18:23:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q44IN4OA016908; Fri, 4 May 2012 18:23:04 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q44IN47D016906; Fri, 4 May 2012 18:23:04 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201205041823.q44IN47D016906@svn.freebsd.org> From: Kip Macy Date: Fri, 4 May 2012 18:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235023 - projects/iscsi_opt/sys/dev/iscsi/initiator X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2012 18:23:04 -0000 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)) {