* [PATCH] serial: do not add port that is not initialized @ 2007-07-11 0:03 Yinghai Lu 2007-07-11 7:17 ` Russell King 0 siblings, 1 reply; 6+ messages in thread From: Yinghai Lu @ 2007-07-11 0:03 UTC (permalink / raw) To: Andrew Morton, Russell King, Bjorn Helgaas, Andi Kleen Cc: Linux Kernel Mailing List [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 Sign-off-by: Yinghai Lu <yinghai.lu@sun.com> diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index c84dab0..6399014 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] serial: do not add port that is not initialized 2007-07-11 0:03 [PATCH] serial: do not add port that is not initialized Yinghai Lu @ 2007-07-11 7:17 ` Russell King 2007-07-11 16:05 ` Bjorn Helgaas 0 siblings, 1 reply; 6+ messages in thread From: Russell King @ 2007-07-11 7:17 UTC (permalink / raw) To: Yinghai Lu Cc: Andrew Morton, Bjorn Helgaas, Andi Kleen, Linux Kernel Mailing List On Tue, Jul 10, 2007 at 05:03:35PM -0700, Yinghai Lu wrote: > [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 > > Sign-off-by: Yinghai Lu <yinghai.lu@sun.com> What if someone wants to run setserial on /dev/ttyS1 to set it's base address, irq and other parameters? People still do this. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] serial: do not add port that is not initialized 2007-07-11 7:17 ` Russell King @ 2007-07-11 16:05 ` Bjorn Helgaas 2007-07-11 19:40 ` Russell King 0 siblings, 1 reply; 6+ messages in thread From: Bjorn Helgaas @ 2007-07-11 16:05 UTC (permalink / raw) To: Russell King Cc: Yinghai Lu, Andrew Morton, Andi Kleen, Linux Kernel Mailing List On Wednesday 11 July 2007 01:17:42 am Russell King wrote: > On Tue, Jul 10, 2007 at 05:03:35PM -0700, Yinghai Lu wrote: > > [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 > > > > Sign-off-by: Yinghai Lu <yinghai.lu@sun.com> > > What if someone wants to run setserial on /dev/ttyS1 to 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] serial: do not add port that is not initialized 2007-07-11 16:05 ` Bjorn Helgaas @ 2007-07-11 19:40 ` Russell King 2007-07-11 20:45 ` Yinghai Lu 0 siblings, 1 reply; 6+ messages in thread From: Russell King @ 2007-07-11 19:40 UTC (permalink / raw) To: Bjorn Helgaas Cc: Yinghai Lu, Andrew Morton, Andi Kleen, Linux Kernel Mailing List On Wed, Jul 11, 2007 at 10:05:53AM -0600, Bjorn Helgaas wrote: > On Wednesday 11 July 2007 01:17:42 am Russell King wrote: > > On Tue, Jul 10, 2007 at 05:03:35PM -0700, Yinghai Lu wrote: > > > [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 > > > > > > Sign-off-by: Yinghai Lu <yinghai.lu@sun.com> > > > > What if someone wants to run setserial on /dev/ttyS1 to 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. 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. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] serial: do not add port that is not initialized 2007-07-11 19:40 ` Russell King @ 2007-07-11 20:45 ` Yinghai Lu 2007-07-11 21:48 ` Russell King 0 siblings, 1 reply; 6+ messages in thread From: Yinghai Lu @ 2007-07-11 20:45 UTC (permalink / raw) To: Russell King Cc: Bjorn Helgaas, Andrew Morton, Andi Kleen, Linux Kernel Mailing List Russell King wrote: > On Wed, Jul 11, 2007 at 10:05:53AM -0600, Bjorn Helgaas wrote: >> On Wednesday 11 July 2007 01:17:42 am Russell King wrote: >>> On Tue, Jul 10, 2007 at 05:03:35PM -0700, Yinghai Lu wrote: >>>> [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 >>>> >>>> Sign-off-by: Yinghai Lu <yinghai.lu@sun.com> >>> What if someone wants to run setserial on /dev/ttyS1 to 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. > > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] serial: do not add port that is not initialized 2007-07-11 20:45 ` Yinghai Lu @ 2007-07-11 21:48 ` Russell King 0 siblings, 0 replies; 6+ messages in thread From: Russell King @ 2007-07-11 21:48 UTC (permalink / raw) To: Yinghai Lu Cc: Bjorn Helgaas, Andrew Morton, Andi Kleen, Linux Kernel Mailing List On Wed, Jul 11, 2007 at 01:45:04PM -0700, Yinghai Lu wrote: > Russell King wrote: > >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. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-11 21:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-07-11 0:03 [PATCH] serial: do not add port that is not initialized Yinghai Lu 2007-07-11 7:17 ` Russell King 2007-07-11 16:05 ` Bjorn Helgaas 2007-07-11 19:40 ` Russell King 2007-07-11 20:45 ` Yinghai Lu 2007-07-11 21:48 ` Russell King
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox