linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jon.mason@intel.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 7/9] NTB: Document HW errata
Date: Wed, 20 Nov 2013 17:21:28 -0700	[thread overview]
Message-ID: <1384993290-10107-8-git-send-email-jon.mason@intel.com> (raw)
In-Reply-To: <1384993290-10107-1-git-send-email-jon.mason@intel.com>

Add a comment describing the necessary ordering of modifications to the
NTB Limit and Base registers.

Signed-off-by: Jon Mason <jon.mason@intel.com>
---
 drivers/ntb/ntb_hw.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
index fa97948..391c377 100644
--- a/drivers/ntb/ntb_hw.c
+++ b/drivers/ntb/ntb_hw.c
@@ -689,6 +689,12 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
 			 */
 			writeq(ndev->mw[1].bar_sz + 0x1000, ndev->reg_base +
 			       SNB_PBAR4LMT_OFFSET);
+			/* HW errata on the Limit registers.  They can only be
+			 * written when the base register is 4GB aligned and
+			 * < 32bit.  This should already be the case based on the
+			 * driver defaults, but write the Limit registers first
+			 * just in case.
+			 */
 		} else {
 			ndev->limits.max_mw = SNB_MAX_MW;
 
@@ -707,6 +713,12 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
 			 * something silly
 			 */
 			writeq(0, ndev->reg_base + SNB_PBAR4LMT_OFFSET);
+			/* HW errata on the Limit registers.  They can only be
+			 * written when the base register is 4GB aligned and
+			 * < 32bit.  This should already be the case based on the
+			 * driver defaults, but write the Limit registers first
+			 * just in case.
+			 */
 		}
 
 		/* The Xeon errata workaround requires setting SBAR Base
-- 
1.7.9.5


  parent reply	other threads:[~2013-11-21  0:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21  0:21 [PATCH 0/9] NTB Update Jon Mason
2013-11-21  0:21 ` [PATCH 1/9] NTB: Xeon Doorbell errata workaround Jon Mason
2013-11-21  0:21 ` [PATCH 2/9] NTB: Fix NTB-RP Link Up Jon Mason
2013-11-21  0:21 ` [PATCH 3/9] ntb: Fix missed call to pci_enable_msix() Jon Mason
2013-11-21  0:21 ` [PATCH 4/9] NTB: Fix ntb_transport link down race Jon Mason
2013-11-21  0:21 ` [PATCH 5/9] NTB: correct dmaengine_get/put usage Jon Mason
2013-11-21  0:21 ` [PATCH 6/9] NTB: remove duplicate defines Jon Mason
2013-11-21  0:21 ` Jon Mason [this message]
2013-11-21  0:21 ` [PATCH 8/9] NTB: Enable Snoop on Primary Side Jon Mason
2013-11-21  0:21 ` [PATCH 9/9] NTB: Disable interrupts and poll under high load Jon Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384993290-10107-8-git-send-email-jon.mason@intel.com \
    --to=jon.mason@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).