svn commit: r297854 - head/sys/dev/isp

Alexander Motin mav at FreeBSD.org
Tue Apr 12 11:48:52 UTC 2016


Author: mav
Date: Tue Apr 12 11:48:50 2016
New Revision: 297854
URL: https://svnweb.freebsd.org/changeset/base/297854

Log:
  Add couple missing memory barriers.

Modified:
  head/sys/dev/isp/isp.c

Modified: head/sys/dev/isp/isp.c
==============================================================================
--- head/sys/dev/isp/isp.c	Tue Apr 12 10:25:44 2016	(r297853)
+++ head/sys/dev/isp/isp.c	Tue Apr 12 11:48:50 2016	(r297854)
@@ -2802,12 +2802,13 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui
 		isp_prt(isp, ISP_LOGERR, sacq);
 		return (-1);
 	}
-	MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (un), chan);
+	MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof(un), chan);
 	isp_mboxcmd(isp, &mbs);
 	if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
 		FC_SCRATCH_RELEASE(isp, chan);
 		return (mbs.param[0] | (mbs.param[1] << 16));
 	}
+	MEMORYBARRIER(isp, SYNC_SFORCPU, 0, sizeof(un), chan);
 	if (IS_24XX(isp)) {
 		isp_get_pdb_24xx(isp, fcp->isp_scratch, &un.bill);
 		pdb->handle = un.bill.pdb_handle;
@@ -2875,6 +2876,7 @@ isp_gethandles(ispsoftc_t *isp, int chan
 		FC_SCRATCH_RELEASE(isp, chan);
 		return (mbs.param[0] | (mbs.param[1] << 16));
 	}
+	MEMORYBARRIER(isp, SYNC_SFORCPU, 0, ISP_FC_SCRLEN, chan);
 	elp1 = fcp->isp_scratch;
 	elp3 = fcp->isp_scratch;
 	elp4 = fcp->isp_scratch;


More information about the svn-src-head mailing list