Search Linux Wireless

Re: [PATCH V2] b43: Changes to enable BCM4311 rev 02 with wireless core revision 13

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 23 November 2007 06:36:55 Larry Finger wrote:
> Michael Buesch wrote:
> > 
> > partially acked.
> > Though, I'm not quite sure yet why you remove that
> > address extension bits. The specs clearly say that they _are_ there.
> > And it makes sense to use them, as two bytes of the address are used
> > for the routing stuff. So the highest 2 bits of the address have to be put
> > somewhere else. That's the "Transmit Channel Control Word" and
> > "Receive Channel Control Word" where 0x00030000 are the extension bits.
> > 
> 
> The appropriate section of dmacontroller_setup() in my patched source is as follows:
> 
>         if (ring->tx) {
>                 if (ring->dma64) {
>                         u64 ringbase = (u64) (ring->dmabase);
> 
>                         b43_dma_write(ring, B43_DMA64_TXCTL,
>                                       B43_DMA64_TXENABLE);
>                         b43_dma_write(ring, B43_DMA64_TXRINGLO,
>                                       (ringbase & 0xFFFFFFFF));
>                         b43_dma_write(ring, B43_DMA64_TXRINGHI,
>                                       (ringbase >> 32));
>                 } else {
> 			...... untouched 32-bit stuff ....
> 		}
>         } else {
>                 err = alloc_initial_descbuffers(ring);
>                 if (err)
>                         goto out;
>                 if (ring->dma64) {
>                         u64 ringbase = (u64) (ring->dmabase);
> 
>                         value = (ring->frameoffset << B43_DMA64_RXFROFF_SHIFT)
>                                 | B43_DMA64_RXENABLE;
>                         b43_dma_write(ring, B43_DMA64_RXCTL, value);
>                         b43_dma_write(ring, B43_DMA64_RXRINGLO,
>                                       (ringbase & 0xFFFFFFFF));
>                         b43_dma_write(ring, B43_DMA64_RXRINGHI,
>                                       (ringbase >> 32));
>                         b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots *
>                                       sizeof(struct b43_dmadesc64));
>                 } else {
> 			........... 32-bit stuff ........
> 	}
> 
> No address extensions are used here because the specs clearly state that a flat 64-bit address is
> used to specify the Descriptor Ring address. My code matches the specs.

I'm not sure which specifications you use, but here it clearly describes the
extension bits:
http://bcm-v4.sipsolutions.net/802.11/DMA#TransmitChannelControlWord-1

> > However I do think that this might be related to the bug you are explaining
> > in the comment:
> >> +	 * 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.

> the error, and that part does not use any extension bits. Secondly, the address extension stuff
> would only apply if my computer had more than 2^(62) bytes of RAM, which is something like 10
> billion GB - an amount that probably exceeds the total RAM in the world.

This is not true. We live in a world with IO-MMUs.

-- 
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux