From: Adam Belay <ambx1@neo.rr.com>
To: CarlosRomero <caberome@bellsouth.net>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@digeo.com>,
Shawn Starr <spstarr@sh0n.net>
Subject: Re: simple pnp bios io resources bug makes system unusable
Date: Tue, 1 Jul 2003 22:30:50 +0000 [thread overview]
Message-ID: <20030701223050.GA19402@neo.rr.com> (raw)
In-Reply-To: <3F010229.4020201@bellsouth.net>
The pnpbios is reserving the complete range of every possible
io port. This causes device activation to fail for every device
that needs an io port because that resource will always appear
busy.
On Mon, Jun 30, 2003 at 11:38:17PM -0400, CarlosRomero wrote:
> cat /sys/devices/pnp0/00\:0c/name
> Reserved Motherboard Resources
>
> cat /sys/devices/pnp0/00\:0c/resources
> state = active
> io 0x4d0-0x4d1
> io 0xcf8-0xcff
> io 0x3f7-0x3f7
> io 0x401-0x407
> io 0x298-0x298
> io 0x00000000-0xffffffff
> mem 0xfffe0000-0xffffffff
> mem 0x100000-0x7ffffff
>
> fixup: check for null io base, other devices are now able to initialize.
Unfortunatly it's not quite that simple.
> static void current_ioresource(struct pnp_resource_table * res, int io,
> int len)
> {
> int i = 0;
>
> + if (!io) return;
> while ((res->port_resource[i].flags & IORESOURCE_IO) && i <
> PNP_MAX_PORT) i++;
> if (i < PNP_MAX_PORT) {
> res->port_resource[i].start = (unsigned long) io;
> res->port_resource[i].end = (unsigned long)(io + len - 1);
> res->port_resource[i].flags = IORESOURCE_IO; // Also
> clears _UNSET flag
> }
> }
Below are two examples that both use a base of 0 in a valid way.
(one for mem)
# cat id
PNP0c01 /* this is a system device */
# cat resources
state = active
mem 0x0-0x9ffff
mem 0xe4000-0xfffff
mem 0x100000-0x3ffffff
mem 0xfff80000-0xfffbffff
(and one for io ports)
# cat id
PNP0200 /* this is an AT DMA Controller */
# cat resources
state = active
io 0x0-0xf
io 0x81-0x8f
io 0xc0-0xdf
dma 4
Therefore just eliminating base 0 addresses is not a proper solution.
Also if we just skip the culprit resource then the resource index number
(a value that many drivers require to be consistent) will be offset by
the number of skipped resources of the same type.
Currently I'm leaning toward this logic...
if we have any of the following situations
- 0x00000000 for base and 0xffffffff for end
- 0x00000000 for base and 0x00000000 for end
- 0xffffffff for base and 0xffffffff for end
then the resource range can be considered disabled.
Also a device can have a disabled resource but not be fully disabled,
such as a parport with some features disabled (ECP etc). So the
index number must be maintained, this will require some more complex
changes.
I'll have a full fix out soon.
Thanks,
Adam
next prev parent reply other threads:[~2003-07-02 2:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-01 3:38 simple pnp bios io resources bug makes system unusable CarlosRomero
2003-07-01 22:30 ` Adam Belay [this message]
2003-07-02 17:20 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2003-07-01 5:54 CarlosRomero
2003-07-01 22:37 ` Adam Belay
2003-07-01 7:30 Shawn Starr
2003-07-01 21:33 Shawn Starr
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=20030701223050.GA19402@neo.rr.com \
--to=ambx1@neo.rr.com \
--cc=akpm@digeo.com \
--cc=caberome@bellsouth.net \
--cc=linux-kernel@vger.kernel.org \
--cc=spstarr@sh0n.net \
/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