brcm80211 breakage..

89 messages, 8 authors, 2012-01-31 · page 1 of 2 · open the first message on its own page

brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-10 20:15:51

So the wireless on my Macbook Air no longer seems to work with the
current -git tree.

The BRCMSMAC driver *used* to work, and no longer does. Also, very
annoyingly, it's even hard to *compile* the thing, because it used to
be

  depends on BCMA=n

but now it is the exact reverse:

  depends on BCMA

so there is no sane way to carry a configuration over from before, and
things like bisection is a major pain due to having to play idiotic
configuration games to get it to work across all these modifications.

Ragardless, even once you actually enable BCMA and can get the driver
to come back, it just doesn't do anything. Maybe there is some
remaining config problem, but I don't think so. I think the driver is
just buggered.

The kernel messages don't say much. A working config for me has
messages like this:

  brcmsmac 0000:02:00.0: bus 2 slot 0 func 0 irq 11
  brcmsmac 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
  brcmsmac 0000:02:00.0: setting latency timer to 64
  ieee80211 phy0: brcms_ops_config: change monitor mode: false (implement)
  ieee80211 phy0: brcms_ops_config: change power-save mode: false (implement)
  ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled: false (implement)
  ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled: true (implement)
  ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed: associated
  ieee80211 phy0: brcms_ops_bss_info_changed: arp filtering: enabled
true, count 0 (implement)
  ieee80211 phy0: brcms_ops_bss_info_changed: arp filtering: enabled
true, count 1 (implement)

while the nonworking one says:

  brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 17
  ieee80211 phy0: wl0: brcms_b_attach: si_attach failed
  ieee80211 phy0: wl0: brcms_b_attach: failed with err 11
  ieee80211 phy0: wl0: brcms_c_attach: failed with err 11
  ieee80211 phy0: brcmsmac: attach() failed with code 11
  brcmsmac: brcms_bcma_probe: brcms_attach failed!
  brcms_module_init: register returned 0

and no wireless device ever shows up.

lspci for this device says:

  02:00.0 Network controller: Broadcom Corporation BCM43224
802.11a/b/g/n (rev 01)
          Subsystem: Apple Computer Inc. Device 00e9
          Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
          Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
          Latency: 0, Cache Line Size: 256 bytes
          Interrupt: pin A routed to IRQ 17
          Region 0: Memory at a0400000 (64-bit, non-prefetchable) [size=16K]
          Capabilities: <access denied>
          Kernel driver in use: brcmsmac
  00: e4 14 53 43 06 00 10 00 01 00 80 02 40 00 00 00
  10: 04 00 40 a0 00 00 00 00 00 00 00 00 00 00 00 00
  20: 00 00 00 00 00 00 00 00 00 00 00 00 6b 10 e9 00
  30: 00 00 00 00 40 00 00 00 00 00 00 00 0b 01 00 00

(this is from the working kernel, obviously).

Please look into this. I'll obviously be happy test any reasonable suggestions,

                 Linus

Re: brcm80211 breakage..

From: Arend van Spriel <hidden>
Date: 2012-01-11 10:44:39

On 01/10/2012 09:15 PM, Linus Torvalds wrote:
So the wireless on my Macbook Air no longer seems to work with the
current -git tree.

The BRCMSMAC driver *used* to work, and no longer does. Also, very
annoyingly, it's even hard to *compile* the thing, because it used to
be

  depends on BCMA=n

but now it is the exact reverse:

  depends on BCMA

so there is no sane way to carry a configuration over from before, and
things like bisection is a major pain due to having to play idiotic
configuration games to get it to work across all these modifications.
BCMA support has been added to brcmsmac so now we depend on it. As BCMA
claims the PCI device we had the BCMA=n in place before. I agree that it
makes bisecting a pain in the...
Ragardless, even once you actually enable BCMA and can get the driver
to come back, it just doesn't do anything. Maybe there is some
remaining config problem, but I don't think so. I think the driver is
just buggered.
Looking at the output I had deja-vu feeling. The issue popped up when we
published part of the patches for BCMA support. I looked into it with
Larry Finger and Rafał Miłecki. We found the reason for the failure, but
it seemed resolved after submitting the remaining patches for BCMA
support. However, it seems to have raised its ugly head.
Please look into this. I'll obviously be happy test any reasonable suggestions,

                 Linus
My theory is that the BAR window is not mapped to a valid address. Could
you try to revert the following commit:

commit 439678f8b0fca7aeca06c6581e3679eef618721a
Author: Rafał Miłecki [off-list ref]
Date:   Mon Dec 5 19:13:39 2011 +0100

    bcma: pci: use fixed windows when possible

    Some cores are mapped in the fixed way, they registers can be accessed
    all the time.

    Signed-off-by: Rafał Miłecki [off-list ref]
    Signed-off-by: John W. Linville [off-list ref]

I have attached the 'revert patch' based on your git master branch.

Gr. AvS

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-11 15:06:00

On Wed, Jan 11, 2012 at 2:44 AM, Arend van Spriel [off-list ref] wrote:
My theory is that the BAR window is not mapped to a valid address. Could
you try to revert the following commit:
Sadly, that one makes no difference. I'll enable BRCM/BCMA debugging
and see if that gives any more information, but will be unable to do
much for the next few hours, so it will likely not be until this
afternoon.

                            Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-11 16:05:04

On Wed, Jan 11, 2012 at 7:05 AM, Linus Torvalds
[off-list ref] wrote:
Sadly, that one makes no difference. I'll enable BRCM/BCMA debugging
and see if that gives any more information, but will be unable to do
much for the next few hours, so it will likely not be until this
afternoon.
Ok, could do it now. But that really doesn't give much more
information. Here it is anyway:

[    0.746530] bcma-pci-bridge 0000:02:00.0: PCI INT A -> GSI 17
(level, low) -> IRQ 17
[    0.746544] bcma-pci-bridge 0000:02:00.0: setting latency timer to 64
[    0.746617] bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800,
rev 0x22, class 0x0)
[    0.746646] bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812,
rev 0x17, class 0x0)
[    0.746709] bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev
0x0F, class 0x0)
[    0.746845] bcma: Switched to core: 0x800
[    0.746859] bcma: Found rev 6 PMU (capabilities 0x108C2606)
[    0.746880] bcma: Switched to core: 0x820
[    0.775510] bcma: Switched to core: 0x800
[    0.815750] bcma: Unsupported SPROM revision: 255
[    0.815804] bcma: No SPROM available
[    0.815909] bcma: Bus registered
[   41.797178] brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 17
[   41.952030] bcma: Switched to core: 0x820
[   41.952050] bcma: Switched to core: 0x800
[   41.953881] ieee80211 phy0: wl0: brcms_b_attach: si_attach failed
[   41.956397] ieee80211 phy0: wl0: brcms_b_attach: failed with err 11
[   41.958443] ieee80211 phy0: wl0: brcms_c_attach: failed with err 11
[   41.960468] ieee80211 phy0: brcmsmac: attach() failed with code 11
[   41.962316] brcmsmac: brcms_bcma_probe: brcms_attach failed!
[   41.967275] brcms_module_init: register returned 0

hopefully this gives people *some* idea, but I'm not seeing anything.

         Linus

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-11 17:00:37

On 01/11/2012 10:04 AM, Linus Torvalds wrote:
On Wed, Jan 11, 2012 at 7:05 AM, Linus Torvalds

Ok, could do it now. But that really doesn't give much more
information. Here it is anyway:

[    0.746530] bcma-pci-bridge 0000:02:00.0: PCI INT A ->  GSI 17
(level, low) ->  IRQ 17
[    0.746544] bcma-pci-bridge 0000:02:00.0: setting latency timer to 64
[    0.746617] bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800,
rev 0x22, class 0x0)
[    0.746646] bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812,
rev 0x17, class 0x0)
[    0.746709] bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev
0x0F, class 0x0)
[    0.746845] bcma: Switched to core: 0x800
[    0.746859] bcma: Found rev 6 PMU (capabilities 0x108C2606)
[    0.746880] bcma: Switched to core: 0x820
[    0.775510] bcma: Switched to core: 0x800
[    0.815750] bcma: Unsupported SPROM revision: 255
[    0.815804] bcma: No SPROM available
I'm not a bcma or brcmsmac expert, but the above result of SPROM version 0xFF 
looks as if the read was from a non-existent register. If you get a chance, 
please try this patch, which will dump the offset that is being used.

Index: wireless-testing-new/drivers/bcma/sprom.c
===================================================================
--- wireless-testing-new.orig/drivers/bcma/sprom.c
+++ wireless-testing-new/drivers/bcma/sprom.c
@@ -230,6 +230,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
  	 * TODO: understand this condition and use it */
  	offset = (bus->chipinfo.id == 0x4331) ? BCMA_CC_SPROM :
  		BCMA_CC_SPROM_PCIE6;
+	pr_debug("SPROM offset 0x%x\n", offset);
  	bcma_sprom_read(bus, offset, sprom);

  	if (bus->chipinfo.id == 0x4331)
As the TODO indicates, this part is not understood.

One other thing to try. If the new output says that the offset is 0x830, try 
forcing it to 0x800, or vice versa. I don't think you have a 4331, and I expect 
that the current code is trying 0x830, but should be using 0x800.

Larry

Re: brcm80211 breakage..

From: Ben Hutchings <hidden>
Date: 2012-01-11 17:15:38

On Wed, 2012-01-11 at 11:44 +0100, Arend van Spriel wrote:
On 01/10/2012 09:15 PM, Linus Torvalds wrote:
quoted
So the wireless on my Macbook Air no longer seems to work with the
current -git tree.

The BRCMSMAC driver *used* to work, and no longer does. Also, very
annoyingly, it's even hard to *compile* the thing, because it used to
be

  depends on BCMA=n

but now it is the exact reverse:

  depends on BCMA

so there is no sane way to carry a configuration over from before, and
things like bisection is a major pain due to having to play idiotic
configuration games to get it to work across all these modifications.
BCMA support has been added to brcmsmac so now we depend on it. As BCMA
claims the PCI device we had the BCMA=n in place before. I agree that it
makes bisecting a pain in the...
[...]

Maybe BRCMSMAC should select BCMA rather than depending on it.  This bus
seems like kind of an implementation detail that people are unlikely to
be aware of, unlike say PCI.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

Re: brcm80211 breakage..

From: Arend van Spriel <hidden>
Date: 2012-01-11 21:01:35

On 01/11/2012 05:04 PM, Linus Torvalds wrote:
On Wed, Jan 11, 2012 at 7:05 AM, Linus Torvalds
[off-list ref] wrote:
quoted
Sadly, that one makes no difference. I'll enable BRCM/BCMA debugging
and see if that gives any more information, but will be unable to do
much for the next few hours, so it will likely not be until this
afternoon.
There goes my theory. I have no MacBook Air over here and we have
nightly testing running for this chip. I will have it run on your branch
iso wireless to see if I can reproduce it over here.
Ok, could do it now. But that really doesn't give much more
information. Here it is anyway:
[   41.797178] brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 17
[   41.952030] bcma: Switched to core: 0x820
[   41.952050] bcma: Switched to core: 0x800
[   41.953881] ieee80211 phy0: wl0: brcms_b_attach: si_attach failed
[   41.956397] ieee80211 phy0: wl0: brcms_b_attach: failed with err 11
[   41.958443] ieee80211 phy0: wl0: brcms_c_attach: failed with err 11
[   41.960468] ieee80211 phy0: brcmsmac: attach() failed with code 11
[   41.962316] brcmsmac: brcms_bcma_probe: brcms_attach failed!
[   41.967275] brcms_module_init: register returned 0

hopefully this gives people *some* idea, but I'm not seeing anything.

         Linus
I have some idea, but no success in reproducing it. Could you provide
the .config used on this?

Gr. AvS

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 00:08:03

2012/1/11 Arend van Spriel [off-list ref]:
I have some idea, but no success in reproducing it. Could you provide
the .config used on this?
Attached.

I'm also attaching the lspci output from a working configuration and a
nonworking one. The only thing that stands out is the ">TAbort+" in
the status of the broken one. Some transfer has gone wrong, it looks
like.

              Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 00:11:08

On Wed, Jan 11, 2012 at 9:15 AM, Ben Hutchings
[off-list ref] wrote:
Maybe BRCMSMAC should select BCMA rather than depending on it.  This bus
seems like kind of an implementation detail that people are unlikely to
be aware of, unlike say PCI.
Yes, please. This is exactly the kind of thing "select" exists for.
Asking the user about some crazy proprietary broadcom bus interface is
useless, since no sane user should ever know or care about that kind
of thing.

                         Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 01:06:37

On Wed, Jan 11, 2012 at 9:00 AM, Larry Finger [off-list ref] wrote:
quoted hunk
--- wireless-testing-new.orig/drivers/bcma/sprom.c
+++ wireless-testing-new/drivers/bcma/sprom.c
@@ -230,6 +230,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
        * TODO: understand this condition and use it */
       offset = (bus->chipinfo.id == 0x4331) ? BCMA_CC_SPROM :
               BCMA_CC_SPROM_PCIE6;
+       pr_debug("SPROM offset 0x%x\n", offset);
       bcma_sprom_read(bus, offset, sprom);

       if (bus->chipinfo.id == 0x4331)
So I did that - the offset is printed out as 0x0830
(BCMA_CC_SPROM_PCIE6). And when I change the offset to 0x0800
(BCMA_CC_SPROM), the complaint about SPROM version goes away.

IOW, these messages no longer exist:

[    0.815750] bcma: Unsupported SPROM revision: 255
[    0.815804] bcma: No SPROM available

but that doesn't actually make anything *work*. The brcms errors still
remain the same.

So the SPROM issue seems to be real, but irrelevant.

I also noticed that the CONFIG_BRCMDBG onyl enables pr_debug(), but
doesn't actually #define DEBUG, so pr_debug() gets compiled out
anyway.

I'll try with -DDEBUG in the brcm80211 subdirectory and see if I get
more interesting output that way.

                       Linus

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-12 01:46:42

On 01/11/2012 07:06 PM, Linus Torvalds wrote:
On Wed, Jan 11, 2012 at 9:00 AM, Larry Finger[off-list ref]  wrote:
quoted
--- wireless-testing-new.orig/drivers/bcma/sprom.c
+++ wireless-testing-new/drivers/bcma/sprom.c
@@ -230,6 +230,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
         * TODO: understand this condition and use it */
        offset = (bus->chipinfo.id == 0x4331) ? BCMA_CC_SPROM :
                BCMA_CC_SPROM_PCIE6;
+       pr_debug("SPROM offset 0x%x\n", offset);
        bcma_sprom_read(bus, offset, sprom);

        if (bus->chipinfo.id == 0x4331)
So I did that - the offset is printed out as 0x0830
(BCMA_CC_SPROM_PCIE6). And when I change the offset to 0x0800
(BCMA_CC_SPROM), the complaint about SPROM version goes away.

IOW, these messages no longer exist:

[    0.815750] bcma: Unsupported SPROM revision: 255
[    0.815804] bcma: No SPROM available

but that doesn't actually make anything *work*. The brcms errors still
remain the same.

So the SPROM issue seems to be real, but irrelevant.

I also noticed that the CONFIG_BRCMDBG onyl enables pr_debug(), but
doesn't actually #define DEBUG, so pr_debug() gets compiled out
anyway.

I'll try with -DDEBUG in the brcm80211 subdirectory and see if I get
more interesting output that way.
OK. The SPROM issue is not completely irrelevant as that has to be correct, but 
obviously not sufficient.

What is the PCI ID for your device?

Larry

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 01:58:32

On Wed, Jan 11, 2012 at 5:46 PM, Larry Finger [off-list ref] wrote:
What is the PCI ID for your device?
You can decode it from the lspci output posted in another email in
this thread, but it's basically 14e4:4353 (rev 01).

                     Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 02:12:08

On Wed, Jan 11, 2012 at 5:46 PM, Larry Finger [off-list ref] wrote:
OK. The SPROM issue is not completely irrelevant as that has to be correct,
but obviously not sufficient.
Hmm. Having dug a bit deeper, I do think it's kind of related.

I get -ENODATA form sprom_read_pci(), but that function actually seems
to get the offset *right*.

Some printout shows that for that chip, I have

 - ai_get_ccrev(sih) = 34
 - sprom_offset = 0x800

but then it apparently reads all ones anyway. At least in the first
word. So then I get that -ENODATA error.

So once more, it's somehow related to the sprom, just in a new place:
sprom_read_pci() in brcmsmac/srom.c instead of drivers/bcma/sprom.c.

Does that give people any new ideas to try out?

                      Linus

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-12 04:15:23

On 01/11/2012 08:11 PM, Linus Torvalds wrote:
On Wed, Jan 11, 2012 at 5:46 PM, Larry Finger[off-list ref]  wrote:
quoted
OK. The SPROM issue is not completely irrelevant as that has to be correct,
but obviously not sufficient.
Hmm. Having dug a bit deeper, I do think it's kind of related.

