On Monday 26 November 2007 15:38:11 Larry Finger wrote:
> The BCM94311MCG rev 02 chip has an 802.11 core with revision 13 and
> has not been supported until now. The changes include the following:
> 
> (1) Add the 802.11 rev 13 device to the ssb_device_id table to load b43.
> (2) Add PHY revision 9 to the supported list.
> (3) Change the 2-bit routing code for address extensions to 0b10 rather
>     than the 0b01 used for the 32-bit case.
> (4) Remove some magic numbers in the DMA setup.
> 
> The DMA implementation for this chip supports full 64-bit addressing with
> one exception. Whenever the Descriptor Ring Buffer is in high memory, a
> fatal DMA error occurs. This problem was not present in 2.6.24-rc2 due
> to code to "Bias the placement of kernel pages at lower PFNs". When
> commit 44048d70 reverted that code, the DMA error appeared. As a "fix",
> use the GFP_DMA flag when allocating the buffer for 64-bit DMA. At present,
> this problem is thought to arise from a hardware error.
> 
> This patch has been tested on my system, and by Cédric Caumont
> <[EMAIL PROTECTED]> and by Matthieu PATOU <[EMAIL PROTECTED]> on a BCM4312.
> 
> Signed-off-by: Larry Finger <[EMAIL PROTECTED]>


>  static int alloc_ringmemory(struct b43_dmaring *ring)
>  {
>       struct device *dev = ring->dev->dev->dev;
> +     gfp_t flags = GFP_KERNEL;
> 
> +     /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K
> +      * alignment and 8K buffers for 64-bit DMA with 8K alignment. Testing
> +      * has shown that 4K is sufficient for the latter as long as the buffer
> +      * does not cross an 8K boundary.
> +      *
> +      * For unknown reasons - possibly a hardware error - the BCM4311 rev
> +      * 02, which uses 64-bit DMA, needs the ring buffer in very low memory,
> +      * which accounts for the GFP_DMA flag below.
> +      */
> +     if (ring->dma64)
> +             flags = GFP_DMA;

Whoops, didn't notice this before. This needs to be
        flags |= GFP_DMA;

>       ring->descbase = dma_alloc_coherent(dev, B43_DMA_RINGMEMSIZE,
> -                                         &(ring->dmabase), GFP_KERNEL);
> +                                         &(ring->dmabase), flags);
>       if (!ring->descbase) {
>               b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");
>               return -ENOMEM;

The rest is acked.

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

Reply via email to