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

Alexander Motin mav at FreeBSD.org
Tue May 3 07:58:52 UTC 2016


Author: mav
Date: Tue May  3 07:58:51 2016
New Revision: 298964
URL: https://svnweb.freebsd.org/changeset/base/298964

Log:
  MFC r297854: Add couple missing memory barriers.

Modified:
  stable/10/sys/dev/isp/isp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/isp/isp.c
==============================================================================
--- stable/10/sys/dev/isp/isp.c	Tue May  3 07:58:11 2016	(r298963)
+++ stable/10/sys/dev/isp/isp.c	Tue May  3 07:58:51 2016	(r298964)
@@ -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-all mailing list