Date: Thu, 10 May 2012 22:00:39 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r235247 - projects/iscsi_opt/sys/dev/iscsi/initiator Message-ID: <201205102200.q4AM0dac053508@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205102200.q4AM0dac053508>