Red Hat Bugzilla – Full Text Bug Listing
|Summary:||CONFIG_SERIAL_8250 not set to "y" in xen0 kernel|
|Product:||[Fedora] Fedora||Reporter:||Jordan Russell <jr-redhatbugs2>|
|Component:||udev||Assignee:||Harald Hoyer <harald>|
|Status:||CLOSED ERRATA||QA Contact:|
|Version:||6||CC:||bstein, fche, jima, notting, xen-maint|
|Fixed In Version:||udev-095-15||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2007-09-20 06:21:04 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Jordan Russell 2006-08-31 14:43:03 EDT
Description of problem: In kernel-xen0, CONFIG_SERIAL_8250 is set to "m" instead of "y" as in non-Xen kernels. Consequently, serial ports cannot be accessed unless "modprobe 8250" is run first. One package this impacts is "nut" (Network UPS Tools). When booting using a xen0 kernel, the daemon fails to start with this error message: "Can't connect to UPS [ups] (apcsmart-ttyS0): No such file or directory" Version-Release number of selected component (if applicable): kernel-xen0-2.6.17-1.2174_FC5 How reproducible: Always Steps to Reproduce: 1. Set up "nut" on a non-Xen kernel with a UPS attached to ttyS0. 2. Reboot and observe that "nut" starts successfully. 3. Add "xencons=off" to your Xen kernel's command line in /boot/grub/grub.conf. (This step is necessary to prevent Xen from trying to attach a console to a serial port.) 4. Boot into the Xen kernel. Actual results: Because 8250 is compiled as a module, "nut" fails to start with the message: "Can't connect to UPS [ups] (apcsmart-ttyS0): No such file or directory" Expected results: "nut" should start with no errors.
Comment 1 Russell Coker 2006-10-30 03:35:45 EST
"modprobe 8250" doesn't work with kernel 2.6.18-1.2200.fc5xen for me on a P3 system.
Comment 2 Stephen Tweedie 2006-10-30 07:30:57 EST
Does it work on FC6?
Comment 3 Jordan Russell 2006-10-30 14:38:52 EST
It's still a problem in FC6. # grep CONFIG_SERIAL_8250= config-2.6.18-1.2798.fc6* config-2.6.18-1.2798.fc6PAE:CONFIG_SERIAL_8250=y config-2.6.18-1.2798.fc6xen:CONFIG_SERIAL_8250=m <----
Comment 4 Stephen Tweedie 2006-11-02 18:29:58 EST
Question was not whether it was modular, but whether the module works (comment #1). We know it is modular, and it needs to stay that way, I'm afraid. The problem is that the kernel is not the only driver of the serial ports: the hypervisor has the ability to log to serial too, so there's handshaking between the kernel and Xen for serial console. That does not use the normal kernel serial driver, hence that driver gets loaded as a separate module. Arguably, though udev or kudzu should be loading the module in this case.
Comment 5 Bill Nottingham 2006-11-03 12:23:42 EST
ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id ; done < /sys/$devpath/id'" in udev rules will load the 8250_pnp driver for most modern PCs with PNP BIOSes (tested on both x86 and x86_64.) Not sure there's much else we can do to automatically detect it. PCI serial ports should already be picked up.
Comment 6 Stephen Tweedie 2006-11-15 16:55:57 EST
Need feedback --- does that udev rule help?
Comment 7 Jordan Russell 2006-11-20 14:18:12 EST
No. I saved the above line to /etc/udev/rules.d/TEST.rules and rebooted. dmesg shows that it's attempting to load the 8250 driver: Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled But then: 8250_pnp: Unknown symbol serial8250_unregister_port 8250_pnp: Unknown symbol serial8250_register_port If I try to start "nut" after that, it can't find ttyS0. (This is on a fully-updated system. kernel-xen-2.6.18-1.2849.fc6, udev-095-14)
Comment 8 Jordan Russell 2006-11-20 14:26:08 EST
And running "modprobe 8250" manually doesn't work anymore in the latest xen kernel: FATAL: Error inserting 8250 (/lib/modules/2.6.18-1.2849.fc6xen/kernel/drivers/serial/8250.ko): Device or resource busy even if I remove the udev rule and reboot. I guess these problems are related?
Comment 9 Jordan Russell 2006-11-20 14:34:39 EST
OOPS! Please disregard my last two comments. I had forgotten to include "xencons=off" in my kernel command line... Yes, the udev rule works. nut now starts successfully on boot.
Comment 10 Stephen Tweedie 2006-11-20 16:19:00 EST
Bill, is this something we can set in the udev rules by default, or would that cause problems on non-xen kernels?
Comment 11 Bill Nottingham 2006-11-20 16:28:09 EST
Not-the-udev-maintainer, but it shouldn't cause any issues. It doesn't fully support all PnP devices, but works for things like serial or parallel ports.
Comment 12 Jima 2006-11-29 16:26:30 EST
Any idea what the rationale behind this change was? I'd really like to use my 8250-based serial port for the primary console on my Xen box; CONFIG_SERIAL_8250=m prevents that from being a reality. The board supports serial redirection at the BIOS level; it's sad to think that I can access the BIOS but not my Linux install. :-P
Comment 13 Stephen Tweedie 2006-11-29 17:38:30 EST
re comment #12: Serial console with Xen works just fine without the serial driver, because the hypervisor has its own 8250 driver (which is precisely why the kernel doesn't build the module by default.) Just set the appropriate xen options: I personally use kernel xen.gz... com1=38400,8n1 module vmlinuz ... xencons=xvc console=xvc on all my Xen kernels and serial console just works, including agetty logins over serial. This bug is purely for the support of specialised tools that require the kernel's own 8250 driver for full ioctl support. Serial console does NOT require this.
Comment 15 Harald Hoyer 2006-11-30 02:35:19 EST
rule include in udev-095-15.fc6
Comment 16 Jima 2006-11-30 07:34:03 EST
(In reply to comment #13) And there was much serial happiness. Thanks for the pointer, and thanks for the udev update (that rule did help me for ttyS1).