Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 21:32:51 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338158 - head/sys/dev/cxgbe
Message-ID:  <201808212132.w7LLWpnI084161@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Tue Aug 21 21:32:51 2018
New Revision: 338158
URL: https://svnweb.freebsd.org/changeset/base/338158

Log:
  cxgbe(4): Check the RO bit properly before disabling relaxed ordering.
  
  Reported by:	Coverity (CID 1384286)
  MFC after:	1 week
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Tue Aug 21 21:30:19 2018	(r338157)
+++ head/sys/dev/cxgbe/t4_main.c	Tue Aug 21 21:32:51 2018	(r338158)
@@ -861,7 +861,7 @@ t4_attach(device_t dev)
 		v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2);
 		sc->params.pci.mps = 128 << ((v & PCIEM_CTL_MAX_PAYLOAD) >> 5);
 		if (pcie_relaxed_ordering == 0 &&
-		    (v | PCIEM_CTL_RELAXED_ORD_ENABLE) != 0) {
+		    (v & PCIEM_CTL_RELAXED_ORD_ENABLE) != 0) {
 			v &= ~PCIEM_CTL_RELAXED_ORD_ENABLE;
 			pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2);
 		} else if (pcie_relaxed_ordering == 1 &&



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