I get -ENODATA form sprom_read_pci(), but that function actually seems
to get the offset *right*.

Some printout shows that for that chip, I have

  - ai_get_ccrev(sih) = 34
  - sprom_offset = 0x800

but then it apparently reads all ones anyway. At least in the first
word. So then I get that -ENODATA error.

So once more, it's somehow related to the sprom, just in a new place:
sprom_read_pci() in brcmsmac/srom.c instead of drivers/bcma/sprom.c.

Does that give people any new ideas to try out?
Things are getting curious. I have a 14e4:4353 device, which works with both b43 
and brcmsmac using mainline v3.2-6271-g925b5d2. The output of

dmesg | egrep "bcma|brcm"

with some extra debugging added yields:

bcma-pci-bridge 0000:06:00.0: PCI INT A -> Link[LK1E] -> GSI 22 (level, low) -> 
IRQ 22
bcma-pci-bridge 0000:06:00.0: setting latency timer to 64
bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
bcma: Found rev 6 PMU (capabilities 0x108C2606)
bcma: SPROM offset 0x830
bcma: Found SPROM Revision 8
bcma: Bus registered
brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 22
brcmsmac: Found chip type AI (0x1381a8d8)
brcmsmac: Applying 43224B0+ WARs
bcma: Switched to core: 0x812
brcms_module_init: register returned 0

I see no difference in the core revisions, etc. to explain why mine should work, 
and yours fail.

Arend: Any particular place we should look?

Larry

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 05:21:09

On Wed, Jan 11, 2012 at 8:15 PM, Larry Finger [off-list ref] wrote:
I see no difference in the core revisions, etc. to explain why mine should
work, and yours fail.
Maybe your BIOS firmware sets things up, and the Apple Macbook Air
doesn't? And the driver used to initialize things sufficiently, and
the changes have broken that?

Apple is famous for being contrary. They tend to wire things up oddly,
they don't initialize things in the BIOS (they don't have a BIOS at
all, they use EFI, but even there they use their own abortion of an
EFI rather than what everybody else does), yadda yadda.

But the real point is: it used to work, and now it doesn't. This needs
to  get fixed, or it will get reverted.

                             Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 05:30:27

On Wed, Jan 11, 2012 at 9:20 PM, Linus Torvalds
[off-list ref] wrote:
Maybe your BIOS firmware sets things up, and the Apple Macbook Air
doesn't? And the driver used to initialize things sufficiently, and
the changes have broken that?
The code in v3.2 also used to support srom rev < 4, the new code
doesn't seem to do that.

Looking at the older initvars_srom_pci() (now "srom_var_init()") the
old code started out reading just SROM_WORDS, and then reading more
only if it found the srom4 signature. The new code always reads
SROM4_WORDS.

I dunno. But it looks to me like the new driver has dropped some logic
that used to exist in that driver. I don't know if it was ever used,
though, nor do I know if it's relevant. But if tat "dropped some
logic" is more widespread, it might well also cover some
initialization code.

                        Linus

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-12 07:08:51

2012/1/12 Linus Torvalds [off-list ref]:
On Wed, Jan 11, 2012 at 9:20 PM, Linus Torvalds
[off-list ref] wrote:
quoted
Maybe your BIOS firmware sets things up, and the Apple Macbook Air
doesn't? And the driver used to initialize things sufficiently, and
the changes have broken that?
The code in v3.2 also used to support srom rev < 4, the new code
doesn't seem to do that.
After hacking bcma to read SPROM from the correct location, what did
you get in dmesg? There should be info about version of SPROM.

There are 2 possible reasons for this issue:
1) bcma doesn't fully init your card
2) brcmsmac does sth wrong incorrectly as init

