Re: 8250 creating instances with no underlying hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Jun 27, 2017, at 11:11 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> On Tue, Jun 27, 2017 at 06:32:07PM -0600, Philip Prindeville wrote:
>> I’m running 3.10.0 (CentOS 7.3) on a Supermicro X10SDV-8C-TLN4F
>> motherboard, which has a 16550A on it.
> 
> That's really old and obsolete, and not supported by the community at
> all.  Care to use a more modern kernel?  :)


I’m happy to fix it on HEAD or linux-next and then back-port the fix.

But for this particular server, I’m required to run CentOS 7.3 on it.


> 
>> What’s odd is that when I look in /dev/ I see ttyS0…S3, even though
>> there are only 2 hardware ports (a single DUART).
>> 
>> [root@kvm2 logwatch]# setserial -G /dev/ttyS0
>> /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test
>> [root@kvm2 logwatch]# setserial -G /dev/ttyS1
>> /dev/ttyS1 uart 16550A port 0x02f8 irq 3 baud_base 115200 spd_normal skip_test
>> [root@kvm2 logwatch]# setserial -G /dev/ttyS2
>> /dev/ttyS2 uart unknown port 0x03e8 irq 4 baud_base 115200 spd_normal skip_test
>> [root@kvm2 logwatch]# setserial -G /dev/ttyS3
>> /dev/ttyS3 uart unknown port 0x02e8 irq 3 baud_base 115200 spd_normal
>> 
>> 
>> and dmesg says:
>> 
>> [    3.173481] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>> [    3.194077] 00:03: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>> [    3.214710] 00:04: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>> 
>> 
>> I was trying to figure out where this happens, and why, so maybe I
>> could submit a patch to allow one to suppress this behavior (say with
>> “8250.only_real_hw=1” or some other module parameter).
>> 
>> Not sure where this is happening.  Thought it might be in
>> drivers/tty/serial/8250/8250_pnp.c but nothing stands out.
>> 
>> Anyone know the backstory on why this happens, and how to
>> (conditionally) change this behavior?
> 
> Why do you need to change this?  What is wrong with the existing way
> this works?  As for the code that implements it, it's the platform
> driver for your system that thinks the serial ports are there to remain
> compatible with the old PC standard.


Why do I want to change it?  Well, why would I want to keep it?  If I open /dev/ttyS2 or /dev/ttyS3 they're not useful for anything at all, since they don’t correspond to existing hardware.  Why have them?  I already have /dev/null if I need something that I can’t read from and that writing to amounts to throwing away data...

-Philip



> 
> thanks,
> 
> greg k-h

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux