summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bgmac.h
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2013-09-16 01:13:18 +0400
committerDavid S. Miller <davem@davemloft.net>2013-09-17 05:30:59 +0400
commit9900303ec7698d82c8f7a018b134a7c1ec557499 (patch)
tree8355a5903e2a1b829874c6f9daf1dbef892e2cc3 /drivers/net/ethernet/broadcom/bgmac.h
parent3647268dedfe95945be05c9dde2bdbda7cfc6e91 (diff)
downloadlinux-9900303ec7698d82c8f7a018b134a7c1ec557499.tar.xz
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];
};