aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ntb/hw/intel
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2015-05-08 12:24:40 -0400
committerJon Mason <jdmason@kudzu.us>2015-07-04 14:06:14 -0400
commitdd5d4d8edb6b40f75e5c8f0db65a4562bffc2e00 (patch)
tree1313491f622cc567487c67c97338bab27d2b6a50 /drivers/ntb/hw/intel
parent5ae0beb6bcb781ba0439618a4883fdb243916f46 (diff)
NTB: Check the device ID to set errata flags
Set errata flags for the specific device IDs to which they apply, instead of the whole Xeon hardware class. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb/hw/intel')
-rw-r--r--drivers/ntb/hw/intel/ntb_hw_intel.c49
1 files changed, 44 insertions, 5 deletions
diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
index 3810ad11cfdf..499222285439 100644
--- a/drivers/ntb/hw/intel/ntb_hw_intel.c
+++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
@@ -1718,29 +1718,68 @@ static int snb_init_dev(struct intel_ntb_dev *ndev)
1718 u8 ppd; 1718 u8 ppd;
1719 int rc, mem; 1719 int rc, mem;
1720 1720
1721 pdev = ndev_pdev(ndev);
1722
1723 switch (pdev->device) {
1721 /* There is a Xeon hardware errata related to writes to SDOORBELL or 1724 /* There is a Xeon hardware errata related to writes to SDOORBELL or
1722 * B2BDOORBELL in conjunction with inbound access to NTB MMIO Space, 1725 * B2BDOORBELL in conjunction with inbound access to NTB MMIO Space,
1723 * which may hang the system. To workaround this use the second memory 1726 * which may hang the system. To workaround this use the second memory
1724 * window to access the interrupt and scratch pad registers on the 1727 * window to access the interrupt and scratch pad registers on the
1725 * remote system. 1728 * remote system.
1726 */ 1729 */
1727 ndev->hwerr_flags |= NTB_HWERR_SDOORBELL_LOCKUP; 1730 case PCI_DEVICE_ID_INTEL_NTB_SS_JSF:
1731 case PCI_DEVICE_ID_INTEL_NTB_PS_JSF:
1732 case PCI_DEVICE_ID_INTEL_NTB_B2B_JSF:
1733 case PCI_DEVICE_ID_INTEL_NTB_SS_SNB:
1734 case PCI_DEVICE_ID_INTEL_NTB_PS_SNB:
1735 case PCI_DEVICE_ID_INTEL_NTB_B2B_SNB:
1736 case PCI_DEVICE_ID_INTEL_NTB_SS_IVT:
1737 case PCI_DEVICE_ID_INTEL_NTB_PS_IVT:
1738 case PCI_DEVICE_ID_INTEL_NTB_B2B_IVT:
1739 case PCI_DEVICE_ID_INTEL_NTB_SS_HSX:
1740 case PCI_DEVICE_ID_INTEL_NTB_PS_HSX:
1741 case PCI_DEVICE_ID_INTEL_NTB_B2B_HSX:
1742 ndev->hwerr_flags |= NTB_HWERR_SDOORBELL_LOCKUP;
1743 break;
1744 }
1728 1745
1746 switch (pdev->device) {
1729 /* There is a hardware errata related to accessing any register in 1747 /* There is a hardware errata related to accessing any register in
1730 * SB01BASE in the presence of bidirectional traffic crossing the NTB. 1748 * SB01BASE in the presence of bidirectional traffic crossing the NTB.
1731 */ 1749 */
1732 ndev->hwerr_flags |= NTB_HWERR_SB01BASE_LOCKUP; 1750 case PCI_DEVICE_ID_INTEL_NTB_SS_IVT:
1751 case PCI_DEVICE_ID_INTEL_NTB_PS_IVT:
1752 case PCI_DEVICE_ID_INTEL_NTB_B2B_IVT:
1753 case PCI_DEVICE_ID_INTEL_NTB_SS_HSX:
1754 case PCI_DEVICE_ID_INTEL_NTB_PS_HSX:
1755 case PCI_DEVICE_ID_INTEL_NTB_B2B_HSX:
1756 ndev->hwerr_flags |= NTB_HWERR_SB01BASE_LOCKUP;
1757 break;
1758 }
1733 1759
1760 switch (pdev->device) {
1734 /* HW Errata on bit 14 of b2bdoorbell register. Writes will not be 1761 /* HW Errata on bit 14 of b2bdoorbell register. Writes will not be
1735 * mirrored to the remote system. Shrink the number of bits by one, 1762 * mirrored to the remote system. Shrink the number of bits by one,
1736 * since bit 14 is the last bit. 1763 * since bit 14 is the last bit.
1737 */ 1764 */
1738 ndev->hwerr_flags |= NTB_HWERR_B2BDOORBELL_BIT14; 1765 case PCI_DEVICE_ID_INTEL_NTB_SS_JSF:
1766 case PCI_DEVICE_ID_INTEL_NTB_PS_JSF:
1767 case PCI_DEVICE_ID_INTEL_NTB_B2B_JSF:
1768 case PCI_DEVICE_ID_INTEL_NTB_SS_SNB:
1769 case PCI_DEVICE_ID_INTEL_NTB_PS_SNB:
1770 case PCI_DEVICE_ID_INTEL_NTB_B2B_SNB:
1771 case PCI_DEVICE_ID_INTEL_NTB_SS_IVT:
1772 case PCI_DEVICE_ID_INTEL_NTB_PS_IVT:
1773 case PCI_DEVICE_ID_INTEL_NTB_B2B_IVT:
1774 case PCI_DEVICE_ID_INTEL_NTB_SS_HSX:
1775 case PCI_DEVICE_ID_INTEL_NTB_PS_HSX:
1776 case PCI_DEVICE_ID_INTEL_NTB_B2B_HSX:
1777 ndev->hwerr_flags |= NTB_HWERR_B2BDOORBELL_BIT14;
1778 break;
1779 }
1739 1780
1740 ndev->reg = &snb_reg; 1781 ndev->reg = &snb_reg;
1741 1782
1742 pdev = ndev_pdev(ndev);
1743
1744 rc = pci_read_config_byte(pdev, SNB_PPD_OFFSET, &ppd); 1783 rc = pci_read_config_byte(pdev, SNB_PPD_OFFSET, &ppd);
1745 if (rc) 1784 if (rc)
1746 return -EIO; 1785 return -EIO;