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


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 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 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 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


Problem with b43_get_and_map_ringmem()

2009-12-28 Thread Larry Finger
Michael,

There is something a little funky with this routine. If the call to
__b43_get_and_map_ringmem() fails because the memory allocated is not within the
DMA region supported by the card, there is no way for execution to reach the
section that takes action to fix the problem. As you have probably seen, this is
likely the underlying cause of the regression reported in Bugzilla No. 14844.
Testing by the OP has not been done, but it fixed the same problem here.

Fixing this will likely be a two-step process. For 2.6.33, I am proposing the
following simple patch, which is essentially what is being tested:

Index: wireless-testing/drivers/net/wireless/b43/dma.c
===
--- wireless-testing.orig/drivers/net/wireless/b43/dma.c
+++ wireless-testing/drivers/net/wireless/b43/dma.c
@@ -439,9 +439,14 @@ static void * b43_get_and_map_ringmem(st
  dma_addr_t *dmaaddr, size_t size)
 {
void *base;
+   gfp_t flags = GFP_KERNEL;

+   if (unlikely(ring-type == B43_DMA_30BIT))
+   flags |= GFP_DMA;
+   else if (unlikely(ring-type == B43_DMA_32BIT))
+   flags |= GFP_DMA32;
base = __b43_get_and_map_ringmem(ring, dmaaddr, size,
-GFP_KERNEL);
+flags);
if (!base) {
b43err(ring-dev-wl, Failed to allocate or map pages 
   for DMA ringmemory\n);

Comments?

For 2.6.34, a more complete rework is probably needed.

Larry

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


Re: Problem with b43_get_and_map_ringmem()

2009-12-28 Thread Michael Buesch
As I have said several times. I am not interested in fixing this. Just revert 
the patch.

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