Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2016 06:58:51 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310750 - head/sys/dev/sfxge/common
Message-ID:  <201612290658.uBT6wp8n050481@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Thu Dec 29 06:58:51 2016
New Revision: 310750
URL: https://svnweb.freebsd.org/changeset/base/310750

Log:
  sfxge(4): add missing barrier in common code MCDI response handling
  
  The semantics of the MCDI interfacve require reading the first
  dword of the header before any other data in the buffer. Add
  a barrier to the common code MCDI handler to enforce this.
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      1 week
  Differential Revision:  https://reviews.freebsd.org/D8949

Modified:
  head/sys/dev/sfxge/common/ef10_mcdi.c

Modified: head/sys/dev/sfxge/common/ef10_mcdi.c
==============================================================================
--- head/sys/dev/sfxge/common/ef10_mcdi.c	Thu Dec 29 06:57:36 2016	(r310749)
+++ head/sys/dev/sfxge/common/ef10_mcdi.c	Thu Dec 29 06:58:51 2016	(r310750)
@@ -159,6 +159,8 @@ ef10_mcdi_poll_response(
 	efx_dword_t hdr;
 
 	EFSYS_MEM_READD(esmp, 0, &hdr);
+	EFSYS_MEM_READ_BARRIER();
+
 	return (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) ? B_TRUE : B_FALSE);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612290658.uBT6wp8n050481>