linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NEWBIE: how to change serial device<->port association
@ 2009-01-29 11:02 Pazzo Da Legare
  2009-01-29 12:43 ` Jan Engelhardt
  2009-01-29 13:45 ` NEWBIE: " Alan Cox
  0 siblings, 2 replies; 10+ messages in thread
From: Pazzo Da Legare @ 2009-01-29 11:02 UTC (permalink / raw)
  To: linux-kernel

Dear ML,

how can I instruct the kernel (if possible) to map a certain serial
port to a specific device ttySx?
I have 4 16550 ports and kernel ( the driver, I suppose) say to me:

Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A

I would like to change the map ttySx -> I/O port. I try with setserial
but it doesn't work....Any clue?

TIA

p

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: how to change serial device<->port association
  2009-01-29 11:02 NEWBIE: how to change serial device<->port association Pazzo Da Legare
@ 2009-01-29 12:43 ` Jan Engelhardt
  2009-01-29 12:54   ` Oliver Neukum
  2009-01-29 13:45 ` NEWBIE: " Alan Cox
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Engelhardt @ 2009-01-29 12:43 UTC (permalink / raw)
  To: Pazzo Da Legare; +Cc: linux-kernel


On Thursday 2009-01-29 12:02, Pazzo Da Legare wrote:

>Dear ML,
>
>how can I instruct the kernel (if possible) to map a certain serial
>port to a specific device ttySx?
>I have 4 16550 ports and kernel ( the driver, I suppose) say to me:
>
>Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
>serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
>serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
>00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
>00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A
>
>I would like to change the map ttySx -> I/O port. I try with setserial
>but it doesn't work....Any clue?

If you want to access ttyS4, etc. you need to increase
CONFIG_SERIAL_8250_NR_UARTS. I found that using setserial(8)
to change ports for an existing ttyS[0-3] has no effects.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: how to change serial device<->port association
  2009-01-29 12:43 ` Jan Engelhardt
@ 2009-01-29 12:54   ` Oliver Neukum
  2009-01-29 15:04     ` Pazzo Da Legare
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Neukum @ 2009-01-29 12:54 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Pazzo Da Legare, linux-kernel

Am Thursday 29 January 2009 13:43:02 schrieb Jan Engelhardt:
> >Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
> >serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> >serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
> >serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
> >serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
> >00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> >00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
> >00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
> >00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A
> >
> >I would like to change the map ttySx -> I/O port. I try with setserial
> >but it doesn't work....Any clue?

They are just names. Create device nodes with the name you like and
the correct major:minor combination. Udev can do this for you.

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: NEWBIE: how to change serial device<->port association
  2009-01-29 11:02 NEWBIE: how to change serial device<->port association Pazzo Da Legare
  2009-01-29 12:43 ` Jan Engelhardt
@ 2009-01-29 13:45 ` Alan Cox
  2009-01-29 14:16   ` Pazzo Da Legare
  1 sibling, 1 reply; 10+ messages in thread
From: Alan Cox @ 2009-01-29 13:45 UTC (permalink / raw)
  To: Pazzo Da Legare; +Cc: linux-kernel

On Thu, 29 Jan 2009 12:02:49 +0100
Pazzo Da Legare <pazzodalegare@gmail.com> wrote:

> Dear ML,
> 
> how can I instruct the kernel (if possible) to map a certain serial
> port to a specific device ttySx?

The kernel mapping defaults are from a table so you could recompile
the kernel. However applications should always let you select a serial
port.

Alan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: NEWBIE: how to change serial device<->port association
  2009-01-29 13:45 ` NEWBIE: " Alan Cox
@ 2009-01-29 14:16   ` Pazzo Da Legare
  2009-01-29 16:06     ` Alan Cox
  0 siblings, 1 reply; 10+ messages in thread
From: Pazzo Da Legare @ 2009-01-29 14:16 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Dear Alan,

Thank you very much for your help.
I'm going to have a look at the table you mentioned. Yes, I know that
usually one should make the selection from application, in my case I'm
trying to uniform two different hardware maintaining  the
configuration for applications (running on both).

The hws have a different combination of kind serials and I would like
to present the same ttyS* to applications. I need to have different
kernel configuration so I thought I could uniform things there....I'm
going to evaluate the hardness


p

2009/1/29 Alan Cox <alan@lxorguk.ukuu.org.uk>:
> On Thu, 29 Jan 2009 12:02:49 +0100
> Pazzo Da Legare <pazzodalegare@gmail.com> wrote:
>
>> Dear ML,
>>
>> how can I instruct the kernel (if possible) to map a certain serial
>> port to a specific device ttySx?
>
> The kernel mapping defaults are from a table so you could recompile
> the kernel. However applications should always let you select a serial
> port.
>
> Alan
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: how to change serial device<->port association
  2009-01-29 12:54   ` Oliver Neukum
@ 2009-01-29 15:04     ` Pazzo Da Legare
  0 siblings, 0 replies; 10+ messages in thread
From: Pazzo Da Legare @ 2009-01-29 15:04 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Jan Engelhardt, linux-kernel

