From owner-svn-src-stable-10@FreeBSD.ORG Mon Feb 10 16:29:51 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E7097B2; Mon, 10 Feb 2014 16:29:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47F861D3A; Mon, 10 Feb 2014 16:29:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AGTpHp004453; Mon, 10 Feb 2014 16:29:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AGTptJ004452; Mon, 10 Feb 2014 16:29:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201402101629.s1AGTptJ004452@svn.freebsd.org> From: Alexander Motin Date: Mon, 10 Feb 2014 16:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261718 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 16:29:51 -0000 Author: mav Date: Mon Feb 10 16:29:50 2014 New Revision: 261718 URL: http://svnweb.freebsd.org/changeset/base/261718 Log: MFC r261515: Fix I/O freezes in some cases, caused by r257916. Delaying isp_reqodx update, we should be ready to update it every time we read it. Otherwise requests using several indexes may be requeued ndefinitely without ever updating the variable. Modified: stable/10/sys/dev/isp/isp_library.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Feb 10 16:13:45 2014 (r261717) +++ stable/10/sys/dev/isp/isp_library.c Mon Feb 10 16:29:50 2014 (r261718) @@ -144,7 +144,9 @@ isp_send_cmd(ispsoftc_t *isp, void *fqe, while (seg < nsegs) { nxtnxt = ISP_NXT_QENTRY(nxt, RQUEST_QUEUE_LEN(isp)); if (nxtnxt == isp->isp_reqodx) { - return (CMD_EAGAIN); + isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); + if (nxtnxt == isp->isp_reqodx) + return (CMD_EAGAIN); } ISP_MEMZERO(storage, QENTRY_LEN); qe1 = ISP_QUEUE_ENTRY(isp->isp_rquest, nxt); @@ -2210,7 +2212,9 @@ isp_send_tgt_cmd(ispsoftc_t *isp, void * while (seg < nsegs) { nxtnxt = ISP_NXT_QENTRY(nxt, RQUEST_QUEUE_LEN(isp)); if (nxtnxt == isp->isp_reqodx) { - return (CMD_EAGAIN); + isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); + if (nxtnxt == isp->isp_reqodx) + return (CMD_EAGAIN); } ISP_MEMZERO(storage, QENTRY_LEN); qe1 = ISP_QUEUE_ENTRY(isp->isp_rquest, nxt);