The story with brcmsmac is that it had code duplicated with bcma at
first. Now they partially switched to bcma, which inits bus for them,
and provide access to bus devices. However I'm afraid Broadcom didn't
remove duplicated init code (correct me if i'm wrong!). They may be
re-initializing bus and it's devices which cause some problems...

Linus: is this possible for you to give b43 a chance? It has to be compiled with
B43_BCMA
B43_PHY_N
Unfortunately you have to install firmware manually to get b43 working
:( Howto is located at:
http://wireless.kernel.org/en/users/Drivers/b43
("Install b43-fwcutter" and "If you are using the b43 driver from 3.2
kernel or newer:").

b43 doesn't re-init bus devices, so this test will check if bcma is OK or not.

-- 
Rafał

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-12 07:10:43

W dniu 12 stycznia 2012 08:08 użytkownik Rafał Miłecki
[off-list ref] napisał:
Linus: is this possible for you to give b43 a chance? It has to be compiled with
B43_BCMA
B43_PHY_N
Unfortunately you have to install firmware manually to get b43 working
:( Howto is located at:
http://wireless.kernel.org/en/users/Drivers/b43
("Install b43-fwcutter" and "If you are using the b43 driver from 3.2
kernel or newer:").

b43 doesn't re-init bus devices, so this test will check if bcma is OK or not.
That probably will require blacklisting brcmsmac for a moment to
prevent bcma auto-loading it. Testing from cold-boot is recommended.

-- 
Rafał

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 07:14:17

On Wed, Jan 11, 2012 at 9:30 PM, Linus Torvalds
[off-list ref] wrote:
The code in v3.2 also used to support srom rev < 4, the new code
doesn't seem to do that.
I ended up trying to bisect this, and seem to have been successful.
The problem came in not with the BCMA use, but with commit
888153b3db3f ("brcm80211: smac: avoid sprom endianess conversions for
crc8 check")

I haven't yet tried to revert this on top of the current tree, but I'm
pretty sure about the bisection. That commit changes things to be read
a byte at a time, but it *also* removes the old code that only read
SROM_WORDS from the SROM.

Might the apple parts have different SROM contents? I assume "SROM" is
just a serial rom, which may be external and contain things like the ?

All the BCMA changes make the revert somewhat non-trivial, could
somebody who knows the code better please try to do it for me? It
doesn't look complicated, and I can try to do it myself tomorrow if
nobody else steps up, but I'd *really* prefer the guilty parties
themselves to do it, ok?

Arend - it's your commit...

                    Linus

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-12 07:18:17

2012/1/12 Linus Torvalds [off-list ref]:
On Wed, Jan 11, 2012 at 9:30 PM, Linus Torvalds
[off-list ref] wrote:
quoted
The code in v3.2 also used to support srom rev < 4, the new code
doesn't seem to do that.
I ended up trying to bisect this, and seem to have been successful.
The problem came in not with the BCMA use, but with commit
888153b3db3f ("brcm80211: smac: avoid sprom endianess conversions for
crc8 check")
Uh, OK, that was tricky. BCMA switch was the biggest change and we
were assuming it has to be the guilty one. Thanks for bisecting!

-- 
Rafał

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 07:19:19

2012/1/11 Rafał Miłecki [off-list ref]:
After hacking bcma to read SPROM from the correct location, what did
you get in dmesg? There should be info about version of SPROM.
When I changed the offset from 830 to 800, I didn't get any sprom
version information at all.

Anyway, as mentioned in another email I just sent out, I bisected it,
and the problem actually predates the move to bcma.

                          Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 07:22:37

2012/1/11 Rafał Miłecki [off-list ref]:
Uh, OK, that was tricky. BCMA switch was the biggest change and we
were assuming it has to be the guilty one. Thanks for bisecting!
Hey, I blamed the BCMA switch too, since it was the obvious big
change, and also caused the config problems I saw. So when the bisect
blithely went right past it and showed the exact same "si_attach
failed" messages even before that, I was all surprised.

Anyway, I'm done for today, and am hoping that somebody can pick up on
the revert effort.

                  Linus

Re: brcm80211 breakage..

From: Arend van Spriel <hidden>
Date: 2012-01-12 10:04:08

On 01/12/2012 08:13 AM, Linus Torvalds wrote:
On Wed, Jan 11, 2012 at 9:30 PM, Linus Torvalds
[off-list ref] wrote:
quoted
The code in v3.2 also used to support srom rev < 4, the new code
doesn't seem to do that.
I ended up trying to bisect this, and seem to have been successful.
The problem came in not with the BCMA use, but with commit
888153b3db3f ("brcm80211: smac: avoid sprom endianess conversions for
crc8 check")
Thanks for doing that while I had put my head on a pillow.
I haven't yet tried to revert this on top of the current tree, but I'm
pretty sure about the bisection. That commit changes things to be read
a byte at a time, but it *also* removes the old code that only read
SROM_WORDS from the SROM.

Might the apple parts have different SROM contents? I assume "SROM" is
just a serial rom, which may be external and contain things like the ?
Mostly configuration parameters for RF/PHY.
All the BCMA changes make the revert somewhat non-trivial, could
somebody who knows the code better please try to do it for me? It
doesn't look complicated, and I can try to do it myself tomorrow if
nobody else steps up, but I'd *really* prefer the guilty parties
themselves to do it, ok?

Arend - it's your commit...
Ok. I know a hint when I see one ;-)
                    Linus
Gr. AvS

Re: brcm80211 breakage..

From: Arend van Spriel <hidden>
Date: 2012-01-12 13:13:42

On 01/12/2012 05:15 AM, Larry Finger wrote:
On 01/11/2012 08:11 PM, Linus Torvalds wrote:
quoted
On Wed, Jan 11, 2012 at 5:46 PM, Larry Finger[off-list ref]  wrote:
quoted
OK. The SPROM issue is not completely irrelevant as that has to be correct,
but obviously not sufficient.
Hmm. Having dug a bit deeper, I do think it's kind of related.

I get -ENODATA form sprom_read_pci(), but that function actually seems
to get the offset *right*.

Some printout shows that for that chip, I have

  - ai_get_ccrev(sih) = 34
  - sprom_offset = 0x800

but then it apparently reads all ones anyway. At least in the first
word. So then I get that -ENODATA error.

So once more, it's somehow related to the sprom, just in a new place:
sprom_read_pci() in brcmsmac/srom.c instead of drivers/bcma/sprom.c.

Does that give people any new ideas to try out?
Things are getting curious. I have a 14e4:4353 device, which works with both b43 
and brcmsmac using mainline v3.2-6271-g925b5d2. The output of

dmesg | egrep "bcma|brcm"

with some extra debugging added yields:

bcma-pci-bridge 0000:06:00.0: PCI INT A -> Link[LK1E] -> GSI 22 (level, low) -> 
IRQ 22
bcma-pci-bridge 0000:06:00.0: setting latency timer to 64
bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
bcma: Found rev 6 PMU (capabilities 0x108C2606)
bcma: SPROM offset 0x830
bcma: Found SPROM Revision 8
bcma: Bus registered
brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 22
brcmsmac: Found chip type AI (0x1381a8d8)
brcmsmac: Applying 43224B0+ WARs
bcma: Switched to core: 0x812
brcms_module_init: register returned 0

I see no difference in the core revisions, etc. to explain why mine should work, 
and yours fail.

Arend: Any particular place we should look?

Larry
Hi, Larry

I am surprised that we end up on sprom_read_pci(). That suggests that
MacBook Air has an external sprom. Can you tell me what the function
ai_is_sprom_available() returns on your system?

Gr. AvS

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-12 15:39:17

On 01/12/2012 01:08 AM, Rafał Miłecki wrote:
2012/1/12 Linus Torvalds[off-list ref]:
quoted
On Wed, Jan 11, 2012 at 9:20 PM, Linus Torvalds
[off-list ref]  wrote:
quoted
Maybe your BIOS firmware sets things up, and the Apple Macbook Air
doesn't? And the driver used to initialize things sufficiently, and
the changes have broken that?
The code in v3.2 also used to support srom rev<  4, the new code
doesn't seem to do that.
After hacking bcma to read SPROM from the correct location, what did
you get in dmesg? There should be info about version of SPROM.
In the bcma version of the SPROM reading, there is no error logging other than 
the incorrect version message. In particular, there is no message when the CRC 
test fails, and the version will not be logged.

Larry

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-12 15:46:26

W dniu 12 stycznia 2012 16:39 użytkownik Larry Finger
[off-list ref] napisał:
On 01/12/2012 01:08 AM, Rafał Miłecki wrote:
quoted
2012/1/12 Linus Torvalds[off-list ref]:
quoted
On Wed, Jan 11, 2012 at 9:20 PM, Linus Torvalds
[off-list ref]  wrote:
quoted

Maybe your BIOS firmware sets things up, and the Apple Macbook Air
doesn't? And the driver used to initialize things sufficiently, and
the changes have broken that?

The code in v3.2 also used to support srom rev<  4, the new code
doesn't seem to do that.

After hacking bcma to read SPROM from the correct location, what did
you get in dmesg? There should be info about version of SPROM.

In the bcma version of the SPROM reading, there is no error logging other
than the incorrect version message. In particular, there is no message when
the CRC test fails, and the version will not be logged.
Oops, you're right. I forgot bcma doesn't have that (on the difference to ssb).

-- 
Rafał

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 15:51:31

2012/1/12 Arend van Spriel [off-list ref]:
Ok. I know a hint when I see one ;-)
Yeah. I'm real subtle.

          Linus

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-12 16:22:53

On 01/12/2012 07:13 AM, Arend van Spriel wrote:
Hi, Larry

I am surprised that we end up on sprom_read_pci(). That suggests that
MacBook Air has an external sprom. Can you tell me what the function
ai_is_sprom_available() returns on your system?
It returns false. My card uses OTP.

Larry

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-12 17:18:33

On 01/12/2012 07:13 AM, Arend van Spriel wrote:
I am surprised that we end up on sprom_read_pci(). That suggests that
MacBook Air has an external sprom. Can you tell me what the function
ai_is_sprom_available() returns on your system?
For completeness, sromctrl is 0x12, thus bit 1 (SRC_PRESENT) is not set, and my 
device has an OTP, not an SPROM.

I do not see anything wrong with commit 888153b3db3f, but I realize that my card 
really does not test any of those changes.

Larry

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 17:31:33

On Thu, Jan 12, 2012 at 9:18 AM, Larry Finger [off-list ref] wrote:
For completeness, sromctrl is 0x12, thus bit 1 (SRC_PRESENT) is not set, and
my device has an OTP, not an SPROM.
So this is again something that apple is *famous* for.

They try to control their hardware very tightly, and OS X will (for
example) not use non-apple wireless cards as "Airport" cards, and will
do things like dropping features ("Oh, you tried to save money by
buying a generic wireless minipci card instead of the apple branded
one? Well, that's fine, but now I'll make your network flaky and will
refuse to support 802.11n just to make a point.").

Never mind that the hardware is the same - they'll literally look at
the PCI subvendor ID and things like that, and if it doesn't say
"Apple", they will simply not enable all the features, or won't even
connect to it.

They've done this forever. Others do it too (I think both HP and IBM
have done the exact same thing with minipci wireless cards - back when
WiFi used to be a "premium" thing in a laptop, and vendors charged
quite a bit extra for it, gah!). But Apple does it for a *lot* of
things, presumably because they want to make it extra hard for clone
makers (or just tinkerers that would try to run OS X on a regular PC
that just happened to have the exact same hardware as a Macbook).

Seriously. I really like my Macbook Air hardware, but the moment some
non-apple supplier makes anything comparable, I'll drop it like the
crap it is. Exactly because Apple uses software to make it harder to
use. Installing Linux on that thing is "interesting" - Linux works
perfectly fine on it, but with all the special Apple firmware crap,
you have to jump through hoops.
I do not see anything wrong with commit 888153b3db3f, but I realize that my
card really does not test any of those changes.
I suspect the big change is the version check and the size of the
sprom image. Apple probably has an older version. I assume that the
subvendor ID etc comes from the srom?

                            Linus

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-12 17:44:26

On 01/12/2012 11:31 AM, Linus Torvalds wrote:
On Thu, Jan 12, 2012 at 9:18 AM, Larry Finger[off-list ref]  wrote:
quoted
For completeness, sromctrl is 0x12, thus bit 1 (SRC_PRESENT) is not set, and
my device has an OTP, not an SPROM.
So this is again something that apple is *famous* for.

They try to control their hardware very tightly, and OS X will (for
example) not use non-apple wireless cards as "Airport" cards, and will
do things like dropping features ("Oh, you tried to save money by
buying a generic wireless minipci card instead of the apple branded
one? Well, that's fine, but now I'll make your network flaky and will
refuse to support 802.11n just to make a point.").

Never mind that the hardware is the same - they'll literally look at
the PCI subvendor ID and things like that, and if it doesn't say
"Apple", they will simply not enable all the features, or won't even
connect to it.

They've done this forever. Others do it too (I think both HP and IBM
have done the exact same thing with minipci wireless cards - back when
WiFi used to be a "premium" thing in a laptop, and vendors charged
quite a bit extra for it, gah!). But Apple does it for a *lot* of
things, presumably because they want to make it extra hard for clone
makers (or just tinkerers that would try to run OS X on a regular PC
that just happened to have the exact same hardware as a Macbook).

Seriously. I really like my Macbook Air hardware, but the moment some
non-apple supplier makes anything comparable, I'll drop it like the
crap it is. Exactly because Apple uses software to make it harder to
use. Installing Linux on that thing is "interesting" - Linux works
perfectly fine on it, but with all the special Apple firmware crap,
you have to jump through hoops.
quoted
I do not see anything wrong with commit 888153b3db3f, but I realize that my
card really does not test any of those changes.
I suspect the big change is the version check and the size of the
sprom image. Apple probably has an older version. I assume that the
subvendor ID etc comes from the srom?
HP is not at all subtle. Their BIOS checks the hardware in the internal PCIe 
slot. If it is wifi and not on their whitelist, the computer will not boot. For 
my testing, Realtek sent me an extender that plugs into an Express Card slot. 
When this machine dies, I'm not sure what I'll do as I have not found a modern 
laptop with such a slot.

I too would like to blame Apple, but there is one factoid that I just noticed 
and I'm still exploring. When I run bcma/b43, the software says I have a Rev 8 
SPROM at offset 0x830, but bcma/brcmsmac says my card has no SPROM and it uses 
the OTP branch! Why, and what does it mean? Any thoughts from the Broadcom guys?

Larry

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 19:00:43

On Wed, Jan 11, 2012 at 11:13 PM, Linus Torvalds
[off-list ref] wrote:
All the BCMA changes make the revert somewhat non-trivial, could
somebody who knows the code better please try to do it for me? It
doesn't look complicated, and I can try to do it myself tomorrow if
nobody else steps up, but I'd *really* prefer the guilty parties
themselves to do it, ok?
Since I had the hardware to test, I could work on this and try to
figure out exactly what went wrong in that commit.

The problem seems to be simple: the SPROM contents *have* to be read
as aligned 16-bit words. Anything else seems to return 0xff and just
fails the transaction.

I didn't check all the combinations, of course, so who knows what the
exact details are, but it does look like the sprom has very limited
pci decode and simply refuses to touch anything but the one case it
can handle.

I'll send out a patch that seems to get things to a working state for
me. At least I have wireless connectivity again, I don't know if there
are some other problems remaining.

                      Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 19:08:45

On Thu, Jan 12, 2012 at 11:00 AM, Linus Torvalds
[off-list ref] wrote:
I'll send out a patch that seems to get things to a working state for
me. At least I have wireless connectivity again, I don't know if there
are some other problems remaining.
Ok, this is the patch that gets me going, and this is sent from the Macbook Air.

NOTE! The BCMA confusion about the sprom still exists, but doesn't
seem to matter:

 bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
 bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
 bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
 bcma: Found rev 6 PMU (capabilities 0x108C2606)
 bcma: Unsupported SPROM revision: 255
 bcma: No SPROM available
 bcma: Bus registered
  ..
 brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 17
 brcmsmac: Found chip type AI (0x1381a8d8)
 brcmsmac: Applying 43224B0+ WARs
 bcma: Switched to core: 0x812
 ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
 brcms_module_init: register returned 0

so this does seem to work, but there are clearly some issues still..

                 Linus

Re: brcm80211 breakage..

From: Arend van Spriel <hidden>
Date: 2012-01-12 19:46:47

On 01/12/2012 08:00 PM, Linus Torvalds wrote:
On Wed, Jan 11, 2012 at 11:13 PM, Linus Torvalds
[off-list ref] wrote:
quoted
All the BCMA changes make the revert somewhat non-trivial, could
somebody who knows the code better please try to do it for me? It
doesn't look complicated, and I can try to do it myself tomorrow if
nobody else steps up, but I'd *really* prefer the guilty parties
themselves to do it, ok?
Since I had the hardware to test, I could work on this and try to
figure out exactly what went wrong in that commit.
I was trying to get my hands on a card with SPROM to dig in and I still
intend to get it because Apples are no pears.
The problem seems to be simple: the SPROM contents *have* to be read
as aligned 16-bit words. Anything else seems to return 0xff and just
fails the transaction.
I was already wondering what aspect of the patch was causing the issue.
The transaction size requirement seems likely and I was not aware.
I didn't check all the combinations, of course, so who knows what the
exact details are, but it does look like the sprom has very limited
pci decode and simply refuses to touch anything but the one case it
can handle.

I'll send out a patch that seems to get things to a working state for
me. At least I have wireless connectivity again, I don't know if there
are some other problems remaining.

                      Linus
Thanks for putting the effort into this in the middle of a merge window.

Gr. AvS

Re: brcm80211 breakage..

From: Arend van Spriel <hidden>
Date: 2012-01-12 20:09:34

On 01/12/2012 08:08 PM, Linus Torvalds wrote:
On Thu, Jan 12, 2012 at 11:00 AM, Linus Torvalds
[off-list ref] wrote:
quoted
I'll send out a patch that seems to get things to a working state for
me. At least I have wireless connectivity again, I don't know if there
are some other problems remaining.
Ok, this is the patch that gets me going, and this is sent from the Macbook Air.

NOTE! The BCMA confusion about the sprom still exists, but doesn't
seem to matter:
That is because brcmsmac is not relying on the sprom logic provided by
bcma. As Rafał indicated that is duplicated code so if we are to use
bcma sprom functionality that needs to be fixed (after the merge window).
 bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
 bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
 bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
 bcma: Found rev 6 PMU (capabilities 0x108C2606)
 bcma: Unsupported SPROM revision: 255
 bcma: No SPROM available
 bcma: Bus registered
  ..
 brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 17
 brcmsmac: Found chip type AI (0x1381a8d8)
 brcmsmac: Applying 43224B0+ WARs
 bcma: Switched to core: 0x812
 ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
 brcms_module_init: register returned 0

so this does seem to work, but there are clearly some issues still..

                 Linus
That output look fine. The patch looks fine although you can use the new
do_crc_check() function in otp_read_pci as well.

Gr. AvS

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 20:27:57

2012/1/12 Arend van Spriel [off-list ref]:
That output look fine. The patch looks fine although you can use the new
do_crc_check() function in otp_read_pci as well.
I'll leave that as a separate cleanup for somebody who has the
hardware to test it. I committed the 16-bit read fix for now.

But I'm currently also trying to work out why that macbook air no
longer comes back from a suspend alive, and it looks like it may be
another problem with that brcmsmac driver. The bisection is in its
early stages yet, but it looks like it is coming in from the network
merge, and nothing else looks relevant.

Has suspend/resume been tested exhaustively with that driver?

                     Linus

Re: brcm80211 breakage..

From: Arend van Spriel <hidden>
Date: 2012-01-12 20:36:44

On 01/12/2012 09:27 PM, Linus Torvalds wrote:
2012/1/12 Arend van Spriel [off-list ref]:
quoted
That output look fine. The patch looks fine although you can use the new
do_crc_check() function in otp_read_pci as well.
I'll leave that as a separate cleanup for somebody who has the
hardware to test it. I committed the 16-bit read fix for now.
Ah. yet another hint :-p
But I'm currently also trying to work out why that macbook air no
longer comes back from a suspend alive, and it looks like it may be
another problem with that brcmsmac driver. The bisection is in its
early stages yet, but it looks like it is coming in from the network
merge, and nothing else looks relevant.

Has suspend/resume been tested exhaustively with that driver?

                     Linus
BCMA introduced suspend/resume after the BCMA changes in brcmsmac so
there may still be issues.

Gr. AvS

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 22:39:06

On Thu, Jan 12, 2012 at 12:27 PM, Linus Torvalds
[off-list ref] wrote:
But I'm currently also trying to work out why that macbook air no
longer comes back from a suspend alive, and it looks like it may be
another problem with that brcmsmac driver. The bisection is in its
early stages yet, but it looks like it is coming in from the network
merge, and nothing else looks relevant.
Ugh. This is nasty to bisect, because it goes back to the pre-3.2 days
that didn't support graphics properly on that Macbook Air either. So
I've been having to work around not just the "wireless doesn't work",
but also the "graphics doesn't work" issue.

But after lots of nasty bisection problems and a few false starts, it
definitely looks like the brcmsmac driver. I don't know exactly which
commit, but it's all in network drivers now, and the only network
driver on this machine is the brcmsmac one.

                     Linus

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-12 22:42:15

2012/1/12 Linus Torvalds [off-list ref]:
On Thu, Jan 12, 2012 at 12:27 PM, Linus Torvalds
[off-list ref] wrote:
quoted
But I'm currently also trying to work out why that macbook air no
longer comes back from a suspend alive, and it looks like it may be
another problem with that brcmsmac driver. The bisection is in its
early stages yet, but it looks like it is coming in from the network
merge, and nothing else looks relevant.
Ugh. This is nasty to bisect, because it goes back to the pre-3.2 days
that didn't support graphics properly on that Macbook Air either. So
I've been having to work around not just the "wireless doesn't work",
but also the "graphics doesn't work" issue.

But after lots of nasty bisection problems and a few false starts, it
definitely looks like the brcmsmac driver. I don't know exactly which
commit, but it's all in network drivers now, and the only network
driver on this machine is the brcmsmac one.
Make sure you have

commit 775ab52142b02237a54184238e922251c59a2b5c
Author: Rafał Miłecki [off-list ref]
Date:   Fri Dec 9 22:16:07 2011 +0100

    bcma: support for suspend and resume

applied. I believe this patch already has hit your tree, but maybe
because of bisecting you are at some old commit without this patch.

-- 
Rafał

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-12 22:45:39

2012/1/12 Rafał Miłecki [off-list ref]:
Make sure you have

commit 775ab52142b02237a54184238e922251c59a2b5c
Author: Rafał Miłecki [off-list ref]
Date:   Fri Dec 9 22:16:07 2011 +0100

   bcma: support for suspend and resume

applied. I believe this patch already has hit your tree, but maybe
because of bisecting you are at some old commit without this patch.
That one is *not* sufficient. Current -git doesn't suspend/resume.

                    Linus

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-12 23:04:05

W dniu 12 stycznia 2012 23:45 użytkownik Linus Torvalds
[off-list ref] napisał:
2012/1/12 Rafał Miłecki [off-list ref]:
quoted
Make sure you have

commit 775ab52142b02237a54184238e922251c59a2b5c
Author: Rafał Miłecki [off-list ref]
Date:   Fri Dec 9 22:16:07 2011 +0100

   bcma: support for suspend and resume

applied. I believe this patch already has hit your tree, but maybe
because of bisecting you are at some old commit without this patch.
That one is *not* sufficient. Current -git doesn't suspend/resume.
Forgive me if it was already said, but I didn't see it.

Have you tried booting with bcma & brcmsmac blacklisted? Does
suspend&resume work then?

Have you tried blacklisting just brcmsmac (letting bcma load)? Does
s&r work then?

-- 
Rafał

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 00:13:51

2012/1/12 Rafał Miłecki [off-list ref]:
Have you tried booting with bcma & brcmsmac blacklisted? Does
suspend&resume work then?

Have you tried blacklisting just brcmsmac (letting bcma load)? Does
s&r work then?
If I unload brcmsmac, I can suspend/resume. Once. It can't suspend a
second time.

I did see some message flash about "does not have a release()
function", but don't know if that was bcma or something else.

I do notice that both the bcma and suspend/resume seems quite broken.
It's using the legacy suspend/resume stuff and does the PCI resume on
its own (with no matching suspend!). That *really* isn't a good idea
these days.

The way to do it these days is to have a struct dev_pm_ops embedded in
the struct pci_driver (".driver.pm"), and let the PCI layer handle all
the generic PCI suspend/resume  details - you only handle the
device-specific ones (ie in this case suspending/resuming the bcma bus
itself).

The generic PCI layer will do all the PCI stuff correctly, including
all the nasty races with shared interrupts etc. In a way that no
driver ever got it right. And it simplifies the driver too.

And the brcms driver does suspend/resume *completely* wrong, and seems
to actually re-suspend and re-resume the PCI device.

I'm surprised it has ever worked for anybody. It certainly doesn't work for me.

                      Linus

Re: brcm80211 breakage..

From: Larry Finger <hidden>
Date: 2012-01-13 01:53:20

On 01/12/2012 01:00 PM, Linus Torvalds wrote:
On Wed, Jan 11, 2012 at 11:13 PM, Linus Torvalds
[off-list ref]  wrote:
quoted
All the BCMA changes make the revert somewhat non-trivial, could
somebody who knows the code better please try to do it for me? It
doesn't look complicated, and I can try to do it myself tomorrow if
nobody else steps up, but I'd *really* prefer the guilty parties
themselves to do it, ok?
Since I had the hardware to test, I could work on this and try to
figure out exactly what went wrong in that commit.

The problem seems to be simple: the SPROM contents *have* to be read
as aligned 16-bit words. Anything else seems to return 0xff and just
fails the transaction.

I didn't check all the combinations, of course, so who knows what the
exact details are, but it does look like the sprom has very limited
pci decode and simply refuses to touch anything but the one case it
can handle.

I'll send out a patch that seems to get things to a working state for
me. At least I have wireless connectivity again, I don't know if there
are some other problems remaining.
As my device has both SPROM and OTP, I hacked on it to get it to use the SPROM 
rather than the default OTP.

I learned that reading by byte on my HP laptop fails the same was as did the 
MacBook - it is not an Apple artifact.

Note, the patch that worked for me is as follows:

Index: linux-2.6/drivers/net/wireless/brcm80211/brcmsmac/srom.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/brcm80211/brcmsmac/srom.c
+++ linux-2.6/drivers/net/wireless/brcm80211/brcmsmac/srom.c
@@ -786,9 +786,12 @@ sprom_read_pci(struct si_pub *sih, u16 *
  		sprom_offset = CHIPCREGOFFS(sromotp);
  	}

-	/* read the sprom in bytes */
-	for (i = 0; i < nbytes; i++)
-		bbuf[i] = bcma_read8(core, sprom_offset+i);
+	/* read the sprom - this operation must be done by words */
+	for (i = 0; i < nbytes; i += 2) {
+		u16 data = bcma_read16(core, sprom_offset+i);
+		bbuf[i] = data & 0xff;
+		bbuf[i+1] = (data >> 8) & 0xff;
+	}

  	if (buf[0] == 0xffff)
  		/*

Larry

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 02:30:41

2012/1/12 Linus Torvalds [off-list ref]:
I'm surprised it has ever worked for anybody. It certainly doesn't work for me.
So I can suspend the bcma driver on its own until the cows come home.

But after I have suspended the bcma driver even once, just doing a
"modprobe brcmsmac" will hang the machine hard. Dunno where, but this
is probably the same thing as "hangs on resume".

                             Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 05:34:43

2012/1/12 Linus Torvalds [off-list ref]:
2012/1/12 Linus Torvalds [off-list ref]:
quoted
I'm surprised it has ever worked for anybody. It certainly doesn't work for me.
So I can suspend the bcma driver on its own until the cows come home.

But after I have suspended the bcma driver even once, just doing a
"modprobe brcmsmac" will hang the machine hard. Dunno where, but this
is probably the same thing as "hangs on resume".
Guys, has suspend/resume with the bcma interface been tested AT ALL?

The suspend/resume fields of "struct bcma_driver" are COMPLETELY
UNUSED. The only place in the kernel that uses them is the brcmsmac
driver that does this write-only assignment:

        .suspend  = brcms_suspend,
        .resume   = brcms_resume,

nothing else uses them. NOTHING. I tested by just removing the fields
and compiling the bcma subsystem, just in case there was something
really subtle that I was missing and was hidden through some magic
hidden approach. But no.

Seriously - how was something that isn't even connected ever supposed
to work at all? And why was the BCMA conversion of that driver sent
up-stream if something as fundamental as suspend/resume had never been
done, and didn't actually work?

What am I missing now? How the hell can this ever have worked for
ANYBODY? What kind of f*&*ing sick joke is this all?

                      Linus

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-13 06:50:43

W dniu 13 stycznia 2012 06:34 użytkownik Linus Torvalds
[off-list ref] napisał:
2012/1/12 Linus Torvalds [off-list ref]:
quoted
2012/1/12 Linus Torvalds [off-list ref]:
quoted
I'm surprised it has ever worked for anybody. It certainly doesn't work for me.
So I can suspend the bcma driver on its own until the cows come home.

But after I have suspended the bcma driver even once, just doing a
"modprobe brcmsmac" will hang the machine hard. Dunno where, but this
is probably the same thing as "hangs on resume".
Guys, has suspend/resume with the bcma interface been tested AT ALL?

The suspend/resume fields of "struct bcma_driver" are COMPLETELY
UNUSED. The only place in the kernel that uses them is the brcmsmac
driver that does this write-only assignment:

       .suspend  = brcms_suspend,
       .resume   = brcms_resume,

nothing else uses them. NOTHING. I tested by just removing the fields
and compiling the bcma subsystem, just in case there was something
really subtle that I was missing and was hidden through some magic
hidden approach. But no.

Seriously - how was something that isn't even connected ever supposed
to work at all? And why was the BCMA conversion of that driver sent
up-stream if something as fundamental as suspend/resume had never been
done, and didn't actually work?

What am I missing now? How the hell can this ever have worked for
ANYBODY? What kind of f*&*ing sick joke is this all?
The suspend&resume wasn't implemented for some time because my PC
doesn't s&r. And I don't have access to notebook with mini PCIe slot.

I've implemented support for s&r in bcma when I got to open my Sony
VAIO to replace A/C power slot. It was one time I was able to change
WiFi card in my notebook which has really-ugly-hidden mini PCIe slot.

S&r was working fine for me with bcma&b43 after writing that patch!
That includes suspending and resuming multiple times. And tests were
done with the same card you're using.

The lock up on (resume|loading brcmsmac) means bus wasn't initialized
correctly after resume. It does not have to be brcmsmac bug. We're
accessing some registers before they're ready.

Linus: can you do one trivial test for me? Please simply try unloading
bcma before suspending. Then resume and load bcma and brcmsmac. Does
it still lockup your machine?

-- 
Rafał

Re: brcm80211 breakage..

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-13 06:57:26

W dniu 13 stycznia 2012 07:50 użytkownik Rafał Miłecki
[off-list ref] napisał:
W dniu 13 stycznia 2012 06:34 użytkownik Linus Torvalds
[off-list ref] napisał:
quoted
2012/1/12 Linus Torvalds [off-list ref]:
quoted
2012/1/12 Linus Torvalds [off-list ref]:
quoted
I'm surprised it has ever worked for anybody. It certainly doesn't work for me.
So I can suspend the bcma driver on its own until the cows come home.

But after I have suspended the bcma driver even once, just doing a
"modprobe brcmsmac" will hang the machine hard. Dunno where, but this
is probably the same thing as "hangs on resume".
Guys, has suspend/resume with the bcma interface been tested AT ALL?

The suspend/resume fields of "struct bcma_driver" are COMPLETELY
UNUSED. The only place in the kernel that uses them is the brcmsmac
driver that does this write-only assignment:

       .suspend  = brcms_suspend,
       .resume   = brcms_resume,

nothing else uses them. NOTHING. I tested by just removing the fields
and compiling the bcma subsystem, just in case there was something
really subtle that I was missing and was hidden through some magic
hidden approach. But no.

Seriously - how was something that isn't even connected ever supposed
to work at all? And why was the BCMA conversion of that driver sent
up-stream if something as fundamental as suspend/resume had never been
done, and didn't actually work?

What am I missing now? How the hell can this ever have worked for
ANYBODY? What kind of f*&*ing sick joke is this all?
The suspend&resume wasn't implemented for some time because my PC
doesn't s&r. And I don't have access to notebook with mini PCIe slot.

I've implemented support for s&r in bcma when I got to open my Sony
VAIO to replace A/C power slot. It was one time I was able to change
WiFi card in my notebook which has really-ugly-hidden mini PCIe slot.

S&r was working fine for me with bcma&b43 after writing that patch!
That includes suspending and resuming multiple times. And tests were
done with the same card you're using.

The lock up on (resume|loading brcmsmac) means bus wasn't initialized
correctly after resume. It does not have to be brcmsmac bug. We're
accessing some registers before they're ready.

Linus: can you do one trivial test for me? Please simply try unloading
bcma before suspending. Then resume and load bcma and brcmsmac. Does
it still lockup your machine?
Actually.. I've re-read your mail and I got it wrong at first. I
though you can suspend&resume once, but then loading brcmsmac causes
lock up. I interpreted that as broken initialization after resume.

Now I see you *can't suspend for the second time*. I don't get it :/
I've no idea what wrong we may be doing in that trivial
bcma_host_pci_suspend and bcma_host_pci_resume stopping you from
suspending for the second time.

I'll take a look at that new pm ops you told me about.

-- 
Rafał

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 07:13:44

2012/1/12 Rafał Miłecki [off-list ref]:
Linus: can you do one trivial test for me? Please simply try unloading
bcma before suspending. Then resume and load bcma and brcmsmac. Does
it still lockup your machine?
That works, but is not interesting. It just reloads everything.

The thing is, your hardware clearly never powers anything down,
because the bcma suspend/resume functions aren't hooked up to
anything, so the brcmsmac suspend/resume never gets called at all.

And it sounds like it works for you for the simple reason that your
hardware never loses power - so you don't need to do anything for
suspend/resume.

But there is absolutely zero question about it - the code does not
work. Never has. It's just that your hardware doesn't *need* any code
at all, and as far as you are concerned, suspend/resume doesn't even
really happen (the PCI layer handles the regular "set to D3 and back
to D0", so the fact that the driver doesn't do anything never shows
up)

                       Linus

Re: brcm80211 breakage..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 07:17:31

2012/1/12 Rafał Miłecki [off-list ref]:
Actually.. I've re-read your mail and I got it wrong at first. I
though you can suspend&resume once, but then loading brcmsmac causes
lock up. I interpreted that as broken initialization after resume.
That is correct.

And I cannot suspend/resume AT ALL if I actually keep brcmsmac loaded
- then it will lock up at resume - exactly the same way it locks up at
loading brcmsmac time if I had unloaded it.
Now I see you *can't suspend for the second time*. I don't get it :/
No, that was an unrelated bug, I'm chasing that one down too and it
seems to be in the machine check driver.

                           Linus

[PATCH] bcma: s&r: NULL mapped core

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-13 07:39:42

---
 drivers/bcma/host_pci.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 443b83a..726e43d 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -237,11 +237,16 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
 #ifdef CONFIG_PM
 static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
 {
+	struct bcma_bus *bus = pci_get_drvdata(dev);
+
 	/* Host specific */
 	pci_save_state(dev);
 	pci_disable_device(dev);
 	pci_set_power_state(dev, pci_choose_state(dev, state));
 
+	/* Bus specific */
+	bus->mapped_core = NULL;
+
 	return 0;
 }
 
-- 
1.7.7

Re: [PATCH] bcma: s&r: NULL mapped core

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 07:53:24

Yup. This definitely helps.

I haven't done a lot of suspend/resume cycles, and I have my own
cleanups in my tree, but with this, I finally get a successful resume.

I'll send out a series of cleanups and fixes that will include this.
Can you test whether my series works for you too?

               Linus

On Thu, Jan 12, 2012 at 11:41 PM, Rafał Miłecki [off-list ref] wrote:
quoted hunk
---
 drivers/bcma/host_pci.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 443b83a..726e43d 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -237,11 +237,16 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
 #ifdef CONFIG_PM
 static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
 {
+       struct bcma_bus *bus = pci_get_drvdata(dev);
+
       /* Host specific */
       pci_save_state(dev);
       pci_disable_device(dev);
       pci_set_power_state(dev, pci_choose_state(dev, state));

+       /* Bus specific */
+       bus->mapped_core = NULL;
+
       return 0;
 }

--
1.7.7

[0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 07:58:50

So here are five cleanup/fix patches that try to make the bcma and 
brcmsmac suspend/resume situation look better.

The changes do:

 - use the modern PCI suspend/resume model, and let the PCI layer handle 
   the actual standard power state changes.

 - clean up the BCMA suspend/resume infrastructure a bit in general.

 - actually hook the BCMA suspend/resume callbacks up to the 
   suspend/resume event - it use to be that a bcma driver could set its 
   suspend/resume routines, but nothing would ever call them.

 - and Rafał's bcma window invalidation

Comments? This gets suspend/resume working for me at least once. I'm not 
going to try to hang my machine again until after I have gotten this sent 
out.

Does this work for others?

               Linus

[PATCH 1/5] bcma: convert suspend/resume to pm_ops

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 07:59:34

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 22:47:01 -0800

.. and avoid doing th eunnecessary PCI operations - the PCI layer will do them for us.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/bcma/host_pci.c |   38 +++++++++++++-------------------------
 1 files changed, 13 insertions(+), 25 deletions(-)
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 443b83a2fd7a..3aee641c9b7b 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -235,38 +235,27 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
 }
 
 #ifdef CONFIG_PM
-static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
+static int bcma_suspend(struct device *dev)
 {
-	/* Host specific */
-	pci_save_state(dev);
-	pci_disable_device(dev);
-	pci_set_power_state(dev, pci_choose_state(dev, state));
-
 	return 0;
 }
 
-static int bcma_host_pci_resume(struct pci_dev *dev)
+static int bcma_resume(struct device *dev)
 {
-	struct bcma_bus *bus = pci_get_drvdata(dev);
-	int err;
-
-	/* Host specific */
-	pci_set_power_state(dev, 0);
-	err = pci_enable_device(dev);
-	if (err)
-		return err;
-	pci_restore_state(dev);
+	struct pci_dev *pdev = to_pci_dev(dev);
+	struct bcma_bus *bus = pci_get_drvdata(pdev);
 
-	/* Bus specific */
-	err = bcma_bus_resume(bus);
-	if (err)
-		return err;
+	return bcma_bus_resume(bus);
 
-	return 0;
 }
+
+static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_suspend, bcma_resume);
+#define BCMA_PM_OPS     (&bcma_pm_ops)
+
 #else /* CONFIG_PM */
-# define bcma_host_pci_suspend	NULL
-# define bcma_host_pci_resume	NULL
+
+#define BCMA_PM_OPS     NULL
+
 #endif /* CONFIG_PM */
 
 static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
@@ -284,8 +273,7 @@ static struct pci_driver bcma_pci_bridge_driver = {
 	.id_table = bcma_pci_bridge_tbl,
 	.probe = bcma_host_pci_probe,
 	.remove = bcma_host_pci_remove,
-	.suspend = bcma_host_pci_suspend,
-	.resume = bcma_host_pci_resume,
+	.driver.pm = BCMA_PM_OPS,
 };
 
 int __init bcma_host_pci_init(void)
-- 
1.7.8.rc2.3.g0911

[PATCH 2/5] bcma: add stub for bcma_bus suspend()

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 08:00:04

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 22:50:31 -0800

.. and connect it up with the pci host bcma driver.

Now, the next step is to connect those bcma bus-level suspend/resume
functions to the actual bcma device suspend resume functions.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/bcma/bcma_private.h |    1 +
 drivers/bcma/host_pci.c     |    5 ++++-
 drivers/bcma/main.c         |    5 +++++
 3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index fda56bde36b8..0def898a1d15 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -19,6 +19,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
 				   struct bcma_device *core_cc,
 				   struct bcma_device *core_mips);
 #ifdef CONFIG_PM
+int bcma_bus_suspend(struct bcma_bus *bus);
 int bcma_bus_resume(struct bcma_bus *bus);
 #endif
 
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 3aee641c9b7b..33ec3054248e 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -237,7 +237,10 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
 #ifdef CONFIG_PM
 static int bcma_suspend(struct device *dev)
 {
-	return 0;
+	struct pci_dev *pdev = to_pci_dev(dev);
+	struct bcma_bus *bus = pci_get_drvdata(pdev);
+
+	return bcma_bus_suspend(bus);
 }
 
 static int bcma_resume(struct device *dev)
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 10f92b371e58..b711d9d634a7 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -241,6 +241,11 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
 }
 
 #ifdef CONFIG_PM
+int bcma_bus_suspend(struct bcma_bus *bus)
+{
+	return 0;
+}
+
 int bcma_bus_resume(struct bcma_bus *bus)
 {
 	struct bcma_device *core;
-- 
1.7.8.rc2.3.g0911

[PATCH 3/5] bcma: connect the bcma bus suspend/resume to the bcma driver suspend/resume

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 08:00:47

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 23:15:41 -0800

Now the low-level driver actually gets informed that it is getting suspended and resumed.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/bcma/main.c                                |   19 +++++++++++++++++++
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |    2 +-
 include/linux/bcma/bcma.h                          |    2 +-
 3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index b711d9d634a7..febbc0a1222a 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -243,6 +243,16 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
 #ifdef CONFIG_PM
 int bcma_bus_suspend(struct bcma_bus *bus)
 {
+	struct bcma_device *core;
+
+	list_for_each_entry(core, &bus->cores, list) {
+		struct device_driver *drv = core->dev.driver;
+		if (drv) {
+			struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
+			if (adrv->suspend)
+				adrv->suspend(core);
+		}
+	}
 	return 0;
 }
 
@@ -257,6 +267,15 @@ int bcma_bus_resume(struct bcma_bus *bus)
 		bcma_core_chipcommon_init(&bus->drv_cc);
 	}
 
+	list_for_each_entry(core, &bus->cores, list) {
+		struct device_driver *drv = core->dev.driver;
+		if (drv) {
+			struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
+			if (adrv->resume)
+				adrv->resume(core);
+		}
+	}
+
 	return 0;
 }
 #endif
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index d106576ce338..213130afdaf7 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1135,7 +1135,7 @@ static int brcms_pci_suspend(struct pci_dev *pdev)
 	return pci_set_power_state(pdev, PCI_D3hot);
 }
 
