Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
openwrt-bot opened this issue Feb 27, 2019 · 7 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

abatyiev:

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.

@openwrt-bot
Copy link
Author

ynezz:

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_SERIAL_8250_RUNTIME_UARTS=1
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_AR933X=y
-CONFIG_SERIAL_AR933X_CONSOLE=y

CONFIG_HW_RANDOM is not set

CONFIG_I2C=y

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.

@openwrt-bot
Copy link
Author

abatyiev:

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)

@openwrt-bot
Copy link
Author

ynezz:

Thanks, I was able to reproduce it. Can you please test [[https://github.com/ynezz/linux-2.6/commit/753aeed4f9889cd27f7a8802c05998413f3cdc60|this patch]] and give me your email I can include instead of the current email@missing.fixme in the commit message?

@openwrt-bot
Copy link
Author

abatyiev:

Hi

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 batyiev@gmail.com.

Thanks!

@openwrt-bot
Copy link
Author

ynezz:

Thanks for testing, I've sent fix upstream https://marc.info/?l=linux-serial&m=155189162432223 and once accepted I'll prepare patch for OpenWrt.

@openwrt-bot
Copy link
Author

@openwrt-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant