summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bgmac.h
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2013-09-15 23:13:18 +0200
committerDavid S. Miller <davem@davemloft.net>2013-09-17 03:30:59 +0200
commit9900303ec7698d82c8f7a018b134a7c1ec557499 (patch)
tree8355a5903e2a1b829874c6f9daf1dbef892e2cc3 /drivers/net/ethernet/broadcom/bgmac.h
parentbgmac: allow bigger et_swtype nvram variable (diff)
downloadlinux-9900303ec7698d82c8f7a018b134a7c1ec557499.tar.xz
linux-9900303ec7698d82c8f7a018b134a7c1ec557499.zip
bgmac: implement unaligned addressing for DMA rings that support it
This is important patch for new devices that support unaligned addressing. That devices suffer from the backward-compatibility bug in DMA engine. In theory we should be able to use old mechanism, but in practice DMA address seems to be randomly copied into status register when hardware reaches end of a ring. This breaks reading slot number from status register and we can't use DMA anymore. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bgmac.h')
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.h b/drivers/net/ethernet/broadcom/bgmac.h
index 12a35cf9bb81..66c8afbdc8c7 100644
--- a/drivers/net/ethernet/broadcom/bgmac.h
+++ b/drivers/net/ethernet/broadcom/bgmac.h
@@ -384,6 +384,8 @@ struct bgmac_dma_ring {
u16 mmio_base;
struct bgmac_dma_desc *cpu_base;
dma_addr_t dma_base;
+ u32 index_base; /* Used for unaligned rings only, otherwise 0 */
+ bool unaligned;
struct bgmac_slot_info slots[BGMAC_RX_RING_SLOTS];
};