summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2019-10-04 14:17:22 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-04 11:38:50 -0400
commitf8204f0ddd62966a0e79c2804963a21e3540dd82 (patch)
treebadacec4b02529a80a4509d34f5f076c058c93d1
parent4d86dfd38285c83a6df01093b8547f742e3b2470 (diff)
mei: avoid FW version request on Ibex Peak and earlier
The fixed MKHI client on PCH 6 gen platforms does not support fw version retrieval. The error is not fatal, but it fills up the kernel logs and slows down the driver start. This patch disables requesting FW version on GEN6 and earlier platforms. Fixes warning: [ 15.964298] mei mei::55213584-9a29-4916-badf-0fb7ed682aeb:01: Could not read FW version [ 15.964301] mei mei::55213584-9a29-4916-badf-0fb7ed682aeb:01: version command failed -5 Cc: <stable@vger.kernel.org> +v4.18 Cc: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20191004181722.31374-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/mei/bus-fixup.c14
-rw-r--r--drivers/misc/mei/hw-me.c21
-rw-r--r--drivers/misc/mei/hw-me.h8
-rw-r--r--drivers/misc/mei/mei_dev.h4
-rw-r--r--drivers/misc/mei/pci-me.c10
5 files changed, 44 insertions, 13 deletions
diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c
index 32e9b1aed2ca..0a2b99e1af45 100644
--- a/drivers/misc/mei/bus-fixup.c
+++ b/drivers/misc/mei/bus-fixup.c
@@ -218,13 +218,21 @@ static void mei_mkhi_fix(struct mei_cl_device *cldev)
218{ 218{
219 int ret; 219 int ret;
220 220
221 /* No need to enable the client if nothing is needed from it */
222 if (!cldev->bus->fw_f_fw_ver_supported &&
223 !cldev->bus->hbm_f_os_supported)
224 return;
225
221 ret = mei_cldev_enable(cldev); 226 ret = mei_cldev_enable(cldev);
222 if (ret) 227 if (ret)
223 return; 228 return;
224 229
225 ret = mei_fwver(cldev); 230 if (cldev->bus->fw_f_fw_ver_supported) {
226 if (ret < 0) 231 ret = mei_fwver(cldev);
227 dev_err(&cldev->dev, "FW version command failed %d\n", ret); 232 if (ret < 0)
233 dev_err(&cldev->dev, "FW version command failed %d\n",
234 ret);
235 }
228 236
229 if (cldev->bus->hbm_f_os_supported) { 237 if (cldev->bus->hbm_f_os_supported) {
230 ret = mei_osver(cldev); 238 ret = mei_osver(cldev);
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index abe1b1f4362f..c4f6991d3028 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -1355,6 +1355,8 @@ static bool mei_me_fw_type_sps(struct pci_dev *pdev)
1355#define MEI_CFG_FW_SPS \ 1355#define MEI_CFG_FW_SPS \
1356 .quirk_probe = mei_me_fw_type_sps 1356 .quirk_probe = mei_me_fw_type_sps
1357 1357
1358#define MEI_CFG_FW_VER_SUPP \
1359 .fw_ver_supported = 1
1358 1360
1359#define MEI_CFG_ICH_HFS \ 1361#define MEI_CFG_ICH_HFS \
1360 .fw_status.count = 0 1362 .fw_status.count = 0
@@ -1392,31 +1394,41 @@ static const struct mei_cfg mei_me_ich10_cfg = {
1392 MEI_CFG_ICH10_HFS, 1394 MEI_CFG_ICH10_HFS,
1393}; 1395};
1394 1396
1395/* PCH devices */ 1397/* PCH6 devices */
1396static const struct mei_cfg mei_me_pch_cfg = { 1398static const struct mei_cfg mei_me_pch6_cfg = {
1397 MEI_CFG_PCH_HFS, 1399 MEI_CFG_PCH_HFS,
1398}; 1400};
1399 1401
1402/* PCH7 devices */
1403static const struct mei_cfg mei_me_pch7_cfg = {
1404 MEI_CFG_PCH_HFS,
1405 MEI_CFG_FW_VER_SUPP,
1406};
1407
1400/* PCH Cougar Point and Patsburg with quirk for Node Manager exclusion */ 1408/* PCH Cougar Point and Patsburg with quirk for Node Manager exclusion */
1401static const struct mei_cfg mei_me_pch_cpt_pbg_cfg = { 1409static const struct mei_cfg mei_me_pch_cpt_pbg_cfg = {
1402 MEI_CFG_PCH_HFS, 1410 MEI_CFG_PCH_HFS,
1411 MEI_CFG_FW_VER_SUPP,
1403 MEI_CFG_FW_NM, 1412 MEI_CFG_FW_NM,
1404}; 1413};
1405 1414
1406/* PCH8 Lynx Point and newer devices */ 1415/* PCH8 Lynx Point and newer devices */
1407static const struct mei_cfg mei_me_pch8_cfg = { 1416static const struct mei_cfg mei_me_pch8_cfg = {
1408 MEI_CFG_PCH8_HFS, 1417 MEI_CFG_PCH8_HFS,
1418 MEI_CFG_FW_VER_SUPP,
1409}; 1419};
1410 1420
1411/* PCH8 Lynx Point with quirk for SPS Firmware exclusion */ 1421/* PCH8 Lynx Point with quirk for SPS Firmware exclusion */
1412static const struct mei_cfg mei_me_pch8_sps_cfg = { 1422static const struct mei_cfg mei_me_pch8_sps_cfg = {
1413 MEI_CFG_PCH8_HFS, 1423 MEI_CFG_PCH8_HFS,
1424 MEI_CFG_FW_VER_SUPP,
1414 MEI_CFG_FW_SPS, 1425 MEI_CFG_FW_SPS,
1415}; 1426};
1416 1427
1417/* Cannon Lake and newer devices */ 1428/* Cannon Lake and newer devices */
1418static const struct mei_cfg mei_me_pch12_cfg = { 1429static const struct mei_cfg mei_me_pch12_cfg = {
1419 MEI_CFG_PCH8_HFS, 1430 MEI_CFG_PCH8_HFS,
1431 MEI_CFG_FW_VER_SUPP,
1420 MEI_CFG_DMA_128, 1432 MEI_CFG_DMA_128,
1421}; 1433};
1422 1434
@@ -1428,7 +1440,8 @@ static const struct mei_cfg *const mei_cfg_list[] = {
1428 [MEI_ME_UNDEF_CFG] = NULL, 1440 [MEI_ME_UNDEF_CFG] = NULL,
1429 [MEI_ME_ICH_CFG] = &mei_me_ich_cfg, 1441 [MEI_ME_ICH_CFG] = &mei_me_ich_cfg,
1430 [MEI_ME_ICH10_CFG] = &mei_me_ich10_cfg, 1442 [MEI_ME_ICH10_CFG] = &mei_me_ich10_cfg,
1431 [MEI_ME_PCH_CFG] = &mei_me_pch_cfg, 1443 [MEI_ME_PCH6_CFG] = &mei_me_pch6_cfg,
1444 [MEI_ME_PCH7_CFG] = &mei_me_pch7_cfg,
1432 [MEI_ME_PCH_CPT_PBG_CFG] = &mei_me_pch_cpt_pbg_cfg, 1445 [MEI_ME_PCH_CPT_PBG_CFG] = &mei_me_pch_cpt_pbg_cfg,
1433 [MEI_ME_PCH8_CFG] = &mei_me_pch8_cfg, 1446 [MEI_ME_PCH8_CFG] = &mei_me_pch8_cfg,
1434 [MEI_ME_PCH8_SPS_CFG] = &mei_me_pch8_sps_cfg, 1447 [MEI_ME_PCH8_SPS_CFG] = &mei_me_pch8_sps_cfg,
@@ -1473,6 +1486,8 @@ struct mei_device *mei_me_dev_init(struct pci_dev *pdev,
1473 mei_device_init(dev, &pdev->dev, &mei_me_hw_ops); 1486 mei_device_init(dev, &pdev->dev, &mei_me_hw_ops);
1474 hw->cfg = cfg; 1487 hw->cfg = cfg;
1475 1488
1489 dev->fw_f_fw_ver_supported = cfg->fw_ver_supported;
1490
1476 return dev; 1491 return dev;
1477} 1492}
1478 1493
diff --git a/drivers/misc/mei/hw-me.h b/drivers/misc/mei/hw-me.h
index 08c84a0de4a8..1d8794828cbc 100644
--- a/drivers/misc/mei/hw-me.h
+++ b/drivers/misc/mei/hw-me.h
@@ -20,11 +20,13 @@
20 * @fw_status: FW status 20 * @fw_status: FW status
21 * @quirk_probe: device exclusion quirk 21 * @quirk_probe: device exclusion quirk
22 * @dma_size: device DMA buffers size 22 * @dma_size: device DMA buffers size
23 * @fw_ver_supported: is fw version retrievable from FW
23 */ 24 */
24struct mei_cfg { 25struct mei_cfg {
25 const struct mei_fw_status fw_status; 26 const struct mei_fw_status fw_status;
26 bool (*quirk_probe)(struct pci_dev *pdev); 27 bool (*quirk_probe)(struct pci_dev *pdev);
27 size_t dma_size[DMA_DSCR_NUM]; 28 size_t dma_size[DMA_DSCR_NUM];
29 u32 fw_ver_supported:1;
28}; 30};
29 31
30 32
@@ -62,7 +64,8 @@ struct mei_me_hw {
62 * @MEI_ME_UNDEF_CFG: Lower sentinel. 64 * @MEI_ME_UNDEF_CFG: Lower sentinel.
63 * @MEI_ME_ICH_CFG: I/O Controller Hub legacy devices. 65 * @MEI_ME_ICH_CFG: I/O Controller Hub legacy devices.
64 * @MEI_ME_ICH10_CFG: I/O Controller Hub platforms Gen10 66 * @MEI_ME_ICH10_CFG: I/O Controller Hub platforms Gen10
65 * @MEI_ME_PCH_CFG: Platform Controller Hub platforms (Up to Gen8). 67 * @MEI_ME_PCH6_CFG: Platform Controller Hub platforms (Gen6).
68 * @MEI_ME_PCH7_CFG: Platform Controller Hub platforms (Gen7).
66 * @MEI_ME_PCH_CPT_PBG_CFG:Platform Controller Hub workstations 69 * @MEI_ME_PCH_CPT_PBG_CFG:Platform Controller Hub workstations
67 * with quirk for Node Manager exclusion. 70 * with quirk for Node Manager exclusion.
68 * @MEI_ME_PCH8_CFG: Platform Controller Hub Gen8 and newer 71 * @MEI_ME_PCH8_CFG: Platform Controller Hub Gen8 and newer
@@ -77,7 +80,8 @@ enum mei_cfg_idx {
77 MEI_ME_UNDEF_CFG, 80 MEI_ME_UNDEF_CFG,
78 MEI_ME_ICH_CFG, 81 MEI_ME_ICH_CFG,
79 MEI_ME_ICH10_CFG, 82 MEI_ME_ICH10_CFG,
80 MEI_ME_PCH_CFG, 83 MEI_ME_PCH6_CFG,
84 MEI_ME_PCH7_CFG,
81 MEI_ME_PCH_CPT_PBG_CFG, 85 MEI_ME_PCH_CPT_PBG_CFG,
82 MEI_ME_PCH8_CFG, 86 MEI_ME_PCH8_CFG,
83 MEI_ME_PCH8_SPS_CFG, 87 MEI_ME_PCH8_SPS_CFG,
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index f71a023aed3c..0f2141178299 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -426,6 +426,8 @@ struct mei_fw_version {
426 * 426 *
427 * @fw_ver : FW versions 427 * @fw_ver : FW versions
428 * 428 *
429 * @fw_f_fw_ver_supported : fw feature: fw version supported
430 *
429 * @me_clients_rwsem: rw lock over me_clients list 431 * @me_clients_rwsem: rw lock over me_clients list
430 * @me_clients : list of FW clients 432 * @me_clients : list of FW clients
431 * @me_clients_map : FW clients bit map 433 * @me_clients_map : FW clients bit map
@@ -506,6 +508,8 @@ struct mei_device {
506 508
507 struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS]; 509 struct mei_fw_version fw_ver[MEI_MAX_FW_VER_BLOCKS];
508 510
511 unsigned int fw_f_fw_ver_supported:1;
512
509 struct rw_semaphore me_clients_rwsem; 513 struct rw_semaphore me_clients_rwsem;
510 struct list_head me_clients; 514 struct list_head me_clients;
511 DECLARE_BITMAP(me_clients_map, MEI_CLIENTS_MAX); 515 DECLARE_BITMAP(me_clients_map, MEI_CLIENTS_MAX);
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index 775a2090c2ac..3dca63eddaa0 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -61,13 +61,13 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
61 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_3, MEI_ME_ICH10_CFG)}, 61 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_3, MEI_ME_ICH10_CFG)},
62 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_4, MEI_ME_ICH10_CFG)}, 62 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_4, MEI_ME_ICH10_CFG)},
63 63
64 {MEI_PCI_DEVICE(MEI_DEV_ID_IBXPK_1, MEI_ME_PCH_CFG)}, 64 {MEI_PCI_DEVICE(MEI_DEV_ID_IBXPK_1, MEI_ME_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