diff options
| author | Jon Mason <jon.mason@intel.com> | 2013-05-31 17:05:53 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-12 22:05:34 -0500 |
| commit | 8293fc2416f0eb13ff81501b31f0206c5331b9cb (patch) | |
| tree | 2495a55dbd36953c76671c1488657a16e18526d6 | |
| parent | 576db18cb68483e6e54f18dfda4b9c24f7e07dfe (diff) | |
NTB: Correct USD/DSD Identification
commit b6750cfe0710a14fd147ba27fddbecae8ba88c77 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/ntb/ntb_hw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c index 3b0ab50e2d5c..26b808b4d3a0 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) | |||
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | if (val & SNB_PPD_DEV_TYPE) | 533 | if (val & SNB_PPD_DEV_TYPE) |
| 534 | ndev->dev_type = NTB_DEV_DSD; | ||
| 535 | else | ||
| 536 | ndev->dev_type = NTB_DEV_USD; | 534 | ndev->dev_type = NTB_DEV_USD; |
| 535 | else | ||
| 536 | ndev->dev_type = NTB_DEV_DSD; | ||
| 537 | 537 | ||
| 538 | ndev->reg_ofs.pdb = ndev->reg_base + SNB_PDOORBELL_OFFSET; | 538 | ndev->reg_ofs.pdb = ndev->reg_base + SNB_PDOORBELL_OFFSET; |
| 539 | ndev->reg_ofs.pdb_mask = ndev->reg_base + SNB_PDBMSK_OFFSET; | 539 | ndev->reg_ofs.pdb_mask = ndev->reg_base + SNB_PDBMSK_OFFSET; |
| @@ -647,6 +647,9 @@ static int ntb_device_setup(struct ntb_device *ndev) | |||
| 647 | if (rc) | 647 | if (rc) |
| 648 | return rc; | 648 | return rc; |
| 649 | 649 | ||
| 650 | dev_info(&ndev->pdev->dev, "Device Type = %s\n", | ||
| 651 | ndev->dev_type == NTB_DEV_USD ? "USD/DSP" : "DSD/USP"); | ||
| 652 | |||
| 650 | /* Enable Bus Master and Memory Space on the secondary side */ | 653 | /* Enable Bus Master and Memory Space on the secondary side */ |
| 651 | writew(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, ndev->reg_ofs.spci_cmd); | 654 | writew(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, ndev->reg_ofs.spci_cmd); |
| 652 | 655 | ||
