On 02/01/2011 08:41 AM, dylan cristiani wrote:
> i have some news: i went back to kernel version 2.6.26 and it worked
> so i moved forward kernel by kernel and it works till kernel 2.6.32;
> first kernel that shows up the problem is 2.6.33 and, at module loading
> time i can see for the first time, after loading firmware, the following
> debug info (don't know if it's helpful but same message happears in
> every non-working kernel from 2.6.33 to 2.6.37):
> 
> "b43-phy0 warning: Invalid max-TX-power value in SPROM"

Between 2.6.32 and 2.6.33, there were only 6 patches that touched SSB. Two of
them (e33761e and 3ba6018) affected SPROM writing, one (37ace3d) was only for
PCMCIA, and one (ac2752c) only affected logging of a core scan. The two
remaining are 391ae22 that fixed an SDIO typo and 8b45499 that put host pointers
in a union should be the only ones that needed testing.

Those patches are attached. Try each of them in turn to 2.6.33 with a
'patch -p1 -R < patch_name' If it doesn't help, use the same command without the
"-R" to reapply. I'm guessing that 8b45499 is more likely to be the problem, and
I would try it first.

Larry
commit 391ae22ae5726d2a8cebfa62879635c54a349642
Author: Michael Buesch <[email protected]>
Date:   Wed Feb 3 18:24:35 2010 +0100

    ssb: Fix CONFIG_SSB_SDIOHOST typo
    
    This fixes a CONFIG_SSB_SDIOHOST typo.
    
    Signed-off-by: Michael Buesch <[email protected]>
    Reported-by: Christoph Egger <[email protected]>
    Tested-By: Albert Herranz <[email protected]>
    Signed-off-by: John W. Linville <[email protected]>

diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 5681ebe..03dfd27 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -494,8 +494,7 @@ static int ssb_devices_register(struct ssb_bus *bus)
 #endif
                        break;
                case SSB_BUSTYPE_SDIO:
-#ifdef CONFIG_SSB_SDIO
-                       sdev->irq = bus->host_sdio->dev.irq;
+#ifdef CONFIG_SSB_SDIOHOST
                        dev->parent = &bus->host_sdio->dev;
 #endif
                        break;
commit 8b45499ccb8a93cd68b1a8766786c2f8ea991ae2
Author: Michael Buesch <[email protected]>
Date:   Fri Oct 9 20:32:10 2009 +0200

    ssb: Put host pointers into a union
    
    This slightly shrinks the structure.
    
    Signed-off-by: Michael Buesch <[email protected]>
    Signed-off-by: John W. Linville <[email protected]>

diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 538c570..f1dcd79 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -551,13 +551,13 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
        might_sleep_if(pdev->id.coreid != SSB_DEV_PCI);
 
        /* Enable interrupts for this device. */
-       if (bus->host_pci &&
-           ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) {
+       if ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE)) {
                u32 coremask;
 
                /* Calculate the "coremask" for the device. */
                coremask = (1 << dev->core_index);
 
+               SSB_WARN_ON(bus->bustype != SSB_BUSTYPE_PCI);
                err = pci_read_config_dword(bus->host_pci, SSB_PCI_IRQMASK, 
&tmp);
                if (err)
                        goto out;
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 3d0a9ff..24f9885 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -269,7 +269,8 @@ struct ssb_bus {
 
        const struct ssb_bus_ops *ops;
 
-       /* The core in the basic address register window. (PCI bus only) */
+       /* The core currently mapped into the MMIO window.
+        * Not valid on all host-buses. So don't use outside of SSB. */
        struct ssb_device *mapped_device;
        union {
                /* Currently mapped PCMCIA segment. (bustype == 
SSB_BUSTYPE_PCMCIA only) */
@@ -281,14 +282,17 @@ struct ssb_bus {
         * On PCMCIA-host busses this is used to protect the whole MMIO access. 
*/
        spinlock_t bar_lock;
 
-       /* The bus this backplane is running on. */
+       /* The host-bus this backplane is running on. */
        enum ssb_bustype bustype;
-       /* Pointer to the PCI bus (only valid if bustype == SSB_BUSTYPE_PCI). */
-       struct pci_dev *host_pci;
-       /* Pointer to the PCMCIA device (only if bustype == 
SSB_BUSTYPE_PCMCIA). */
-       struct pcmcia_device *host_pcmcia;
-       /* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */
-       struct sdio_func *host_sdio;
+       /* Pointers to the host-bus. Check bustype before using any of these 
pointers. */
+       union {
+               /* Pointer to the PCI bus (only valid if bustype == 
SSB_BUSTYPE_PCI). */
+               struct pci_dev *host_pci;
+               /* Pointer to the PCMCIA device (only if bustype == 
SSB_BUSTYPE_PCMCIA). */
+               struct pcmcia_device *host_pcmcia;
+               /* Pointer to the SDIO device (only if bustype == 
SSB_BUSTYPE_SDIO). */
+               struct sdio_func *host_sdio;
+       };
 
        /* See enum ssb_quirks */
        unsigned int quirks;
_______________________________________________
b43-dev mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/b43-dev

Reply via email to