Skip to content

Commit 4f13967

Browse files
Tomas Winklergregkh
authored andcommitted
mei: me: disable driver on SPT SPS firmware
commit 8c57cac1457f3125a5d13dc03635c0708c61bff0 upstream. Sunrise Point PCH with SPS Firmware doesn't expose working MEI interface, we need to quirk it out. The SPS Firmware is identifiable only on the first PCI function of the device. Tested-by: Sujith Pandel <sujith_pandel@dell.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e104937 commit 4f13967

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

drivers/misc/mei/hw-me.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,8 +1258,14 @@ static bool mei_me_fw_type_nm(struct pci_dev *pdev)
12581258
static bool mei_me_fw_type_sps(struct pci_dev *pdev)
12591259
{
12601260
u32 reg;
1261-
/* Read ME FW Status check for SPS Firmware */
1262-
pci_read_config_dword(pdev, PCI_CFG_HFS_1, &reg);
1261+
unsigned int devfn;
1262+
1263+
/*
1264+
* Read ME FW Status register to check for SPS Firmware
1265+
* The SPS FW is only signaled in pci function 0
1266+
*/
1267+
devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0);
1268+
pci_bus_read_config_dword(pdev->bus, devfn, PCI_CFG_HFS_1, &reg);
12631269
/* if bits [19:16] = 15, running SPS Firmware */
12641270
return (reg & 0xf0000) == 0xf0000;
12651271
}

drivers/misc/mei/pci-me.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
8484

8585
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT, mei_me_pch8_cfg)},
8686
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_2, mei_me_pch8_cfg)},
87-
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H, mei_me_pch8_cfg)},
88-
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H_2, mei_me_pch8_cfg)},
87+
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H, mei_me_pch8_sps_cfg)},
88+
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H_2, mei_me_pch8_sps_cfg)},
8989

9090
{MEI_PCI_DEVICE(MEI_DEV_ID_KBP, mei_me_pch8_cfg)},
9191
{MEI_PCI_DEVICE(MEI_DEV_ID_KBP_2, mei_me_pch8_cfg)},

0 commit comments

Comments
 (0)