diff options
author | Chien Tung <chien.tin.tung@intel.com> | 2009-04-27 16:28:41 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-04-27 16:28:41 -0400 |
commit | 366835e24977f4590ef353bdc70f0dda278c2a84 (patch) | |
tree | a48c57e07bc0227281f184d48ae4343414d11392 /drivers/infiniband | |
parent | 010db4d127d1ae7324d5e00035fe4362e27f0508 (diff) |
RDMA/nes: Correct CDR loop filter setting for port 1
In commit 1b949324 ("RDMA/nes: Fix SFP+ PHY initialization") there is
a mistake in the clean up code that removed port 1 CDR loop filter
settings for 10G cards other than CX4. Put the correct setting back
for appropriate PHY types.
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 7e20a7fd3c3c..b5d9c4bae452 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -761,6 +761,9 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, | |||
761 | return 0; | 761 | return 0; |
762 | 762 | ||
763 | /* init serdes 1 */ | 763 | /* init serdes 1 */ |
764 | if (!(OneG_Mode && (nesadapter->phy_type[1] != NES_PHY_TYPE_PUMA_1G))) | ||
765 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000000FF); | ||
766 | |||
764 | switch (nesadapter->phy_type[1]) { | 767 | switch (nesadapter->phy_type[1]) { |
765 | case NES_PHY_TYPE_ARGUS: | 768 | case NES_PHY_TYPE_ARGUS: |
766 | case NES_PHY_TYPE_SFP_D: | 769 | case NES_PHY_TYPE_SFP_D: |
@@ -768,21 +771,20 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, | |||
768 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP1, 0x00000000); | 771 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP1, 0x00000000); |
769 | break; | 772 | break; |
770 | case NES_PHY_TYPE_CX4: | 773 | case NES_PHY_TYPE_CX4: |
771 | sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1); | ||
772 | sds &= 0xFFFFFFBF; | ||
773 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds); | ||
774 | if (wide_ppm_offset) | 774 | if (wide_ppm_offset) |
775 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000FFFAA); | 775 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000FFFAA); |
776 | else | ||
777 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000000FF); | ||
778 | break; | 776 | break; |
779 | case NES_PHY_TYPE_PUMA_1G: | 777 | case NES_PHY_TYPE_PUMA_1G: |
780 | sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1); | 778 | sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1); |
781 | sds |= 0x000000100; | 779 | sds |= 0x000000100; |
782 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds); | 780 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds); |
783 | } | 781 | } |
784 | if (!OneG_Mode) | 782 | if (!OneG_Mode) { |
785 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE1, 0x11110000); | 783 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE1, 0x11110000); |
784 | sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1); | ||
785 | sds &= 0xFFFFFFBF; | ||
786 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds); | ||
787 | } | ||
786 | } else { | 788 | } else { |
787 | /* init serdes 0 */ | 789 | /* init serdes 0 */ |
788 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008); | 790 | nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008); |