bnx2x: half duplex support added for several boards
authorMintz Yuval <yuvalmin@broadcom.com>
Wed, 15 Feb 2012 02:10:23 +0000 (02:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Feb 2012 20:30:48 +0000 (15:30 -0500)
From: Yaniv Rosner <yaniv.rosner@broadcom.com>

Several boards require an additional HW bit written in-order to enable
half duplex.

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

index 2102ad593c14146d40dba28a0254fda1fd99cf1e..e7b0baf873b6272953ea328371e6519bdb4f6129 100644 (file)
@@ -1612,6 +1612,9 @@ static void bnx2x_umac_enable(struct link_params *params,
        if (!(vars->flow_ctrl & BNX2X_FLOW_CTRL_RX))
                val |= UMAC_COMMAND_CONFIG_REG_PAUSE_IGNORE;
 
+       if (vars->duplex == DUPLEX_HALF)
+               val |= UMAC_COMMAND_CONFIG_REG_HD_ENA;
+
        REG_WR(bp, umac_base + UMAC_REG_COMMAND_CONFIG, val);
        udelay(50);
 
index c95d9dcac6df0cf94e59331cd1fd58e735dc110b..2feaca52d70c05e62c54cb98b82553f61be50e4e 100644 (file)
    The fields are: [4:0] - tail pointer; 10:5] - Link List size; 15:11] -
    header pointer. */
 #define UCM_REG_XX_TABLE                                        0xe0300
+#define UMAC_COMMAND_CONFIG_REG_HD_ENA                          (0x1<<10)
 #define UMAC_COMMAND_CONFIG_REG_IGNORE_TX_PAUSE                         (0x1<<28)
 #define UMAC_COMMAND_CONFIG_REG_LOOP_ENA                        (0x1<<15)
 #define UMAC_COMMAND_CONFIG_REG_NO_LGTH_CHECK                   (0x1<<24)