Re: Fatal DMA error problem with netbook and BCM4312 - Test 3

2009-12-28 Thread Michael Buesch
On Monday 28 December 2009 20:09:05 Larry Finger wrote:
> I did get that wrong. The Broadcom code does the equivalent of
> 
> tmp = tmp & ~0x77 | 3

Ok, so you need my version of the masking.

> which is what my code ended up doing by accident, but REQ is set to zero.

Yeah, OK to me. It's a workaround after all...

> Are these values discussed anywhere in the open? I have not found anything
> regarding the SSB configuration.

Well, there's no real docs on these, but I'm pretty sure they are related
to the posting of messages on the SSB bus. These values are timeouts for
the communication on the bus. So yeah, I think in _theory_ it can cause
DMA (and other) trouble.

-- 
Greetings, Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: Fatal DMA error problem with netbook and BCM4312 - Test 3

2009-12-28 Thread Larry Finger
On 12/28/2009 12:33 PM, Michael Buesch wrote:
> On Monday 28 December 2009 05:49:14 Larry Finger wrote:
>> +tmp &= ~(SSB_IMCFGLO_SERTO | SSB_IMCFGLO_REQTO_SHIFT);
> 
> This does not make any sense.
> Did you mean:
> + tmp &= ~(SSB_IMCFGLO_SERTO | SSB_IMCFGLO_REQTO);
> 
> 
>> +tmp |= 3;
> 
> So you set SER-timeout to 3 and REQ-timeout to 0. Is that what we want?
> REQ=zero smells fishy to me, but if the broadcom code also does this, I'm OK 
> with it.

I did get that wrong. The Broadcom code does the equivalent of

tmp = tmp & ~0x77 | 3

which is what my code ended up doing by accident, but REQ is set to zero.

Are these values discussed anywhere in the open? I have not found anything
regarding the SSB configuration.

Larry
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: Fatal DMA error problem with netbook and BCM4312 - Test 3

2009-12-28 Thread Michael Buesch
On Monday 28 December 2009 05:49:14 Larry Finger wrote:
>+  tmp &= ~(SSB_IMCFGLO_SERTO | SSB_IMCFGLO_REQTO_SHIFT);

This does not make any sense.
Did you mean:
+   tmp &= ~(SSB_IMCFGLO_SERTO | SSB_IMCFGLO_REQTO);


>+  tmp |= 3;

So you set SER-timeout to 3 and REQ-timeout to 0. Is that what we want?
REQ=zero smells fishy to me, but if the broadcom code also does this, I'm OK 
with it.

-- 
Greetings, Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: Fatal DMA error problem with netbook and BCM4312 - Test 3

2009-12-28 Thread Larry Finger
On 12/28/2009 09:52 AM, Andrew Benton wrote:
> 
> Sadly it does not work. Tested with the mainline kernel. The DMA errors 
> persist.

Shucks!!! I was hoping for a late Christmas present. Unfortunately, more coal in
my stocking.

As usual, thanks for testing.

Larry
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: Fatal DMA error problem with netbook and BCM4312 - Test 3

2009-12-28 Thread Andrew Benton
On 28/12/09 04:49, Larry Finger wrote:
> Hi,
>
> In the latest Broadcom driver, I found code that sets the timeout field of the
> SSB configuration for some BCM4311 and all BCM4312 devices. Please test this
> patch following a cold boot.
>

Sadly it does not work. Tested with the mainline kernel. The DMA errors 
persist.

Andy
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Fatal DMA error problem with netbook and BCM4312 - Test 3

2009-12-27 Thread Larry Finger
Hi,

In the latest Broadcom driver, I found code that sets the timeout field of the
SSB configuration for some BCM4311 and all BCM4312 devices. Please test this
patch following a cold boot.

Thanks,

Larry



Index: wireless-testing/drivers/ssb/driver_pcicore.c
===
--- wireless-testing.orig/drivers/ssb/driver_pcicore.c
+++ wireless-testing/drivers/ssb/driver_pcicore.c
@@ -621,6 +621,14 @@ int ssb_pcicore_dev_irqvecs_enable(struc
tmp |= 0x40;
ssb_pcie_write(pc, 0x100, tmp);
}
+   if (bus->chip_id == 0x4312 ||
+  (bus->chip_id == 0x4311 && bus->chip_rev == 2)) {
+   tmp = ssb_read32(pdev, SSB_IMCFGLO);
+   tmp &= ~(SSB_IMCFGLO_SERTO | SSB_IMCFGLO_REQTO_SHIFT);
+   tmp |= 3;
+   ssb_write32(pdev, SSB_IMCFGLO, tmp);
+   ssb_commit_settings(bus);
+   }
}
pc->setup_done = 1;
 out:
Index: wireless-testing/drivers/ssb/driver_chipcommon_pmu.c
===
--- wireless-testing.orig/drivers/ssb/driver_chipcommon_pmu.c
+++ wireless-testing/drivers/ssb/driver_chipcommon_pmu.c
@@ -424,9 +424,9 @@ static void ssb_pmu_resources_init(struc
switch (bus->chip_id) {
case 0x4312:
/* We keep the default settings:
-* min_msk = 0xCBB
 * max_msk = 0x7
 */
+   min_msk = 0xCBB;
break;
case 0x4325:
/* Power OTP down later. */
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev