Re: 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)

2007-11-27 Thread Shaohua Li
On Mon, 2007-11-26 at 04:01 +0800, Andrey Borzenkov wrote:
> On Sunday 25 November 2007, Robert Hancock wrote:
> > Andrey Borzenkov wrote:
> > > I have no COM port on notebook (without port replicator which I do not 
> > > have)
> > > so COM is disabled in BIOS. No ttyS* is detected during boot (and no 
> > > device
> > > created) but I just noticed that serial modules are still loaded. Well, 
> > > this
> > > partially defeats the purpose of disabling COM port - the intention was to
> > > free resources by *not* loading unneeded modules ...
> > > 
> > > This may have something to do with (ACPI) PnP which apparently believes 
> > > COM is alive.
> > > Notebook is Toshiba Portege 4000.
> > 
> > Probably a BIOS bug. It still lists the port in PnP data even though the 
> > hardware is disabled, so the kernel still tries to load the serial 
> > driver for it, which finds there's no port there.
> > 
> 
> Here is what we get from _STA:
> 
> [ 1689.988245] HID=PNP0501 flags=0d
> 
> If I read specs correctly, if bit 1 is cleared it means, device is not able
> to access its hardware resources, so it makes no sense to even try to
> load driver for it.
> 
> And of course it makes PnP output completely bogus:
> 
> 00:09 PNP0501 16550A-compatible serial port
> state = active
> allocated resources:
> io 0x3f8-0x3ff
> irq 5
>  
> So two questions:
> 
> 1. why device got enabled when ACPI explicitly stated it cannot be?
> 2. can we get information about _STA result in user space so we do not try
> to autoload driver for device that can't work?
0xd means present, disabled. A disabled PNP device can be enabled, ACPI
doesn't say it can't be. When the driver is loaded, it will enabled the
device. If BIOS wants to disable the device, it should make the device
non-present.

Thanks,
Shaohua
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)

2007-11-25 Thread Andrey Borzenkov
On Sunday 25 November 2007, Robert Hancock wrote:
> Andrey Borzenkov wrote:
> > I have no COM port on notebook (without port replicator which I do not have)
> > so COM is disabled in BIOS. No ttyS* is detected during boot (and no device
> > created) but I just noticed that serial modules are still loaded. Well, this
> > partially defeats the purpose of disabling COM port - the intention was to
> > free resources by *not* loading unneeded modules ...
> > 
> > This may have something to do with (ACPI) PnP which apparently believes COM 
> > is alive.
> > Notebook is Toshiba Portege 4000.
> 
> Probably a BIOS bug. It still lists the port in PnP data even though the 
> hardware is disabled, so the kernel still tries to load the serial 
> driver for it, which finds there's no port there.
> 

Here is what we get from _STA:

[ 1689.988245] HID=PNP0501 flags=0d

If I read specs correctly, if bit 1 is cleared it means, device is not able
to access its hardware resources, so it makes no sense to even try to
load driver for it.

And of course it makes PnP output completely bogus:

00:09 PNP0501 16550A-compatible serial port
state = active
allocated resources:
io 0x3f8-0x3ff
irq 5
 
So two questions:

1. why device got enabled when ACPI explicitly stated it cannot be?
2. can we get information about _STA result in user space so we do not try
to autoload driver for device that can't work?


signature.asc
Description: This is a digitally signed message part.


Re: 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)

2007-11-25 Thread Robert Hancock

Andrey Borzenkov wrote:

I have no COM port on notebook (without port replicator which I do not have)
so COM is disabled in BIOS. No ttyS* is detected during boot (and no device
created) but I just noticed that serial modules are still loaded. Well, this
partially defeats the purpose of disabling COM port - the intention was to
free resources by *not* loading unneeded modules ...

This may have something to do with (ACPI) PnP which apparently believes COM is 
alive.
Notebook is Toshiba Portege 4000.


Probably a BIOS bug. It still lists the port in PnP data even though the 
hardware is disabled, so the kernel still tries to load the serial 
driver for it, which finds there's no port there.


--
Robert Hancock  Saskatoon, SK, Canada
To email, remove "nospam" from [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)

2007-11-24 Thread David Newall

Michael H. Warfield wrote:

On Sat, 2007-11-24 at 23:36 +0300, Andrey Borzenkov wrote:
  

I have no COM port on notebook (without port replicator which I do not have)
so COM is disabled in BIOS. No ttyS* is detected during boot (and no device
created) but I just noticed that serial modules are still loaded. Well, this
partially defeats the purpose of disabling COM port - the intention was to
free resources by *not* loading unneeded modules ...



  

This may have something to do with (ACPI) PnP which apparently believes COM is 
alive.
Notebook is Toshiba Portege 4000.



Nice...  What's this then?

  

00:09 PNP0501 16550A-compatible serial port
state = active
io 0x3f8-0x3ff
irq 5



