Skip to content

Commit

Permalink
bnx2x: add DCB support
Browse files Browse the repository at this point in the history
Adding DCB initialization and handling on 57712 FW/HW

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Shmulik Ravid-Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladislav Zolotarov authored and davem330 committed Dec 16, 2010
1 parent 8307fa3 commit e4901dd
Show file tree
Hide file tree
Showing 9 changed files with 2,050 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/net/bnx2x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

obj-$(CONFIG_BNX2X) += bnx2x.o

bnx2x-objs := bnx2x_main.o bnx2x_link.o bnx2x_cmn.o bnx2x_ethtool.o bnx2x_stats.o
bnx2x-objs := bnx2x_main.o bnx2x_link.o bnx2x_cmn.o bnx2x_ethtool.o bnx2x_stats.o bnx2x_dcb.o
15 changes: 15 additions & 0 deletions drivers/net/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "bnx2x_fw_defs.h"
#include "bnx2x_hsi.h"
#include "bnx2x_link.h"
#include "bnx2x_dcb.h"
#include "bnx2x_stats.h"

/* error/debug prints */
Expand Down Expand Up @@ -820,6 +821,8 @@ struct bnx2x_slowpath {

u32 wb_comp;
u32 wb_data[4];
/* pfc configuration for DCBX ramrod */
struct flow_control_configuration pfc_config;
};

#define bnx2x_sp(bp, var) (&bp->slowpath->var)
Expand Down Expand Up @@ -1180,6 +1183,18 @@ struct bnx2x {

char fw_ver[32];
const struct firmware *firmware;
/* LLDP params */
struct bnx2x_config_lldp_params lldp_config_params;

/* DCBX params */
struct bnx2x_config_dcbx_params dcbx_config_params;

struct bnx2x_dcbx_port_params dcbx_port_params;
int dcb_version;

/* DCBX Negotation results */
struct dcbx_features dcbx_local_feat;
u32 dcbx_error;
};

/**
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
}
}

bnx2x_dcbx_init(bp);

bp->state = BNX2X_STATE_OPENING_WAIT4_PORT;

rc = bnx2x_func_start(bp);
Expand Down
7 changes: 7 additions & 0 deletions drivers/net/bnx2x/bnx2x_cmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ int bnx2x_func_start(struct bnx2x *bp);
*/
void bnx2x_ilt_set_info(struct bnx2x *bp);

/**
* Inintialize dcbx protocol
*
* @param bp
*/
void bnx2x_dcbx_init(struct bnx2x *bp);

/**
* Set power state to the requested value. Currently only D0 and
* D3hot are supported.
Expand Down
Loading

0 comments on commit e4901dd

Please sign in to comment.