]> git.baikalelectronics.ru Git - kernel.git/commit
[TG3]: Add DMA address workaround
authorMichael Chan <mchan@broadcom.com>
Tue, 7 Mar 2006 03:28:35 +0000 (19:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Mar 2006 03:28:35 +0000 (19:28 -0800)
commit3abeac1824bc0c6dadc2d2f5e5435a62c023b596
tree1cc6884bf4e48822423d23d68d7b2699cd2e68fd
parentdf7ff7239d2b790205352608da763f9b7cf47fca
[TG3]: Add DMA address workaround

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: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c