OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Andrey Batyiev - 27.02.2019
Last edited by Petr Štetiar - 21.03.2019

FS#2152 - ar933x_uart.c: Build failure when serial console is disabled

Hello everyone,

If serial console is disabled (but not the serial device) on ath79 target (i.e. CONFIG_SERIAL_AR933X_CONSOLE in undefined), there is a compilation error:

drivers/tty/serial/ar933x_uart.c: In function 'ar933x_uart_console_write':
drivers/tty/serial/ar933x_uart.c:550:14: error: 'struct uart_port' has no member named 'sysrq'

Member variable `sysrq` in `struct uart_port`(in include/linux/serial_core.h) is #ifdef-ed by `defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)` condition.

It seems like access to that variable should be #ifdef-ed too.

Closed by  Petr Štetiar
21.03.2019 22:47
Reason for closing:  Fixed
Petr Štetiar commented on 01.03.2019 11:02

I can't confirm this behavior with following setup:

$ git log -1
commit 30921fc1e5fcf904f9afddeece1288f5b16ba017
Author: Greg Kroah-Hartman <>
Date:   Wed Feb 27 10:08:09 2019 +0100

    Linux 4.14.104

$ git diff
diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig
index 8a22978..e8bfed5 100644
--- a/arch/mips/configs/ath79_defconfig
+++ b/arch/mips/configs/ath79_defconfig
@@ -74,7 +74,6 @@ CONFIG_SERIAL_8250_NR_UARTS=1
 # CONFIG_HW_RANDOM is not set
 # CONFIG_I2C_COMPAT is not set

STAGING_DIR=/opt/devel/openwrt/openwrt.git/staging_dir make -j9 ath79_defconfig vmlinuz modules ARCH=mips CROSS_COMPILE=/opt/devel/openwrt/openwrt.git/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/bin/mips-openwrt-linux-

It builds fine here without `CONFIG_SERIAL_AR933X_CONSOLE=y`, so you probably have different kernel config.

Andrey Batyiev commented on 04.03.2019 21:55

It seems that `CONFIG_SERIAL_8250_CONSOLE` should also be disabled (because it selects `SERIAL_CORE_CONSOLE`, which should be disabled for this bug to happen)

Petr Štetiar commented on 04.03.2019 23:56

Thanks, I was able to reproduce it. Can you please test this patch and give me your email I can include instead of the current email@missing.fixme in the commit message?

Andrey Batyiev commented on 06.03.2019 13:31


I've successfully tested your patch on GL.iNet AR150M device. Just as planned, UART is now functions as pure serial port, without kernel's console interference.
My email is


Petr Štetiar commented on 06.03.2019 17:32

Thanks for testing, I've sent fix upstream and once accepted I'll prepare patch for OpenWrt.


Available keyboard shortcuts


Task Details

Task Editing