From b5ffed60344217373e719c398ea907a102b646bb Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Mon, 7 Nov 2016 16:54:44 +1030 Subject: Fix vuart symlink udev rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rule was not creating the /dev/ttyVUART0 rule. ``` root@palmetto:~# udevadm info -q all /dev/ttyS0 P: /devices/platform/ahb/ahb:apb/1e787000.vuart/tty/ttyS0 N: ttyS0 E: DEVNAME=/dev/ttyS0 E: DEVPATH=/devices/platform/ahb/ahb:apb/1e787000.vuart/tty/ttyS0 E: MAJOR=4 E: MINOR=64 E: SUBSYSTEM=tty E: TAGS=:systemd: E: USEC_INITIALIZED=22674274 ``` ``` root@palmetto:~# systemctl status dev-ttyVUART0.device --no-pager ● dev-ttyVUART0.device Loaded: loaded Active: inactive (dead) Nov 07 05:43:37 palmetto systemd[1]: dev-ttyVUART0.device: Job dev-ttyVUART0.device/start timed out. Nov 07 05:43:37 palmetto systemd[1]: Timed out waiting for device dev-ttyVUART0.device. Nov 07 05:43:37 palmetto systemd[1]: dev-ttyVUART0.device: Job dev-ttyVUART0.device/start failed with result 'timeout'. ``` This just sits there without returning: ``` root@palmetto:~# systemctl start dev-ttyVUART0.device ``` This is the reason udev does not trigger due to the lpc address on this system being set to 0x417 when the rule expects 0x3f8: ``` root@palmetto:~# cat /sys/devices/platform/ahb/ahb\:apb/1e787000.vuart/lpc_address 0x417 ``` - `obmc-console-server` is launched when `/dev/ttyVUART0` is created. - `/dev/ttyVUART0` is created when a device with `lpc_address` of `0x3f8` is created - `lpc_address` is configured by obmc-console-server. - GOTO 10; A fix would be to match the udev rule on the address of the peripheral. This is what Cedric's original patch did: ``` SUBSYSTEM=="tty", ATTR{iomem_base}=="0x1E787000", SYMLINK+="tty-host" ``` Use the iomem_base in place of the lpc_address condition. The rule was not matching with the driver==aspeed_vuart condition, so that was removed as well. Fixes: openbmc/openbmc#749 Fixes: openbmc/openbmc#718 Fixes: openbmc/openbmc#706 Change-Id: Ia55f47a84d657ab9572a8b0495420b1f56e16c02 Signed-off-by: Joel Stanley --- .../udev-aspeed-vuart/udev-aspeed-vuart/61-aspeed-vuart.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-openbmc-bsp/meta-aspeed/common/recipes-core/udev-aspeed-vuart/udev-aspeed-vuart/61-aspeed-vuart.rules b/meta-openbmc-bsp/meta-aspeed/common/recipes-core/udev-aspeed-vuart/udev-aspeed-vuart/61-aspeed-vuart.rules index 98ac36d3a..f9b93c9e4 100644 --- a/meta-openbmc-bsp/meta-aspeed/common/recipes-core/udev-aspeed-vuart/udev-aspeed-vuart/61-aspeed-vuart.rules +++ b/meta-openbmc-bsp/meta-aspeed/common/recipes-core/udev-aspeed-vuart/udev-aspeed-vuart/61-aspeed-vuart.rules @@ -1 +1 @@ -SUBSYSTEM=="tty", DRIVERS=="aspeed-vuart",ATTRS{lpc_address}=="0x3f8", SYMLINK+="ttyVUART0", TAG+="systemd" +SUBSYSTEM=="tty", ATTRS{iomem_base}=="0x1E787000", SYMLINK+="ttyVUART0", TAG+="systemd" -- cgit v1.2.1