2005-09-01 20:25:46

by Alon Bar-Lev

[permalink] [raw]
Subject: Serial driver (serial_core.c) status messages should be set to KERN_INFO

Hello,


When upgrading to 2.6.13 I've noticed that serial driver reports it
status with unknown severity, causing the boot-splash to be overridden.


Please consider this modification.


Best Regards,

Alon Bar-Lev.


At drivers/serial/serial_core.c


static inline void

uart_report_port(struct uart_driver *drv, struct uart_port *port)
{
- printk("%s%d", drv->dev_name, port->line);
+ printk(KERN_INFO + "%s%d", drv->dev_name, port->line);

printk(" at ");
switch (port->iotype) {
case UPIO_PORT:
printk("I/O 0x%x", port->iobase);
break;
case UPIO_HUB6:
printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6);
break;
case UPIO_MEM:
case UPIO_MEM32:
printk("MMIO 0x%lx", port->mapbase);
break;
}
printk(" (irq = %d) is a %s\n", port->irq, uart_type(port));
}


2005-09-01 20:42:30

by Jiri Slaby

[permalink] [raw]
Subject: Re: Serial driver (serial_core.c) status messages should be set to KERN_INFO

Alon Bar-Lev napsal(a):

> Hello,
>
>
> When upgrading to 2.6.13 I've noticed that serial driver reports it
> status with unknown severity, causing the boot-splash to be overridden.
>
>
> Please consider this modification.
>
>
> Best Regards,
>
> Alon Bar-Lev.
>
>
> At drivers/serial/serial_core.c
>
>
> static inline void
>
> uart_report_port(struct uart_driver *drv, struct uart_port *port)
> {
> - printk("%s%d", drv->dev_name, port->line);
> + printk(KERN_INFO + "%s%d", drv->dev_name, port->line);

plus sign between that?

>
> printk(" at ");

why the fellows didn't put this to the line above?

> switch (port->iotype) {
> case UPIO_PORT:
> printk("I/O 0x%x", port->iobase);

And what about these?

> break;
> case UPIO_HUB6:
> printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6);
> break;
> case UPIO_MEM:
> case UPIO_MEM32:
> printk("MMIO 0x%lx", port->mapbase);
> break;
> }
> printk(" (irq = %d) is a %s\n", port->irq, uart_type(port));
> }

regards,

--
Jiri Slaby http://www.fi.muni.cz/~xslaby
~\-/~ [email protected] ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10

2005-09-01 20:46:40

by Ben Dooks

[permalink] [raw]
Subject: Re: Serial driver (serial_core.c) status messages should be set to KERN_INFO

On Thu, Sep 01, 2005 at 10:38:26PM +0200, Jiri Slaby wrote:
> Alon Bar-Lev napsal(a):
>
> >Hello,
> >
> >
> >When upgrading to 2.6.13 I've noticed that serial driver reports it
> >status with unknown severity, causing the boot-splash to be overridden.
> >
> >
> >Please consider this modification.
> >
> >
> >Best Regards,
> >
> >Alon Bar-Lev.
> >
> >
> >At drivers/serial/serial_core.c
> >
> >
> >static inline void
> >
> >uart_report_port(struct uart_driver *drv, struct uart_port *port)
> >{
> >- printk("%s%d", drv->dev_name, port->line);
> >+ printk(KERN_INFO + "%s%d", drv->dev_name, port->line);
>
> plus sign between that?
>
> >
> > printk(" at ");
>
> why the fellows didn't put this to the line above?
> > switch (port->iotype) {
> > case UPIO_PORT:
> > printk("I/O 0x%x", port->iobase);
>
> And what about these?

looks like they're not on a newline, so need no severity.

> > break;
> > case UPIO_HUB6:
> > printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6);
> > break;
> > case UPIO_MEM:
> > case UPIO_MEM32:
> > printk("MMIO 0x%lx", port->mapbase);
> > break;
> > }
> > printk(" (irq = %d) is a %s\n", port->irq, uart_type(port));
> >}

--
Ben ([email protected], http://www.fluff.org/)

'a smiley only costs 4 bytes'

2005-09-01 20:48:33

by Alon Bar-Lev

[permalink] [raw]
Subject: Re: Serial driver (serial_core.c) status messages should be set to KERN_INFO

Hi!

Jiri Slaby wrote:

> Alon Bar-Lev napsal(a):
>
>> Hello,
>>
>>
>> When upgrading to 2.6.13 I've noticed that serial driver reports it
>> status with unknown severity, causing the boot-splash to be overridden.
>>
>>
>> Please consider this modification.
>>
>>
>> Best Regards,
>>
>> Alon Bar-Lev.
>>
>>
>> At drivers/serial/serial_core.c
>>
>>
>> static inline void
>>
>> uart_report_port(struct uart_driver *drv, struct uart_port *port)
>> {
>> - printk("%s%d", drv->dev_name, port->line);
>> + printk(KERN_INFO + "%s%d", drv->dev_name, port->line);
>
>
> plus sign between that?

You are right!!! the + is mistake.
The KERN_INFO is the main fix.

>
>>
>> printk(" at ");
>
>
> why the fellows didn't put this to the line above?

Regarding the other comments... I really don't know... this is how the
driver is written....
I would have constructed a string and only then printk it...

Regards,
Alon Bar-Lev.

2005-09-01 21:04:45

by Jiri Slaby

[permalink] [raw]
Subject: Re: Serial driver (serial_core.c) status messages should be set to KERN_INFO

Ben Dooks napsal(a):

>On Thu, Sep 01, 2005 at 10:38:26PM +0200, Jiri Slaby wrote:
>
>
>>Alon Bar-Lev napsal(a):
>>
>>
>>>static inline void
>>>
>>>uart_report_port(struct uart_driver *drv, struct uart_port *port)
>>>{
>>>- printk("%s%d", drv->dev_name, port->line);
>>>+ printk(KERN_INFO + "%s%d", drv->dev_name, port->line);
>>>
>>>
>>plus sign between that?
>>
>>
>>
>>> printk(" at ");
>>>
>>>
>>why the fellows didn't put this to the line above?
>>
>>
>>> switch (port->iotype) {
>>> case UPIO_PORT:
>>> printk("I/O 0x%x", port->iobase);
>>>
>>>
>>And what about these?
>>
>>
>
>looks like they're not on a newline, so need no severity.
>
>
ok, ok, but isn't this a little bit racy (so you can see dev_name and
line, then another driver's info and then " at ", then something else...)

regards,

--
Jiri Slaby http://www.fi.muni.cz/~xslaby
~\-/~ [email protected] ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10

2005-09-01 21:38:15

by Russell King

[permalink] [raw]
Subject: Re: Serial driver (serial_core.c) status messages should be set to KERN_INFO

On Thu, Sep 01, 2005 at 11:04:04PM +0200, Jiri Slaby wrote:
> ok, ok, but isn't this a little bit racy (so you can see dev_name and
> line, then another driver's info and then " at ", then something else...)

I think you'll find things are serialised.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2005-09-02 15:21:11

by Russell King

[permalink] [raw]
Subject: Re: Serial driver (serial_core.c) status messages should be set to KERN_INFO

On Fri, Sep 02, 2005 at 12:26:59AM +0300, Alon Bar-Lev wrote:
> When upgrading to 2.6.13 I've noticed that serial driver reports it
> status with unknown severity, causing the boot-splash to be overridden.

Please don't submit patches to bugzilla as a way to get them into the
kernel. Instead, please send them direct to the person/mailing list
responsible for the area, as per the SubmittingPatches document in
the kernel tree.

Thanks.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core