bnx2x: Fix compilation warning messages
authorYaniv Rosner <yanivr@broadcom.com>
Mon, 31 Jan 2011 04:22:03 +0000 (04:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Jan 2011 21:22:41 +0000 (13:22 -0800)
Fix annoying compilation warning, mainly related to static declarations

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2x/bnx2x_link.c
drivers/net/bnx2x/bnx2x_link.h

index 9fadcdbe41154a27a87f102f2d9a01dd1e215971..452e262b0c209ea7d1ab0786fc92b201d7c75aaf 100644 (file)
                (_bank + (_addr & 0xf)), \
                _val)
 
-static u8 bnx2x_cl45_read(struct bnx2x *bp, struct bnx2x_phy *phy,
-                         u8 devad, u16 reg, u16 *ret_val);
-
-static u8 bnx2x_cl45_write(struct bnx2x *bp, struct bnx2x_phy *phy,
-                          u8 devad, u16 reg, u16 val);
-
 static u32 bnx2x_bits_en(struct bnx2x *bp, u32 reg, u32 bits)
 {
        u32 val = REG_RD(bp, reg);
@@ -269,7 +263,7 @@ void bnx2x_ets_disabled(struct link_params *params)
        REG_WR(bp, PBF_REG_NUM_STRICT_ARB_SLOTS, 0);
 }
 
-void bnx2x_ets_bw_limit_common(const struct link_params *params)
+static void bnx2x_ets_bw_limit_common(const struct link_params *params)
 {
        /* ETS disabled configuration */
        struct bnx2x *bp = params->bp;
@@ -1391,8 +1385,8 @@ static u32 bnx2x_get_emac_base(struct bnx2x *bp,
 /******************************************************************/
 /*                     CL45 access functions                     */
 /******************************************************************/
-u8 bnx2x_cl45_write(struct bnx2x *bp, struct bnx2x_phy *phy,
-                   u8 devad, u16 reg, u16 val)
+static u8 bnx2x_cl45_write(struct bnx2x *bp, struct bnx2x_phy *phy,
+                          u8 devad, u16 reg, u16 val)
 {
        u32 tmp, saved_mode;
        u8 i, rc = 0;
@@ -1458,8 +1452,8 @@ u8 bnx2x_cl45_write(struct bnx2x *bp, struct bnx2x_phy *phy,
        return rc;
 }
 
-u8 bnx2x_cl45_read(struct bnx2x *bp, struct bnx2x_phy *phy,
-                  u8 devad, u16 reg, u16 *ret_val)
+static u8 bnx2x_cl45_read(struct bnx2x *bp, struct bnx2x_phy *phy,
+                         u8 devad, u16 reg, u16 *ret_val)
 {
        u32 val, saved_mode;
        u16 i;
@@ -4614,7 +4608,7 @@ static u8 bnx2x_8727_read_sfp_module_eeprom(struct bnx2x_phy *phy,
                DP(NETIF_MSG_LINK,
                         "Got bad status 0x%x when reading from SFP+ EEPROM\n",
                         (val & MDIO_PMA_REG_SFP_TWO_WIRE_CTRL_STATUS_MASK));
-               return -EINVAL;
+               return -EFAULT;
        }
 
        /* Read the buffer */
index d9e847bb96f8709a1b040f9157dcc8d473dd37ff..92f36b6950dc22246b94b0dde53d79c77e8713d0 100644 (file)
@@ -337,6 +337,11 @@ void bnx2x_ext_phy_hw_reset(struct bnx2x *bp, u8 port);
 /* Reset the external of SFX7101 */
 void bnx2x_sfx7101_sp_sw_reset(struct bnx2x *bp, struct bnx2x_phy *phy);
 
+/* Read "byte_cnt" bytes from address "addr" from the SFP+ EEPROM */
+u8 bnx2x_read_sfp_module_eeprom(struct bnx2x_phy *phy,
+                               struct link_params *params, u16 addr,
+                               u8 byte_cnt, u8 *o_buf);
+
 void bnx2x_hw_reset_phy(struct link_params *params);
 
 /* Checks if HW lock is required for this phy/board type */