Commit 7f02c4ad authored by Yaniv Rosner's avatar Yaniv Rosner Committed by David S. Miller

bnx2x: Change LED scheme for dual-media

Change LED scheme for dual-media
Signed-off-by: default avatarYaniv Rosner <yanivr@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a22f0788
...@@ -1954,10 +1954,11 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data) ...@@ -1954,10 +1954,11 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data)
for (i = 0; i < (data * 2); i++) { for (i = 0; i < (data * 2); i++) {
if ((i % 2) == 0) if ((i % 2) == 0)
bnx2x_set_led(&bp->link_params, LED_MODE_OPER, bnx2x_set_led(&bp->link_params, &bp->link_vars,
SPEED_1000); LED_MODE_OPER, SPEED_1000);
else else
bnx2x_set_led(&bp->link_params, LED_MODE_OFF, 0); bnx2x_set_led(&bp->link_params, &bp->link_vars,
LED_MODE_OFF, 0);
msleep_interruptible(500); msleep_interruptible(500);
if (signal_pending(current)) if (signal_pending(current))
...@@ -1965,7 +1966,7 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data) ...@@ -1965,7 +1966,7 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data)
} }
if (bp->link_vars.link_up) if (bp->link_vars.link_up)
bnx2x_set_led(&bp->link_params, LED_MODE_OPER, bnx2x_set_led(&bp->link_params, &bp->link_vars, LED_MODE_OPER,
bp->link_vars.line_speed); bp->link_vars.line_speed);
return 0; return 0;
......
...@@ -78,6 +78,8 @@ struct shared_hw_cfg { /* NVRAM Offset */ ...@@ -78,6 +78,8 @@ struct shared_hw_cfg { /* NVRAM Offset */
#define SHARED_HW_CFG_LED_PHY11 0x000b0000 #define SHARED_HW_CFG_LED_PHY11 0x000b0000
#define SHARED_HW_CFG_LED_MAC4 0x000c0000 #define SHARED_HW_CFG_LED_MAC4 0x000c0000
#define SHARED_HW_CFG_LED_PHY8 0x000d0000 #define SHARED_HW_CFG_LED_PHY8 0x000d0000
#define SHARED_HW_CFG_LED_EXTPHY1 0x000e0000
#define SHARED_HW_CFG_AN_ENABLE_MASK 0x3f000000 #define SHARED_HW_CFG_AN_ENABLE_MASK 0x3f000000
#define SHARED_HW_CFG_AN_ENABLE_SHIFT 24 #define SHARED_HW_CFG_AN_ENABLE_SHIFT 24
......
This diff is collapsed.
...@@ -296,9 +296,12 @@ u8 bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded, ...@@ -296,9 +296,12 @@ u8 bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
Basically, the CLC takes care of the led for the link, but in case one needs Basically, the CLC takes care of the led for the link, but in case one needs
to set/unset the led unnaturally, set the "mode" to LED_MODE_OPER to to set/unset the led unnaturally, set the "mode" to LED_MODE_OPER to
blink the led, and LED_MODE_OFF to set the led off.*/ blink the led, and LED_MODE_OFF to set the led off.*/
u8 bnx2x_set_led(struct link_params *params, u8 mode, u32 speed); u8 bnx2x_set_led(struct link_params *params, struct link_vars *vars,
u8 mode, u32 speed);
#define LED_MODE_OFF 0 #define LED_MODE_OFF 0
#define LED_MODE_ON 1
#define LED_MODE_OPER 2 #define LED_MODE_OPER 2
#define LED_MODE_FRONT_PANEL_OFF 3
u8 bnx2x_override_led_value(struct bnx2x *bp, u8 port, u32 led_idx, u32 value); u8 bnx2x_override_led_value(struct bnx2x *bp, u8 port, u32 led_idx, u32 value);
......
...@@ -5161,8 +5161,11 @@ Theotherbitsarereservedandshouldbezero*/ ...@@ -5161,8 +5161,11 @@ Theotherbitsarereservedandshouldbezero*/
#define MDIO_PMA_REG_8481_LED2_MASK 0xa82f #define MDIO_PMA_REG_8481_LED2_MASK 0xa82f
#define MDIO_PMA_REG_8481_LED3_MASK 0xa832 #define MDIO_PMA_REG_8481_LED3_MASK 0xa832
#define MDIO_PMA_REG_8481_LED3_BLINK 0xa834 #define MDIO_PMA_REG_8481_LED3_BLINK 0xa834
#define MDIO_PMA_REG_8481_LED5_MASK 0xa838
#define MDIO_PMA_REG_8481_SIGNAL_MASK 0xa835 #define MDIO_PMA_REG_8481_SIGNAL_MASK 0xa835
#define MDIO_PMA_REG_8481_LINK_SIGNAL 0xa83b #define MDIO_PMA_REG_8481_LINK_SIGNAL 0xa83b
#define MDIO_PMA_REG_8481_LINK_SIGNAL_LED4_ENABLE_MASK 0x800
#define MDIO_PMA_REG_8481_LINK_SIGNAL_LED4_ENABLE_SHIFT 11
#define MDIO_WIS_DEVAD 0x2 #define MDIO_WIS_DEVAD 0x2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment