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

2009-12-21 Thread Chris Vine
On Mon, 21 Dec 2009 17:18:01 -0500
William Bourque  wrote:
> Larry Finger wrote:
> > Hi,
> > 
> > I placed a number of test prints in my system trying to find where a
> > DMA data error might occur. In doing so, I found that 3 slots in the
> > DMA header cache cross a page boundary. Such a situation is allowed
> > on my system, but it might be forbidden on Atom processors. Please
> > try this really ugly hack to see if it makes any difference.
> 
> I confirm that the DMA error is still present with this patch.

Ditto.

Chris
___
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 2

2009-12-21 Thread Michael Buesch
On Monday 21 December 2009 23:20:06 Larry Finger wrote:
> Here, it was slot 74 that crossed the page boundary. At 110 bytes per
> every 2 slots, that works out to 4070 bytes for 0 - 73. From that, I
> infer that the cache starts on a page boundary.

Yeah well. For you.

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

2009-12-21 Thread Larry Finger
On 12/21/2009 04:18 PM, William Bourque wrote:
> 
> 
> Larry Finger wrote:
>> Hi,
>>
>> I placed a number of test prints in my system trying to find where a
>> DMA data error might occur. In doing so, I found that 3 slots in the
>> DMA header cache cross a page boundary. Such a situation is allowed on
>> my system, but it might be forbidden on Atom processors. Please try
>> this really ugly hack to see if it makes any difference.
> 
> I confirm that the DMA error is still present with this patch.

Thanks for testing. The results are as Michael expected, and as I feared.

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 2

2009-12-21 Thread Larry Finger
On 12/21/2009 04:11 PM, Michael Buesch wrote:
> On Monday 21 December 2009 23:02:39 Larry Finger wrote:
>> On 12/21/2009 03:47 PM, Michael Buesch wrote:
>>> On Monday 21 December 2009 22:31:10 Larry Finger wrote:
 Hi,

 I placed a number of test prints in my system trying to find where a
 DMA data error might occur. In doing so, I found that 3 slots in the
 DMA header cache cross a page boundary. Such a situation is allowed on
 my system, but it might be forbidden on Atom processors. Please try
 this really ugly hack to see if it makes any difference.
>>>
>>> First thing is that the DMA buffers are allowed to cross any boundary (and
>>> the header is just a buffer). The boundary requirements only apply to the
>>> memory holding the descriptors.
>>
>> That is what we will test for the Atom. I know it doesn't matter for
>> my CPU, but ...
> 
> I'm pretty sure the broadcom DMA engine is not _that_ braindead.
> (It is pretty weird, but not _that_ weird).
> It would effectively mean that we'd have to bouncebuffer _every_ TX packet.

I'm not that worried about the Broadcom implementation as I am about
the support chips on the Netbooks.

>>> Second thing is: How does the patch prevent a boundary crossing?
>>
>> The number of slots is reduced to the point that the header cache fits
>> in one page, just as the RX header cache does. As I said, this is
>> really ugly. If this fixes the problem, then a more elegant fix will
>> be needed.
> 
> But the allocation is not required to be aligned to the page start.
> The first header might start at offset 4000 of a page, so you cross
> the page border after the first few headers.

Here, it was slot 74 that crossed the page boundary. At 110 bytes per
every 2 slots, that works out to 4070 bytes for 0 - 73. From that, I
infer that the cache starts on a page boundary.

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 2

2009-12-21 Thread William Bourque


Larry Finger wrote:
> Hi,
> 
> I placed a number of test prints in my system trying to find where a
> DMA data error might occur. In doing so, I found that 3 slots in the
> DMA header cache cross a page boundary. Such a situation is allowed on
> my system, but it might be forbidden on Atom processors. Please try
> this really ugly hack to see if it makes any difference.

I confirm that the DMA error is still present with this patch.

- William

> 
> Thanks,
> 
> 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 2

