mei: corner cases bug fixes
cover mei: corner cases bug fixes
Set of fixes that covers few corner cases
Alexander Usyskin (5):
mei: reset client connection state on timeout
mei: start disconnect request timer consistently
mei: don't schedule suspend in pm idle
mei: nfc: clean nfc internal struct on host exit
mei: fix return value on disconnect timeout
drivers/misc/mei/client.c | 17 +++++++---------- drivers/misc/mei/nfc.c | 1 + drivers/misc/mei/pci-me.c | 2 +- drivers/misc/mei/pci-txe.c | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-)
Signature · 1 line
1.9.3
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit
Quoted 26 lines · Tomas Winkler
From: Alexander Usyskin <[email protected]>
NFC internal structure cleaning was dropped by commit
commit
5ad1550a15cd5b75ed8aa3009e162822f720375eAuthor: Tomas Winkler <[email protected]> Date: Sun Jan 26 11:53:06 2014 +0200mei: Remove all bus devices from the
mei_devlist when stopping the MEIBring back cleaning of structure only, because it broke host init after host exit scenario (like after S3):
mei_nfc_host_initchecksndev->cl_infoand does nothing if it's dirty.Cc [email protected] # 3.15+Signed-off-by Alexander Usyskin <[email protected]>Signed-off-by Tomas Winkler <[email protected]>--- drivers/misc/mei/nfc.c | 1 + 1 file changed, 1 insertion(+)drivers/misc/mei/nfc.c +0
-0
drivers/misc/mei/nfc.c void mei_nfc_host_exit(struct mei_device *dev) · line 556
Quoted 4 lines
drivers/misc/mei/nfc.c +1
-0@@ -553,6 +553,7 @@ void mei_nfc_host_exit(struct mei_device *dev) {struct mei_nfc_dev *ndev = &nfc_dev;cancel_work_sync (&ndev->init_work); +memset (ndev,0 ,sizeof (struct mei_nfc_dev ));
This implies that something is using a "static" device structure, which isn't allowed by the driver core. So please fix the root cause here, don't paper over the bug.
thanks,
greg k-h
RE: [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit
Quoted 10 lines
Review void mei_nfc_host_exit(struct mei_device *dev) · line 556
Quoted 5 lines
(quoted diff) +1
-0@@ -553,6 +553,7 @@ void mei_nfc_host_exit(struct mei_device *dev) { struct mei_nfc_dev *ndev = &nfc_dev; cancel_work_sync(&ndev->init_work); + memset(ndev, 0, sizeof(struct mei_nfc_dev));This implies that something is using a "static" device structure, which isn't allowed by the driver core. So please fix the root cause here, don't paper over the bug.
You are partially correct as this is not the 'struct device' it just a nfc singleton in any case it is not really nice and we have the fix in queue but it is rather extensive rework and I guess it won't be suitable for stable so hence this one liner fix.
Thanks
Tomas
Re: [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit
Quoted 10 lines · Tomas
Quoted 10 lines
Review void mei_nfc_host_exit(struct mei_device *dev) · line 556
Quoted 5 lines
(quoted diff) +1
-0@@ -553,6 +553,7 @@ void mei_nfc_host_exit(struct mei_device *dev) { struct mei_nfc_dev *ndev = &nfc_dev; cancel_work_sync(&ndev->init_work); + memset(ndev, 0, sizeof(struct mei_nfc_dev));This implies that something is using a "static" device structure, which isn't allowed by the driver core. So please fix the root cause here, don't paper over the bug.
Quoted 3 lines
You are partially correct as this is not the 'struct device' it just a nfc singleton in any case it is not really nice and we have the fix in queue but it is rather extensive rework and I guess it won't be suitable for stable so hence this one liner fix.
It shouldn't be a huge rework to make a static variable dynamic, right? Please do it correctly.
thanks,
greg k-h