lkml.org 
[lkml]   [2011]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: How to access serial port that is set in BIOS as OS Controlled
On Fri, Aug 5, 2011 at 7:59 AM, Jeff Chua <jeff.chua.linux@gmail.com> wrote:
>
>
> On Fri, Aug 5, 2011 at 1:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>
>> On Thu, Aug 4, 2011 at 4:56 AM, Andrey Panin <pazke@centrinvest.ru> wrote:
>> > On 209, 07 28, 2011 at 01:43:11PM +0800, Jeff Chua wrote:
>> >> I'm trying to access the serial port ttyS2 that is set in the BIOS as
>> >> "OS Controlled" without much success. If it's set it to "Always
>> >> Enabled",  I can access the serial port.
>>
>> >> If I set the BIOS to "OS Controlled", I can't access the serial port
>> >> no matter what parameter I pass to the setserial. The factory default
>> >> is "OS Controlled", and Window XP can detect and access the port.
>> >> There will be hundreds of CV60 to get into the BIOS to set it one by
>> >> one. If there's a way to access the port in linux, it'll be great!
>> >
>> > Does lspnp show this port in "OS Controlled" mode ?
>>
>> It would definitely be interesting to know what lspnp says, but I
>> suspect there might be even more to it.
>>
>> Linux can find UARTs via PNP (via PNPACPI on modern boxes).  But we
>> also poke blindly at the legacy I/O port addresses in
>> SERIAL_PORT_DFNS, which includes 0x3e8, so we should have found it
>> that way even if we didn't find it via PNP.
>>
>> My guess is that in "OS Controlled" mode, the port is initially
>> powered off or disconnected, so we can't find it, and there's some
>> ACPI method that would turn it on.  Windows might be enabling it
>> automatically.
>>
>> Can you also collect the DSDT so we can investigate this possibility?
>> There are instructions here:
>> http://kernel.org/pub/linux/kernel/people/helgaas/debug .  You might
>> want to open a bug report at http://bugzilla.kernel.org to have a
>> place to attach the DSDT and some dmesg logs.  I would start by filing
>> it under "ACPI / Config-Other".
>
> I tried it a bit more after reading  /usr/src/linux/Documentation/pnp.txt
> and got turned out that to enable to "OS Controlled" serial touch screen,
> I've to do this ...
>
> echo "auto" > /sys/bus/pnp/devices/00:0a/resources
>
> This seems to work.

OK. That's a good clue, and maybe a good enough workaround for your
immediate need.

But I think the fact that it doesn't "just work" is a Linux bug, and
it'd be nice to fix it. My guess is that running _SRS is what makes
the port work, and that Windows does this automatically but Linux does
not. If we can figure out exactly what the difference is, there's a
good chance that we can fix several Linux issues by just doing things
the way Windows does.

Would you mind building with CONFIG_PNP_DEBUG_MESSAGES=y, booting with
"pnp.debug", issuing the "auto" command, and attaching the dmesg log
to this bug report?

https://bugzilla.kernel.org/show_bug.cgi?id=40612

Thanks!

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

\
 
 \ /
  Last update: 2011-08-05 17:23    [W:0.057 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site