aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2012-09-11 00:34:13 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-13 16:37:52 -0400
commit2ace95103df2bcb574c9da5df96807e9b46f9b38 (patch)
treed559b5cf69b21afb8d5aa295714646519b042d98 /drivers
parent5cd75f0c0fd2b068dbd0ce3cb9460c3aafc0aae7 (diff)
bnx2x: fix registers dumped
Under traffic, there are several registers that when read (e.g., via 'ethtool -d') may cause the chip to stall. This patch corrects the registers read in such flows. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h25
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c2
2 files changed, 9 insertions, 18 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h
index 3e4cff9b1ebe..b926f58e983b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dump.h
@@ -401,11 +401,11 @@ static const struct reg_addr reg_addrs[] = {
401 { 0x70000, 8, RI_ALL_ONLINE }, 401 { 0x70000, 8, RI_ALL_ONLINE },
402 { 0x70020, 8184, RI_ALL_OFFLINE }, 402 { 0x70020, 8184, RI_ALL_OFFLINE },
403 { 0x78000, 8192, RI_E3E3B0_OFFLINE }, 403 { 0x78000, 8192, RI_E3E3B0_OFFLINE },
404 { 0x85000, 3, RI_ALL_ONLINE }, 404 { 0x85000, 3, RI_ALL_OFFLINE },
405 { 0x8501c, 7, RI_ALL_ONLINE }, 405 { 0x8501c, 7, RI_ALL_OFFLINE },
406 { 0x85048, 1, RI_ALL_ONLINE }, 406 { 0x85048, 1, RI_ALL_OFFLINE },
407 { 0x85200, 32, RI_ALL_ONLINE }, 407 { 0x85200, 32, RI_ALL_OFFLINE },
408 { 0xb0000, 16384, RI_E1H_ONLINE }, 408 { 0xb0000, 16384, RI_E1H_OFFLINE },
409 { 0xc1000, 7, RI_ALL_ONLINE }, 409 { 0xc1000, 7, RI_ALL_ONLINE },
410 { 0xc103c, 2, RI_E2E3E3B0_ONLINE }, 410 { 0xc103c, 2, RI_E2E3E3B0_ONLINE },
411 { 0xc1800, 2, RI_ALL_ONLINE }, 411 { 0xc1800, 2, RI_ALL_ONLINE },
@@ -581,17 +581,12 @@ static const struct reg_addr reg_addrs[] = {
581 { 0x140188, 3, RI_E1E1HE2E3_ONLINE }, 581 { 0x140188, 3, RI_E1E1HE2E3_ONLINE },
582 { 0x140194, 13, RI_ALL_ONLINE }, 582 { 0x140194, 13, RI_ALL_ONLINE },
583 { 0x140200, 6, RI_E1E1HE2E3_ONLINE }, 583 { 0x140200, 6, RI_E1E1HE2E3_ONLINE },
584 { 0x140220, 4, RI_E2E3_ONLINE },
585 { 0x140240, 4, RI_E2E3_ONLINE },
586 { 0x140260, 4, RI_E2E3_ONLINE }, 584 { 0x140260, 4, RI_E2E3_ONLINE },
587 { 0x140280, 4, RI_E2E3_ONLINE }, 585 { 0x140280, 4, RI_E2E3_ONLINE },
588 { 0x1402a0, 4, RI_E2E3_ONLINE },
589 { 0x1402c0, 4, RI_E2E3_ONLINE },
590 { 0x1402e0, 2, RI_E2E3_ONLINE }, 586 { 0x1402e0, 2, RI_E2E3_ONLINE },
591 { 0x1402e8, 2, RI_E2E3E3B0_ONLINE }, 587 { 0x1402e8, 2, RI_E2E3E3B0_ONLINE },
592 { 0x1402f0, 9, RI_E2E3_ONLINE }, 588 { 0x1402f0, 9, RI_E2E3_ONLINE },
593 { 0x140314, 44, RI_E3B0_ONLINE }, 589 { 0x140314, 44, RI_E3B0_ONLINE },
594 { 0x1403d0, 70, RI_E3B0_ONLINE },
595 { 0x144000, 4, RI_E1E1H_ONLINE }, 590 { 0x144000, 4, RI_E1E1H_ONLINE },
596 { 0x148000, 4, RI_E1E1H_ONLINE }, 591 { 0x148000, 4, RI_E1E1H_ONLINE },
597 { 0x14c000, 4, RI_E1E1H_ONLINE }, 592 { 0x14c000, 4, RI_E1E1H_ONLINE },
@@ -704,7 +699,6 @@ static const struct reg_addr reg_addrs[] = {
704 { 0x180398, 1, RI_E2E3E3B0_ONLINE }, 699 { 0x180398, 1, RI_E2E3E3B0_ONLINE },
705 { 0x1803a0, 5, RI_E2E3E3B0_ONLINE }, 700 { 0x1803a0, 5, RI_E2E3E3B0_ONLINE },
706 { 0x1803b4, 2, RI_E3E3B0_ONLINE }, 701 { 0x1803b4, 2, RI_E3E3B0_ONLINE },
707 { 0x180400, 1, RI_ALL_ONLINE },
708 { 0x180404, 255, RI_E1E1H_OFFLINE }, 702 { 0x180404, 255, RI_E1E1H_OFFLINE },
709 { 0x181000, 4, RI_ALL_ONLINE }, 703 { 0x181000, 4, RI_ALL_ONLINE },
710 { 0x181010, 1020, RI_ALL_OFFLINE }, 704 { 0x181010, 1020, RI_ALL_OFFLINE },
@@ -800,9 +794,9 @@ static const struct reg_addr reg_addrs[] = {
800 { 0x1b905c, 1, RI_E3E3B0_ONLINE }, 794 { 0x1b905c, 1, RI_E3E3B0_ONLINE },
801 { 0x1b9064, 1, RI_E3B0_ONLINE }, 795 { 0x1b9064, 1, RI_E3B0_ONLINE },
802 { 0x1b9080, 10, RI_E3B0_ONLINE }, 796 { 0x1b9080, 10, RI_E3B0_ONLINE },
803 { 0x1b9400, 14, RI_E2E3E3B0_ONLINE }, 797 { 0x1b9400, 14, RI_E2E3E3B0_OFFLINE },
804 { 0x1b943c, 19, RI_E2E3E3B0_ONLINE }, 798 { 0x1b943c, 19, RI_E2E3E3B0_OFFLINE },
805 { 0x1b9490, 10, RI_E2E3E3B0_ONLINE }, 799 { 0x1b9490, 10, RI_E2E3E3B0_OFFLINE },
806 { 0x1c0000, 2, RI_ALL_ONLINE }, 800 { 0x1c0000, 2, RI_ALL_ONLINE },
807 { 0x200000, 65, RI_ALL_ONLINE }, 801 { 0x200000, 65, RI_ALL_ONLINE },
808 { 0x20014c, 2, RI_E1HE2E3E3B0_ONLINE }, 802 { 0x20014c, 2, RI_E1HE2E3E3B0_ONLINE },
@@ -814,7 +808,6 @@ static const struct reg_addr reg_addrs[] = {
814 { 0x200398, 1, RI_E2E3E3B0_ONLINE }, 808 { 0x200398, 1, RI_E2E3E3B0_ONLINE },
815 { 0x2003a0, 1, RI_E2E3E3B0_ONLINE }, 809 { 0x2003a0, 1, RI_E2E3E3B0_ONLINE },
816 { 0x2003a8, 2, RI_E2E3E3B0_ONLINE }, 810 { 0x2003a8, 2, RI_E2E3E3B0_ONLINE },
817 { 0x200400, 1, RI_ALL_ONLINE },
818 { 0x200404, 255, RI_E1E1H_OFFLINE }, 811 { 0x200404, 255, RI_E1E1H_OFFLINE },
819 { 0x202000, 4, RI_ALL_ONLINE }, 812 { 0x202000, 4, RI_ALL_ONLINE },
820 { 0x202010, 2044, RI_ALL_OFFLINE }, 813 { 0x202010, 2044, RI_ALL_OFFLINE },
@@ -921,7 +914,6 @@ static const struct reg_addr reg_addrs[] = {
921 { 0x280398, 1, RI_E2E3E3B0_ONLINE }, 914 { 0x280398, 1, RI_E2E3E3B0_ONLINE },
922 { 0x2803a0, 1, RI_E2E3E3B0_ONLINE }, 915 { 0x2803a0, 1, RI_E2E3E3B0_ONLINE },
923 { 0x2803a8, 2, RI_E2E3E3B0_ONLINE }, 916 { 0x2803a8, 2, RI_E2E3E3B0_ONLINE },
924 { 0x280400, 1, RI_ALL_ONLINE },
925 { 0x280404, 255, RI_E1E1H_OFFLINE }, 917 { 0x280404, 255, RI_E1E1H_OFFLINE },
926 { 0x282000, 4, RI_ALL_ONLINE }, 918 { 0x282000, 4, RI_ALL_ONLINE },
927 { 0x282010, 2044, RI_ALL_OFFLINE }, 919 { 0x282010, 2044, RI_ALL_OFFLINE },
@@ -1031,7 +1023,6 @@ static const struct reg_addr reg_addrs[] = {
1031 { 0x300398, 1, RI_E2E3E3B0_ONLINE }, 1023 { 0x300398, 1, RI_E2E3E3B0_ONLINE },
1032 { 0x3003a0, 1, RI_E2E3E3B0_ONLINE }, 1024 { 0x3003a0, 1, RI_E2E3E3B0_ONLINE },
1033 { 0x3003a8, 2, RI_E2E3E3B0_ONLINE }, 1025 { 0x3003a8, 2, RI_E2E3E3B0_ONLINE },
1034 { 0x300400, 1, RI_ALL_ONLINE },
1035 { 0x300404, 255, RI_E1E1H_OFFLINE }, 1026 { 0x300404, 255, RI_E1E1H_OFFLINE },
1036 { 0x302000, 4, RI_ALL_ONLINE }, 1027 { 0x302000, 4, RI_ALL_ONLINE },
1037 { 0x302010, 2044, RI_ALL_OFFLINE }, 1028 { 0x302010, 2044, RI_ALL_OFFLINE },
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index bbf4cf00dd19..ebf40cd7aa10 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -775,7 +775,7 @@ static void bnx2x_get_regs(struct net_device *dev,
775 struct bnx2x *bp = netdev_priv(dev); 775 struct bnx2x *bp = netdev_priv(dev);
776 struct dump_hdr dump_hdr = {0}; 776 struct dump_hdr dump_hdr = {0};
777 777
778 regs->version = 0; 778 regs->version = 1;
779 memset(p, 0, regs->len); 779 memset(p, 0, regs->len);
780 780
781 if (!netif_running(bp->dev)) 781 if (!netif_running(bp->dev))