mei: me: disable mei interface on Mehlow server platforms
For SPS firmware versions 5.0 and newer the way detection has changed. The detection is done now via PCI_CFG_HFS_3 register. To prevent conflict the previous method will get sps_4 suffix Disable both CNP_H and CNP_H_3 interfaces. CNP_H_3 requires a separate configuration as it doesn't support DMA. Cc: <stable@vger.kernel.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20200619165121.2145330-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

父節點
d35d3660e0
當前提交
f76d77f50b
@@ -1366,7 +1366,7 @@ static bool mei_me_fw_type_nm(struct pci_dev *pdev)
|
||||
#define MEI_CFG_FW_NM \
|
||||
.quirk_probe = mei_me_fw_type_nm
|
||||
|
||||
static bool mei_me_fw_type_sps(struct pci_dev *pdev)
|
||||
static bool mei_me_fw_type_sps_4(struct pci_dev *pdev)
|
||||
{
|
||||
u32 reg;
|
||||
unsigned int devfn;
|
||||
@@ -1382,7 +1382,36 @@ static bool mei_me_fw_type_sps(struct pci_dev *pdev)
|
||||
return (reg & 0xf0000) == 0xf0000;
|
||||
}
|
||||
|
||||
#define MEI_CFG_FW_SPS \
|
||||
#define MEI_CFG_FW_SPS_4 \
|
||||
.quirk_probe = mei_me_fw_type_sps_4
|
||||
|
||||
/**
|
||||
* mei_me_fw_sku_sps() - check for sps sku
|
||||
*
|
||||
* Read ME FW Status register to check for SPS Firmware.
|
||||
* The SPS FW is only signaled in pci function 0
|
||||
*
|
||||
* @pdev: pci device
|
||||
*
|
||||
* Return: true in case of SPS firmware
|
||||
*/
|
||||
static bool mei_me_fw_type_sps(struct pci_dev *pdev)
|
||||
{
|
||||
u32 reg;
|
||||
u32 fw_type;
|
||||
unsigned int devfn;
|
||||
|
||||
devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0);
|
||||
pci_bus_read_config_dword(pdev->bus, devfn, PCI_CFG_HFS_3, ®);
|
||||
trace_mei_pci_cfg_read(&pdev->dev, "PCI_CFG_HFS_3", PCI_CFG_HFS_3, reg);
|
||||
fw_type = (reg & PCI_CFG_HFS_3_FW_SKU_MSK);
|
||||
|
||||
dev_dbg(&pdev->dev, "fw type is %d\n", fw_type);
|
||||
|
||||
return fw_type == PCI_CFG_HFS_3_FW_SKU_SPS;
|
||||
}
|
||||
|
||||
#define MEI_CFG_FW_SPS \
|
||||
.quirk_probe = mei_me_fw_type_sps
|
||||
|
||||
#define MEI_CFG_FW_VER_SUPP \
|
||||
@@ -1452,10 +1481,17 @@ static const struct mei_cfg mei_me_pch8_cfg = {
|
||||
};
|
||||
|
||||
/* PCH8 Lynx Point with quirk for SPS Firmware exclusion */
|
||||
static const struct mei_cfg mei_me_pch8_sps_cfg = {
|
||||
static const struct mei_cfg mei_me_pch8_sps_4_cfg = {
|
||||
MEI_CFG_PCH8_HFS,
|
||||
MEI_CFG_FW_VER_SUPP,
|
||||
MEI_CFG_FW_SPS,
|
||||
MEI_CFG_FW_SPS_4,
|
||||
};
|
||||
|
||||
/* LBG with quirk for SPS (4.0) Firmware exclusion */
|
||||
static const struct mei_cfg mei_me_pch12_sps_4_cfg = {
|
||||
MEI_CFG_PCH8_HFS,
|
||||
MEI_CFG_FW_VER_SUPP,
|
||||
MEI_CFG_FW_SPS_4,
|
||||
};
|
||||
|
||||
/* Cannon Lake and newer devices */
|
||||
@@ -1465,8 +1501,18 @@ static const struct mei_cfg mei_me_pch12_cfg = {
|
||||
MEI_CFG_DMA_128,
|
||||
};
|
||||
|
||||
/* LBG with quirk for SPS Firmware exclusion */
|
||||
/* Cannon Lake with quirk for SPS 5.0 and newer Firmware exclusion */
|
||||
static const struct mei_cfg mei_me_pch12_sps_cfg = {
|
||||
MEI_CFG_PCH8_HFS,
|
||||
MEI_CFG_FW_VER_SUPP,
|
||||
MEI_CFG_DMA_128,
|
||||
MEI_CFG_FW_SPS,
|
||||
};
|
||||
|
||||
/* Cannon Lake with quirk for SPS 5.0 and newer Firmware exclusion
|
||||
* w/o DMA support
|
||||
*/
|
||||
static const struct mei_cfg mei_me_pch12_nodma_sps_cfg = {
|
||||
MEI_CFG_PCH8_HFS,
|
||||
MEI_CFG_FW_VER_SUPP,
|
||||
MEI_CFG_FW_SPS,
|
||||
@@ -1492,9 +1538,11 @@ static const struct mei_cfg *const mei_cfg_list[] = {
|
||||
[MEI_ME_PCH7_CFG] = &mei_me_pch7_cfg,
|
||||
[MEI_ME_PCH_CPT_PBG_CFG] = &mei_me_pch_cpt_pbg_cfg,
|
||||
[MEI_ME_PCH8_CFG] = &mei_me_pch8_cfg,
|
||||
[MEI_ME_PCH8_SPS_CFG] = &mei_me_pch8_sps_cfg,
|
||||
[MEI_ME_PCH8_SPS_4_CFG] = &mei_me_pch8_sps_4_cfg,
|
||||
[MEI_ME_PCH12_CFG] = &mei_me_pch12_cfg,
|
||||
[MEI_ME_PCH12_SPS_4_CFG] = &mei_me_pch12_sps_4_cfg,
|
||||
[MEI_ME_PCH12_SPS_CFG] = &mei_me_pch12_sps_cfg,
|
||||
[MEI_ME_PCH12_SPS_NODMA_CFG] = &mei_me_pch12_nodma_sps_cfg,
|
||||
[MEI_ME_PCH15_CFG] = &mei_me_pch15_cfg,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user