public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Robert Hancock <hancockr@shaw.ca>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related)
Date: Tue, 27 Nov 2007 16:59:06 +0800	[thread overview]
Message-ID: <1196153946.5385.4.camel@sli10-conroe.sh.intel.com> (raw)
In-Reply-To: <200711252301.34503.arvidjaar@mail.ru>

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

  reply	other threads:[~2007-11-27  8:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.P01QcmUf2f3DN4etI8KJYFdaLnE@ifi.uio.no>
2007-11-25 18:39 ` 2.6.24: Serial disabled in BIOS but serial modules still loaded (probably PnP related) Robert Hancock
2007-11-25 20:01   ` Andrey Borzenkov
2007-11-27  8:59     ` Shaohua Li [this message]
2007-11-24 20:36 Andrey Borzenkov
2007-11-24 23:09 ` Yinghai Lu
2007-11-25 16:50   ` Andrey Borzenkov
2007-11-25  3:55 ` Michael H. Warfield
2007-11-25  7:54   ` David Newall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1196153946.5385.4.camel@sli10-conroe.sh.intel.com \
    --to=shaohua.li@intel.com \
    --cc=arvidjaar@mail.ru \
    --cc=hancockr@shaw.ca \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox