Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6750cfe authored by Jon Mason's avatar Jon Mason
Browse files

NTB: Correct USD/DSD Identification



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: default avatarJon Mason <jon.mason@intel.com>
parent 87034511
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -531,9 +531,9 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
	}
	}


	if (val & SNB_PPD_DEV_TYPE)
	if (val & SNB_PPD_DEV_TYPE)
		ndev->dev_type = NTB_DEV_DSD;
	else
		ndev->dev_type = NTB_DEV_USD;
		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 = ndev->reg_base + SNB_PDOORBELL_OFFSET;
	ndev->reg_ofs.pdb_mask = ndev->reg_base + SNB_PDBMSK_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)
	if (rc)
		return 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 */
	/* Enable Bus Master and Memory Space on the secondary side */
	writew(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, ndev->reg_ofs.spci_cmd);
	writew(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, ndev->reg_ofs.spci_cmd);