summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorIvan Kokshaysky2005-06-28 01:28:02 +0200
committerLinus Torvalds2005-06-28 03:03:05 +0200
commit7925407aa02653ba462b1d8b0b1229b99aee5411 (patch)
tree450fbfe7570b65ae978cb036bc1cc689dde30e69 /drivers/pcmcia
parentCommit the manual part of the input layer merge. (diff)
downloadkernel-qcow2-linux-7925407aa02653ba462b1d8b0b1229b99aee5411.tar.gz
kernel-qcow2-linux-7925407aa02653ba462b1d8b0b1229b99aee5411.tar.xz
kernel-qcow2-linux-7925407aa02653ba462b1d8b0b1229b99aee5411.zip
[PATCH] pci: yenta cardbus fix
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. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/yenta_socket.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index bee05362fd24..02b23abc2df1 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -549,6 +549,11 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ
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)
@@ -556,7 +561,6 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ
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;