Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2017 07:09:11 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r311483 - stable/11/sys/dev/sfxge/common
Message-ID:  <201701060709.v0679B57034414@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Fri Jan  6 07:09:11 2017
New Revision: 311483
URL: https://svnweb.freebsd.org/changeset/base/311483

Log:
  MFC r310750
  
  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>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/11/sys/dev/sfxge/common/ef10_mcdi.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/sfxge/common/ef10_mcdi.c
==============================================================================
--- stable/11/sys/dev/sfxge/common/ef10_mcdi.c	Fri Jan  6 07:08:09 2017	(r311482)
+++ stable/11/sys/dev/sfxge/common/ef10_mcdi.c	Fri Jan  6 07:09:11 2017	(r311483)
@@ -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?201701060709.v0679B57034414>