diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-11-24 03:31:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-24 14:06:16 -0500 |
commit | b75cc0e4c1caac63941d96a73b2214e8007b934b (patch) | |
tree | 46d69eeee14366d7eebe2f9606308c9394d2c06a | |
parent | 5093eedc8bdfd7d906836a44a248f66a99e27d22 (diff) |
tg3: Assign correct tx margin for 5719
Commit d309a46e42542223946d3a9e4e239fdc945cb53e, entitled
"tg3: 5719: Prevent tx data corruption", was supposed to contain the tx
margin adjustment but it looks like it somehow was omitted. This patch
fixes the problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/tg3.c | 4 | ||||
-rw-r--r-- | drivers/net/tg3.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index ca6b3cbf44d5..4dc07564e141 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -8206,6 +8206,10 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
8206 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 || | 8206 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 || |
8207 | (tp->tg3_flags3 & TG3_FLG3_5717_PLUS)) { | 8207 | (tp->tg3_flags3 & TG3_FLG3_5717_PLUS)) { |
8208 | val = tr32(TG3_RDMA_RSRVCTRL_REG); | 8208 | val = tr32(TG3_RDMA_RSRVCTRL_REG); |
8209 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) { | ||
8210 | val &= ~TG3_RDMA_RSRVCTRL_TXMRGN_MASK; | ||
8211 | val |= TG3_RDMA_RSRVCTRL_TXMRGN_320B; | ||
8212 | } | ||
8209 | tw32(TG3_RDMA_RSRVCTRL_REG, | 8213 | tw32(TG3_RDMA_RSRVCTRL_REG, |
8210 | val | TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX); | 8214 | val | TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX); |
8211 | } | 8215 | } |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 4a1974804b9f..06a4e7e8fff3 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -1327,6 +1327,8 @@ | |||
1327 | 1327 | ||
1328 | #define TG3_RDMA_RSRVCTRL_REG 0x00004900 | 1328 | #define TG3_RDMA_RSRVCTRL_REG 0x00004900 |
1329 | #define TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX 0x00000004 | 1329 | #define TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX 0x00000004 |
1330 | #define TG3_RDMA_RSRVCTRL_TXMRGN_320B 0x28000000 | ||
1331 | #define TG3_RDMA_RSRVCTRL_TXMRGN_MASK 0xffe00000 | ||
1330 | /* 0x4904 --> 0x4910 unused */ | 1332 | /* 0x4904 --> 0x4910 unused */ |
1331 | 1333 | ||
1332 | #define TG3_LSO_RD_DMA_CRPTEN_CTRL 0x00004910 | 1334 | #define TG3_LSO_RD_DMA_CRPTEN_CTRL 0x00004910 |