-static int brcms_suspend(struct bcma_device *pdev, pm_message_t state)
+static int brcms_suspend(struct bcma_device *pdev)
 {
 	struct brcms_info *wl;
 	struct ieee80211_hw *hw;
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index f4b8346b1a33..83c209f39493 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -162,7 +162,7 @@ struct bcma_driver {
 
 	int (*probe)(struct bcma_device *dev);
 	void (*remove)(struct bcma_device *dev);
-	int (*suspend)(struct bcma_device *dev, pm_message_t state);
+	int (*suspend)(struct bcma_device *dev);
 	int (*resume)(struct bcma_device *dev);
 	void (*shutdown)(struct bcma_device *dev);
 
-- 
1.7.8.rc2.3.g0911

[PATCH 4/5] brcmsmac: remove PCI suspend/resume from bcma driver

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 08:01:24

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 23:36:52 -0800

The brcmsmac driver isn't a PCI driver any more, it's a bcma one.  The
PCI device has been resumed by the PCI driver (the generic PCI layer,
really), we should be resuming just our own driver state.

Also add pr_debug() calls to show that we now actually get the
suspend/resume events.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |   38 ++------------------
 1 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 213130afdaf7..448ab9c4eb47 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1128,13 +1128,6 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
 	return 0;
 }
 
-static int brcms_pci_suspend(struct pci_dev *pdev)
-{
-	pci_save_state(pdev);
-	pci_disable_device(pdev);
-	return pci_set_power_state(pdev, PCI_D3hot);
-}
-
 static int brcms_suspend(struct bcma_device *pdev)
 {
 	struct brcms_info *wl;
@@ -1153,40 +1146,15 @@ static int brcms_suspend(struct bcma_device *pdev)
 	wl->pub->hw_up = false;
 	spin_unlock_bh(&wl->lock);
 
-	/* temporarily do suspend ourselves */
-	return brcms_pci_suspend(pdev->bus->host_pci);
-}
-
-static int brcms_pci_resume(struct pci_dev *pdev)
-{
-	int err = 0;
-	uint val;
-
-	err = pci_set_power_state(pdev, PCI_D0);
-	if (err)
-		return err;
-
-	pci_restore_state(pdev);
-
-	err = pci_enable_device(pdev);
-	if (err)
-		return err;
-
-	pci_set_master(pdev);
-
-	pci_read_config_dword(pdev, 0x40, &val);
-	if ((val & 0x0000ff00) != 0)
-		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+	pr_debug("brcms_suspend ok\n");
 
 	return 0;
 }
 
 static int brcms_resume(struct bcma_device *pdev)
 {
-	/*
-	*  just do pci resume for now until bcma supports it.
-	*/
-	return brcms_pci_resume(pdev->bus->host_pci);
+	pr_debug("brcms_resume ok\n");
+	return 0;
 }
 
 static struct bcma_driver brcms_bcma_driver = {
-- 
1.7.8.rc2.3.g0911

[PATCH 5/5] bcma: invalidate the mapped window over suspend/resume

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 08:02:18

From: Rafał Miłecki <zajec5@gmail.com>
Date: Thu, 12 Jan 2012 23:51:30 -0800

This clears the current mapped window when suspending, so that the
resumed state will re-map them as required.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/bcma/main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index febbc0a1222a..d185039690bc 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -253,6 +253,8 @@ int bcma_bus_suspend(struct bcma_bus *bus)
 				adrv->suspend(core);
 		}
 	}
+
+	bus->mapped_core = NULL;
 	return 0;
 }
 
-- 
1.7.8.rc2.3.g0911

Re: [PATCH 1/5] bcma: convert suspend/resume to pm_ops

From: Arend van Spriel <hidden>
Date: 2012-01-13 09:58:51

On 01/13/2012 09:00 AM, Linus Torvalds wrote:
quoted hunk
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 22:47:01 -0800