This doesn't mean that a port (ie connector) is present.  My notebook 
also has the electronics without the physical connector.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)

2007-11-24 Thread Michael H. Warfield
On Sat, 2007-11-24 at 23:36 +0300, Andrey Borzenkov wrote:
> I have no COM port on notebook (without port replicator which I do not have)
> so COM is disabled in BIOS. No ttyS* is detected during boot (and no device
> created) but I just noticed that serial modules are still loaded. Well, this
> partially defeats the purpose of disabling COM port - the intention was to
> free resources by *not* loading unneeded modules ...

> This may have something to do with (ACPI) PnP which apparently believes COM 
> is alive.
> Notebook is Toshiba Portege 4000.

Nice...  What's this then?

> 00:09 PNP0501 16550A-compatible serial port
> state = active
> io 0x3f8-0x3ff
> irq 5

0x3f8-0x3ff is COM1 and a 16550A is the most common invocation of the
vernerable serial port.  I haven't seen a real 8250 in ages.  the 16550
is an 8250 with larger FIFO's and better rates.

Now, it's on IRQ5 instead of IRQ4 but that's all allocatable on PCI.
Unless I'm missing something, it looks like you've got a COM port and it
looks like it's active.

Might be related to an IR port?

> 00:0a SMCf010 SMC Fast Infrared Port
> state = disabled

> 00:0b PNP0401 ECP printer port
> state = disabled

:

Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  [EMAIL PROTECTED]
   /\/\|=mhw=|\/\/  | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9  | An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471| possible worlds.  A pessimist is sure of it!



signature.asc
Description: This is a digitally signed message part


Re: 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)

2007-11-24 Thread Yinghai Lu
On Nov 24, 2007 12:36 PM, Andrey Borzenkov <[EMAIL PROTECTED]> wrote:
> I have no COM port on notebook (without port replicator which I do not have)
> so COM is disabled in BIOS. No ttyS* is detected during boot (and no device
> created) but I just noticed that serial modules are still loaded. Well, this
> partially defeats the purpose of disabling COM port - the intention was to
> free resources by *not* loading unneeded modules ...
>
> This may have something to do with (ACPI) PnP which apparently believes COM 
> is alive.
> Notebook is Toshiba Portege 4000.
>
> {pts/0}% lsmod | grep 82
> 8250_pnp9792  0
> 8250   24660  1 8250_pnp
> serial_core22872  1 8250
>
> {pts/0}% lspnp -v
> 00:00 PNP0c01 System board
> state = active
> mem 0x0-0x9
> mem 0xe-0xe
> mem 0xf-0xf
> mem 0x10-0x1ef5
>
> 00:01 PNP0a03 PCI bus
> state = active
> io 0xcf8-0xcff
>
> 00:02 PNP0200 AT DMA controller
> state = active
> io 0x0-0xf
> io 0x81-0x83
> io 0x87-0x87
> io 0x89-0x8b
> io 0x8f-0x8f
> io 0xc0-0xdf
> dma 4
>
> 00:03 PNP0800 AT speaker
> state = active
> io 0x61-0x61
>
> 00:04 PNP0c04 Math coprocessor
> state = active
> io 0xf0-0xff
> irq 13
>
> 00:05 PNP0303 IBM enhanced keyboard (101/102-key, PS/2 mouse support)
> state = active
> io 0x60-0x60
> io 0x64-0x64
> irq 1
>
> 00:06 PNP0f13 PS/2 port for PS/2-style mice
> state = active
> irq 12
>
> 00:07 PNP0b00 AT real-time clock
> state = active
> io 0x70-0x71
> irq 8
>
> 00:08 PNP0c02 Motherboard resources
> state = active
> io 0x2e-0x2f
> io 0x62-0x62
> io 0x66-0x66
> io 0x80-0x80
> io 0x84-0x86
> io 0x88-0x88
> io 0x8c-0x8e
> io 0x92-0x92
>
> 00:09 PNP0501 16550A-compatible serial port
> state = active
> io 0x3f8-0x3ff
> irq 5
>
> 00:0a SMCf010 SMC Fast Infrared Port
> state = disabled
>
> 00:0b PNP0401 ECP printer port
> state = disabled
>
> ..
> [  126.035809] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ 
> sharing enabled
...
> [  126.107096] serial 00:09: activated
...

Can you cat /sys/firmware/acpi/DSDT and use iasl to decode it?
it seems that your BIOS has problem about com setup.

YH
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)

2007-11-24 Thread Andrey Borzenkov
I have no COM port on notebook (without port replicator which I do not have)
so COM is disabled in BIOS. No ttyS* is detected during boot (and no device
created) but I just noticed that serial modules are still loaded. Well, this
partially defeats the purpose of disabling COM port - the intention was to
free resources by *not* loading unneeded modules ...

This may have something to do with (ACPI) PnP which apparently believes COM is 
alive.
Notebook is Toshiba Portege 4000.

