diff options
-rw-r--r-- | drivers/net/bnx2.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index da7c3b0c533c..9789f05cbc99 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -1811,6 +1811,7 @@ bnx2_init_context(struct bnx2 *bp) | |||
1811 | vcid = 96; | 1811 | vcid = 96; |
1812 | while (vcid) { | 1812 | while (vcid) { |
1813 | u32 vcid_addr, pcid_addr, offset; | 1813 | u32 vcid_addr, pcid_addr, offset; |
1814 | int i; | ||
1814 | 1815 | ||
1815 | vcid--; | 1816 | vcid--; |
1816 | 1817 | ||
@@ -1831,16 +1832,20 @@ bnx2_init_context(struct bnx2 *bp) | |||
1831 | pcid_addr = vcid_addr; | 1832 | pcid_addr = vcid_addr; |
1832 | } | 1833 | } |
1833 | 1834 | ||
1834 | REG_WR(bp, BNX2_CTX_VIRT_ADDR, 0x00); | 1835 | for (i = 0; i < (CTX_SIZE / PHY_CTX_SIZE); i++) { |
1835 | REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); | 1836 | vcid_addr += (i << PHY_CTX_SHIFT); |
1837 | pcid_addr += (i << PHY_CTX_SHIFT); | ||
1836 | 1838 | ||
1837 | /* Zero out the context. */ | 1839 | REG_WR(bp, BNX2_CTX_VIRT_ADDR, 0x00); |
1838 | for (offset = 0; offset < PHY_CTX_SIZE; offset += 4) { | 1840 | REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); |
1839 | CTX_WR(bp, 0x00, offset, 0); | ||
1840 | } | ||
1841 | 1841 | ||
1842 | REG_WR(bp, BNX2_CTX_VIRT_ADDR, vcid_addr); | 1842 | /* Zero out the context. */ |
1843 | REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); | 1843 | for (offset = 0; offset < PHY_CTX_SIZE; offset += 4) |
1844 | CTX_WR(bp, 0x00, offset, 0); | ||
1845 | |||
1846 | REG_WR(bp, BNX2_CTX_VIRT_ADDR, vcid_addr); | ||
1847 | REG_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); | ||
1848 | } | ||
1844 | } | 1849 | } |
1845 | } | 1850 | } |
1846 | 1851 | ||