• Michael Chan's avatar
    [TG3]: Add DMA address workaround · 72f2afb8
    Michael Chan authored
    Add DMA workaround for chips that do not support full 64-bit DMA
    addresses.
    
    5714, 5715, and 5780 chips only support DMA addresses less than 40
    bits. On 64-bit systems with IOMMU, set the dma_mask to 40-bit so
    that pci_map_xxx() calls will map the DMA address below 40 bits if
    necessary. On 64-bit systems without IOMMU, set the dma_mask to
    64-bit and check for DMA addresses exceeding the limit in
    tg3_start_xmit().
    
    5788 only supports 32-bit DMA so need to set the mask appropriately
    also.
    
    Thanks to Chris Elmquist at SGI for reporting and helping to debug
    the problem on 5714.
    
    Thanks to David Miller for explaining the HIGHMEM and DMA stuff.
    Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    72f2afb8
tg3.c 316 KB