{pts/0}% lsmod | grep 82
8250_pnp9792  0
8250   24660  1 8250_pnp
serial_core22872  1 8250

{pts/0}% lspnp -v
00:00 PNP0c01 System board
state = active
mem 0x0-0x9
mem 0xe-0xe
mem 0xf-0xf
mem 0x10-0x1ef5

00:01 PNP0a03 PCI bus
state = active
io 0xcf8-0xcff

00:02 PNP0200 AT DMA controller
state = active
io 0x0-0xf
io 0x81-0x83
io 0x87-0x87
io 0x89-0x8b
io 0x8f-0x8f
io 0xc0-0xdf
dma 4

00:03 PNP0800 AT speaker
state = active
io 0x61-0x61

00:04 PNP0c04 Math coprocessor
state = active
io 0xf0-0xff
irq 13

00:05 PNP0303 IBM enhanced keyboard (101/102-key, PS/2 mouse support)
state = active
io 0x60-0x60
io 0x64-0x64
irq 1

00:06 PNP0f13 PS/2 port for PS/2-style mice
state = active
irq 12

00:07 PNP0b00 AT real-time clock
state = active
io 0x70-0x71
irq 8

00:08 PNP0c02 Motherboard resources
state = active
io 0x2e-0x2f
io 0x62-0x62
io 0x66-0x66
io 0x80-0x80
io 0x84-0x86
io 0x88-0x88
io 0x8c-0x8e
io 0x92-0x92

00:09 PNP0501 16550A-compatible serial port
state = active
io 0x3f8-0x3ff
irq 5

00:0a SMCf010 SMC Fast Infrared Port
state = disabled

00:0b PNP0401 ECP printer port
state = disabled


[0.00] Linux version 2.6.24-rc3-1avb ([EMAIL PROTECTED]) (gcc version 
4.2.2 (4.2.2-1mdv2008.1)) #7 Sat Nov 17 12:09:07 MSK 2007
[0.00] BIOS-provided physical RAM map:
[0.00]  BIOS-e820:  - 0009fc00 (usable)
[0.00]  BIOS-e820: 0009fc00 - 000a (reserved)
[0.00]  BIOS-e820: 000e - 000eee00 (reserved)
[0.00]  BIOS-e820: 000eee00 - 000ef000 (ACPI NVS)
[0.00]  BIOS-e820: 000ef000 - 0010 (reserved)
[0.00]  BIOS-e820: 0010 - 1ef6 (usable)
[0.00]  BIOS-e820: 1ef6 - 1ef7 (ACPI data)
[0.00]  BIOS-e820: 1ef7 - 2000 (reserved)
[0.00]  BIOS-e820: fff8 - 0001 (reserved)
[0.00] 495MB LOWMEM available.
[0.00] Entering add_active_range(0, 0, 126816) 0 entries of 256 used
[0.00] Zone PFN ranges:
[0.00]   DMA 0 -> 4096
[0.00]   Normal   4096 ->   126816
[0.00] Movable zone start PFN for each node
[0.00] early_node_map[1] active PFN ranges
[0.00] 0:0 ->   126816
[0.00] On node 0 totalpages: 126816
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 4064 pages, LIFO batch:0
[0.00]   Normal zone: 958 pages used for memmap
[0.00]   Normal zone: 121762 pages, LIFO batch:31
[0.00]   Movable zone: 0 pages used for memmap
[0.00] DMI 2.3 present.
[0.00] ACPI: RSDP 000F0090, 0014 (r0 TOSHIB)
[0.00] ACPI: RSDT 1EF6, 0028 (r1 TOSHIB 750970814 TASM  
401)
[0.00] ACPI: FACP 1EF60054, 0084 (r2 TOSHIB 750970814 TASM  
401)
[0.00] ACPI: DSDT 1EF600D8, 68DA (r1 TOSHIB 4000 20020417 MSFT  
10A)
[0.00] ACPI: FACS 000EEE00, 0040
[0.00] ACPI: PM-Timer IO Port: 0xee08
[0.00] Allocating PCI resources starting at 3000 (gap: 
2000:dff8)
[0.00] swsusp: Registered nosave memory region: 0009f000 - 
000a
[0.00] swsusp: Registered nosave memory region: 000a - 
000e
[0.00] swsusp: Registered nosave memory region: 000e - 
000ee000
[0.00] swsusp: Registered nosave memory region: 000ee000 - 
000ef000
[0.00] swsusp: Registered nosave memory region: 000ef000 - 
0010
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 125826
[0.00] Kernel command line: BOOT_IMAGE=2.6.24-rc3-1avb root=LABEL=/ 
resume=LABEL=swap vga=791
[0.00] Enabling fast FPU save and restore... done.
[0.00] Enabling unmasked SIMD FPU exception support... done.
[0.00] Initializing CPU#0
[0.00] PID hash table entries: 2048 (order: 11, 8192 bytes)
[0.00] Detected 747.681 MHz process