Dear Oliver,

Thank you very much for your help. I'm going to try your suggestion.

p

2009/1/29 Oliver Neukum <oliver@neukum.org>:
> Am Thursday 29 January 2009 13:43:02 schrieb Jan Engelhardt:
>> >Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
>> >serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>> >serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>> >serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a NS16550A
>> >serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a NS16550A
>> >00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
>> >00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
>> >00:0b: ttyS2 at I/O 0x3e8 (irq = 10) is a NS16550A
>> >00:0c: ttyS3 at I/O 0x2e8 (irq = 11) is a NS16550A
>> >
>> >I would like to change the map ttySx -> I/O port. I try with setserial
>> >but it doesn't work....Any clue?
>
> They are just names. Create device nodes with the name you like and
> the correct major:minor combination. Udev can do this for you.
>
>        Regards
>                Oliver
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: NEWBIE: how to change serial device<->port association
  2009-01-29 14:16   ` Pazzo Da Legare
@ 2009-01-29 16:06     ` Alan Cox
  2009-01-29 16:22       ` Jiri Kosina
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Cox @ 2009-01-29 16:06 UTC (permalink / raw)
  To: Pazzo Da Legare; +Cc: linux-kernel

> The hws have a different combination of kind serials and I would like
> to present the same ttyS* to applications. I need to have different

By having multiple different kernels for the different systems ? That
sounds like a really really complicated way to go about the problem when
you could just add a config file to your application.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: NEWBIE: how to change serial device<->port association
  2009-01-29 16:06     ` Alan Cox
@ 2009-01-29 16:22       ` Jiri Kosina
  2009-01-29 16:34         ` Alan Cox
  0 siblings, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2009-01-29 16:22 UTC (permalink / raw)
  To: Alan Cox; +Cc: Pazzo Da Legare, linux-kernel

On Thu, 29 Jan 2009, Alan Cox wrote:

> > The hws have a different combination of kind serials and I would like
> > to present the same ttyS* to applications. I need to have different
> By having multiple different kernels for the different systems ? That
> sounds like a really really complicated way to go about the problem when
> you could just add a config file to your application.

Another possibility is udev rule.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: NEWBIE: how to change serial device<->port association
  2009-01-29 16:22       ` Jiri Kosina
@ 2009-01-29 16:34         ` Alan Cox
  2009-01-29 16:38           ` Pazzo Da Legare
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Cox @ 2009-01-29 16:34 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Pazzo Da Legare, linux-kernel

On Thu, 29 Jan 2009 17:22:54 +0100 (CET)
Jiri Kosina <jkosina@suse.cz> wrote:

> On Thu, 29 Jan 2009, Alan Cox wrote:
> 
> > > The hws have a different combination of kind serials and I would like
> > > to present the same ttyS* to applications. I need to have different
> > By having multiple different kernels for the different systems ? That
> > sounds like a really really complicated way to go about the problem when
> > you could just add a config file to your application.
> 
> Another possibility is udev rule.

If its a simple naming choice then a symlink might do the job. What
Fedora and several other distros do is to create symbolic links from
"virtual" names like /dev/modem and /dev/cdrom to the relevant port using
ln -s

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: NEWBIE: how to change serial device<->port association
  2009-01-29 16:34         ` Alan Cox
@ 2009-01-29 16:38           ` Pazzo Da Legare
  0 siblings, 0 replies; 10+ messages in thread
From: Pazzo Da Legare @ 2009-01-29 16:38 UTC (permalink / raw)
  To: Alan Cox; +Cc: Jiri Kosina, linux-kernel

Dear Alan,

Thanks again. I think I will follow your last (easier) advice.

p

2009/1/29 Alan Cox <alan@lxorguk.ukuu.org.uk>:
> On Thu, 29 Jan 2009 17:22:54 +0100 (CET)
> Jiri Kosina <jkosina@suse.cz> wrote:
>
>> On Thu, 29 Jan 2009, Alan Cox wrote:
>>
>> > > The hws have a different combination of kind serials and I would like
>> > > to present the same ttyS* to applications. I need to have different
>> > By having multiple different kernels for the different systems ? That
>> > sounds like a really really complicated way to go about the problem when
>> > you could just add a config file to your application.
>>
>> Another possibility is udev rule.
>
> If its a simple naming choice then a symlink might do the job. What
> Fedora and several other distros do is to create symbolic links from
> "virtual" names like /dev/modem and /dev/cdrom to the relevant port using
> ln -s
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-01-29 16:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-29 11:02 NEWBIE: how to change serial device<->port association Pazzo Da Legare
2009-01-29 12:43 ` Jan Engelhardt
2009-01-29 12:54   ` Oliver Neukum
2009-01-29 15:04     ` Pazzo Da Legare
2009-01-29 13:45 ` NEWBIE: " Alan Cox
2009-01-29 14:16   ` Pazzo Da Legare
2009-01-29 16:06     ` Alan Cox
2009-01-29 16:22       ` Jiri Kosina
2009-01-29 16:34         ` Alan Cox
2009-01-29 16:38           ` Pazzo Da Legare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).