svn commit: r261718 - stable/10/sys/dev/isp

Alexander Motin mav at FreeBSD.org
Mon Feb 10 16:29:51 UTC 2014


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);


More information about the svn-src-stable-10 mailing list