Sakari Ailus
f6085a96c9
mei: vsc: Unregister interrupt handler for system suspend
...
Unregister the MEI VSC interrupt handler before system suspend and
re-register it at system resume time. This mirrors implementation of other
MEI devices.
This patch fixes the bug that causes continuous stream of MEI VSC errors
after system resume.
Fixes: 386a766c41 ("mei: Add MEI hardware support for IVSC device")
Cc: stable@vger.kernel.org # for 6.8
Reported-by: Dominik Brodowski <linux@dominikbrodowski.net >
Signed-off-by: Wentong Wu <wentong.wu@intel.com >
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Acked-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240403051341.3534650-2-wentong.wu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-04-11 15:15:53 +02:00
Sakari Ailus
e3dc66d998
Revert "mei: vsc: Call wake_up() in the threaded IRQ handler"
...
This reverts commit 058a38acba .
It's not necessary to avoid a spinlock, a sleeping lock on PREEMPT_RT, in
an interrupt handler as the interrupt handler itself would be called in a
process context if PREEMPT_RT is enabled. So revert the patch.
Cc: stable@vger.kernel.org # for 6.8
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Acked-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240403051341.3534650-1-wentong.wu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-04-11 15:15:52 +02:00
Alexander Usyskin
0dc04112be
mei: me: disable RPL-S on SPS and IGN firmwares
...
Extend the quirk to disable MEI interface on Intel PCH Ignition (IGN)
and SPS firmwares for RPL-S devices. These firmwares do not support
the MEI protocol.
Fixes: 3ed8c7d39c ("mei: me: add raptor lake point S DID")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240312051958.118478-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-04-11 15:15:22 +02:00
Linus Torvalds
bb41fe35dc
Merge tag 'char-misc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
...
Pull char/misc and other driver subsystem updates from Greg KH:
"Here is the big set of char/misc and a number of other driver
subsystem updates for 6.9-rc1. Included in here are:
- IIO driver updates, loads of new ones and evolution of existing ones
- coresight driver updates
- const cleanups for many driver subsystems
- speakup driver additions
- platform remove callback void cleanups
- mei driver updates
- mhi driver updates
- cdx driver updates for MSI interrupt handling
- nvmem driver updates
- other smaller driver updates and cleanups, full details in the
shortlog
All of these have been in linux-next for a long time with no reported
issue, other than a build warning for the speakup driver"
The build warning hits clang and is a gcc (and C23) extension, and is
fixed up in the merge.
Link: https://lore.kernel.org/all/20240321134831.GA2762840@dev-arch.thelio-3990X/
* tag 'char-misc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (279 commits)
binder: remove redundant variable page_addr
uio_dmem_genirq: UIO_MEM_DMA_COHERENT conversion
uio_pruss: UIO_MEM_DMA_COHERENT conversion
cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT
uio: introduce UIO_MEM_DMA_COHERENT type
cdx: add MSI support for CDX bus
pps: use cflags-y instead of EXTRA_CFLAGS
speakup: Add /dev/synthu device
speakup: Fix 8bit characters from direct synth
parport: sunbpp: Convert to platform remove callback returning void
parport: amiga: Convert to platform remove callback returning void
char: xillybus: Convert to platform remove callback returning void
vmw_balloon: change maintainership
MAINTAINERS: change the maintainer for hpilo driver
char: xilinx_hwicap: Fix NULL vs IS_ERR() bug
hpet: remove hpets::hp_clocksource
platform: goldfish: move the separate 'default' propery for CONFIG_GOLDFISH
char: xilinx_hwicap: drop casting to void in dev_set_drvdata
greybus: move is_gb_* functions out of greybus.h
greybus: Remove usage of the deprecated ida_simple_xx() API
...
2024-03-21 13:21:31 -07:00
Alexander Usyskin
a0776c214d
mei: gsc_proxy: match component when GSC is on different bus
...
On Arrow Lake S systems, MEI is no longer strictly connected to bus 0,
while graphics remain exclusively on bus 0. Adapt the component
matching logic to accommodate this change:
Original behavior: Required both MEI and graphics to be on the same
bus 0.
New behavior: Only enforces graphics to be on bus 0 (integrated),
allowing MEI to reside on any bus.
This ensures compatibility with Arrow Lake S and maintains functionality
for the legacy systems.
Fixes: 1dd924f688 ("mei: gsc_proxy: add gsc proxy driver")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240220200020.231192-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:30:09 +00:00
Uwe Kleine-König
469b832d44
mei: vsc: Convert to platform remove callback returning void
...
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Acked-by: Arnd Bergmann <arnd@arndb.de >
Link: https://lore.kernel.org/r/8e14f0b1cea107e613fa0075b3379a9f1e7ef63f.1708508896.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:28:52 +00:00
Sakari Ailus
33a2120b87
mei: vsc: Assign pinfo fields in variable declaration
...
Assign all possible fields of pinfo in variable declaration, instead of
just zeroing it there.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com >
Link: https://lore.kernel.org/r/20240219195807.517742-4-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:28:22 +00:00
Sakari Ailus
b8b19acfaf
mei: vsc: Don't use sleeping condition in wait_event_timeout()
...
vsc_tp_wakeup_request() called wait_event_timeout() with
gpiod_get_value_cansleep() which may sleep, and does so as the
implementation is that of gpio-ljca.
Move the GPIO state check outside the call.
Fixes: 566f5ca976 ("mei: Add transport driver for IVSC device")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com >
Link: https://lore.kernel.org/r/20240219195807.517742-3-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:28:22 +00:00
Sakari Ailus
058a38acba
mei: vsc: Call wake_up() in the threaded IRQ handler
...
The hard IRQ handler vsc_tp_irq() is called with a raw spinlock taken.
wake_up() acquires a spinlock, a sleeping lock on PREEMPT_RT. This leads
to sleeping in atomic context.
Move the wake_up() call to the threaded IRQ handler vsc_tp_thread_isr()
where it can be safely called.
Fixes: 566f5ca976 ("mei: Add transport driver for IVSC device")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Tested-and-Reviewed-by: Wentong Wu <wentong.wu@intel.com >
Link: https://lore.kernel.org/r/20240219195807.517742-2-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:28:22 +00:00
Bjorn Helgaas
e37db17dae
mei: me: remove unnecessary NULL pointer checks
...
The .shutdown(), .remove(), and power management callbacks are never called
unless .probe() has already returned success, which means it has set
drvdata to a non-NULL pointer, so "dev" can never be NULL in the other
callbacks.
Remove the unnecessary checks.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Link: https://lore.kernel.org/r/20240229181300.352077-4-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:28:02 +00:00
Bjorn Helgaas
64386d1588
mei: txe: remove unnecessary NULL pointer checks
...
The .shutdown(), .remove(), and power management callbacks are never called
unless .probe() has already returned success, which means it has set
drvdata to a non-NULL pointer, so "dev" can never be NULL in the other
callbacks.
Remove the unnecessary checks.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Link: https://lore.kernel.org/r/20240229181300.352077-3-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:28:02 +00:00
Bjorn Helgaas
d6543805a8
mei: gsc: remove unnecessary NULL pointer checks
...
The .remove() and power management callbacks are never called unless
.probe() has already returned success, which means it has set drvdata to a
non-NULL pointer, so "dev" can never be NULL in the other callbacks.
Remove the unnecessary checks.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Link: https://lore.kernel.org/r/20240229181300.352077-2-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-03-05 14:28:02 +00:00
Wentong Wu
daaf5286b6
mei: Add Meteor Lake support for IVSC device
...
Add IVSC device support on Meteor Lake platform.
Signed-off-by: Wentong Wu <wentong.wu@intel.com >
Cc: stable <stable@kernel.org >
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Acked-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240207004304.31862-1-wentong.wu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-02-19 11:40:17 +01:00
Alexander Usyskin
8436f25802
mei: me: add arrow lake point H DID
...
Add Arrow Lake H device id.
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240211103912.117105-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-02-19 11:39:13 +01:00
Alexander Usyskin
7a9b901204
mei: me: add arrow lake point S DID
...
Add Arrow Lake S device id.
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240211103912.117105-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-02-19 11:39:13 +01:00
Alexander Usyskin
390b60f763
mei: pxp: add dependency on Xe driver
...
Optionally depend on either i915 or Xe drivers.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240123101625.220365-5-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-30 16:19:59 -08:00
Alexander Usyskin
d35e28b565
mei: hdcp: add dependency on Xe driver
...
Optionally depend on either i915 or Xe drivers.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240123101625.220365-4-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-30 16:19:59 -08:00
Alexander Usyskin
ceeedd951f
mei: pxp: match without driver name
...
Xe driver uses this component too, but current match function
matches by i915 driver name.
Remove dependency on i915 driver name in component_match function.
Use PCI header information to match Intel graphics device.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240123101625.220365-3-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-30 16:19:59 -08:00
Alexander Usyskin
6244a8b6e3
mei: hdcp: match without driver name
...
Xe driver uses this component too, but current match function
matches by i915 driver name.
Remove dependency on i915 driver name in component_match function.
Use PCI header information to match Intel graphics device.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240123101625.220365-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-30 16:19:59 -08:00
Vitaly Lubart
0e59f01d7c
mei: gsc: add support for auxiliary device created by Xe driver
...
Add support for gsc mei auxiliary device created by Xe driver
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20240123101625.220365-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2024-01-30 16:19:59 -08:00
Arnd Bergmann
d667378ade
mei: rework Kconfig dependencies
...
The dependencies in the mei framework are inconsistent, with some symbols
using 'select INTEL_MEI' to force it being enabled and others using
'depends on INTEL_MEI'.
In general, one should not select user-visible symbols, so change all
of these to normal dependencies, but change the default on INTEL_MEI to
be enabled when building a kernel for an Intel CPU with ME or a generic
x86 kernel.
Having consistent dependencies makes the 'menuconfig' listing more
readable by using proper indentation.
A large if/endif block is just a simpler syntax than repeating the
dependencies for each symbol.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Wentong Wu <wentong.wu@intel.com >
Link: https://lore.kernel.org/r/20231214183946.109124-2-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-15 17:02:15 +01:00
Arnd Bergmann
95171e4566
mei: fix vsc dependency
...
CONFIG_INTEL_MEI_VSC_HW can be set to built-in even with CONFIG_MEI=m,
but then the driver is not built because Kbuild never enters the
drivers/misc/mei directory for built-in files, leading to a link
failure:
ERROR: modpost: "vsc_tp_reset" [drivers/misc/mei/mei-vsc.ko] undefined!
ERROR: modpost: "vsc_tp_init" [drivers/misc/mei/mei-vsc.ko] undefined!
ERROR: modpost: "vsc_tp_xfer" [drivers/misc/mei/mei-vsc.ko] undefined!
ERROR: modpost: "vsc_tp_need_read" [drivers/misc/mei/mei-vsc.ko] undefined!
ERROR: modpost: "vsc_tp_intr_enable" [drivers/misc/mei/mei-vsc.ko] undefined!
ERROR: modpost: "vsc_tp_intr_synchronize" [drivers/misc/mei/mei-vsc.ko] undefined!
ERROR: modpost: "vsc_tp_intr_disable" [drivers/misc/mei/mei-vsc.ko] undefined!
ERROR: modpost: "vsc_tp_register_event_cb" [drivers/misc/mei/mei-vsc.ko] undefined!
Add an explicit dependency on CONFIG_MEI that was apparently missing,
to ensure the VSC_HW driver cannot be built-in with MEI itself being
a loadable module.
Fixes: 566f5ca976 ("mei: Add transport driver for IVSC device")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Wentong Wu <wentong.wu@intel.com >
Link: https://lore.kernel.org/r/20231214183946.109124-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-15 17:01:41 +01:00
Sakari Ailus
5370a431ef
mei: vsc: Rework firmware image names
...
Rework firmware image names with the users in mind---there's no need for
variation between firmware names, apart from connected sensors. All
supported SoCs use the same firmware, too.
Use a single set of firmware binaries and assume they'll be found under
intel/vsc directory.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Tested-by: Wentong Wu <wentong.wu@intel.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20231213094055.446611-1-sakari.ailus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-15 17:01:37 +01:00
Alexander Usyskin
ea0e635fe5
mei: pxp: spdx should be at first line
...
Remove stray empty line at the beginning of the file
to have SPDX header t the first line.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20231214143752.294008-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-15 17:01:33 +01:00
Greg Kroah-Hartman
0e42b5fee8
Merge 6.7-rc5 into char-misc-next
...
We need the char/misc fixes in here as well for testing and to build off
of.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-11 08:39:35 +01:00
Wentong Wu
386a766c41
mei: Add MEI hardware support for IVSC device
...
The protocol used for the IVSC device to communicate with HOST is MEI.
The MEI hardware interfaces for the IVSC device are implemented.
The APIs are exposed by MEI framework to mei clients, e.g. mei_csi and
mei_ace.
Signed-off-by: Wentong Wu <wentong.wu@intel.com >
Reviewed-by: Alexander Usyskin <alexander.usyskin@intel.com >
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Tested-by: Hao Yao <hao.yao@intel.com >
Acked-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/1701651344-20723-3-git-send-email-wentong.wu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-07 11:41:40 +09:00
Wentong Wu
566f5ca976
mei: Add transport driver for IVSC device
...
The Intel visual sensing controller (IVSC) device is designed to control
the camera sharing between host IPU for media usage and IVSC for context
sensing (face detection).
IVSC is exposed to HOST as an SPI device and the message protocol over
the SPI BUS for communicating with the IVSC device is implemented. This
is the backend of mei framework for IVSC device, which usually handles
the hardware data transfer. The mei_csi and mei_ace are the clients of
IVSC mei framework.
The firmware downloading for the IVSC device is implemented as well.
Signed-off-by: Wentong Wu <wentong.wu@intel.com >
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Tested-by: Hao Yao <hao.yao@intel.com >
Acked-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/1701651344-20723-2-git-send-email-wentong.wu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-07 11:41:40 +09:00
Su Hui
ee62360272
misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write
...
Clang static analyzer complains that value stored to 'rets' is never
read.Let 'buf_len = -EOVERFLOW' to make sure we can return '-EOVERFLOW'.
Fixes: 8c8d964ce9 ("mei: move hbuf_depth from the mei device to the hw modules")
Signed-off-by: Su Hui <suhui@nfschina.com >
Link: https://lore.kernel.org/r/20231120095523.178385-2-suhui@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-27 13:38:29 +00:00
Su Hui
8f06aee808
misc: mei: client.c: return negative error code in mei_cl_write
...
mei_msg_hdr_init() return negative error code, rets should be
'PTR_ERR(mei_hdr)' rather than '-PTR_ERR(mei_hdr)'.
Fixes: 0cd7c01a60 ("mei: add support for mei extended header.")
Signed-off-by: Su Hui <suhui@nfschina.com >
Link: https://lore.kernel.org/r/20231120095523.178385-1-suhui@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-27 13:38:29 +00:00
Alexander Usyskin
be6f9a3996
mei: pxp: fix mei_pxp_send_message return value
...
mei_pxp_send_message() should return zero on success and
cannot propagate number of bytes as returned by internally
called mei_cldev_send().
Fixes: ee5cb39348 ("mei: pxp: recover from recv fail under memory pressure")
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20231126092449.88310-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-11-27 13:37:32 +00:00
Vitaly Lubart
34a674e99a
mei: me: emit error only if reset was unexpected
...
GSC devices perform legal firmware initiated resets due to state transition
that may appear as unexpected to the driver. Lower the log level for those
devices to debug level and save the firmware status registers.
When the device comes out of the reset it is possible to check whether the
resets was due to a firmware error or an exception
and only than produce a warning.
Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20231015080540.95922-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:34 +02:00
Randy Dunlap
3b54a111bb
misc: mei: main.c: fix kernel-doc warnings
...
Fix kernel-doc warnings in main.c:
main.c:465: warning: contents before sections
main.c:590: warning: missing initial short description on line:
* mei_ioctl_client_notify_request -
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20231012024845.29169-8-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:34 +02:00
Randy Dunlap
980dcc7e43
misc: mei: interrupt.c: fix kernel-doc warnings
...
Fix kernel-doc warnings in interrupt.c:
interrupt.c:631: warning: contents before sections
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20231012024845.29169-7-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:34 +02:00
Randy Dunlap
de735e7fda
misc: mei: hw-me.c: fix kernel-doc warnings
...
Fix kernel-doc warnings in hw-me.c:
hw-me.c:1391: warning: contents before sections
hw-me.c:1475: warning: contents before sections
hw-me.c:1501: warning: contents before sections
hw-me.c:1525: warning: contents before sections
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20231012024845.29169-6-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Randy Dunlap
fbe3599ee6
misc: mei: hbm.c: fix kernel-doc warnings
...
Fix kernel-doc warnings in hbm.c:
hbm.c:98: warning: No description found for return value of 'mei_hbm_write_message'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20231012024845.29169-5-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Randy Dunlap
4efa1e2a05
misc: mei: dma-ring.c: fix kernel-doc warnings
...
Fix kernel-doc warnings in dma-ring.c:
dma-ring.c:130: warning: No description found for return value of 'mei_dma_copy_from'
dma-ring.c:150: warning: No description found for return value of 'mei_dma_copy_to'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20231012024845.29169-4-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Randy Dunlap
daa0c28d3b
misc: mei: client.c: fix kernel-doc warnings
...
Fix kernel-doc warnings in client.c:
client.c:53: warning: contents before sections
client.c:68: warning: contents before sections
client.c:334: warning: contents before sections
client.c:349: warning: contents before sections
client.c:364: warning: contents before sections
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20231012024845.29169-3-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Randy Dunlap
5d33dc7df2
misc: mei: hw.h: fix kernel-doc warnings
...
Fix kernel-doc warnings in hw.h:
hw.h:809: warning: missing initial short description on line:
* struct hbm_client_dma_unmap_request
hw.h:812: warning: contents before sections
hw.h:825: warning: missing initial short description on line:
* struct hbm_client_dma_response
hw.h:828: warning: contents before sections
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20231012024845.29169-2-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Tomas Winkler
ae4cb6bd50
mei: docs: fix spelling errors
...
Fix spelling errors in the mei code base.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Reviewed-by: Randy Dunlap <rdunlap@infradead.org >
Link: https://lore.kernel.org/r/20231011074301.223879-4-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Tomas Winkler
d37b59c716
mei: docs: add missing entries to kdoc in struct mei_cfg_idx
...
Document all entries in struct mei_cfg_idx.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Reviewed-by: Randy Dunlap <rdunlap@infradead.org >
Link: https://lore.kernel.org/r/20231011074301.223879-3-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Tomas Winkler
64459c626b
mei: docs: use correct structures name in kdoc
...
Fix misalignment between structures names and their kdoc in hw.h
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Reviewed-by: Randy Dunlap <rdunlap@infradead.org >
Link: https://lore.kernel.org/r/20231011074301.223879-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Alan Previn
fb99e79ee6
mei: update mei-pxp's component interface with timeouts
...
In debugging platform or firmware related MEI-PXP connection
issues, having a timeout when clients (such as i915) calling
into mei-pxp's send/receive functions have proven useful as opposed to
blocking forever until the kernel triggers a watchdog panic (when
platform issues are experienced).
Update the mei-pxp component interface send and receive functions
to take in timeouts.
Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com >
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20231011110157.247552-5-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Alexander Usyskin
dab79a2235
mei: pxp: re-enable client on errors
...
Disable and enable mei-pxp client on errors to clean the internal state.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20231011110157.247552-4-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Alexander Usyskin
ee5cb39348
mei: pxp: recover from recv fail under memory pressure
...
Under memory pressure recv fails due to kmalloc failure,
and if drivers(pxp) retry send/receive, send blocks
indefinitely.
Send without recv leaves the channel in a bad state.
Retry send attempt after small timeout and reset the channel if
the retry failed on kmalloc failure too.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20231011110157.247552-3-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Alexander Usyskin
cf439721f6
mei: bus: add send and recv api with timeout
...
Add variation of the send and recv functions on bus
that define timeout.
Caller can use such functions in flow that can stuck
to bail out and not to put down the whole system.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20231011110157.247552-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-10-18 10:01:33 +02:00
Ivan Orlov
df8e2c3e16
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 >
2023-08-22 13:42:00 +02:00
Tomas Winkler
0995c95b08
mei: gsc: add module description
...
For completeness add gsc module description.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20230716081043.3092690-4-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-07-30 18:15:53 +02:00
Christophe JAILLET
fb827efbec
mei: pxp: Keep a const qualifier when calling mei_cldev_send()
...
The API has been fixed in commit 0912ef4855 ("mei: constify passed
buffers and structures"), so there is no more need to drop the const
qualifier and the comment can be removed as-well.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/23c078181575e65ff660f993bc6eb38753b3d5e7.1689971167.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-07-30 18:15:27 +02:00
Alexander Usyskin
6549b2b7ad
mei: obtain firmware version only on gsc.
...
Modern GSC firmwares have both static and dynamic MKHI clients.
Avoid expensive dynamic client call for firmware version retrieval,
in case the firmware version is already retrieved from the fix address
client in bus_fixup().
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20230716081043.3092690-3-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-07-30 14:17:27 +02:00
Alexander Usyskin
5fc227484d
mei: bus: enable asynchronous suspend.
...
Enable asynchronous suspend for devices on MEI bus,
required for gsc.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com >
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com >
Link: https://lore.kernel.org/r/20230716081043.3092690-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-07-30 14:17:27 +02:00