.. and avoid doing th eunnecessary PCI operations - the PCI layer will do them for us.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/bcma/host_pci.c |   38 +++++++++++++-------------------------
 1 files changed, 13 insertions(+), 25 deletions(-)
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 443b83a2fd7a..3aee641c9b7b 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -235,38 +235,27 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
 }
 
 #ifdef CONFIG_PM
-static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
+static int bcma_suspend(struct device *dev)
All functions in host_pci.c start with bcma_host_pci_ prefix. Can we
stick to that convention?
 {
-	/* Host specific */
-	pci_save_state(dev);
-	pci_disable_device(dev);
-	pci_set_power_state(dev, pci_choose_state(dev, state));
-
 	return 0;
 }
 
-static int bcma_host_pci_resume(struct pci_dev *dev)
+static int bcma_resume(struct device *dev)
Same here. It does not refer to the type of the device parameter.

Gr. AvS

Re: [PATCH 4/5] brcmsmac: remove PCI suspend/resume from bcma driver

From: Arend van Spriel <hidden>
Date: 2012-01-13 09:59:17

On 01/13/2012 09:01 AM, Linus Torvalds wrote:
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 23:36:52 -0800

The brcmsmac driver isn't a PCI driver any more, it's a bcma one.  The
PCI device has been resumed by the PCI driver (the generic PCI layer,
really), we should be resuming just our own driver state.

Also add pr_debug() calls to show that we now actually get the
suspend/resume events.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I made similar change as well last night, but did not get to test it. I
will test this series instead.

Gr. AvS

Re: [PATCH 1/5] bcma: convert suspend/resume to pm_ops

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-13 10:01:17

W dniu 13 stycznia 2012 10:58 użytkownik Arend van Spriel
[off-list ref] napisał:
On 01/13/2012 09:00 AM, Linus Torvalds wrote:
quoted
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 12 Jan 2012 22:47:01 -0800

.. and avoid doing th eunnecessary PCI operations - the PCI layer will do them for us.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/bcma/host_pci.c |   38 +++++++++++++-------------------------
 1 files changed, 13 insertions(+), 25 deletions(-)
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index 443b83a2fd7a..3aee641c9b7b 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -235,38 +235,27 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
 }

 #ifdef CONFIG_PM
-static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
+static int bcma_suspend(struct device *dev)
All functions in host_pci.c start with bcma_host_pci_ prefix. Can we
stick to that convention?
/me agrees
Would be nice

-- 
Rafał

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-13 10:03:20

W dniu 13 stycznia 2012 08:59 użytkownik Linus Torvalds
[off-list ref] napisał:
So here are five cleanup/fix patches that try to make the bcma and
brcmsmac suspend/resume situation look better.

The changes do:

 - use the modern PCI suspend/resume model, and let the PCI layer handle
  the actual standard power state changes.

 - clean up the BCMA suspend/resume infrastructure a bit in general.

 - actually hook the BCMA suspend/resume callbacks up to the
  suspend/resume event - it use to be that a bcma driver could set its
  suspend/resume routines, but nothing would ever call them.

 - and Rafał's bcma window invalidation

Comments? This gets suspend/resume working for me at least once. I'm not
going to try to hang my machine again until after I have gotten this sent
out.

Does this work for others?
I have Asus netbook with BCM4313 since a week, so I'll able to test
this. Just give me a day when I'm back home.

Could we rearrange order of patches to make
bcma: invalidate the mapped window over suspend/resume
this first one and add stable as CC? What do you think about this?

-- 
Rafał

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Arend van Spriel <hidden>
Date: 2012-01-13 11:07:01

On 01/13/2012 08:59 AM, Linus Torvalds wrote:
So here are five cleanup/fix patches that try to make the bcma and 
brcmsmac suspend/resume situation look better.

The changes do:

 - use the modern PCI suspend/resume model, and let the PCI layer handle 
   the actual standard power state changes.

 - clean up the BCMA suspend/resume infrastructure a bit in general.

 - actually hook the BCMA suspend/resume callbacks up to the 
   suspend/resume event - it use to be that a bcma driver could set its 
   suspend/resume routines, but nothing would ever call them.

 - and Rafał's bcma window invalidation

Comments? This gets suspend/resume working for me at least once. I'm not 
going to try to hang my machine again until after I have gotten this sent 
out.

Does this work for others?

               Linus
I have a Dell Latitude E6410 over here. I applied the patches to

commit 099469502f62fbe0d7e4f0b83a2f22538367f734
Merge: 7c17d86 35f1526
Author: Linus Torvalds [off-list ref]
Date:   Thu Jan 12 20:42:54 2012 -0800

    Merge branch 'akpm' (aka "Andrew's patch-bomb, take two")

Upon suspend my laptop hangs (see trace below pulled from serial
console). I do not see the pr_debug in the suspend function (compiled
with -DDEBUG). Unfortunately the same happens when I don't insert bcma
and brcmsmac. I attached the kernel configuration.

Normally, the power button led will flash in suspend mode, but it stays
active and I have to force a powerdown (holding the power button).

So for now I can't say the patches are good or bad for that matter.

Gr. AvS

[  816.878395] bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800,
rev 0x22, class 0x0)
[  816.886898] bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812,
rev 0x17, class 0x0)
[  816.895559] bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev
0x0F, class 0x0)
[  816.937118] bcma: Bus registered
[  825.953621] cfg80211: Calling CRDA to update world regulatory domain
[  854.763733] brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 17
[  854.937773] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[  854.938929] brcms_module_init: register returned 0
[  854.939332] cfg80211: Calling CRDA for country: US
[  854.942730] cfg80211: Regulatory domain changed to country: US
[  856.045618] udev[473]: renamed network interface wlan0 to wlan2
[  856.072472] ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled:
false (implement)
[  856.092191] ieee80211 phy0: brcms_ops_config: change power-save mode:
false (implement)
[  856.103216] ADDRCONF(NETDEV_UP): wlan2: link is not ready
[  856.943778] cfg80211: Found new beacon on frequency: 5240 MHz (Ch 48)
on phy0
[  858.487656] cfg80211: Found new beacon on frequency: 5745 MHz (Ch
149) on phy0
[  858.569901] cfg80211: Found new beacon on frequency: 5765 MHz (Ch
153) on phy0
[  872.794509] wlan2: authenticate with c0:c1:c0:04:b8:2c (try 1)
[  872.802028] wlan2: authenticated
[  872.805298] wlan2: associate with c0:c1:c0:04:b8:2c (try 1)
[  872.814451] wlan2: RX AssocResp from c0:c1:c0:04:b8:2c (capab=0x411
status=0 aid=2)
[  872.822164] wlan2: associated
[  872.825143] wlan2: moving STA c0:c1:c0:04:b8:2c to state 1
[  872.830643] wlan2: moving STA c0:c1:c0:04:b8:2c to state 2
[  872.836126] wlan2: moving STA c0:c1:c0:04:b8:2c to state 3
[  872.842363] ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled:
true (implement)
[  872.850202] ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed:
associated
[  872.857249] ieee80211 phy0: changing basic rates failed: -22
[  872.862902] ieee80211 phy0: brcms_ops_bss_info_changed: arp
filtering: enabled true, count 0 (implement)
[  872.872612] ADDRCONF(NETDEV_CHANGE): wlan2: link becomes ready
[  872.873311] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not
AMPDU
[  872.885340] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not
AMPDU
[  876.352453] ieee80211 phy0: brcms_ops_bss_info_changed: arp
filtering: enabled true, count 1 (implement)
[  883.711301] wlan2: no IPv6 routers present
[  979.497669] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro,commit=0
[  979.508400] EXT4-fs (sda7): re-mounted. Opts: commit=0
[  980.899784] ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled:
false (implement)
[  980.907761] ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed:
disassociated
[  980.915061] ieee80211 phy0: brcms_ops_bss_info_changed: arp
filtering: enabled false, count 1 (implement)
[  980.924656] wlan2: deauthenticating from c0:c1:c0:04:b8:2c by local
choice (reason=3)
[  980.932675] wlan2: moving STA c0:c1:c0:04:b8:2c to state 2
[  980.938171] wlan2: moving STA c0:c1:c0:04:b8:2c to state 1
[  980.943692] wlan2: moving STA c0:c1:c0:04:b8:2c to state 0
[  980.949462] cfg80211: All devices are disconnected, going to restore
regulatory settings
[  980.957590] cfg80211: Restoring regulatory settings
[  980.962491] cfg80211: Calling CRDA to update world regulatory domain
[  981.567922] cfg80211: World regulatory domain updated:
[  982.312893] PM: Syncing filesystems ... done.
[  982.356261] PM: Preparing system for mem sleep
[  982.371219] Freezing user space processes ... (elapsed 0.01 seconds)
done.
[  982.390543] Freezing remaining freezable tasks ... (elapsed 0.01
seconds) done.
[  982.410514] PM: Entering mem sleep
[  982.414712] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  982.420182] sd 0:0:0:0: [sda] Stopping disk

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 16:15:42

2012/1/13 Rafał Miłecki [off-list ref]:
I have Asus netbook with BCM4313 since a week, so I'll able to test
this. Just give me a day when I'm back home.

Could we rearrange order of patches to make
bcma: invalidate the mapped window over suspend/resume
this first one and add stable as CC? What do you think about this?
I don't think it is relevant for stable - partly because in stable the
bcma suspend/resume isn't wired up anyway, but mostly because if that
patch really wants to make it into stable, it really is a different
patch than the one I munged it into. The stable bcma doesn't have
bcma_bus_suspend() at all, so it goes into that pci-specific one like
your original email had it, where it's a complete hack.

Does it fix anything in stable?

                     Linus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-13 16:23:56

2012/1/13 Arend van Spriel [off-list ref]:
I have a Dell Latitude E6410 over here. I applied the patches to

commit 099469502f62fbe0d7e4f0b83a2f22538367f734
Merge: 7c17d86 35f1526
Author: Linus Torvalds [off-list ref]
Date:   Thu Jan 12 20:42:54 2012 -0800

   Merge branch 'akpm' (aka "Andrew's patch-bomb, take two")

Upon suspend my laptop hangs (see trace below pulled from serial
console). I do not see the pr_debug in the suspend function (compiled
with -DDEBUG). Unfortunately the same happens when I don't insert bcma
and brcmsmac. I attached the kernel configuration.
Ok, so it's not the bcma/brcmsmac drivers, and your hang seems to be
at suspend time.

There is at least one other suspend problem in the current merge
window, you may be hitting them. The one I know about is some oddity
with the machine check driver, so if you have CONFIG_X86_MCE enabled,
try compiling without it.

Also, try

    echo devices > /sys/power/pm_test
    echo mem > /sys/power/state

which doesn't do the "real" suspend, but only goes through the device
suspend. That often leaves more of a trace of what may have gone
wrong.

                         Linus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-14 03:50:44

2012/1/13 Arend van Spriel [off-list ref]:
Upon suspend my laptop hangs (see trace below pulled from serial
console). I do not see the pr_debug in the suspend function (compiled
with -DDEBUG). Unfortunately the same happens when I don't insert bcma
and brcmsmac. I attached the kernel configuration.
Ok, I note that you do have MCE enabled.

The MCE problems should be fixed in current -git, and so it might be
worth re-testing with that.

                   Linus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Dominique Martinet <asmadeus@codewreck.org>
Date: 2012-01-14 12:30:44

Hi,

Sorry to hijack this thread, but I had the exact same problem Arend has
and disabling MCE fixed it.. Since it froze only after resume and it
didn't send anything to netconsole at this moment I've had this for some
time without any good debug info, so first is a thank you!

I'd like to try if the fix in current -git works, could you remind me
the exact tree name you call this?
I'm familiar with linux-2.6.git, wireless-testing.git, and
linux-next.git, but it's not resolved in linux-next.git not
linux-2.6.git's HEAD at the very least.

By the way, resume/suspend works with your patches over linux-next.git
with a bcm4313 on a eeepc1215b!

Regards,

-- 
Dominique Martinet | Asmadeus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Rafał Miłecki <zajec5@gmail.com>
Date: 2012-01-14 14:34:03

2012/1/14 Dominique Martinet [off-list ref]:
By the way, resume/suspend works with your patches over linux-next.git
with a bcm4313 on a eeepc1215b!
Do you mean hibernate, AKA suspend to disk? I've Asus EEEPC 1215B with
AMD E-450 and after
echo disk > /sys/power/state
it tries to hibernate, but resumes right after, before even stopping
CPU or disabling backlight.

-- 
Rafał

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Dominique Martinet <asmadeus@codewreck.org>
Date: 2012-01-14 15:07:38

Hi,

Rafał Miłecki wrote on Sat, Jan 14, 2012 :
2012/1/14 Dominique Martinet [off-list ref]:
quoted
By the way, resume/suspend works with your patches over linux-next.git
with a bcm4313 on a eeepc1215b!
Do you mean hibernate, AKA suspend to disk? I've Asus EEEPC 1215B with
AMD E-450 and after
echo disk > /sys/power/state
it tries to hibernate, but resumes right after, before even stopping
CPU or disabling backlight.
I was refering to suspend to ram, but it looks like hibernate works fine
as well with the same model (well, aside of the touchpad being unplugged
and the hard drive having been changed)
(FWIW, with MCE enabled, the computer hangs after an attempt to
synchronize SCSI cache and never gets out of hibernation nor powers off)


