- 18 Apr, 2024 1 commit
-
-
Alexey Gladkov authored
All other headers use _IOC() macros to describe ioctls for a long time now. This header is stuck in the last century. Simply use the _IO() macro. No other changes. Signed-off-by: Alexey Gladkov <legion@kernel.org> Link: https://lore.kernel.org/r/e4229fe2933a003341e338b558ab1ea8b63a51f6.1713375378.git.legion@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 Apr, 2024 10 commits
-
-
Parker Newman authored
- Added Connect Tech and Exar IDs not already in pci_ids.h Signed-off-by: Parker Newman <pnewman@connecttech.com> Link: https://lore.kernel.org/r/7c3d8e795a864dd9b0a00353b722060dc27c4e09.1713270624.git.pnewman@connecttech.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guanbing Huang authored
The 16550a serial port based on the ACPI table requires obtaining the reg-shift attribute. In the ACPI scenario, If the reg-shift property is not configured like in DTS, the 16550a serial driver cannot read or write controller registers properly during initialization. Signed-off-by: Guanbing Huang <albanhuang@tencent.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bing Fan <tombinfan@tencent.com> Tested-by: Linheng Du <dylanlhdu@tencent.com> Link: https://lore.kernel.org/r/4726ecea8f7bfbfe42501b4f6ad9fe5b38994574.1713234515.git.albanhuang@tencent.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guanbing Huang authored
The function __uart_read_properties doesn't cover PNP devices, so add IRQ processing for PNP devices in the branch. Signed-off-by: Guanbing Huang <albanhuang@tencent.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bing Fan <tombinfan@tencent.com> Tested-by: Linheng Du <dylanlhdu@tencent.com> Link: https://lore.kernel.org/r/7f4ca31ef1cab4c6ecad22fafd82117686b696be.1713234515.git.albanhuang@tencent.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guanbing Huang authored
Add dev_is_pnp() macro to determine whether the device is a PNP device. Signed-off-by: Guanbing Huang <albanhuang@tencent.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Bing Fan <tombinfan@tencent.com> Tested-by: Linheng Du <dylanlhdu@tencent.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/4e68f5557ad53b671ca8103e572163eca52a8f29.1713234515.git.albanhuang@tencent.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
dw8250_serial_inq() uses unsigned int variable to store 8-bit value. Due to that it needs a cast which can be avoided by switching to use u8 instead of unsigned int. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240412173937.187442-1-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
All callers of dw8250_check_lcr() perform the same check. Deduplicate it by moving them into respective call. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240412173931.187411-1-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alexander Stein authored
Clocks might not be available yet when probing lpuart. Silence -517 errors by using dev_err_probe. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20240411130449.1096090-1-alexander.stein@ew.tq-group.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Esben Haabendal authored
By waiting at most 1 second for USR2_TXDC to be set, we avoid a potential deadlock. In case of the timeout, there is not much we can do, so we simply ignore the transmitter state and optimistically try to continue. Signed-off-by: Esben Haabendal <esben@geanix.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/r/919647898c337a46604edcabaf13d42d80c0915d.1712837613.git.esben@geanix.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
After conversion to the kfifo, it becomes possible to extract two helper functions for better maintenance and code deduplication. Do it here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409174057.1104262-1-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jiri Slaby (SUSE) authored
Pengfei Xu reports, that the -next commit 1788cf6a (tty: serial: switch from circ_buf to kfifo) tries to emit a WARNING and that leads to lockdep errors. Obviously we cannot print anything from uart_put_char()! This WARN_ON_ONCE() was/is a debug aid to check if the condition in uart_put_char() can happen at all. Pengfei Xu confirmed it can. Unlike me and kbuild bot in my queue. Second, I completely forgot about it, so I did not remove it in the final version, nor mentioned it in the commit log. Drop it now as we are all good. And we even have stack traces (and a reproducer)! Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Reported-by: Pengfei Xu <pengfei.xu@intel.com> Link: https://lore.kernel.org/r/20240416071904.21440-1-jirislaby@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 16 Apr, 2024 1 commit
-
-
Jiri Slaby (SUSE) authored
Marek reports, that the -next commit 1788cf6a (tty: serial: switch from circ_buf to kfifo) broke meson_uart and qcom_geni_serial. The commit mistakenly advanced the kfifo twice: once by uart_fifo_get()/kfifo_out() and second time by uart_xmit_advance(). To advance the fifo only once, drop the superfluous uart_xmit_advance() from both. To count the TX statistics properly, use uart_fifo_out() in qcom_geni_serial (meson_uart_start_tx() already uses that). I checked all other uses of uart_xmit_advance() and they appear correct: either they are finishing DMA transfers or are after peek/linear_ptr (i.e. they do not advance fifo). Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Fixes: 1788cf6a ("tty: serial: switch from circ_buf to kfifo") Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Jerome Brunet <jbrunet@baylibre.com> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20240416054825.6211-1-jirislaby@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 13 Apr, 2024 1 commit
-
-
Tony Lindgren authored
If CONFIG_SERIAL_CORE_CONSOLE is not set, we get build errors. Let's fix the issue by moving the endif after the serial base console functions. Fixes: 4547cd76 ("serial: 8250: Fix add preferred console for serial8250_isa_init_ports()") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404131416.VJljwvkS-lkp@intel.com/Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20240413103343.24231-1-tony@atomide.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 11 Apr, 2024 10 commits
-
-
Sreenath Vijayan authored
When terminal is unresponsive, one cannot use dmesg to view the printk ring buffer messages. Also, syslog services may be disabled, especially on embedded systems, to check the messages after a reboot. In this scenario, replay the messages in printk ring buffer on consoles via sysrq by pressing sysrq+R. The console loglevel will determine which all kernel log messages are displayed. The messages will be displayed only when console_trylock() succeeds. Users could repeat the sysrq key when it fails. If the owner of console subsystem lock is stuck, repeating the key won't work. Suggested-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Shimoyashiki Taichi <taichi.shimoyashiki@sony.com> Reviewed-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sreenath Vijayan <sreenath.vijayan@sony.com> Link: https://lore.kernel.org/r/cc3b9b1aae60a236c6aed1dc7b0ffa2c7cd1f183.1710220326.git.sreenath.vijayan@sony.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sreenath Vijayan authored
Add a generic function console_replay_all() for replaying the kernel log on consoles, in any context. It would allow viewing the logs on an unresponsive terminal via sysrq. Reuse the existing code from console_flush_on_panic() for resetting the sequence numbers, by introducing a new helper function __console_rewind_all(). It is safe to be called under console_lock(). Try to acquire lock on the console subsystem without waiting. If successful, reset the sequence number to oldest available record on all consoles and call console_unlock() which will automatically flush the messages to the consoles. Suggested-by: John Ogness <john.ogness@linutronix.de> Suggested-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Shimoyashiki Taichi <taichi.shimoyashiki@sony.com> Reviewed-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sreenath Vijayan <sreenath.vijayan@sony.com> Link: https://lore.kernel.org/r/90ee131c643a5033d117b556c0792de65129d4c3.1710220326.git.sreenath.vijayan@sony.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
As Jiri rightfully pointed out the current to_max3100_port() macro implementation is fragile in a sense that it expects the variable name to be port, otherwise it blow up the build. Change this to be static inline to prevent bad compilation. Suggested-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20240410141135.1378948-1-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Variable tmout is being assigned a value that is never read, it is being re-assinged in the following for-loop statement. The assignment is redundant and can be removed. Cleans up clang scan warning: drivers/tty/serial/omap-serial.c:1096:3: warning: Value stored to 'tmout' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20240411085537.306020-1-colin.i.king@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tony Lindgren authored
We need to inline serial_base_add_isa_preferred_console() based on CONFIG_SERIAL_8250_CONSOLE and not based on CONFIG_SERIAL_CORE_CONSOLE. Otherwise we can get the follwoing error as noted by Stephen: ERROR: modpost: "serial_base_add_isa_preferred_console" [drivers/tty/serial/8250/8250.ko] undefined! We also have a duplicate inlined serial_base_add_isa_preferred_console(), in serial_base_bus.c added by the same commit by accident, let's drop it. Fixes: a8b04cfe ("serial: 8250: Add preferred console in serial8250_isa_init_ports()") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20240411080622.11929-1-tony@atomide.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hugo Villeneuve authored
Since each I2C/SPI probe function can modify sc16is7xx_regcfg at the same time, change structure to be constant and do the required modifications on a local copy. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240409154253.3043822-6-hugo@hugovil.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hugo Villeneuve authored
Before, sc16is7xx_lines was checked for a free (zero) bit first, and then later it was set only if UART port registration succeeded. Now that sc16is7xx_lines is shared for the I2C and SPI drivers, there is a possibility that the two drivers can simultaneously try to reserve the same line bit at the same time. To prevent this, make sure line allocation is reserved atomically, and use a new variable to hold the status of UART port registration. Now that we no longer need to search if a bit is set, it is now possible to simplify sc16is7xx_lines allocation by using the IDA framework. Link: https://lore.kernel.org/all/20231212150302.a9ec5d085a4ba65e89ca41af@hugovil.com/ Link: https://lore.kernel.org/all/CAHp75VebCZckUrNraYQj9k=Mrn2kbYs1Lx26f5-8rKJ3RXeh-w@mail.gmail.com/Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://lore.kernel.org/r/20240409154253.3043822-5-hugo@hugovil.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hugo Villeneuve authored
Split the common code from sc16is7xx driver and move the I2C and SPI bus parts into interface-specific source files. sc16is7xx becomes the core functions which can support multiple bus interfaces like I2C and SPI. No functional changes intended. Also simplify and improve Kconfig entries. - Capitalize SPI keyword for consistency - Display list of supported ICs each on a separate line (and aligned) to facilitate locating a specific IC model - Add Manufacturer name at start of description string - Add UART keyword to description string Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://lore.kernel.org/r/20240409154253.3043822-4-hugo@hugovil.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hugo Villeneuve authored
There is no need to check for previous port registration in sc16is7xx_remove() because if sc16is7xx_probe() succeeded, we are guaranteed to have successfully registered both ports. We can thus unconditionally clear the line allocation bit in sc16is7xx_lines. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20240409154253.3043822-3-hugo@hugovil.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hugo Villeneuve authored
Replace incorrect include with the proper one for sched_set_fifo() declaration. Fixes: 28d2f209 ("sched,serial: Convert to sched_set_fifo()") Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://lore.kernel.org/r/20240409154253.3043822-2-hugo@hugovil.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 Apr, 2024 17 commits
-
-
Lino Sanfilippo authored
In case that no RTS GPIO is available do not use a dedicated nullified serial_rs485 struct to disable RS485 support, but simply delete the SER_RS485_ENABLED flag in the ports rs485_supported struct. This make the structure superfluous and it can be removed. Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Link: https://lore.kernel.org/r/20240407002709.16224-5-l.sanfilippo@kunbus.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lino Sanfilippo authored
The serial core already checks the RS485 RTS settings for sanity, so remove the superfluous check in serial8250_em485_config(). Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Link: https://lore.kernel.org/r/20240407002709.16224-4-l.sanfilippo@kunbus.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lino Sanfilippo authored
Variable dmacr is only used if DMA is enabled, so move it into the CONFIG_DMA_ENGINE conditional. Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Link: https://lore.kernel.org/r/20240407002709.16224-3-l.sanfilippo@kunbus.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lino Sanfilippo authored
Due to earlier code changes function pl011_get_rs485_mode() is now merely a wrapper for uart_get_rs485_mode() which does not add any further functionality. So remove it and instead call uart_get_rs485_mode() directly. Reviewed-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Link: https://lore.kernel.org/r/20240407002709.16224-2-l.sanfilippo@kunbus.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409144721.638326-9-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Instead of using container_of() explicitly, introduce a helper macro. This saves a lot of lines of code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://lore.kernel.org/r/20240409144721.638326-8-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
The SIMPLE_DEV_PM_OPS() is deprecated, replace it with the DEFINE_SIMPLE_DEV_PM_OPS() and use pm_sleep_ptr() for setting the driver's PM routines. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409144721.638326-7-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
MODULE_ALIAS() in most cases is a pure hack to avoid placing ID tables. Replace it with the respective ID tables. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409144721.638326-6-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Switch to use dev_err_probe() to simplify the error path and unify a message template. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409144721.638326-5-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
The struct uart_port has a copy of the IRQ that is also stored in the private data structure. Remove the duplication in the latter one. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409144721.638326-4-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Get crystal frequency via device property instead of using a platform data. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409144721.638326-3-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Enable or disable loopback at run-time. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240409144721.638326-2-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
wangkaiyuan authored
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: wangkaiyuan <wangkaiyuan@inspur.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240318064216.1765-1-wangkaiyuan@inspur.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
wangkaiyuan authored
The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: wangkaiyuan <wangkaiyuan@inspur.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240318064036.1656-1-wangkaiyuan@inspur.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
The driver actually supports more than one chip. Update Kconfig entry to list the supported chips. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240402195306.269276-17-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
There is no code using max3100_work() before the definition of it. Remove unneeded forward declaration. While at it, move max3100_dowork() and max3100_timeout() down in the code to be after actual max3100_work() implementation. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240402195306.269276-15-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Serial core provides a standard timeout for polling modem state. Use it instead of a custom approach. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240402195306.269276-7-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-