@@ -1366,7 +1366,7 @@ static bool mei_me_fw_type_nm(struct pci_dev *pdev)
1366
1366
#define MEI_CFG_FW_NM \
1367
1367
.quirk_probe = mei_me_fw_type_nm
1368
1368
1369
- static bool mei_me_fw_type_sps (struct pci_dev * pdev )
1369
+ static bool mei_me_fw_type_sps_4 (struct pci_dev * pdev )
1370
1370
{
1371
1371
u32 reg ;
1372
1372
unsigned int devfn ;
@@ -1382,7 +1382,36 @@ static bool mei_me_fw_type_sps(struct pci_dev *pdev)
1382
1382
return (reg & 0xf0000 ) == 0xf0000 ;
1383
1383
}
1384
1384
1385
- #define MEI_CFG_FW_SPS \
1385
+ #define MEI_CFG_FW_SPS_4 \
1386
+ .quirk_probe = mei_me_fw_type_sps_4
1387
+
1388
+ /**
1389
+ * mei_me_fw_sku_sps() - check for sps sku
1390
+ *
1391
+ * Read ME FW Status register to check for SPS Firmware.
1392
+ * The SPS FW is only signaled in pci function 0
1393
+ *
1394
+ * @pdev: pci device
1395
+ *
1396
+ * Return: true in case of SPS firmware
1397
+ */
1398
+ static bool mei_me_fw_type_sps (struct pci_dev * pdev )
1399
+ {
1400
+ u32 reg ;
1401
+ u32 fw_type ;
1402
+ unsigned int devfn ;
1403
+
1404
+ devfn = PCI_DEVFN (PCI_SLOT (pdev -> devfn ), 0 );
1405
+ pci_bus_read_config_dword (pdev -> bus , devfn , PCI_CFG_HFS_3 , & reg );
1406
+ trace_mei_pci_cfg_read (& pdev -> dev , "PCI_CFG_HFS_3" , PCI_CFG_HFS_3 , reg );
1407
+ fw_type = (reg & PCI_CFG_HFS_3_FW_SKU_MSK );
1408
+
1409
+ dev_dbg (& pdev -> dev , "fw type is %d\n" , fw_type );
1410
+
1411
+ return fw_type == PCI_CFG_HFS_3_FW_SKU_SPS ;
1412
+ }
1413
+
1414
+ #define MEI_CFG_FW_SPS \
1386
1415
.quirk_probe = mei_me_fw_type_sps
1387
1416
1388
1417
#define MEI_CFG_FW_VER_SUPP \
@@ -1452,10 +1481,17 @@ static const struct mei_cfg mei_me_pch8_cfg = {
1452
1481
};
1453
1482
1454
1483
/* PCH8 Lynx Point with quirk for SPS Firmware exclusion */
1455
- static const struct mei_cfg mei_me_pch8_sps_cfg = {
1484
+ static const struct mei_cfg mei_me_pch8_sps_4_cfg = {
1456
1485
MEI_CFG_PCH8_HFS ,
1457
1486
MEI_CFG_FW_VER_SUPP ,
1458
- MEI_CFG_FW_SPS ,
1487
+ MEI_CFG_FW_SPS_4 ,
1488
+ };
1489
+
1490
+ /* LBG with quirk for SPS (4.0) Firmware exclusion */
1491
+ static const struct mei_cfg mei_me_pch12_sps_4_cfg = {
1492
+ MEI_CFG_PCH8_HFS ,
1493
+ MEI_CFG_FW_VER_SUPP ,
1494
+ MEI_CFG_FW_SPS_4 ,
1459
1495
};
1460
1496
1461
1497
/* Cannon Lake and newer devices */
@@ -1465,8 +1501,18 @@ static const struct mei_cfg mei_me_pch12_cfg = {
1465
1501
MEI_CFG_DMA_128 ,
1466
1502
};
1467
1503
1468
- /* LBG with quirk for SPS Firmware exclusion */
1504
+ /* Cannon Lake with quirk for SPS 5.0 and newer Firmware exclusion */
1469
1505
static const struct mei_cfg mei_me_pch12_sps_cfg = {
1506
+ MEI_CFG_PCH8_HFS ,
1507
+ MEI_CFG_FW_VER_SUPP ,
1508
+ MEI_CFG_DMA_128 ,
1509
+ MEI_CFG_FW_SPS ,
1510
+ };
1511
+
1512
+ /* Cannon Lake with quirk for SPS 5.0 and newer Firmware exclusion
1513
+ * w/o DMA support
1514
+ */
1515
+ static const struct mei_cfg mei_me_pch12_nodma_sps_cfg = {
1470
1516
MEI_CFG_PCH8_HFS ,
1471
1517
MEI_CFG_FW_VER_SUPP ,
1472
1518
MEI_CFG_FW_SPS ,
@@ -1492,9 +1538,11 @@ static const struct mei_cfg *const mei_cfg_list[] = {
1492
1538
[MEI_ME_PCH7_CFG ] = & mei_me_pch7_cfg ,
1493
1539
[MEI_ME_PCH_CPT_PBG_CFG ] = & mei_me_pch_cpt_pbg_cfg ,
1494
1540
[MEI_ME_PCH8_CFG ] = & mei_me_pch8_cfg ,
1495
- [MEI_ME_PCH8_SPS_CFG ] = & mei_me_pch8_sps_cfg ,
1541
+ [MEI_ME_PCH8_SPS_4_CFG ] = & mei_me_pch8_sps_4_cfg ,
1496
1542
[MEI_ME_PCH12_CFG ] = & mei_me_pch12_cfg ,
1543
+ [MEI_ME_PCH12_SPS_4_CFG ] = & mei_me_pch12_sps_4_cfg ,
1497
1544
[MEI_ME_PCH12_SPS_CFG ] = & mei_me_pch12_sps_cfg ,
1545
+ [MEI_ME_PCH12_SPS_NODMA_CFG ] = & mei_me_pch12_nodma_sps_cfg ,
1498
1546
[MEI_ME_PCH15_CFG ] = & mei_me_pch15_cfg ,
1499
1547
};
1500
1548
0 commit comments