I'm attaching my working config file for reference. I use it on top of
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=00c0c2419d5ea8e6c558e431cf03272cd18d9c02
(linux-next.git's head from yesterday) with the 5 patches from this
thread.

Also, if it resumes right after the suspend, doesn't dmesg say something
about it?

Regards,
-- 
Dominique Martinet | Asmadeus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Arend van Spriel <hidden>
Date: 2012-01-14 17:37:08

On 01/14/2012 04:50 AM, Linus Torvalds wrote:
2012/1/13 Arend van Spriel [off-list ref]:
quoted
Upon suspend my laptop hangs (see trace below pulled from serial
console). I do not see the pr_debug in the suspend function (compiled
with -DDEBUG). Unfortunately the same happens when I don't insert bcma
and brcmsmac. I attached the kernel configuration.
Ok, I note that you do have MCE enabled.

The MCE problems should be fixed in current -git, and so it might be
worth re-testing with that.

                   Linus
Yep. I disabled it and rebuild a kernel. Unfortunately, during the
weekend I have other obligations. So I can give it a go on monday
morning (amsterdam time).

Gr. AvS

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-14 19:15:51

On Sat, Jan 14, 2012 at 4:22 AM, Dominique Martinet
[off-list ref] wrote:
Sorry to hijack this thread, but I had the exact same problem Arend has
and disabling MCE fixed it.. Since it froze only after resume and it
didn't send anything to netconsole at this moment I've had this for some
time without any good debug info, so first is a thank you!

I'd like to try if the fix in current -git works, could you remind me
the exact tree name you call this?

  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux

is the main tree. The old "linux-2.6" name is just a symlink alias to it.

The commit that should fix MCE is just a oneliner: commit a3301b751b19
("x86/mce: Fix CPU hotplug and suspend regression related to MCE").
I'm familiar with linux-2.6.git, wireless-testing.git, and
linux-next.git, but it's not resolved in linux-next.git not
linux-2.6.git's HEAD at the very least.
If it's not resolved in linux-2.6, then you have a different problem.

Or, possibly, the mirroring hadn't quite happened yet when you fetched
it - so it's worth double-checking that you have that commit
a3301b751b19 in your tree. But kernel.org git mirroring has been
pretty fast now that it uses gitorious.
By the way, resume/suspend works with your patches over linux-next.git
with a bcm4313 on a eeepc1215b!
Good. So they probably didn't break anything. It's always hard to tell
with drivers: even if it's an "obvious fix", the old code may have
worked for random reasons, and fixing it then breaks.

But I do think the patches should be pretty safe. The PCI layer
generally does all the PCI-level suspend/resumes correctly, and
drivers that try to do it are more likely to mess it up than not (that
didn't use to be true long ago, which is why many drivers still do it
- legacy baggage).

                           Linus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Dominique Martinet <asmadeus@codewreck.org>
Date: 2012-01-14 23:08:56

Hi,

Linus Torvalds wrote on Sat, Jan 14, 2012 :
The commit that should fix MCE is just a oneliner: commit a3301b751b19
("x86/mce: Fix CPU hotplug and suspend regression related to MCE").
Right, I missed it. Suspend works as long as I don't use wireless
before.
I still get a warning:

[   30.256946] ------------[ cut here ]------------
[   30.256956] WARNING: at drivers/base/core.c:194
device_release+0x6a/0x73()
[   30.256960] Hardware name: 1215B
[   30.256963] Device 'machinecheck1' does not have a release()
function, it is broken and must be fixed.
[   30.256966] Modules linked in: tun ipv6 snd_hrtimer uinput fuse ext4
jbd2 crc16 ext2 mbcache loop kvm_amd kvm snd_hda_codec_realtek
snd_hda_codec_hdmi brcmsmac mac80211 brcmutil cfg80211 crc8 cordic
eeepc_wmi asus_wmi sparse_keymap rfkill pci_hotplug uvcvideo videodev
media v4l2_compat_ioctl32 evdev psmouse snd_hda_intel snd_hda_codec
snd_hwdep snd_seq snd_pcm k10temp i2c_piix4 snd_timer snd_seq_device
bcma radeon snd ttm drm_kms_helper soundcore drm snd_page_alloc
i2c_algo_bit i2c_core battery ac power_supply video wmi button processor
xfs exportfs dm_mod sg sd_mod crc_t10dif thermal ohci_hcd xhci_hcd
thermal_sys ahci libahci ehci_hcd libata usbcore scsi_mod usb_common
[last unloaded: scsi_wait_scan]
[   30.257049] Pid: 3468, comm: pm-suspend Tainted: G        W    3.2.0+ #3
[   30.257052] Call Trace:
[   30.257063]  [<ffffffff8102e4b1>] ? warn_slowpath_common+0x78/0x8c
[   30.257069]  [<ffffffff8102e566>] ? warn_slowpath_fmt+0x45/0x4a
[   30.257075]  [<ffffffff811a4be3>] ? add_uevent_var+0xd9/0xd9
[   30.257080]  [<ffffffff81246c6b>] ? device_release+0x6a/0x73
[   30.257086]  [<ffffffff811a4090>] ? kobject_release+0x48/0x5e
[   30.257093]  [<ffffffff8130b17d>] ? mce_cpu_callback+0xdf/0x175
[   30.257101]  [<ffffffff8104bb15>] ? notifier_call_chain+0x2e/0x5b
[   30.257106]  [<ffffffff8102fb59>] ? __cpu_notify+0x1b/0x30
[   30.257110]  [<ffffffff8102fb86>] ? cpu_notify_nofail+0x9/0x14
[   30.257116]  [<ffffffff812ff826>] ? _cpu_down+0x133/0x1f4
[   30.257122]  [<ffffffff8102fd0b>] ? disable_nonboot_cpus+0x58/0xf3
[   30.257127]  [<ffffffff8106ed71>] ? suspend_devices_and_enter+0xd7/0x1c4
[   30.257132]  [<ffffffff8106ef5d>] ? enter_state+0xff/0x10d
[   30.257138]  [<ffffffff8106e1b0>] ? state_store+0xb4/0x108
[   30.257144]  [<ffffffff81144a19>] ? sysfs_write_file+0xd3/0x10f
[   30.257149]  [<ffffffff810f3c96>] ? vfs_write+0xa6/0xf9
[   30.257154]  [<ffffffff810f3e8b>] ? sys_write+0x45/0x6b
[   30.257160]  [<ffffffff813150f9>] ? system_call_fastpath+0x16/0x1b
[   30.257165] ---[ end trace 527780f5547f85b2 ]---

but it does work.


brcmsmac seems to have a problem that looks like it's fixed in
wireless-next, after a suspend if it's been used then all network
operation hang (i.e. 'ip addr', something like resolving an host doesn't
work but doesn't hang either, modprobe -r brcmsmac hangs as well)
Here's the revelent information about this:

[  232.352927] ieee80211 phy0: wl0: wlc_coreinit: ucode did not self-suspend!
[  232.490867] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  232.490877] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  232.587468] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  232.587477] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  232.684150] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  232.684159] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  232.780771] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  232.780781] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  232.884260] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  232.884271] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  232.987619] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  232.987630] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  233.090996] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  233.091007] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  233.194345] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  233.194356] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  233.194380] ieee80211 phy0: brcms_ops_config: change power-save mode: false (implement)
[  233.297619] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  233.297630] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  233.297703] ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed: associated
[  233.297710] ieee80211 phy0: changing basic rates failed: -22
[  233.297715] ieee80211 phy0: brcms_ops_bss_info_changed: cqm change: threshold 0, hys 0  (implement)
[  233.297720] ieee80211 phy0: brcms_ops_bss_info_changed: arp filtering: enabled true, count 1 (implement)
[  233.297724] ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled: true (implement)
...
[  233.892239] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  233.892256] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000031, psm_brc 0x0000
[  233.988440] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  233.988452] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  234.084714] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  234.084725] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  234.180626] ieee80211 phy0: wl0: wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
[  234.180637] ieee80211 phy0: wl0: psmdebug 0x00ff8f7f, phydebug 0x00000000, psm_brc 0x0000
[  234.180658] ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[  234.180668] ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed: disassociated
[  234.180677] ieee80211 phy0: brcms_ops_bss_info_changed: arp filtering: enabled false, count 1 (implement)

and when something hangs:

[  361.248353] INFO: task wpa_supplicant:9102 blocked for more than 120 seconds.
[  361.248362] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  361.248367] wpa_supplicant  D ffff880062d68400     0  9102      1 0x00000000
[  361.248375]  ffff880062d68400 0000000000000082 ffff88005f72df38 ffff8800580e27b0
[  361.248383]  0000000000012080 ffff88005f72dfd8 ffff88005f72dfd8 0000000000012080
[  361.248390]  ffff880062d68400 0000000000012080 0000000000012080 0000000000012080
[  361.248397] Call Trace:
[  361.248411]  [<ffffffff81313307>] ? __mutex_lock_common.clone.5+0x114/0x179
[  361.248432]  [<ffffffffa03bef8a>] ? cfg80211_wext_siwscan+0xbd/0x2dc [cfg80211]
[  361.248439]  [<ffffffff81313137>] ? mutex_lock+0x12/0x25
[  361.248458]  [<ffffffffa03f83c1>] ? ieee80211_request_scan+0x20/0x4e [mac80211]
[  361.248469]  [<ffffffffa03bf151>] ? cfg80211_wext_siwscan+0x284/0x2dc [cfg80211]
[  361.248477]  [<ffffffff812f910e>] ? ioctl_standard_iw_point+0x142/0x26f
[  361.248484]  [<ffffffff810e7982>] ? __kmalloc+0xd0/0xe2
[  361.248490]  [<ffffffff812f9199>] ? ioctl_standard_iw_point+0x1cd/0x26f
[  361.248501]  [<ffffffffa03beecd>] ? cfg80211_unlock_rdev+0x21/0x21 [cfg80211]
[  361.248507]  [<ffffffff812f937c>] ? ioctl_standard_call+0x7d/0xa4
[  361.248513]  [<ffffffff812f9c66>] ? iw_handler_get_private+0x4c/0x4c
[  361.248519]  [<ffffffff812f9c66>] ? iw_handler_get_private+0x4c/0x4c
[  361.248525]  [<ffffffff812f9c66>] ? iw_handler_get_private+0x4c/0x4c
[  361.248531]  [<ffffffff812f92ff>] ? call_commit_handler+0x31/0x31
[  361.248536]  [<ffffffff812f8a33>] ? wext_ioctl_dispatch+0x8b/0x194
[  361.248542]  [<ffffffff812f9452>] ? wext_handle_ioctl+0x33/0x69
[  361.248550]  [<ffffffff812887f4>] ? dev_ioctl+0x5db/0x620
[  361.248557]  [<ffffffff810c9c1d>] ? tlb_flush_mmu+0x37/0x50
[  361.248563]  [<ffffffff810f4d71>] ? fget_light+0x2e/0x77
[  361.248568]  [<ffffffff810f4d71>] ? fget_light+0x2e/0x77
[  361.248576]  [<ffffffff81273f67>] ? sock_ioctl+0x41/0x204
[  361.248582]  [<ffffffff811013bf>] ? do_vfs_ioctl+0x416/0x455
[  361.248588]  [<ffffffff81101449>] ? sys_ioctl+0x4b/0x72
[  361.248595]  [<ffffffff813150f9>] ? system_call_fastpath+0x16/0x1b


Since it looks fixed with linux-next and the patches I don't know if it
is really important to fix, but it could be that some of the patches
that were intended for linux-next would help with some minor changes.


Regards,
-- 
Dominique Martinet | Asmadeus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-14 23:28:42

On Sat, Jan 14, 2012 at 3:08 PM, Dominique Martinet
[off-list ref] wrote:
Right, I missed it. Suspend works as long as I don't use wireless
before.
Ok. Your suspend hang may be related to the cfg80211_wext hang that is
apparently unrelated to the issues we saw.
I still get a warning:

[   30.256946] ------------[ cut here ]------------
[   30.256956] WARNING: at drivers/base/core.c:194 device_release+0x6a/0x73()
Yes. This warning is annoying but harmless. We'll fix it some way
(possibly by just turning it back to a single line, like it used to
be), but for now you can just ignore it.
brcmsmac seems to have a problem that looks like it's fixed in
wireless-next, after a suspend if it's been used then all network
operation hang (i.e. 'ip addr', something like resolving an host doesn't
work but doesn't hang either, modprobe -r brcmsmac hangs as well)
Here's the revelent information about this:

[  361.248353] INFO: task wpa_supplicant:9102 blocked for more than 120 seconds.
[  361.248362] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  361.248367] wpa_supplicant  D ffff880062d68400     0  9102      1 0x00000000
[  361.248397] Call Trace:
[  361.248411]  [<ffffffff81313307>] ? __mutex_lock_common.clone.5+0x114/0x179
[  361.248432]  [<ffffffffa03bef8a>] ? cfg80211_wext_siwscan+0xbd/0x2dc [cfg80211]
[  361.248439]  [<ffffffff81313137>] ? mutex_lock+0x12/0x25
[  361.248458]  [<ffffffffa03f83c1>] ? ieee80211_request_scan+0x20/0x4e [mac80211]
Ok, judging by the call trace this seems to be a generic wireless bug,
likely not a brcmsmac bug.  Presumably people like me (and obviously
wireless developers) avoid this by not using wpa_supplicant o
rsomething. You might want to enable LOCKDEP to verify - if it's a
deadlock (either direct, or ABBA) - lockdep should give you a big
splat immediately rather than having to wait for 2 minutes.

Linwille/David - can you please make sure the fix gets to my tree,
since it's apparently already ok in the development tree?

                     Linus

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Arend van Spriel <hidden>
Date: 2012-01-16 14:00:53

On 01/14/2012 04:50 AM, Linus Torvalds wrote:
2012/1/13 Arend van Spriel [off-list ref]:
quoted
Upon suspend my laptop hangs (see trace below pulled from serial
console). I do not see the pr_debug in the suspend function (compiled
with -DDEBUG). Unfortunately the same happens when I don't insert bcma
and brcmsmac. I attached the kernel configuration.
Ok, I note that you do have MCE enabled.

The MCE problems should be fixed in current -git, and so it might be
worth re-testing with that.

                   Linus
Hi Linus,

I build a kernel with MCE disabled and tested that. It still hung. I
decided run the kernel with nomodeset parameter to avoid framebuffer
issues. Now the suspend worked, but resume failed. Just heard a beep and
that was it. I will refresh the tree and build another kernel with MCE
enabled.

