From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Grant Coady <grant_lkml@dodo.com.au>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.12-mm1 breaks Toshiba laptop yenta cardbus
Date: Wed, 22 Jun 2005 16:11:42 +0400 [thread overview]
Message-ID: <20050622161142.A32391@jurassic.park.msu.ru> (raw)
In-Reply-To: <s32db1toatpgar8nun4m5rtqq97hkbk2ab@4ax.com>; from grant_lkml@dodo.com.au on Mon, Jun 20, 2005 at 07:15:34PM +1000
On Mon, Jun 20, 2005 at 07:15:34PM +1000, Grant Coady wrote:
> Yenta: CardBus bridge found at 0000:00:0b.0 [1179:0001]
> yenta 0000:00:0b.0: Preassigned resource 0 busy, reconfiguring...
In -mm1 the cardbus resources might be assigned in
pci_assign_unassigned_resources() pass. From your dmesg:
PCI: Bus 2, cardbus bridge: 0000:00:0b.0
IO window: 00002000-00002fff
IO window: 00003000-00003fff
PREFETCH window: 12000000-13ffffff
MEM window: 14000000-15ffffff
Then yenta_allocate_res() tries to assign these resources again and,
naturally, fails.
This adds check for already assigned cardbus resources.
Ivan.
--- 2.6.12-mm1/drivers/pcmcia/yenta_socket.c Wed Jun 22 15:56:20 2005
+++ linux/drivers/pcmcia/yenta_socket.c Wed Jun 22 16:01:40 2005
@@ -553,6 +553,11 @@ static int yenta_try_allocate_res(struct
unsigned offset;
unsigned mask;
+ res = socket->dev->resource + PCI_BRIDGE_RESOURCES + nr;
+ /* Already allocated? */
+ if (res->parent)
+ return 0;
+
/* The granularity of the memory limit is 4kB, on IO it's 4 bytes */
mask = ~0xfff;
if (type & IORESOURCE_IO)
@@ -560,7 +565,6 @@ static int yenta_try_allocate_res(struct
offset = 0x1c + 8*nr;
bus = socket->dev->subordinate;
- res = socket->dev->resource + PCI_BRIDGE_RESOURCES + nr;
res->name = bus->name;
res->flags = type;
res->start = 0;
next prev parent reply other threads:[~2005-06-22 12:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-20 9:15 Grant Coady
2005-06-21 22:01 ` Alexey Dobriyan
2005-06-22 12:11 ` Ivan Kokshaysky [this message]
2005-06-22 16:56 ` Grant Coady
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=20050622161142.A32391@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=akpm@osdl.org \
--cc=grant_lkml@dodo.com.au \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®