diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-07-20 13:52:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-22 09:51:12 -0400 |
commit | a9770a815d280d6aa2da406e159eff92b880670e (patch) | |
tree | 2337d004f5c95677c1e925dfb3b73e939ecf0d19 /drivers | |
parent | 78c1ee7e61af4eb3f6c8a553ca56036e3734121f (diff) |
ssb: return correct translation bit for 64-bit DMA
Remove b43's workarounds at the same time. Other users of
ssb_dma_translation do not support any 64-bit DMA devices, so they are
not affected.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 6 | ||||
-rw-r--r-- | drivers/ssb/main.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 78c5c82dec8d..efff2419388d 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -174,7 +174,7 @@ static void op64_fill_descriptor(struct b43_dmaring *ring, | |||
174 | addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); | 174 | addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); |
175 | addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) | 175 | addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) |
176 | >> SSB_DMA_TRANSLATION_SHIFT; | 176 | >> SSB_DMA_TRANSLATION_SHIFT; |
177 | addrhi |= (ring->dev->dma.translation << 1); | 177 | addrhi |= ring->dev->dma.translation; |
178 | if (slot == ring->nr_slots - 1) | 178 | if (slot == ring->nr_slots - 1) |
179 | ctl0 |= B43_DMA64_DCTL0_DTABLEEND; | 179 | ctl0 |= B43_DMA64_DCTL0_DTABLEEND; |
180 | if (start) | 180 | if (start) |
@@ -678,7 +678,7 @@ static int dmacontroller_setup(struct b43_dmaring *ring) | |||
678 | b43_dma_write(ring, B43_DMA64_TXRINGHI, | 678 | b43_dma_write(ring, B43_DMA64_TXRINGHI, |
679 | ((ringbase >> 32) & | 679 | ((ringbase >> 32) & |
680 | ~SSB_DMA_TRANSLATION_MASK) | 680 | ~SSB_DMA_TRANSLATION_MASK) |
681 | | (trans << 1)); | 681 | | trans); |
682 | } else { | 682 | } else { |
683 | u32 ringbase = (u32) (ring->dmabase); | 683 | u32 ringbase = (u32) (ring->dmabase); |
684 | 684 | ||
@@ -715,7 +715,7 @@ static int dmacontroller_setup(struct b43_dmaring *ring) | |||
715 | b43_dma_write(ring, B43_DMA64_RXRINGHI, | 715 | b43_dma_write(ring, B43_DMA64_RXRINGHI, |
716 | ((ringbase >> 32) & | 716 | ((ringbase >> 32) & |
717 | ~SSB_DMA_TRANSLATION_MASK) | 717 | ~SSB_DMA_TRANSLATION_MASK) |
718 | | (trans << 1)); | 718 | | trans); |
719 | b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots * | 719 | b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots * |
720 | sizeof(struct b43_dmadesc64)); | 720 | sizeof(struct b43_dmadesc64)); |
721 | } else { | 721 | } else { |
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 57b7b6460896..6ec6e099fe04 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -1266,7 +1266,10 @@ u32 ssb_dma_translation(struct ssb_device *dev) | |||
1266 | case SSB_BUSTYPE_SSB: | 1266 | case SSB_BUSTYPE_SSB: |
1267 | return 0; | 1267 | return 0; |
1268 | case SSB_BUSTYPE_PCI: | 1268 | case SSB_BUSTYPE_PCI: |
1269 | return SSB_PCI_DMA; | 1269 | if (ssb_read32(dev, SSB_TMSHIGH) & SSB_TMSHIGH_DMA64) |
1270 | return SSB_PCIE_DMA_H32; | ||
1271 | else | ||
1272 | return SSB_PCI_DMA; | ||
1270 | default: | 1273 | default: |
1271 | __ssb_dma_not_implemented(dev); | 1274 | __ssb_dma_not_implemented(dev); |
1272 | } | 1275 | } |