aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2013-02-22 03:01:10 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-24 20:16:02 -0500
commit732ac8cacbbbdbf9f5ba92299cc747db3abfefd0 (patch)
treea259460dc1de213641bf1ed496131f72861254ff /drivers
parent62ed839dba70edfdc20a9aab92edff0451078584 (diff)
bnx2x: remove dead code and make local funcs static
Sparse warned about several functions that were unnecessarily global. After making them static, discovered that several functions were actually never used. Compile tested only. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Eilon Greenstein <eilong@broadcomo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c58
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c4
2 files changed, 2 insertions, 60 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index c6da77fa9d07..1663e0b6b5a0 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -13013,64 +13013,6 @@ static int bnx2x_84833_common_init_phy(struct bnx2x *bp,
13013 return 0; 13013 return 0;
13014} 13014}
13015 13015
13016static int bnx2x_84833_pre_init_phy(struct bnx2x *bp,
13017 struct bnx2x_phy *phy,
13018 u8 port)
13019{
13020 u16 val, cnt;
13021 /* Wait for FW completing its initialization. */
13022 for (cnt = 0; cnt < 1500; cnt++) {
13023 bnx2x_cl45_read(bp, phy,
13024 MDIO_PMA_DEVAD,
13025 MDIO_PMA_REG_CTRL, &val);
13026 if (!(val & (1<<15)))
13027 break;
13028 usleep_range(1000, 2000);
13029 }
13030 if (cnt >= 1500) {
13031 DP(NETIF_MSG_LINK, "84833 reset timeout\n");
13032 return -EINVAL;
13033 }
13034
13035 /* Put the port in super isolate mode. */
13036 bnx2x_cl45_read(bp, phy,
13037 MDIO_CTL_DEVAD,
13038 MDIO_84833_TOP_CFG_XGPHY_STRAP1, &val);
13039 val |= MDIO_84833_SUPER_ISOLATE;
13040 bnx2x_cl45_write(bp, phy,
13041 MDIO_CTL_DEVAD,
13042 MDIO_84833_TOP_CFG_XGPHY_STRAP1, val);
13043
13044 /* Save spirom version */
13045 bnx2x_save_848xx_spirom_version(phy, bp, port);
13046 return 0;
13047}
13048
13049int bnx2x_pre_init_phy(struct bnx2x *bp,
13050 u32 shmem_base,
13051 u32 shmem2_base,
13052 u32 chip_id,
13053 u8 port)
13054{
13055 int rc = 0;
13056 struct bnx2x_phy phy;
13057 if (bnx2x_populate_phy(bp, EXT_PHY1, shmem_base, shmem2_base,
13058 port, &phy) != 0) {
13059 DP(NETIF_MSG_LINK, "populate_phy failed\n");
13060 return -EINVAL;
13061 }
13062 bnx2x_set_mdio_clk(bp, chip_id, phy.mdio_ctrl);
13063 switch (phy.type) {
13064 case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833:
13065 case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84834:
13066 rc = bnx2x_84833_pre_init_phy(bp, &phy, port);
13067 break;
13068 default:
13069 break;
13070 }
13071 return rc;
13072}
13073
13074static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[], 13016static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[],
13075 u32 shmem2_base_path[], u8 phy_index, 13017 u32 shmem2_base_path[], u8 phy_index,
13076 u32 ext_phy_type, u32 chip_id) 13018 u32 ext_phy_type, u32 chip_id)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
index 36246129864c..531eebf40d60 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
@@ -98,7 +98,7 @@ static inline int bnx2x_pfvf_status_codes(int rc)
98 } 98 }
99} 99}
100 100
101int bnx2x_send_msg2pf(struct bnx2x *bp, u8 *done, dma_addr_t msg_mapping) 101static int bnx2x_send_msg2pf(struct bnx2x *bp, u8 *done, dma_addr_t msg_mapping)
102{ 102{
103 struct cstorm_vf_zone_data __iomem *zone_data = 103 struct cstorm_vf_zone_data __iomem *zone_data =
104 REG_ADDR(bp, PXP_VF_ADDR_CSDM_GLOBAL_START); 104 REG_ADDR(bp, PXP_VF_ADDR_CSDM_GLOBAL_START);
@@ -141,7 +141,7 @@ int bnx2x_send_msg2pf(struct bnx2x *bp, u8 *done, dma_addr_t msg_mapping)
141 return 0; 141 return 0;
142} 142}
143 143
144int bnx2x_get_vf_id(struct bnx2x *bp, u32 *vf_id) 144static int bnx2x_get_vf_id(struct bnx2x *bp, u32 *vf_id)
145{ 145{
146 u32 me_reg; 146 u32 me_reg;
147 int tout = 10, interval = 100; /* Wait for 1 sec */ 147 int tout = 10, interval = 100; /* Wait for 1 sec */