mei: me: disable driver on SPT SPS firmware
Subsystems (3)
PATCH 1/3 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.
--- drivers/misc/mei/hw-me.c | 10 ++++++++-- drivers/misc/mei/pci-me.c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/misc/mei/hw-me.c +8 -2
@@ -1258,8 +1258,14 @@ static bool mei_me_fw_type_nm(struct pci_dev *pdev)static bool mei_me_fw_type_sps (struct pci_dev *pdev) {u32 reg; -/* Read ME FW Status check for SPS Firmware */ -pci_read_config_dword (pdev,PCI_CFG_HFS_1 , ®); +unsigned int devfn; + +/* +* Read ME FW Status register to check for SPS Firmware +* The SPS FW is only signaled in pci function 0 +*/ + devfn =PCI_DEVFN (PCI_SLOT (pdev->devfn),0 ); +pci_bus_read_config_dword (pdev->bus, devfn,PCI_CFG_HFS_1 , ®);/* if bits [19:16] = 15, running SPS Firmware */ return (reg &0xf0000 ) ==0xf0000 ; }
drivers/misc/mei/pci-me.c +2 -2
@@ -84,8 +84,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = { {MEI_PCI_DEVICE(MEI_DEV_ID_SPT, mei_me_pch8_cfg)}, {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_2, mei_me_pch8_cfg)}, - {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H, mei_me_pch8_cfg)}, - {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H_2, mei_me_pch8_cfg)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H, mei_me_pch8_sps_cfg)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H_2, mei_me_pch8_sps_cfg)}, {MEI_PCI_DEVICE(MEI_DEV_ID_KBP, mei_me_pch8_cfg)}, {MEI_PCI_DEVICE(MEI_DEV_ID_KBP_2, mei_me_pch8_cfg)},
Signature · 1 line
2.7.4
PATCH 2/3 mei: me: fix place for kaby point device ids.
This is fix of the backported patch only, it places KBL DIDs on correct place to easy on backporting of further DIDs.
--- drivers/misc/mei/hw-me-regs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/misc/mei/hw-me-regs.h +4 -3
@@ -66,9 +66,6 @@#ifndef _MEI_HW_MEI_REGS_H_#define _MEI_HW_MEI_REGS_H_ -#define MEI_DEV_ID_KBP 0xA2BA/* Kaby Point */ -#define MEI_DEV_ID_KBP_2 0xA2BB/* Kaby Point 2 */ -/* * MEI device IDs */
@@ -124,6 +121,10 @@#define MEI_DEV_ID_SPT_2 0x9D3B/* Sunrise Point 2 */ #define MEI_DEV_ID_SPT_H 0xA13A/* Sunrise Point H */ #define MEI_DEV_ID_SPT_H_2 0xA13B/* Sunrise Point H 2 */ + +#define MEI_DEV_ID_KBP 0xA2BA/* Kaby Point */ +#define MEI_DEV_ID_KBP_2 0xA2BB/* Kaby Point 2 */ +/* * MEI HW Section */
Signature · 1 line
2.7.4
PATCH 3/3 mei: fix return value on disconnection
In reply to Tomas Winklercommit 2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266a upstream.
Correct errno on client disconnection is -ENODEV not -EBUSY
--- drivers/misc/mei/bus.c | 2 +- drivers/misc/mei/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/misc/mei/bus.c +1 -1
@@ -144,7 +144,7 @@ ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length)mutex_lock (&bus->device_lock);if (!mei_cl_is_connected (cl)) { - rets = -EBUSY ; + rets = -ENODEV ; goto out; } }
drivers/misc/mei/main.c +1 -1
@@ -207,7 +207,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,mutex_lock (&dev->device_lock);if (!mei_cl_is_connected (cl)) { - rets = -EBUSY ; + rets = -ENODEV ; goto out; } }
Signature · 1 line
2.7.4
Greg Kroah-Hartman
maintainerQuoted 7 lines · Tomas Winkler
commit
8c57cac1457f3125a5d13dc03635c0708c61bff0upstreamSunrise 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.
Quoted 7 lines
Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/misc/mei/hw-me.c | 10 ++++++++-- drivers/misc/mei/pci-me.c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-)
I don't understand what this is for, it's already in the 4.8-stable tree. And there you said it only needed to go to 4.6 and newer, yet you are saying 4.4 here? What am I supposed to do?
confused,
greg k-h
Greg Kroah-Hartman
maintainerRe: [char-msic 2/3] mei: me: fix place for kaby point device ids.
In reply to Tomas WinklerQuoted 10 lines · Tomas Winkler
This is fix of the backported patch only, it places KBL DIDs on correct place to easy on backporting of further DIDs.
Fixes 5c99f32c461c ('mei: me: add kaby point device ids')Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/hw-me-regs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
What did I mess up? And what tree is this for?
Still confused,
greg k-h
Greg Kroah-Hartman
maintainerRe: [char-msic 3/3] mei: fix return value on disconnection
In reply to Tomas WinklerQuoted 4 lines · Tomas Winkler
commit
2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266aupstream.Correct errno on client disconnection is
-ENODEVnot-EBUSY
Quoted 8 lines
Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Alexander Usyskin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/misc/mei/bus.c | 2 +- drivers/misc/mei/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Again, what kernel tree?
greg k-h
Quoted 17 lines · Tomas Winkler
Quoted 7 lines
commit
8c57cac1457f3125a5d13dc03635c0708c61bff0upstreamSunrise 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.Quoted 7 lines
Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>---
drivers/misc/mei/hw-me.c| 10 ++++++++--drivers/misc/mei/pci-me.c
| 4 ++--2 files changed, 10 insertions(+), 4 deletions(-)
Quoted 4 lines
I don't understand what this is for, it's already in the 4.8-stable tree. And there you said it only needed to go to 4.6 and newer, yet you are saying 4.4 here? What am I supposed to do?
It's needed 4.4, but the original patch does apply cleanly only from 4.6 up, so this is the rebased version over 4.4. Since 4.4 is a long term kernel this is important. I see from time to time broken patches in stable, mostly in 3.X series, so I prefer to do the back port myself.
Thanks
Tomas
RE: [char-msic 2/3] mei: me: fix place for kaby point device ids.
In reply to Greg Kroah-HartmanQuoted 13 lines · Tomas Winkler
Quoted 9 lines
This is fix of the backported patch only, it places KBL DIDs on correct place to easy on backporting of further DIDs.
Fixes 5c99f32c461c ('mei: me: add kaby point device ids')Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/hw-me-regs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 5 lines
What did I mess up? And what tree is this for?
Still confused,
This is for 4.4 stable, not sure where I broke the protocol but according the stable rules
Quoted 1 line
Cc <[email protected]> #4.4 this should indicate the intention.
Thanks
Tomas
RE: [char-msic 3/3] mei: fix return value on disconnection
In reply to Greg Kroah-HartmanQuoted 24 lines
-----Original Message-----
From: Greg Kroah-Hartman [mailto:[email protected]]
Sent: Tuesday, November 29, 2016 21:15
To: Winkler, Tomas <[email protected]>
Cc: [email protected]; [email protected]; Usyskin, Alexander <[email protected]>
Subject: Re: [char-msic 3/3] mei: fix return value on disconnectionQuoted 4 lines · Tomas Winkler
commit
2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266aupstream.Correct errno on client disconnection is
-ENODEVnot-EBUSYQuoted 8 lines
Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Alexander Usyskin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/misc/mei/bus.c | 2 +- drivers/misc/mei/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 1 line
Again, what kernel tree?
Stable 4.4
Cc: <[email protected]> #4.4
Thanks
Tomas
RE: [char-msic 3/3] mei: fix return value on disconnection
In reply to Greg Kroah-HartmanQuoted 24 lines
-----Original Message-----
From: Greg Kroah-Hartman [mailto:[email protected]]
Sent: Tuesday, November 29, 2016 21:15
To: Winkler, Tomas <[email protected]>
Cc: [email protected]; [email protected]; Usyskin, Alexander <[email protected]>
Subject: Re: [char-msic 3/3] mei: fix return value on disconnectionQuoted 4 lines · Tomas Winkler
commit
2d4d5481e2d6f93b25fcfb13a9f20bbfbf54266aupstream.Correct errno on client disconnection is
-ENODEVnot-EBUSYQuoted 8 lines
Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Alexander Usyskin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/misc/mei/bus.c | 2 +- drivers/misc/mei/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 1 line
Again, what kernel tree?
Stable 4.4
Cc: <[email protected]> #4.4
Thanks
Tomas
RE: [char-msic 2/3] mei: me: fix place for kaby point device ids.
In reply to Greg Kroah-HartmanQuoted 6 lines
Quoted 6 lines · Tomas Winkler
Quoted 3 lines
This is fix of the backported patch only, it places KBL DIDs on correct place to easy on backporting of further DIDs.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Fixes 5c99f32c461c ('mei: me: add kaby point device ids')Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/hw-me-regs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)What did I mess up?
The KBL DIDs were moved to a different part of the file during back port, than in the original patch hence the consequent patches will not apply cleanly.
And what tree is this for?
Quoted 11 lines
Quoted 4 lines
Still confused,
This is for 4.4 stable, not sure where I broke the protocol but according the stable rules
Quoted 1 line
Cc <[email protected]> #4.4 this should indicate the intention.Thanks
Tomas
Greg Kroah-Hartman
maintainerQuoted 17 lines · Tomas
Quoted 17 lines · Tomas Winkler
Quoted 14 lines
commit
8c57cac1457f3125a5d13dc03635c0708c61bff0upstreamSunrise 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.Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>---
drivers/misc/mei/hw-me.c| 10 ++++++++--drivers/misc/mei/pci-me.c
| 4 ++--2 files changed, 10 insertions(+), 4 deletions(-)
Quoted 7 lines
Quoted 4 lines
I don't understand what this is for, it's already in the 4.8-stable tree. And there you said it only needed to go to 4.6 and newer, yet you are saying 4.4 here? What am I supposed to do?
It's needed 4.4, but the original patch does apply cleanly only from 4.6 up, so this is the rebased version over 4.4. Since 4.4 is a long term kernel this is important. I see from time to time broken patches in stable, mostly in 3.X series, so I prefer to do the back port myself.
Ok, but your [char-misc] in the subject confused me. Please make this a bit more explicit next time.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [char-msic 2/3] mei: me: fix place for kaby point device ids.
In reply to Winkler, TomasQuoted 13 lines · Tomas
Quoted 13 lines
Quoted 13 lines · Tomas Winkler
Quoted 9 lines
This is fix of the backported patch only, it places KBL DIDs on correct place to easy on backporting of further DIDs.
Fixes 5c99f32c461c ('mei: me: add kaby point device ids')Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/hw-me-regs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 4 lines
Quoted 1 line
Quoted 1 line
What did I mess up?
The KBL DIDs were moved to a different part of the file during back port, than in the original patch hence the consequent patches will not apply cleanly.
What patch caused the ids to be moved around? The one previous to this in this series, or some other patch that is already in the tree?
thanks,
greg k-h
Quoted 28 lines · Tomas
Quoted 18 lines
Quoted 18 lines · Tomas Winkler
Quoted 15 lines
commit
8c57cac1457f3125a5d13dc03635c0708c61bff0upstreamSunrise 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.Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/misc/mei/hw-me.c | 10 ++++++++-- drivers/misc/mei/pci-me.c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-)Quoted 2 lines
Quoted 2 lines
I don't understand what this is for, it's already in the 4.8-stable tree. And there you said it only needed to go to 4.6 and newer, yet you are
saying 4.4 here?
Quoted 3 lines
Quoted 2 lines
What am I supposed to do?
Quoted 8 lines
Quoted 1 line
It's needed 4.4, but the original patch does apply cleanly only from 4.6 up, so
this is the rebased version over 4.4. Since 4.4 is a long term kernel this is important.
Quoted 1 line
I see from time to time broken patches in stable, mostly in 3.X series, so I
prefer to do the back port myself.
Ok, but your [char-misc] in the subject confused me. Please make this a bit more explicit next time.
I see, it's automated in my scripts. Will [char-misc 4.4] or [stable 4.4] works for you?
Thanks
Tomas
RE: [char-msic 2/3] mei: me: fix place for kaby point device ids.
In reply to Greg Kroah-HartmanQuoted 15 lines · Tomas
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines · Tomas Winkler
Quoted 9 lines
This is fix of the backported patch only, it places KBL DIDs on correct place to easy on backporting of further DIDs.
Fixes 5c99f32c461c ('mei: me: add kaby point device ids')Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/hw-me-regs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
What did I mess up?
The KBL DIDs were moved to a different part of the file during back port, than in the original patch hence the consequent patches will not apply
cleanly.
What patch caused the ids to be moved around? The one previous to this in this series, or some other patch that is already in the tree?
This patch "Fixes: 5c99f32c461c ('mei: me: add kaby point device ids')" Which is already in the tree.
Thanks
Tomas
Greg Kroah-Hartman
maintainerQuoted 31 lines · Tomas
Quoted 31 lines · Tomas
Quoted 18 lines
Quoted 18 lines · Tomas Winkler
Quoted 15 lines
commit
8c57cac1457f3125a5d13dc03635c0708c61bff0upstreamSunrise 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.Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/misc/mei/hw-me.c | 10 ++++++++-- drivers/misc/mei/pci-me.c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-)Quoted 2 lines
Quoted 2 lines
I don't understand what this is for, it's already in the 4.8-stable tree. And there you said it only needed to go to 4.6 and newer, yet you are
saying 4.4 here?
Quoted 4 lines
Quoted 2 lines
What am I supposed to do?
It's needed 4.4, but the original patch does apply cleanly only from 4.6 up, so
this is the rebased version over 4.4. Since 4.4 is a long term kernel this is important.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
I see from time to time broken patches in stable, mostly in 3.X series, so I
prefer to do the back port myself.
Ok, but your [char-misc] in the subject confused me. Please make this a bit more explicit next time.
I see, it's automated in my scripts. Will [char-misc 4.4] or [stable 4.4] works for you?
It's not that automated as it is misspelled in this series :)
Anyway, stable would make more sense, char-misc 4.4 does not mean anything...
thanks,
greg k-h
Patch "mei: me: fix place for kaby point device ids." has been added to the 4.4-stable tree
In reply to Tomas WinklerThis is a note to let you know that I've just added the patch titled
mei: me: fix place for kaby point device ids.
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mei-me-fix-place-for-kaby-point-device-ids.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From [email protected] Wed Nov 30 10:22:36 2016
From: Tomas Winkler <[email protected]>
Date: Tue, 29 Nov 2016 14:44:45 +0200
Subject: mei: me: fix place for kaby point device ids.
To: [email protected], Greg Kroah-Hartman <[email protected]>
Cc: [email protected], Alexander Usyskin <[email protected]>
Message-ID: <[email protected]>
From: Tomas Winkler <[email protected]>
This is fix of the backported patch only, it places KBL DIDs on correct place to easy on backporting of further DIDs.
--- drivers/misc/mei/hw-me-regs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/misc/mei/hw-me-regs.h +4 -3
@@ -66,9 +66,6 @@#ifndef _MEI_HW_MEI_REGS_H_#define _MEI_HW_MEI_REGS_H_ -#define MEI_DEV_ID_KBP 0xA2BA/* Kaby Point */ -#define MEI_DEV_ID_KBP_2 0xA2BB/* Kaby Point 2 */ -/* * MEI device IDs */
@@ -124,6 +121,10 @@#define MEI_DEV_ID_SPT_2 0x9D3B/* Sunrise Point 2 */ #define MEI_DEV_ID_SPT_H 0xA13A/* Sunrise Point H */ #define MEI_DEV_ID_SPT_H_2 0xA13B/* Sunrise Point H 2 */ + +#define MEI_DEV_ID_KBP 0xA2BA/* Kaby Point */ +#define MEI_DEV_ID_KBP_2 0xA2BB/* Kaby Point 2 */ +/* * MEI HW Section */
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/mei-fix-return-value-on-disconnection.patch queue-4.4/mei-me-disable-driver-on-spt-sps-firmware.patch queue-4.4/mei-me-fix-place-for-kaby-point-device-ids.patch
Quoted 40 lines · Tomas
Quoted 37 lines
Quoted 37 lines · Tomas
Quoted 18 lines
Quoted 18 lines · Tomas Winkler
Quoted 15 lines
commit
8c57cac1457f3125a5d13dc03635c0708c61bff0upstreamSunrise 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.Cc <[email protected]> #4.4Signed-off-by Tomas Winkler <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/misc/mei/hw-me.c | 10 ++++++++-- drivers/misc/mei/pci-me.c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-)Quoted 3 lines
Quoted 3 lines
I don't understand what this is for, it's already in the 4.8-stable tree. And there you said it only needed to go to 4.6 and newer, yet you are
saying 4.4 here?
Quoted 5 lines
Quoted 2 lines
What am I supposed to do?
It's needed 4.4, but the original patch does apply cleanly only from 4.6 up, so
this is the rebased version over 4.4. Since 4.4 is a long term kernel this is important.
Quoted 2 lines
I see from time to time broken patches in stable, mostly in 3.X series, so I
prefer to do the back port myself.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Ok, but your [char-misc] in the subject confused me. Please make this a bit more explicit next time.
I see, it's automated in my scripts. Will [char-misc 4.4] or [stable 4.4] works
for you?
It's not that automated as it is misspelled in this series :)
Yes I know, the script is a bit dyslectic., AI is going too far :)
Quoted 3 lines
Anyway, stable would make more sense, char-misc 4.4 does not mean anything...
Okay, will skip to that, Maybe Documentation/stable_kernel_rules.txt need some updates,
also not sure you followed the mail thread regarding the git send-email issue
https://lkml.org/lkml/2016/11/24/836
Your input will be valued.
Thanks
Tomas