Also observed occasional long delay upon startup:

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.0-07331-gb2a1efc (root@arend-vb-linux)
(gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #1 SMP Fri Jan 13
21:31:23 CET 2012
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009ac00 (usable)
[    0.000000]  BIOS-e820: 000000000009ac00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 00000000cf65f000 (usable)
[    0.000000]  BIOS-e820: 00000000cf65f000 - 00000000cf67f000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000cf67f000 - 00000000cf76f000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000cf76f000 - 00000000d0000000 (reserved)
[    0.000000]  BIOS-e820: 00000000f8000000 - 00000000fc000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
[    0.000000]  BIOS-e820: 00000000fed10000 - 00000000fed14000 (reserved)
[    0.000000]  BIOS-e820: 00000000fed18000 - 00000000fed1a000 (reserved)
[    0.000000]  BIOS-e820: 00000000fed1c000 - 00000000fed20000 (reserved)
[    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
[    0.000000]  BIOS-e820: 00000000ff800000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 000000012c000000 (usable)
[    0.000000] debug: ignoring loglevel setting.
[    0.000000] Notice: NX (Execute Disable) protection cannot be
enabled: non-PAE kernel!
[    0.000000] DMI 2.6 present.
[    0.000000] DMI: Dell Inc. Latitude E6410/07XJP9, BIOS A07 02/15/2011
[    0.000000] e820 update range: 0000000000000000 - 0000000000010000
(usable) ==> (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000
(usable)
[    0.000000] last_pfn = 0xcf65f max_arch_pfn = 0x100000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000 mask F80000000 write-back
[    0.000000]   1 base 080000000 mask FC0000000 write-back
[    0.000000]   2 base 0C0000000 mask FF0000000 write-back
[    0.000000]   3 base 100000000 mask FE0000000 write-back
[    0.000000]   4 base 120000000 mask FF0000000 write-back
[    0.000000]   5 base 12C000000 mask FFC000000 uncachable
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new
0x7010600070106
[    0.000000] e820 update range: 00000000d0000000 - 0000000100000000
(usable) ==> (reserved)
[    0.000000] found SMP MP-table at [c00f2200] f2200
[    0.000000] initial memory mapped : 0 - 01c00000
[    0.000000] Base memory trampoline at [c0096000] 96000 size 16384
[    0.000000] init_memory_mapping: 0000000000000000-00000000377fe000
[    0.000000]  0000000000 - 0000400000 page 4k
[    0.000000]  0000400000 - 0037400000 page 2M
[    0.000000]  0037400000 - 00377fe000 page 4k
[    0.000000] kernel direct mapping tables up to 377fe000 @ 1bfb000-1c00000
[    0.000000] RAMDISK: 37c1a000 - 37ff0000
[    0.000000] Allocated new RAMDISK: 37428000 - 377fd004
[    0.000000] Move RAMDISK from 0000000037c1a000 - 0000000037fef003 to
37428000 - 377fd003
[    0.000000] ACPI: RSDP 000fe300 00024 (v02 DELL  )
[    0.000000] ACPI: XSDT cf67de18 00064 (v01 DELL    E2      06222004
MSFT 00010013)
[    0.000000] ACPI: FACP cf75fc18 000F4 (v04 DELL    E2      06222004
MSFT 00010013)
[    0.000000] ACPI Warning: 32/64 FACS address mismatch in FADT - two
FACS tables! (20110623/tbfadt-369)
[    0.000000] ACPI Warning: 32/64X FACS address mismatch in FADT -
0xCF76BF40/0x00000000CF76ED40, using 32 (20110623/tbfadt-489)
[    0.000000] ACPI: DSDT cf73e018 0A24E (v01 DELL    E2      00001001
INTL 20080729)
[    0.000000] ACPI: FACS cf76bf40 00040
[    0.000000] ACPI: APIC cf67cf18 0008C (v02 DELL    E2      06222004
MSFT 00010013)
[    0.000000] ACPI: TCPA cf76dd18 00032 (v02                 00000000
    00000000)
[    0.000000] ACPI: MCFG cf76dc98 0003C (v01 A M I  GMCH945. 06222004
MSFT 00000097)
[    0.000000] ACPI: HPET cf76dc18 00038 (v01 DELL    E2      00000001
ASL  00000061)
[    0.000000] ACPI: BOOT cf76db98 00028 (v01 DELL   E2       06222004
AMI  00010013)
[    0.000000] ACPI: SLIC cf766818 00176 (v03 DELL    E2      06222004
MSFT 00010013)
[    0.000000] ACPI: SSDT cf74d018 009F1 (v01  PmRef    CpuPm 00003000
INTL 20080729)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] 2430MB HIGHMEM available.
[    0.000000] 887MB LOWMEM available.
[    0.000000]   mapped low ram: 0 - 377fe000
[    0.000000]   low ram: 0 - 377fe000
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000010 -> 0x00001000
[    0.000000]   Normal   0x00001000 -> 0x000377fe
[    0.000000]   HighMem  0x000377fe -> 0x000cf65f
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000010 -> 0x0000009a
[    0.000000]     0: 0x00000100 -> 0x000cf65f
[    0.000000] On node 0 totalpages: 849385
[    0.000000]   DMA zone: 32 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 3946 pages, LIFO batch:0
[    0.000000]   Normal zone: 1744 pages used for memmap
[    0.000000]   Normal zone: 221486 pages, LIFO batch:31
[    0.000000]   HighMem zone: 4861 pages used for memmap
[    0.000000]   HighMem zone: 617316 pages, LIFO batch:31
[    0.000000] Using APIC driver default
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x04] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x05] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x05] lapic_id[0x04] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x06] lapic_id[0x05] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x07] lapic_id[0x06] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x08] lapic_id[0x07] disabled)
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI
0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[    0.000000] SMP: Allowing 8 CPUs, 4 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] PM: Registered nosave memory: 000000000009a000 -
000000000009b000
[    0.000000] PM: Registered nosave memory: 000000000009b000 -
00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 -
00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 -
0000000000100000
[    0.000000] Allocating PCI resources starting at d0000000 (gap:
d0000000:28000000)
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:8
nr_node_ids:1
[    0.000000] PERCPU: Embedded 13 pages/cpu @f5400000 s29952 r0 d23296
u524288
[    0.000000] pcpu-alloc: s29952 r0 d23296 u524288 alloc=1*4194304
[    0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 842748
[    0.000000] Kernel command line:
BOOT_IMAGE=/boot/vmlinuz-3.2.0-07331-gb2a1efc
root=UUID=7051116f-03ec-4df3-a8ff-813fb03aec9f ro ignore_loglevel
console=tty0 console=ttyS0,115200 nomodeset no_console_suspend
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288
bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144
bytes)
[    0.000000] Initializing CPU#0
[    0.000000] Initializing HighMem for node 0 (000377fe:000cf65f)
[    0.000000] Memory: 3357116k/3398012k available (4841k kernel code,
40424k reserved, 2278k data, 556k init, 2488708k highmem)
[    0.000000] virtual kernel memory layout:
[    0.000000]     fixmap  : 0xfff16000 - 0xfffff000   ( 932 kB)
[    0.000000]     pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
[    0.000000]     vmalloc : 0xf7ffe000 - 0xff7fe000   ( 120 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf77fe000   ( 887 MB)
[    0.000000]       .init : 0xc16f4000 - 0xc177f000   ( 556 kB)
[    0.000000]       .data : 0xc14ba50e - 0xc16f3fc0   (2278 kB)
[    0.000000]       .text : 0xc1000000 - 0xc14ba50e   (4841 kB)
[    0.000000] Checking if this processor honours the WP bit even in
supervisor mode...Ok.
[    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0,
CPUs=8, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000] NR_IRQS:2304 nr_irqs:744 16
[    0.000000] CPU 0 irqstacks, hard=f500a000 soft=f500c000
[    0.000000] Extended CMOS year: 2000
[    0.000000] spurious 8259A interrupt: IRQ7.
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] console [ttyS0] enabled
[    0.000000] allocated 6815744 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't
want memory cgroups
[    0.000000] hpet clockevent registered
[    0.000000] Fast TSC calibration using PIT
[    0.004000] Detected 2793.229 MHz processor.
[    0.000001] Calibrating delay loop (skipped), value calculated using
timer frequency.. 5586.45 BogoMIPS (lpj=11172916)
[    0.010817] pid_max: default: 32768 minimum: 301
[    0.015520] Security Framework initialized
[    0.019689] AppArmor: AppArmor initialized
[    0.023878] Mount-cache hash table entries: 512
[    0.028574] Initializing cgroup subsys cpuacct
[    0.033081] Initializing cgroup subsys memory
[    0.037503] Initializing cgroup subsys devices
[    0.042011] Initializing cgroup subsys freezer
[    0.046518] Initializing cgroup subsys net_cls
[    0.051042] CPU: Physical Processor ID: 0
[    0.055116] CPU: Processor Core ID: 0
[    0.058827] using mwait in idle threads.
[    0.064089] ACPI: Core revision 20110623
[    0.073049] ftrace: allocating 20190 entries in 40 pages
[    0.083048] Enabling APIC mode:  Flat.  Using 1 I/O APICs
[    0.088911] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
[    0.134409] CPU0: Intel(R) Core(TM) i7 CPU       M 640  @ 2.80GHz
stepping 05
[    0.246713] Performance Events: PEBS fmt1+, Westmere events, Intel
PMU driver.
[    0.254187] CPUID marked event: 'bus cycles' unavailable
[    0.259547] ... version:                3
[    0.263743] ... bit width:              48
[    0.267890] ... generic registers:      4
[    0.271949] ... value mask:             0000ffffffffffff
[    0.279011] ... max period:             000000007fffffff
[    0.284369] ... fixed-purpose events:   3
[    0.288428] ... event mask:             000000070000000f
[    0.293915] CPU 1 irqstacks, hard=f4b4e000 soft=f4b58000
[    0.299274] Booting Node   0, Processors  #1
[    0.303474] smpboot cpu 1: start_ip = 96000
[    0.318218] Initializing CPU#1
[    0.341383] CPU 2 irqstacks, hard=f4b62000 soft=f4b64000
[    0.346745]  #2
[    0.348370] smpboot cpu 2: start_ip = 96000
[    0.362989] Initializing CPU#2
[    0.386195] CPU 3 irqstacks, hard=f4b6e000 soft=f4b70000
[    0.391557]  #3
[    0.393180] smpboot cpu 3: start_ip = 96000
[    0.407801] Initializing CPU#3
[    0.430931] Brought up 4 CPUs
[    0.433952] Total of 4 processors activated (22345.83 BogoMIPS).
[    0.442574] devtmpfs: initialized
[    0.446052] PM: Registering ACPI NVS region at cf67f000 (983040 bytes)
[    0.453333] print_constraints: dummy:
[    0.457165] RTC time: 13:52:08, date: 01/16/12
[    0.461685] NET: Registered protocol family 16
[    0.466229] ACPI FADT declares the system doesn't support PCIe ASPM,
so disable it
[    0.473852] ACPI: bus type pci registered
[    0.477960] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem
0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.487317] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.494149] PCI: Using MMCONFIG for extended config space
[    0.499596] PCI: Using configuration type 1 for base access
[    0.505220] dmi type 0xB1 record - unknown flag
[    0.510288] bio: create slab <bio-0> at 0
[    0.514393] ACPI: Added _OSI(Module Device)
[    0.518628] ACPI: Added _OSI(Processor Device)
[    0.523122] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.527876] ACPI: Added _OSI(Processor Aggregator Device)
[    0.534434] ACPI: EC: Look up EC in DSDT
[    0.542573] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    0.555797] ACPI: SSDT cf7eaa18 004B6 (v01  PmRef  Cpu0Ist 00003000
INTL 20080729)
[    0.563813] ACPI: Dynamic OEM Table Load:
[    0.568000] ACPI: SSDT   (null) 004B6 (v01  PmRef  Cpu0Ist 00003000
INTL 20080729)
[    0.575855] ACPI: SSDT cf7e8018 00891 (v01  PmRef  Cpu0Cst 00003001
INTL 20080729)
[    0.583852] ACPI: Dynamic OEM Table Load:
[    0.588039] ACPI: SSDT   (null) 00891 (v01  PmRef  Cpu0Cst 00003001
INTL 20080729)
[    0.595979] ACPI: SSDT cf7e9a98 00303 (v01  PmRef    ApIst 00003000
INTL 20080729)
[    0.604029] ACPI: Dynamic OEM Table Load:
[    0.608216] ACPI: SSDT   (null) 00303 (v01  PmRef    ApIst 00003000
INTL 20080729)
[    0.616042] ACPI: SSDT cf7e7d98 00119 (v01  PmRef    ApCst 00003000
INTL 20080729)
[    0.624061] ACPI: Dynamic OEM Table Load:
[    0.628245] ACPI: SSDT   (null) 00119 (v01  PmRef    ApCst 00003000
INTL 20080729)
[    0.637407] ACPI: Interpreter enabled
[    0.641126] ACPI: (supports S0 S3 S4 S5)
[    0.645374] ACPI: Using IOAPIC for interrupt routing
[    0.661754] ACPI: EC: GPE = 0x10, I/O: command/status = 0x934, data =
0x930
[    0.669313] ACPI: No dock devices found.
[    0.673288] HEST: Table not found.
[    0.676743] PCI: Using host bridge windows from ACPI; if necessary,
use "pci=nocrs" and report a bug
[    0.686201] \_SB_.PCI0:_OSC invalid UUID
[    0.690175] _OSC request data:1 8 1f
[    0.694136] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    0.700798] pci_root PNP0A08:00: host bridge window [io  0x0000-0x0cf7]
[    0.707457] pci_root PNP0A08:00: host bridge window [io  0x0d00-0xffff]
[    0.714115] pci_root PNP0A08:00: host bridge window [mem
0x000a0000-0x000bffff]
[    0.721479] pci_root PNP0A08:00: host bridge window [mem
0xd0000000-0xfeafffff]
[    0.728865] PCI host bridge to bus 0000:00
[    0.733014] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    0.739241] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    0.745467] pci_bus 0000:00: root bus resource [mem
0x000a0000-0x000bffff]
[    0.752385] pci_bus 0000:00: root bus resource [mem
0xd0000000-0xfeafffff]
[    0.759309] pci 0000:00:00.0: [8086:0044] type 0 class 0x000600
[    0.765305] pci 0000:00:01.0: [8086:0045] type 1 class 0x000604
[    0.771296] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[    0.777484] pci 0000:00:19.0: [8086:10ea] type 0 class 0x000200
[    0.783473] pci 0000:00:19.0: reg 10: [mem 0xe9600000-0xe961ffff]
[    0.789624] pci 0000:00:19.0: reg 14: [mem 0xe9680000-0xe9680fff]
[    0.795772] pci 0000:00:19.0: reg 18: [io  0x8040-0x805f]
[    0.801302] pci 0000:00:19.0: PME# supported from D0 D3hot D3cold
[    0.807470] pci 0000:00:1a.0: [8086:3b3c] type 0 class 0x000c03
[    0.813460] pci 0000:00:1a.0: reg 10: [mem 0xe9670000-0xe96703ff]
[    0.819703] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    0.825873] pci 0000:00:1b.0: [8086:3b56] type 0 class 0x000403
[    0.831857] pci 0000:00:1b.0: reg 10: [mem 0xe9660000-0xe9663fff 64bit]
[    0.838609] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    0.844774] pci 0000:00:1c.0: [8086:3b42] type 1 class 0x000604
[    0.850834] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    0.857003] pci 0000:00:1c.1: [8086:3b44] type 1 class 0x000604
[    0.863065] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[    0.869233] pci 0000:00:1c.2: [8086:3b46] type 1 class 0x000604
[    0.875295] pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold
[    0.881465] pci 0000:00:1c.3: [8086:3b48] type 1 class 0x000604
[    0.887526] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    0.893704] pci 0000:00:1d.0: [8086:3b34] type 0 class 0x000c03
[    0.899692] pci 0000:00:1d.0: reg 10: [mem 0xe9650000-0xe96503ff]
[    0.905934] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    0.912097] pci 0000:00:1e.0: [8086:2448] type 1 class 0x000604
[    0.918144] pci 0000:00:1f.0: [8086:3b07] type 0 class 0x000601
[    0.924232] pci 0000:00:1f.2: [8086:3b2f] type 0 class 0x000106
[    0.930223] pci 0000:00:1f.2: reg 10: [io  0x8090-0x8097]
[    0.935678] pci 0000:00:1f.2: reg 14: [io  0x8080-0x8083]
[    0.941133] pci 0000:00:1f.2: reg 18: [io  0x8070-0x8077]
[    0.946589] pci 0000:00:1f.2: reg 1c: [io  0x8060-0x8063]
[    0.952045] pci 0000:00:1f.2: reg 20: [io  0x8020-0x803f]
[    0.957501] pci 0000:00:1f.2: reg 24: [mem 0xe9640000-0xe96407ff]
[    0.963703] pci 0000:00:1f.2: PME# supported from D3hot
[    0.968997] pci 0000:00:1f.3: [8086:3b30] type 0 class 0x000c05
[    0.974982] pci 0000:00:1f.3: reg 10: [mem 0xe9630000-0xe96300ff 64bit]
[    0.981669] pci 0000:00:1f.3: reg 20: [io  0x8000-0x801f]
[    0.987162] pci 0000:00:1f.6: [8086:3b32] type 0 class 0x001180
[    0.993153] pci 0000:00:1f.6: reg 10: [mem 0xe9620000-0xe9620fff 64bit]
[    0.999935] pci 0000:01:00.0: [10de:0a6c] type 0 class 0x000300
[    1.005906] pci 0000:01:00.0: reg 10: [mem 0xe2000000-0xe2ffffff]
[    1.012054] pci 0000:01:00.0: reg 14: [mem 0xd0000000-0xdfffffff
64bit pref]
[    1.019153] pci 0000:01:00.0: reg 1c: [mem 0xe0000000-0xe1ffffff
64bit pref]
[    1.026249] pci 0000:01:00.0: reg 24: [io  0x7000-0x707f]
[    1.031701] pci 0000:01:00.0: reg 30: [mem 0xe3000000-0xe307ffff pref]
[    1.038317] pci 0000:01:00.1: [10de:0be3] type 0 class 0x000403
[    1.044290] pci 0000:01:00.1: reg 10: [mem 0xe3080000-0xe3083fff]
[    1.050504] pci 0000:00:01.0: PCI bridge to [bus 01-01]
[    1.055777] pci 0000:00:01.0:   bridge window [io  0x7000-0x7fff]
[    1.061916] pci 0000:00:01.0:   bridge window [mem 0xd0000000-0xe30fffff]
[    1.068802] pci 0000:00:1c.0: PCI bridge to [bus 02-02]
[    1.074079] pci 0000:00:1c.0:   bridge window [io  0x6000-0x6fff]
[    1.080220] pci 0000:00:1c.0:   bridge window [mem 0xe8200000-0xe95fffff]
[    1.087179] pci 0000:03:00.0: [14e4:4353] type 0 class 0x000280
[    1.093213] pci 0000:03:00.0: reg 10: [mem 0xe6e00000-0xe6e03fff 64bit]
[    1.100131] pci 0000:03:00.0: supports D1 D2
[    1.104450] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
[    1.110764] pci 0000:00:1c.1: PCI bridge to [bus 03-03]
[    1.116039] pci 0000:00:1c.1:   bridge window [io  0x5000-0x5fff]
[    1.122181] pci 0000:00:1c.1:   bridge window [mem 0xe6e00000-0xe81fffff]
[    1.129141] pci 0000:04:00.0: [1180:e476] type 2 class 0x000607
[    1.135172] pci 0000:04:00.0: reg 10: [mem 0xe5940000-0xe5940fff]
[    1.141431] pci 0000:04:00.0: supports D1 D2
[    1.145753] pci 0000:04:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.152508] pci 0000:04:00.1: [1180:e822] type 0 class 0x000805
[    1.158542] pci 0000:04:00.1: reg 10: [mem 0xe5930000-0xe59300ff]
[    1.164884] pci 0000:04:00.1: supports D1 D2
[    1.169204] pci 0000:04:00.1: PME# supported from D0 D1 D2 D3hot D3cold
[    1.175960] pci 0000:04:00.4: [1180:e832] type 0 class 0x000c00
[    1.181991] pci 0000:04:00.4: reg 10: [mem 0xe5900000-0xe59007ff]
[    1.188331] pci 0000:04:00.4: supports D1 D2
[    1.192652] pci 0000:04:00.4: PME# supported from D0 D1 D2 D3hot D3cold
[    1.207903] pci 0000:00:1c.2: PCI bridge to [bus 04-05]
[    1.213185] pci 0000:00:1c.2:   bridge window [io  0x2000-0x3fff]
[    1.219328] pci 0000:00:1c.2:   bridge window [mem 0xe3100000-0xe59fffff]
[    1.226255] pci_bus 0000:05: [bus 05-08] partially hidden behind
bridge 0000:04 [bus 04-05]
[    1.234712] pci 0000:00:1c.3: PCI bridge to [bus 06-0b]
[    1.239989] pci 0000:00:1c.3:   bridge window [io  0x4000-0x4fff]
[    1.246132] pci 0000:00:1c.3:   bridge window [mem 0xe5a00000-0xe6dfffff]
[    1.253165] pci 0000:00:1e.0: PCI bridge to [bus 0c-0c] (subtractive
decode)
[    1.260268] pci 0000:00:1e.0:   bridge window [io  0x0000-0x0cf7]
(subtractive decode)
[    1.268236] pci 0000:00:1e.0:   bridge window [io  0x0d00-0xffff]
(subtractive decode)
[    1.276203] pci 0000:00:1e.0:   bridge window [mem
0x000a0000-0x000bffff] (subtractive decode)
[    1.284867] pci 0000:00:1e.0:   bridge window [mem
0xd0000000-0xfeafffff] (subtractive decode)
[    1.293558] pci_bus 0000:00: on NUMA node 0
[    1.297792] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    1.303885] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]
[    1.310325] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
[    1.316805] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP01._PRT]
[    1.323240] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP02._PRT]
[    1.329677] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP03._PRT]
[    1.336114] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP04._PRT]
[    1.342600] \_SB_.PCI0:_OSC invalid UUID
[    1.346574] _OSC request data:1 1f 1f
[    1.350627]  pci0000:00: Requesting ACPI _OSC control (0x1d)
[    1.356358] \_SB_.PCI0:_OSC invalid UUID
[    1.360332] _OSC request data:1 0 1d
[    1.366005]  pci0000:00: ACPI _OSC request failed (AE_ERROR),
returned control mask: 0x1d
[    1.374233] ACPI _OSC control for PCIe not granted, disabling ASPM
[    1.383094] ACPI: PCI Root Bridge [CPBG] (domain 0000 [bus 3f])
[    1.389084] PCI: root bus 3f: using default resources
[    1.394200] PCI host bridge to bus 0000:3f
[    1.398349] pci_bus 0000:3f: root bus resource [io  0x0000-0xffff]
[    1.404575] pci_bus 0000:3f: root bus resource [mem
0x00000000-0xffffffff]
[    1.411498] pci 0000:3f:00.0: [8086:2c62] type 0 class 0x000600
[    1.417477] pci 0000:3f:00.1: [8086:2d01] type 0 class 0x000600
[    1.423458] pci 0000:3f:02.0: [8086:2d10] type 0 class 0x000600
[    1.429436] pci 0000:3f:02.1: [8086:2d11] type 0 class 0x000600
[    1.435414] pci 0000:3f:02.2: [8086:2d12] type 0 class 0x000600
[    1.441392] pci 0000:3f:02.3: [8086:2d13] type 0 class 0x000600
[    1.447378] pci_bus 0000:3f: on NUMA node 0
[    1.451617]  pci0000:3f: Requesting ACPI _OSC control (0x1d)
[    1.457322]  pci0000:3f: ACPI _OSC request failed (AE_NOT_FOUND),
returned control mask: 0x1d
[    1.465896] ACPI _OSC control for PCIe not granted, disabling ASPM
[    1.472273] ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 12
14 15) *11
[    1.480406] ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 11 12
14 15) *10
[    1.488543] ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 *5 6 7 10 12
14 15)
[    1.496341] ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 11 12
14 15) *10
[    1.504473] ACPI: PCI Interrupt Link [LNKE] (IRQs 1 *3 4 5 6 7 10 12
14 15)
[    1.512267] ACPI: PCI Interrupt Link [LNKF] (IRQs 1 3 4 5 6 7 11 12
14 15) *0, disabled.
[    1.521326] ACPI: PCI Interrupt Link [LNKG] (IRQs 1 3 4 5 6 7 10 12
14 15) *11
[    1.529455] ACPI: PCI Interrupt Link [LNKH] (IRQs 1 3 4 5 6 7 11 12
14 15) *0, disabled.
[    1.538538] vgaarb: device added:
PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    1.546683] vgaarb: loaded
[    1.549442] vgaarb: bridge control possible 0000:01:00.0
[    1.554860] SCSI subsystem initialized
[    1.558688] libata version 3.00 loaded.
[    1.562602] usbcore: registered new interface driver usbfs
[    1.568142] usbcore: registered new interface driver hub
[    1.573515] usbcore: registered new device driver usb
[    1.578698] wmi: Mapper loaded
[    1.581805] PCI: Using ACPI for IRQ routing
[    1.588192] PCI: pci_cache_line_size set to 64 bytes
[    1.593319] reserve RAM buffer: 000000000009ac00 - 000000000009ffff
[    1.599537] reserve RAM buffer: 00000000cf65f000 - 00000000cfffffff
[    1.606060] NetLabel: Initializing
[    1.609760] NetLabel:  domain hash size = 128
[    1.614168] NetLabel:  protocols = UNLABELED CIPSOv4
[    1.619188] NetLabel:  unlabeled traffic allowed by default
[    1.624837] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    1.631639] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[    1.639532] Switching to clocksource hpet
[    1.648052] AppArmor: AppArmor Filesystem Enabled
[    1.652837] pnp: PnP ACPI init
[    1.655960] ACPI: bus type pnp registered
[    1.660275] pnp 00:00: [bus 00-3e]
[    1.663738] pnp 00:00: [io  0x0000-0x0cf7 window]
[    1.668500] pnp 00:00: [io  0x0cf8-0x0cff]
[    1.672652] pnp 00:00: [io  0x0d00-0xffff window]
[    1.677412] pnp 00:00: [mem 0x000a0000-0x000bffff window]
[    1.682865] pnp 00:00: [mem 0x000c0000-0x000c3fff window]
[    1.688316] pnp 00:00: [mem 0x000c4000-0x000c7fff window]
[    1.693768] pnp 00:00: [mem 0x000c8000-0x000cbfff window]
[    1.699219] pnp 00:00: [mem 0x000cc000-0x000cffff window]
[    1.704669] pnp 00:00: [mem 0x000d0000-0x000d3fff window]
[    1.710121] pnp 00:00: [mem 0x000d4000-0x000d7fff window]
[    1.715570] pnp 00:00: [mem 0x000d8000-0x000dbfff window]
[    1.721021] pnp 00:00: [mem 0x000dc000-0x000dffff window]
[    1.726473] pnp 00:00: [mem 0x000e0000-0x000e3fff window]
[    1.731926] pnp 00:00: [mem 0x000e4000-0x000e7fff window]
[    1.737377] pnp 00:00: [mem 0x000e8000-0x000ebfff window]
[    1.742827] pnp 00:00: [mem 0x000ec000-0x000effff window]
[    1.748280] pnp 00:00: [mem 0x000f0000-0x000fffff window]
[    1.753733] pnp 00:00: [mem 0xd0000000-0xfeafffff window]
[    1.759184] pnp 00:00: [mem 0xfed40000-0xfed44fff window]
[    1.764682] pnp 00:00: Plug and Play ACPI device, IDs PNP0a08 PNP0a03
(active)
[    1.771981] pnp 00:01: [io  0x0000-0x001f]
[    1.776135] pnp 00:01: [io  0x0081-0x0091]
[    1.780287] pnp 00:01: [io  0x0093-0x009f]
[    1.784440] pnp 00:01: [io  0x00c0-0x00df]
[    1.788593] pnp 00:01: [dma 4]
[    1.791717] pnp 00:01: Plug and Play ACPI device, IDs PNP0200 (active)
[    1.798299] pnp 00:02: [mem 0xff000000-0xffffffff]
[    1.803153] pnp 00:02: Plug and Play ACPI device, IDs INT0800 (active)
[    1.809783] pnp 00:03: [mem 0xfed00000-0xfed003ff]
[    1.814643] pnp 00:03: Plug and Play ACPI device, IDs PNP0103 (active)
[    1.821226] pnp 00:04: [io  0x00f0]
[    1.824779] pnp 00:04: [irq 13]
[    1.827992] pnp 00:04: Plug and Play ACPI device, IDs PNP0c04 (active)
[    1.834574] pnp 00:05: [io  0x002e-0x002f]
[    1.838726] pnp 00:05: [io  0x004e-0x004f]
[    1.842878] pnp 00:05: [io  0x0061]
[    1.846420] pnp 00:05: [io  0x0063]
[    1.849963] pnp 00:05: [io  0x0065]
[    1.853508] pnp 00:05: [io  0x0067]
[    1.857054] pnp 00:05: [io  0x0070]
[    1.860600] pnp 00:05: [io  0x0080]
[    1.864146] pnp 00:05: [io  0x0092]
[    1.867691] pnp 00:05: [io  0x00b2-0x00b3]
[    1.871843] pnp 00:05: [io  0x0680-0x069f]
[    1.875995] pnp 00:05: [io  0x1000-0x1003]
[    1.880144] pnp 00:05: [io  0x1004-0x1013]
[    1.884296] pnp 00:05: [io  0xffff]
[    1.887842] pnp 00:05: [io  0x0400-0x047f]
[    1.891992] pnp 00:05: [io  0x0500-0x057f]
[    1.896144] pnp 00:05: [io  0x164e-0x164f]
[    1.900330] system 00:05: [io  0x0680-0x069f] has been reserved
[    1.906304] system 00:05: [io  0x1000-0x1003] has been reserved
[    1.912276] system 00:05: [io  0x1004-0x1013] has been reserved
[    1.918248] system 00:05: [io  0xffff] has been reserved
[    1.923611] system 00:05: [io  0x0400-0x047f] has been reserved
[    1.929582] system 00:05: [io  0x0500-0x057f] has been reserved
[    1.935552] system 00:05: [io  0x164e-0x164f] has been reserved
[    1.941522] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.948367] pnp 00:06: [io  0x0070-0x0077]
[    1.952523] pnp 00:06: [irq 8]
[    1.955648] pnp 00:06: Plug and Play ACPI device, IDs PNP0b00 (active)
[    1.962230] pnp 00:07: [io  0x0060]
[    1.965777] pnp 00:07: [io  0x0064]
[    1.969325] pnp 00:07: [irq 1]
[    1.972450] pnp 00:07: Plug and Play ACPI device, IDs PNP0303 (active)
[    1.980087] pnp 00:08: [io  0x03f8-0x03ff]
[    1.984244] pnp 00:08: [irq 4]
[    1.987398] pnp 00:08: Plug and Play ACPI device, IDs PNP0501 (active)
[    1.994883] pnp 00:09: [io  0x0378-0x037b]
[    1.999041] pnp 00:09: [irq 7]
[    2.002181] pnp 00:09: Plug and Play ACPI device, IDs PNP0401 (active)
[    2.008768] pnp 00:0a: [irq 12]
[    2.011984] pnp 00:0a: Plug and Play ACPI device, IDs DLL040a PNP0f13
(active)
[    2.019424] pnp 00:0b: [mem 0xfed1c000-0xfed1ffff]
[    2.024273] pnp 00:0b: [mem 0xfed10000-0xfed13fff]
[    2.029118] pnp 00:0b: [mem 0xfed18000-0xfed18fff]
[    2.033964] pnp 00:0b: [mem 0xfed19000-0xfed19fff]
[    2.038810] pnp 00:0b: [mem 0xf8000000-0xfbffffff]
[    2.043654] pnp 00:0b: [mem 0xfed20000-0xfed3ffff]
[    2.048499] pnp 00:0b: [mem 0xfed90000-0xfed8ffff disabled]
[    2.054122] pnp 00:0b: [mem 0xfed45000-0xfed8ffff]
[    2.058965] pnp 00:0b: [mem 0xff000000-0xffffffff]
[    2.063810] pnp 00:0b: [mem 0xfee00000-0xfeefffff]
[    2.068654] pnp 00:0b: [mem 0xe96c0000-0xe96c0fff]
[    2.073532] system 00:0b: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    2.080199] system 00:0b: [mem 0xfed10000-0xfed13fff] has been reserved
[    2.086864] system 00:0b: [mem 0xfed18000-0xfed18fff] has been reserved
[    2.093526] system 00:0b: [mem 0xfed19000-0xfed19fff] has been reserved
[    2.100190] system 00:0b: [mem 0xf8000000-0xfbffffff] has been reserved
[    2.106853] system 00:0b: [mem 0xfed20000-0xfed3ffff] has been reserved
[    2.113515] system 00:0b: [mem 0xfed45000-0xfed8ffff] has been reserved
[    2.120178] system 00:0b: [mem 0xff000000-0xffffffff] could not be
reserved
[    2.127191] system 00:0b: [mem 0xfee00000-0xfeefffff] could not be
reserved
[    2.134202] system 00:0b: [mem 0xe96c0000-0xe96c0fff] has been reserved
[    2.140866] system 00:0b: Plug and Play ACPI device, IDs PNP0c02 (active)
[    2.147756] pnp 00:0c: [irq 23]
[    2.150977] pnp 00:0c: Plug and Play ACPI device, IDs SMO8800 (active)
[    2.158645] pnp 00:0d: [bus 3f]
[    2.161874] pnp 00:0d: Plug and Play ACPI device, IDs PNP0a03 (active)
[  118.756113] pnp: PnP ACPI: found 14 devices
[  118.760526] ACPI: ACPI bus type pnp unregistered
[  118.801225] PCI: max bus depth: 2 pci_try_num: 3
[  118.805957] pci 0000:00:1c.3: BAR 15: assigned [mem
0xe9700000-0xe98fffff 64bit pref]
[  118.813845] pci 0000:00:1c.2: BAR 15: assigned [mem
0xec000000-0xefffffff pref]
[  118.821214] pci 0000:00:1c.1: BAR 15: assigned [mem
0xe9900000-0xe9afffff 64bit pref]
[  118.829103] pci 0000:00:1c.0: BAR 15: assigned [mem
0xe9b00000-0xe9cfffff 64bit pref]
[  118.836989] pci 0000:00:01.0: PCI bridge to [bus 01-01]
[  118.842266] pci 0000:00:01.0:   bridge window [io  0x7000-0x7fff]
[  118.848411] pci 0000:00:01.0:   bridge window [mem 0xd0000000-0xe30fffff]
[  118.855248] pci 0000:00:1c.0: PCI bridge to [bus 02-02]
[  118.860526] pci 0000:00:1c.0:   bridge window [io  0x6000-0x6fff]
[  118.866673] pci 0000:00:1c.0:   bridge window [mem 0xe8200000-0xe95fffff]
[  118.873514] pci 0000:00:1c.0:   bridge window [mem
0xe9b00000-0xe9cfffff 64bit pref]
[  118.881320] pci 0000:00:1c.1: PCI bridge to [bus 03-03]
[  118.886601] pci 0000:00:1c.1:   bridge window [io  0x5000-0x5fff]
[  118.894453] pci 0000:00:1c.1:   bridge window [mem 0xe6e00000-0xe81fffff]
[  118.901292] pci 0000:00:1c.1:   bridge window [mem
0xe9900000-0xe9afffff 64bit pref]
[  118.909098] pci 0000:04:00.0: BAR 16: can't assign mem (size 0x4000000)
[  118.915764] pci 0000:04:00.0: BAR 15: assigned [mem
0xec000000-0xefffffff pref]
[  118.923133] pci 0000:04:00.0: BAR 14: assigned [io  0x2000-0x20ff]
[  118.929363] pci 0000:04:00.0: BAR 13: assigned [io  0x2400-0x24ff]
[  118.935595] pci 0000:04:00.0: CardBus bridge to [bus 05-08]
[  118.941220] pci 0000:04:00.0:   bridge window [io  0x2400-0x24ff]
[  118.947370] pci 0000:04:00.0:   bridge window [io  0x2000-0x20ff]
[  118.953517] pci 0000:04:00.0:   bridge window [mem
0xec000000-0xefffffff pref]

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Arend van Spriel <hidden>
Date: 2012-01-16 17:33:23

