]>
Commit | Line | Data |
---|---|---|
016e29c0 DM |
1 | From e97cdb303c04bfe60283094bdced68a0d363bd5d Mon Sep 17 00:00:00 2001 |
2 | From: Tomas Winkler <tomas.winkler@intel.com> | |
3 | Date: Fri, 8 Jan 2016 00:49:24 +0200 | |
4 | Subject: mei: bus: whitelist the watchdog client | |
5 | ||
6 | The iAMT WD client has to be whitelisted sice it has two connections | |
7 | and is filtered out by number_of_connections fixup. | |
8 | Also the API has changed for BDW and SKL but firmware haven't updated | |
9 | the protocol version. | |
10 | ||
11 | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> | |
12 | Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> | |
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
14 | --- | |
15 | drivers/misc/mei/bus-fixup.c | 29 +++++++++++++++++++++++++++++ | |
16 | 1 file changed, 29 insertions(+) | |
17 | ||
18 | diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c | |
19 | index b2d2a6e..b87323f 100644 | |
20 | --- a/drivers/misc/mei/bus-fixup.c | |
21 | +++ b/drivers/misc/mei/bus-fixup.c | |
22 | @@ -35,6 +35,9 @@ static const uuid_le mei_nfc_info_guid = MEI_UUID_NFC_INFO; | |
23 | #define MEI_UUID_NFC_HCI UUID_LE(0x0bb17a78, 0x2a8e, 0x4c50, \ | |
24 | 0x94, 0xd4, 0x50, 0x26, 0x67, 0x23, 0x77, 0x5c) | |
25 | ||
26 | +#define MEI_UUID_WD UUID_LE(0x05B79A6F, 0x4628, 0x4D7F, \ | |
27 | + 0x89, 0x9D, 0xA9, 0x15, 0x14, 0xCB, 0x32, 0xAB) | |
28 | + | |
29 | #define MEI_UUID_ANY NULL_UUID_LE | |
30 | ||
31 | /** | |
32 | @@ -66,6 +69,31 @@ static void blacklist(struct mei_cl_device *cldev) | |
33 | cldev->do_match = 0; | |
34 | } | |
35 | ||
36 | +/** | |
37 | + * mei_wd - wd client on the bus, change protocol version | |
38 | + * as the API has changed. | |
39 | + * | |
40 | + * @cldev: me clients device | |
41 | + */ | |
42 | +#if IS_ENABLED(CONFIG_INTEL_MEI_ME) | |
43 | +#include <linux/pci.h> | |
44 | +#include "hw-me-regs.h" | |
45 | +static void mei_wd(struct mei_cl_device *cldev) | |
46 | +{ | |
47 | + struct pci_dev *pdev = to_pci_dev(cldev->dev.parent); | |
48 | + | |
49 | + dev_dbg(&cldev->dev, "running hook %s\n", __func__); | |
50 | + if (pdev->device == MEI_DEV_ID_WPT_LP || | |
51 | + pdev->device == MEI_DEV_ID_SPT || | |
52 | + pdev->device == MEI_DEV_ID_SPT_H) | |
53 | + cldev->me_cl->props.protocol_version = 0x2; | |
54 | + | |
55 | + cldev->do_match = 1; | |
56 | +} | |
57 | +#else | |
58 | +static inline void mei_wd(struct mei_cl_device *cldev) {} | |
59 | +#endif /* CONFIG_INTEL_MEI_ME */ | |
60 | + | |
61 | struct mei_nfc_cmd { | |
62 | u8 command; | |
63 | u8 status; | |
64 | @@ -280,6 +308,7 @@ static struct mei_fixup { | |
65 | MEI_FIXUP(MEI_UUID_ANY, number_of_connections), | |
66 | MEI_FIXUP(MEI_UUID_NFC_INFO, blacklist), | |
67 | MEI_FIXUP(MEI_UUID_NFC_HCI, mei_nfc), | |
68 | + MEI_FIXUP(MEI_UUID_WD, mei_wd), | |
69 | }; | |
70 | ||
71 | /** | |
72 | -- | |
73 | cgit v0.12 | |
74 |