Date: Wed, 5 Feb 2014 16:22:02 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261515 - head/sys/dev/isp Message-ID: <201402051622.s15GM22f025200@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Feb 5 16:22:02 2014 New Revision: 261515 URL: http://svnweb.freebsd.org/changeset/base/261515 Log: 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. MFC after: 3 days Modified: head/sys/dev/isp/isp_library.c Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Wed Feb 5 14:44:59 2014 (r261514) +++ head/sys/dev/isp/isp_library.c Wed Feb 5 16:22:02 2014 (r261515) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402051622.s15GM22f025200>