serial: do not add port that is not initialized
PATCH 1/1 serial: do not add port that is not initialized
[PATCH] serial: do not add port that is not initialized
if the port is not initialized with correct iobase, and membase, we don't need to add that port.
for x86, when pnpacpi is enabled, we will not get extra ttyS1/ttyS2/ttyS3 in /sys/devices/platform/serial8250/tty
drivers/serial/8250.c +3 -0
@@ -2425,9 +2425,12 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)for (i =0 ; i < nr_uarts; i++) {struct uart_8250_port *up = &serial8250_ports[i]; +if (!up->port.iobase && !up->port.membase) +continue ; up->port.dev = dev;uart_add_one_port (drv, &up->port); } + }#ifdef CONFIG_SERIAL_8250_CONSOLE
Quoted 8 lines · Yinghai Lu
[PATCH] serial: do not add port that is not initialized
if the port is not initialized with correct iobase, and membase, we don't need to add that port.
for x86, when pnpacpi is enabled, we will not get extra ttyS1/ttyS2/ttyS3 in/sys/devices/platform/serial8250/ttySign-off-by Yinghai Lu <[email protected]>
What if someone wants to run setserial on /dev/ttyS1 to set it's base address, irq and other parameters? People still do this.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 8 lines · Russell King
Quoted 7 lines · Yinghai Lu
[PATCH] serial: do not add port that is not initialized
if the port is not initialized with correct iobase, and membase, we don't need to add that port.
for x86, when pnpacpi is enabled, we will not get extra ttyS1/ttyS2/ttyS3 in/sys/devices/platform/serial8250/tty
Quoted 4 lines
Quoted 1 line
Sign-off-by Yinghai Lu <[email protected]>What if someone wants to run setserial on
/dev/ttyS1to set it's base address, irq and other parameters? People still do this.
I agree that people still use setserial that way, and we shouldn't make this change because it would break things.
But I also agree with Yinghai that these extra phantom devices are just weird. It would be a lot nicer if there were a way to say, "please, Mr. Serial Driver, create me a new ttyS device with these parameters."
But no, I'm not volunteering to do that.
Bjorn
Quoted 17 lines · Bjorn Helgaas
Quoted 8 lines · Russell King
Quoted 7 lines · Yinghai Lu
[PATCH] serial: do not add port that is not initialized
if the port is not initialized with correct iobase, and membase, we don't need to add that port.
for x86, when pnpacpi is enabled, we will not get extra ttyS1/ttyS2/ttyS3 in/sys/devices/platform/serial8250/ttyQuoted 4 lines
Quoted 1 line
Sign-off-by Yinghai Lu <[email protected]>What if someone wants to run setserial on
/dev/ttyS1to set it's base address, irq and other parameters? People still do this.I agree that people still use setserial that way, and we shouldn't make this change because it would break things.
Quoted 6 lines
But I also agree with Yinghai that these extra phantom devices are just weird. It would be a lot nicer if there were a way to say, "please, Mr. Serial Driver, create me a new ttyS device with these parameters."
But no, I'm not volunteering to do that.
Indeed, and since distros still haven't picked up my setserial v3, I see little chance of that ever being practical. Not that I've really tried very hard to get them to - no real idea who to contact to make that happen, and of course I've no interest in making it happen anymore.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 21 lines · Russell King
Quoted 20 lines · Bjorn Helgaas
Quoted 11 lines · Russell King
Quoted 8 lines · Yinghai Lu
[PATCH] serial: do not add port that is not initialized
if the port is not initialized with correct iobase, and membase, we don't need to add that port.
for x86, when pnpacpi is enabled, we will not get extra ttyS1/ttyS2/ttyS3 in/sys/devices/platform/serial8250/ttySign-off-by Yinghai Lu <[email protected]>What if someone wants to run setserial on
/dev/ttyS1to set it's base address, irq and other parameters? People still do this.I agree that people still use setserial that way, and we shouldn't make this change because it would break things.
But I also agree with Yinghai that these extra phantom devices are just weird. It would be a lot nicer if there were a way to say, "please, Mr. Serial Driver, create me a new ttyS device with these parameters."
Quoted 7 lines
Quoted 1 line
But no, I'm not volunteering to do that.
Indeed, and since distros still haven't picked up my setserial v3, I see little chance of that ever being practical. Not that I've really tried very hard to get them to - no real idea who to contact to make that happen, and of course I've no interest in making it happen anymore.
so remove these extra phantom devices, the kernel distros will use your setserial v3.
we can put some comments in code, so later they will find clue about your setserial v3.
YH
Quoted 9 lines · Yinghai Lu
Quoted 5 lines · Russell King
Indeed, and since distros still haven't picked up my setserial v3, I see little chance of that ever being practical. Not that I've really tried very hard to get them to - no real idea who to contact to make that happen, and of course I've no interest in making it happen anymore.
so remove these extra phantom devices, the kernel distros will use your setserial v3.
You made a connection which wasn't there - setserial v3 doesn't allow this either, but it is a cleaner and slightly more extensible implementation of setserial v2.
It does, however, drop support for the things which 2.6 kernels don't support, such as the setting of the multiport addresses and masks. So it wouldn't be suitable for shipping as-is with (eg) 2.4 kernels.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: