#
53e0b766 |
| 30-May-2024 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: demote client disconnect warning on suspend to debug
[ Upstream commit 1db5322b7e6b58e1b304ce69a50e9dca798ca95b ]
Change level for the "not connected" client message in the write callback from
mei: demote client disconnect warning on suspend to debug
[ Upstream commit 1db5322b7e6b58e1b304ce69a50e9dca798ca95b ]
Change level for the "not connected" client message in the write callback from error to debug.
The MEI driver currently disconnects all clients upon system suspend. This behavior is by design and user-space applications with open connections before the suspend are expected to handle errors upon resume, by reopening their handles, reconnecting, and retrying their operations.
However, the current driver implementation logs an error message every time a write operation is attempted on a disconnected client. Since this is a normal and expected flow after system resume logging this as an error can be misleading.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20240530091415.725247-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
df8e2c3e |
| 11-Aug-2023 |
Ivan Orlov <ivan.orlov0322@gmail.com> |
mei: make mei_class a static const structure
Now that the driver core allows for struct class to be in read-only memory, move the mei_class structure to be declared at build time placing it into rea
mei: make mei_class a static const structure
Now that the driver core allows for struct class to be in read-only memory, move the mei_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230811213052.85044-1-ivan.orlov0322@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
1fb1ea0d |
| 10-Mar-2023 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
mei: Move uuid.h to the MEI namespace
There is only a single user of the UUID uAPI, let's make it part of that user.
The way it's done is to prevent compilation time breakage for the user space tha
mei: Move uuid.h to the MEI namespace
There is only a single user of the UUID uAPI, let's make it part of that user.
The way it's done is to prevent compilation time breakage for the user space that does
#include <linux/uuid.h>
In the future MEI user space tools can switch over to use mei_uuid.h.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230310170747.22782-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
1aaba11d |
| 13-Mar-2023 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
driver core: class: remove module * from class_create()
The module pointer in class_create() never actually did anything, and it shouldn't have been requred to be set as a parameter even if it did s
driver core: class: remove module * from class_create()
The module pointer in class_create() never actually did anything, and it shouldn't have been requred to be set as a parameter even if it did something. So just remove it and fix up all callers of the function in the kernel tree at the same time.
Cc: "Rafael J. Wysocki" <rafael@kernel.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
83f47eea |
| 16-Nov-2022 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: add timeout to send
When driver wakes up the firmware from the low power state, it is sending a memory ready message. The send is done via synchronous/blocking function to ensure that firmware
mei: add timeout to send
When driver wakes up the firmware from the low power state, it is sending a memory ready message. The send is done via synchronous/blocking function to ensure that firmware is in ready state. However, in case of firmware undergoing reset send might be block forever. To address this issue a timeout is added to blocking write command on the internal bus.
Introduce the __mei_cl_send_timeout function to use instead of __mei_cl_send in cases where timeout is required. The mei_cl_write has only two callers and there is no need to split it into two functions.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Link: https://lore.kernel.org/r/20221116124735.2493847-2-alexander.usyskin@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
95953618 |
| 07-Sep-2022 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: extend timeouts on slow devices
Parametrize operational timeouts in order to support slow firmware on some graphics devices.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Sign
mei: extend timeouts on slow devices
Parametrize operational timeouts in order to support slow firmware on some graphics devices.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220907215113.1596567-9-tomas.winkler@intel.com Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
show more ...
|
#
09f8c33a |
| 21-Jun-2021 |
Tamar Mashiah <tamar.mashiah@intel.com> |
mei: fix kdoc in the driver
Over time the functions were renamed, but this was not always reflected in kdoc, fix that.
Signed-off-by: Tamar Mashiah <tamar.mashiah@intel.com> Signed-off-by: Tomas Wi
mei: fix kdoc in the driver
Over time the functions were renamed, but this was not always reflected in kdoc, fix that.
Signed-off-by: Tamar Mashiah <tamar.mashiah@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20210621193756.134027-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
ca263dd8 |
| 10-May-2021 |
Guenter Roeck <linux@roeck-us.net> |
mei: Drop unnecessary NULL check after container_of
The result of container_of() operations is never NULL unless the embedded element is the first element of the data structure, which is not the cas
mei: Drop unnecessary NULL check after container_of
The result of container_of() operations is never NULL unless the embedded element is the first element of the data structure, which is not the case here. The NULL check is therefore unnecessary and misleading. Remove it.
This change was made automatically with the following Coccinelle script.
@@ type t; identifier v; statement s; @@
<+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+>
Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210511045512.2376580-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
e666b79e |
| 08-Feb-2021 |
Tomas Winkler <tomas.winkler@intel.com> |
mei: use sysfs_emit() in tx_queue_limit_show sysfs
Using of snprintf is discouraged in sysfs use the new sysfs_emit() API.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.
mei: use sysfs_emit() in tx_queue_limit_show sysfs
Using of snprintf is discouraged in sysfs use the new sysfs_emit() API.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20210208150649.141358-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
aa207a05 |
| 18-Aug-2020 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: add connect with vtag ioctl
This IOCTL is used to associate the current file descriptor with a FW Client (given by UUID), and virtual tag (vtag). The IOCTL opens a communication channel between
mei: add connect with vtag ioctl
This IOCTL is used to associate the current file descriptor with a FW Client (given by UUID), and virtual tag (vtag). The IOCTL opens a communication channel between a host client and a FW client on a tagged channel. From this point on, every reader and write will communicate with the associated FW client on the tagged channel. Upon close() the communication is terminated.
The IOCTL argument is a struct with a union that contains the input parameter and the output parameter for this IOCTL.
The input parameter is UUID of the FW Client, a vtag [0,255] The output parameter is the properties of the FW client
Clients that do not support tagged connection will respond with -EOPNOTSUPP
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20200818115147.2567012-12-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
f35fe5f4 |
| 18-Aug-2020 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: add a vtag map for each client
Vtag map is a list of tuples of vtag and file pointer (struct mei_cl_vtag) associated with a particular me host client.
Signed-off-by: Alexander Usyskin <alexand
mei: add a vtag map for each client
Vtag map is a list of tuples of vtag and file pointer (struct mei_cl_vtag) associated with a particular me host client.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20200818115147.2567012-8-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
d1376f3d |
| 18-Aug-2020 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: add a spin lock to protect rd_completed queue
In order to support vtags we need to access read completed queue out of driver big lock. Add a spin lock to protect rd_completed queue.
Signed-off
mei: add a spin lock to protect rd_completed queue
In order to support vtags we need to access read completed queue out of driver big lock. Add a spin lock to protect rd_completed queue.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20200818115147.2567012-7-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
2f79d3d1 |
| 28-Jul-2020 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: add device kind to sysfs
Some of the mei device heads are not generic and have a specific purpose, we need to announce it to the user space so it is possible to detect the correct device node v
mei: add device kind to sysfs
Some of the mei device heads are not generic and have a specific purpose, we need to announce it to the user space so it is possible to detect the correct device node via matching attributes.
Generic heads are marked as 'mei' while special purpose heads have their own names. Currently we are adding 'itouch' string for Intel IPTS 1.0, 2.0 devices.
This is done via new sysfs attribute 'kind'.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20200728192242.3117779-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
b4a6700c |
| 23-Jul-2020 |
Tomas Winkler <tomas.winkler@intel.com> |
mei: ioctl: use sizeof of variable instead of struct type
Use sizeof(connect_data))) instead of sizeof(struct mei_connect_client_data) when copying data between user space and kernel.
There is a po
mei: ioctl: use sizeof of variable instead of struct type
Use sizeof(connect_data))) instead of sizeof(struct mei_connect_client_data) when copying data between user space and kernel.
There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not.
Cc: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20200723145927.882743-3-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
52f6efdf |
| 07-Nov-2019 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: add trc detection register to sysfs
The glitch detection HW (TRC) save it status information into TRC status register. Make it available to user-space via read-only sysfs file. The TRC register
mei: add trc detection register to sysfs
The glitch detection HW (TRC) save it status information into TRC status register. Make it available to user-space via read-only sysfs file. The TRC register is availab for PCH15 gen and newer, for older platforms reading the sysfs file will fail with EOPNOTSUPP.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20191107104445.19101-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
407e9ef7 |
| 11-Sep-2018 |
Arnd Bergmann <arnd@arndb.de> |
compat_ioctl: move drivers to compat_ptr_ioctl
Each of these drivers has a copy of the same trivial helper function to convert the pointer argument and then call the native ioctl handler.
We now ha
compat_ioctl: move drivers to compat_ptr_ioctl
Each of these drivers has a copy of the same trivial helper function to convert the pointer argument and then call the native ioctl handler.
We now have a generic implementation of that, so use it.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Reviewed-by: Jiri Kosina <jkosina@suse.cz> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
show more ...
|
#
4495dfdd |
| 23-Jul-2019 |
Suzuki K Poulose <suzuki.poulose@arm.com> |
drivers: Introduce device lookup variants by device type
Add a helper to match a device by its type and provide wrappers for {bus/class/driver}_find_device() APIs.
Cc: Alexander Shishkin <alexander
drivers: Introduce device lookup variants by device type
Add a helper to match a device by its type and provide wrappers for {bus/class/driver}_find_device() APIs.
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Harald Freudenberger <freude@linux.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux-usb@vger.kernel.org Cc: Oliver Neukum <oneukum@suse.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20190723221838.12024-5-suzuki.poulose@arm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
5666d896 |
| 11-Jun-2019 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
mei: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic shou
mei: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.
Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
43b8a7ed |
| 22-Apr-2019 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: expose device state in sysfs
Expose mei device state to user-space through sysfs. This gives indication to applications that driver is in transition, usefully mostly to detect link reset state.
mei: expose device state in sysfs
Expose mei device state to user-space through sysfs. This gives indication to applications that driver is in transition, usefully mostly to detect link reset state.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
1e55b609 |
| 11-Mar-2019 |
Tomas Winkler <tomas.winkler@intel.com> |
mei: adjust the copyright notice in the files.
Use unified version of the copyright notice in the files Update copyright years according the year the files were touched, except this patch and SPDX c
mei: adjust the copyright notice in the files.
Use unified version of the copyright notice in the files Update copyright years according the year the files were touched, except this patch and SPDX conversions.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
9fff0425 |
| 11-Mar-2019 |
Tomas Winkler <tomas.winkler@intel.com> |
mei: convert to SPDX license tags
Replace boiler plate licenses texts with the SPDX license identifiers in the mei files header.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by
mei: convert to SPDX license tags
Replace boiler plate licenses texts with the SPDX license identifiers in the mei files header.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
03b2cbb6 |
| 28-Sep-2018 |
Tomas Winkler <tomas.winkler@intel.com> |
mei: replace POLL* with EPOLL* for write queues.
Looks like during merging the bulk POLL* -> EPOLL* replacement missed the patch 'commit af336cabe083 ("mei: limit the number of queued writes")'
Fix
mei: replace POLL* with EPOLL* for write queues.
Looks like during merging the bulk POLL* -> EPOLL* replacement missed the patch 'commit af336cabe083 ("mei: limit the number of queued writes")'
Fix sparse warning: drivers/misc/mei/main.c:602:13: warning: restricted __poll_t degrades to integer drivers/misc/mei/main.c:605:30: warning: invalid assignment: |= drivers/misc/mei/main.c:605:30: left side has type restricted __poll_t drivers/misc/mei/main.c:605:30: right side has type int
Fixes: af336cabe083 ("mei: limit the number of queued writes") Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
5151e2b5 |
| 12-Jul-2018 |
Tomas Winkler <tomas.winkler@intel.com> |
mei: fix ssize_t to int assignment in read and write ops.
Use ssize_t for rets variables in mei_write(), mei_read(), and mei_cl_write() as well as change the return type of mei_cl_write() to ssize_t
mei: fix ssize_t to int assignment in read and write ops.
Use ssize_t for rets variables in mei_write(), mei_read(), and mei_cl_write() as well as change the return type of mei_cl_write() to ssize_t, to prevent assignment of possible 64bit size_t to int 32 bit variable.
As by product also eliminate warning drivers/misc/mei/client.c:1702:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
a103af1b |
| 09-Jul-2018 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: don't update offset in write
MEI enables writes of complete messages only while read can be performed in parts, hence write should not update the file offset to not break interleaving partial r
mei: don't update offset in write
MEI enables writes of complete messages only while read can be performed in parts, hence write should not update the file offset to not break interleaving partial reads with writes.
Cc: <stable@vger.kernel.org> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
3cfaeb33 |
| 24-Jun-2018 |
Alexander Usyskin <alexander.usyskin@intel.com> |
mei: expose fw version to sysfs
The ME FW version is constantly used by detection and update tools. To improve the reliability and simplify these tools provide a sysfs interface to access version of
mei: expose fw version to sysfs
The ME FW version is constantly used by detection and update tools. To improve the reliability and simplify these tools provide a sysfs interface to access version of the platform ME firmware in the following format: <platform>:<major>.<minor>.<milestone>.<build>. There can be up to three such blocks for different FW components.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|