public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jon.mason@intel.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 03/15] NTB: Correct USD/DSD Identification
Date: Fri,  2 Aug 2013 10:35:32 -0700	[thread overview]
Message-ID: <1375464944-27914-4-git-send-email-jon.mason@intel.com> (raw)
In-Reply-To: <1375464944-27914-1-git-send-email-jon.mason@intel.com>

Due to ambiguous documentation, the USD/DSD identification is backward
when compared to the setting in BIOS.  Correct the bits to match the
BIOS setting.

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

diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
index 3b0ab50..26b808b 100644
--- a/drivers/ntb/ntb_hw.c
+++ b/drivers/ntb/ntb_hw.c
@@ -531,9 +531,9 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
 	}
 
 	if (val & SNB_PPD_DEV_TYPE)
-		ndev->dev_type = NTB_DEV_DSD;
-	else
 		ndev->dev_type = NTB_DEV_USD;
+	else
+		ndev->dev_type = NTB_DEV_DSD;
 
 	ndev->reg_ofs.pdb = ndev->reg_base + SNB_PDOORBELL_OFFSET;
 	ndev->reg_ofs.pdb_mask = ndev->reg_base + SNB_PDBMSK_OFFSET;
@@ -647,6 +647,9 @@ static int ntb_device_setup(struct ntb_device *ndev)
 	if (rc)
 		return rc;
 
+	dev_info(&ndev->pdev->dev, "Device Type = %s\n",
+		 ndev->dev_type == NTB_DEV_USD ? "USD/DSP" : "DSD/USP");
+
 	/* Enable Bus Master and Memory Space on the secondary side */
 	writew(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, ndev->reg_ofs.spci_cmd);
 
-- 
1.7.9.5


  parent reply	other threads:[~2013-08-02 17:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 17:35 [PATCH 00/15] NTB: Bug Fixes and New Features Jon Mason
2013-08-02 17:35 ` [PATCH 01/15] NTB: Add Error Handling in ntb_device_setup Jon Mason
2013-08-02 17:35 ` [PATCH 02/15] NTB: Correct Number of Scratch Pad Registers Jon Mason
2013-08-02 17:35 ` Jon Mason [this message]
2013-08-02 17:35 ` [PATCH 04/15] NTB: Correct debugfs to work with more than 1 NTB Device Jon Mason
2013-08-02 17:35 ` [PATCH 05/15] NTB: Xeon Errata Workaround Jon Mason
2013-08-02 17:35 ` [PATCH 06/15] NTB: BWD Link Recovery Jon Mason
2013-08-02 17:35 ` [PATCH 07/15] NTB: Update Device IDs Jon Mason
2013-08-02 17:35 ` [PATCH 08/15] NTB: Enable 32bit Support Jon Mason
2013-08-02 17:35 ` [PATCH 09/15] NTB: Use DMA Engine to Transmit and Receive Jon Mason
2013-08-19  9:41   ` Dan Williams
2013-08-19 10:01   ` Dan Williams
2013-08-19 20:37     ` Jon Mason
2013-08-19 23:36       ` Dan Williams
2013-08-20  0:07         ` Jon Mason
2013-08-20  0:45           ` Dan Williams
2013-08-02 17:35 ` [PATCH 10/15] NTB: Rename Variables for NTB-RP Jon Mason
2013-08-02 17:35 ` [PATCH 11/15] NTB: NTB-RP support Jon Mason
2013-08-02 17:35 ` [PATCH 12/15] NTB: Remove References of non-B2B BWD HW Jon Mason
2013-08-02 17:35 ` [PATCH 13/15] NTB: Comment Fix Jon Mason
2013-08-02 17:35 ` [PATCH 14/15] NTB: Update Version Jon Mason
2013-08-02 17:35 ` [PATCH 15/15] MAINTAINERS: Add Website and Git Tree for NTB Jon Mason
2013-08-02 18:04 ` [PATCH 00/15] NTB: Bug Fixes and New Features Joe Perches

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=1375464944-27914-4-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