From: Linus Torvalds <torvalds@linux-foundation•org>
To: Andrew Morton <akpm@linux-foundation•org>
Cc: Stephen Rothwell <sfr@canb•auug.org.au>,
linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
Yinghai Lu <yhlu.kernel@gmail•com>,
Ivan Kokshaysky <ink@jurassic•park.msu.ru>,
Jesse Barnes <jbarnes@virtuousgeek•org>
Subject: Re: linux-next: Tree for September 3
Date: Thu, 4 Sep 2008 01:50:58 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0809040143350.3452@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20080904012544.cabed847.akpm@linux-foundation.org>
On Thu, 4 Sep 2008, Andrew Morton wrote:
>
> <plugs it in>
>
> cs: pcmcia_socket0: unable to apply power.
> pccard: CardBus card inserted into slot 0
> pci 0000:07:00.0: supports D1
> pci 0000:07:00.0: supports D2
> pci 0000:07:00.0: PME# supported from D1 D2 D3hot D3cold
> pci 0000:07:00.0: PME# disabled
>
> sony:/home/akpm> lspci -s07:00
> 07:00.0 Ethernet controller: 3Com Corporation 3cCFE575CT CardBus [Cyclone] (rev 10)
Ok, the PCI resource side definitely works.
I've committed the fix as follows.. (the explanation is about three times
the size, but whatever ;)
As to that "unable to apply power" thing, that's a separate issue.. And
in fact one that probably doesn't even matter to a CardBus card, since
cardbus doesn't care about the insane CS state machines anyway.
Anyway, Ivan and Jesse cc'd for the patch, but I committed it, since I
was involved in causing the bug in the first place.
Linus
---
commit 5f17cfce5776c566d64430f543a289e5cfa4538b
Author: Linus Torvalds <torvalds@linux-foundation•org>
Date: Thu Sep 4 01:33:59 2008 -0700
PCI: fix pbus_size_mem() resource alignment for CardBus controllers
Commit 884525655d07fdee9245716b998ecdc45cdd8007 ("PCI: clean up resource
alignment management") changed the resource handling to mark how a
resource was aligned on a per-resource basis.
Thus, instead of looking at the resource number to determine whether it
was a bridge resource or a regular resource (they have different
alignment rules), we should just ask the resource for its alignment
directly.
The reason this broke only cardbus resources was that for the other
types of resources, the old way of deciding alignment actually still
happened to work. But CardBus bridge resources had been changed by
commit 934b7024f0ed29003c95cef447d92737ab86dc4f ("Fix cardbus resource
allocation") to look more like regular resources than PCI bridge
resources from an alignment handling standpoint.
Reported-and-tested-by: Andrew Morton <akpm@linux-foundation•org>
Cc: Ivan Kokshaysky <ink@jurassic•park.msu.ru>
Cc: Jesse Barnes <jbarnes@virtuousgeek•org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation•org>
---
drivers/pci/setup-bus.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 82634a2..1aad599 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -352,11 +352,12 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long
continue;
r_size = r->end - r->start + 1;
/* For bridges size != alignment */
- align = (i < PCI_BRIDGE_RESOURCES) ? r_size : r->start;
+ align = resource_alignment(r);
order = __ffs(align) - 20;
if (order > 11) {
- dev_warn(&dev->dev, "BAR %d too large: "
+ dev_warn(&dev->dev, "BAR %d bad alignment %llx: "
"%#016llx-%#016llx\n", i,
+ (unsigned long long)align,
(unsigned long long)r->start,
(unsigned long long)r->end);
r->flags = 0;
next prev parent reply other threads:[~2008-09-04 8:51 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 9:16 linux-next: Tree for September 3 Stephen Rothwell
2008-09-04 2:32 ` [PATCH] hid: fix gyration build error Randy Dunlap
2008-09-04 6:52 ` Jiri Slaby
2008-09-04 8:06 ` Jiri Kosina
2008-09-04 4:42 ` linux-next: Tree for September 3 Andrew Morton
2008-09-04 4:46 ` Andrew Morton
2008-09-04 4:54 ` Andrew Morton
2008-09-04 4:57 ` Stephen Rothwell
2008-09-04 5:05 ` Andrew Morton
2008-09-04 5:20 ` Stephen Rothwell
2008-09-04 6:01 ` Andrew Morton
2008-09-04 7:15 ` Andrew Morton
2008-09-04 7:48 ` Stephen Rothwell
2008-09-04 9:19 ` Alan Cox
2008-09-04 9:21 ` Alan Cox
2008-09-04 11:01 ` Alan Cox
2008-09-04 14:35 ` Alan Cox
2008-09-04 5:26 ` Linus Torvalds
2008-09-04 5:42 ` Andrew Morton
2008-09-04 5:00 ` Stephen Rothwell
2008-09-04 5:21 ` Linus Torvalds
2008-09-04 5:33 ` Andrew Morton
2008-09-04 7:14 ` Yinghai Lu
2008-09-04 8:00 ` Andrew Morton
2008-09-04 8:23 ` Linus Torvalds
2008-09-04 8:02 ` Linus Torvalds
2008-09-04 8:25 ` Andrew Morton
2008-09-04 8:37 ` Andrew Morton
2008-09-04 9:03 ` Linus Torvalds
2008-09-04 8:50 ` Linus Torvalds [this message]
2008-09-04 8:57 ` Andrew Morton
2008-09-04 9:07 ` Linus Torvalds
2008-09-04 17:45 ` Andrew Morton
2008-09-04 18:05 ` Linus Torvalds
2008-09-04 18:34 ` Andrew Morton
2008-09-04 20:31 ` Eric W. Biederman
2008-09-04 20:41 ` Andrew Morton
2008-09-04 21:03 ` Eric W. Biederman
2008-09-04 22:22 ` Andrew Morton
2008-09-04 22:45 ` Thomas Gleixner
2008-09-04 23:17 ` Linus Torvalds
2008-09-05 5:39 ` Arjan van de Ven
2008-09-04 23:17 ` Andrew Morton
2008-09-04 23:25 ` Linus Torvalds
2008-09-04 23:27 ` Thomas Gleixner
2008-09-05 11:04 ` Ingo Molnar
2008-09-05 17:49 ` Andrew Morton
2008-09-09 4:39 ` Jesse Barnes
-- strict thread matches above, loose matches on Subject: below --
2009-09-03 11:59 Stephen Rothwell
2010-09-03 3:52 Stephen Rothwell
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=alpine.LFD.1.10.0809040143350.3452@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation$(echo .)org \
--cc=akpm@linux-foundation$(echo .)org \
--cc=ink@jurassic$(echo .)park.msu.ru \
--cc=jbarnes@virtuousgeek$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=yhlu.kernel@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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