On 01/16/2012 03:00 PM, Arend van Spriel wrote:
On 01/14/2012 04:50 AM, Linus Torvalds wrote:
quoted
2012/1/13 Arend van Spriel [off-list ref]:
quoted
Upon suspend my laptop hangs (see trace below pulled from serial
console). I do not see the pr_debug in the suspend function (compiled
with -DDEBUG). Unfortunately the same happens when I don't insert bcma
and brcmsmac. I attached the kernel configuration.
Ok, I note that you do have MCE enabled.

The MCE problems should be fixed in current -git, and so it might be
worth re-testing with that.

                   Linus
Hi Linus,

I build a kernel with MCE disabled and tested that. It still hung. I
decided run the kernel with nomodeset parameter to avoid framebuffer
issues. Now the suspend worked, but resume failed. Just heard a beep and
that was it. I will refresh the tree and build another kernel with MCE
enabled.
I build a new kernel with MCE enabled. Same issue. I did not load bcma
or brcmsmac yet. Attached is trace I could pull from the kernel log
(str-test-*).

I also tried the pm_test and attached the trace for that
(str-devices-*). No bcma/brcmsmac test done with it yet.

Gr. AvS

-----------------------------------
version: 3.2.0-08699-ga93ce74

a93ce74 bcma: invalidate the mapped window over suspend/resume
d205a29 brcmsmac: remove PCI suspend/resume from bcma driver
310c9f8 bcma: connect the bcma bus suspend/resume to the bcma driver
suspend/res
6f55bd0 bcma: add stub for bcma_bus suspend()
83d836c bcma: convert suspend/resume to pm_ops
53999bf error: implicit declaration of function 'module_flags_taint'
122804e Merge branch 'v4l_for_linus' of
git://git.kernel.org/pub/scm/linux/kerne

Re: [0/5] bcma/brcmsmac suspend/resume cleanups and fixes

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-01-17 01:13:14

2012/1/16 Arend van Spriel [off-list ref]:
I build a new kernel with MCE enabled. Same issue. I did not load bcma
or brcmsmac yet. Attached is trace I could pull from the kernel log
(str-test-*).
Oh well. Everything looks fine in the test traces - the warnings are
annoying and nasty, but a known issue and not dangerous (and I have a
patch in my tree to fix them now).

So if the real suspend fails, it's some other subsystem that has
gotten broken. I don't think I have any other reports like that yet,
and there is not a lot to go on. If you could try to bisect it (I
assume plain Linux-3.2 works fine?) that woudl be wonderful, otherwise
I think we're stuck waiting for somebody else to hit it and figure it
out.

                 Linus
Next 14 of 14 remaining
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help