From owner-svn-src-projects@FreeBSD.ORG Thu May 10 22:00:39 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 6D1A31065670; Thu, 10 May 2012 22:00:39 +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 589F48FC0C; Thu, 10 May 2012 22:00:39 +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 q4AM0dkF053511; Thu, 10 May 2012 22:00:39 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AM0dac053508; Thu, 10 May 2012 22:00:39 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201205102200.q4AM0dac053508@svn.freebsd.org> From: Kip Macy Date: Thu, 10 May 2012 22:00:39 +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: r235247 - 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: Thu, 10 May 2012 22:00:39 -0000 Author: kmacy Date: Thu May 10 22:00:38 2012 New Revision: 235247 URL: http://svn.freebsd.org/changeset/base/235247 Log: unfreeze the queue in recovery situations Modified: projects/iscsi_opt/sys/dev/iscsi/initiator/isc_cam.c projects/iscsi_opt/sys/dev/iscsi/initiator/iscsi_subr.c Modified: projects/iscsi_opt/sys/dev/iscsi/initiator/isc_cam.c ============================================================================== --- projects/iscsi_opt/sys/dev/iscsi/initiator/isc_cam.c Thu May 10 21:38:48 2012 (r235246) +++ projects/iscsi_opt/sys/dev/iscsi/initiator/isc_cam.c Thu May 10 22:00:38 2012 (r235247) @@ -319,8 +319,13 @@ ic_action(struct cam_sim *sim, union ccb scsi->valid = CTS_SCSI_VALID_TQ; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; - cts->ccb_h.status = CAM_REQ_CMP; + /* kick a stalled queue */ + if (sp->cam_flags & ISC_QFROZEN) { + sp->space_needed = 0; + cts->ccb_h.status |= CAM_RELEASE_SIMQ; + sp->cam_flags &= ~ISC_QFROZEN; + } break; } default: Modified: projects/iscsi_opt/sys/dev/iscsi/initiator/iscsi_subr.c ============================================================================== --- projects/iscsi_opt/sys/dev/iscsi/initiator/iscsi_subr.c Thu May 10 21:38:48 2012 (r235246) +++ projects/iscsi_opt/sys/dev/iscsi/initiator/iscsi_subr.c Thu May 10 22:00:38 2012 (r235247) @@ -270,6 +270,11 @@ iscsi_requeue(isc_session_t *sp) while((pq = i_dqueue_hld(sp)) != NULL) { i++; if(pq->ccb != NULL) { + if (sp->cam_flags & ISC_QFROZEN) { + sp->space_needed = 0; + pq->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; + sp->cam_flags &= ~ISC_QFROZEN; + } _scsi_done(sp, 0, 0x28, pq->ccb, NULL); n = ntohl(pq->pdu.ipdu.bhs.CmdSN); if(last==0 || (last > n))