2009-12-21 Thread Michael Buesch
On Monday 21 December 2009 23:02:39 Larry Finger wrote:
> On 12/21/2009 03:47 PM, Michael Buesch wrote:
> > On Monday 21 December 2009 22:31:10 Larry Finger wrote:
> >> Hi,
> >>
> >> I placed a number of test prints in my system trying to find where a
> >> DMA data error might occur. In doing so, I found that 3 slots in the
> >> DMA header cache cross a page boundary. Such a situation is allowed on
> >> my system, but it might be forbidden on Atom processors. Please try
> >> this really ugly hack to see if it makes any difference.
> > 
> > First thing is that the DMA buffers are allowed to cross any boundary (and
> > the header is just a buffer). The boundary requirements only apply to the
> > memory holding the descriptors.
> 
> That is what we will test for the Atom. I know it doesn't matter for
> my CPU, but ...

I'm pretty sure the broadcom DMA engine is not _that_ braindead.
(It is pretty weird, but not _that_ weird).
It would effectively mean that we'd have to bouncebuffer _every_ TX packet.

> > Second thing is: How does the patch prevent a boundary crossing?
> 
> The number of slots is reduced to the point that the header cache fits
> in one page, just as the RX header cache does. As I said, this is
> really ugly. If this fixes the problem, then a more elegant fix will
> be needed.

But the allocation is not required to be aligned to the page start.
The first header might start at offset 4000 of a page, so you cross
the page border after the first few headers.

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

2009-12-21 Thread Larry Finger
On 12/21/2009 03:47 PM, Michael Buesch wrote:
> On Monday 21 December 2009 22:31:10 Larry Finger wrote:
>> Hi,
>>
>> I placed a number of test prints in my system trying to find where a
>> DMA data error might occur. In doing so, I found that 3 slots in the
>> DMA header cache cross a page boundary. Such a situation is allowed on
>> my system, but it might be forbidden on Atom processors. Please try
>> this really ugly hack to see if it makes any difference.
> 
> First thing is that the DMA buffers are allowed to cross any boundary (and
> the header is just a buffer). The boundary requirements only apply to the
> memory holding the descriptors.

That is what we will test for the Atom. I know it doesn't matter for
my CPU, but ...

> Second thing is: How does the patch prevent a boundary crossing?

The number of slots is reduced to the point that the header cache fits
in one page, just as the RX header cache does. As I said, this is
really ugly. If this fixes the problem, then a more elegant fix will
be needed.

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 2

2009-12-21 Thread Michael Buesch
On Monday 21 December 2009 22:31:10 Larry Finger wrote:
> Hi,
> 
> I placed a number of test prints in my system trying to find where a
> DMA data error might occur. In doing so, I found that 3 slots in the
> DMA header cache cross a page boundary. Such a situation is allowed on
> my system, but it might be forbidden on Atom processors. Please try
> this really ugly hack to see if it makes any difference.

First thing is that the DMA buffers are allowed to cross any boundary (and
the header is just a buffer). The boundary requirements only apply to the
memory holding the descriptors.

Second thing is: How does the patch prevent a boundary crossing?

-- 
Greetings, Michael.
___
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 2

2009-12-21 Thread Larry Finger
Hi,

I placed a number of test prints in my system trying to find where a
DMA data error might occur. In doing so, I found that 3 slots in the
DMA header cache cross a page boundary. Such a situation is allowed on
my system, but it might be forbidden on Atom processors. Please try
this really ugly hack to see if it makes any difference.

Thanks,

Larry


Index: wireless-testing/drivers/net/wireless/b43/dma.h
===
--- wireless-testing.orig/drivers/net/wireless/b43/dma.h
+++ wireless-testing/drivers/net/wireless/b43/dma.h
@@ -160,7 +160,7 @@ struct b43_dmadesc_generic {
 #define B43_DMA0_RX_FRAMEOFFSET30
 
 /* DMA engine tuning knobs */
-#define B43_TXRING_SLOTS   256
+#define B43_TXRING_SLOTS   74
 #define B43_RXRING_SLOTS   64
 #define B43_DMA0_RX_BUFFERSIZE IEEE80211_MAX_FRAME_LEN
 
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev