Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19dbff9f authored by Rasesh Mody's avatar Rasesh Mody Committed by David S. Miller
Browse files

bna: Formatting and Code Cleanup



Change details:
 - Print log messages when running with reduced number of MSI-X vectors
   and when defaulting to INTx mode.
 - Remove BUG_ONs and header file inclusion that are not needed
 - Comments addition/cleanup
 - Unused code cleanup
 - Add New Line to Print msg in bfa_sm_fault
 - Formatting fix

Signed-off-by: default avatarGurunatha Karaje <gkaraje@brocade.com>
Signed-off-by: default avatarRasesh Mody <rmody@brocade.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 271e8b79
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@
 * www.brocade.com
 */

#include "bfa_defs_cna.h"
#include "cna.h"
#include "bfa_cee.h"
#include "bfi_cna.h"
#include "bfa_ioc.h"
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#ifndef __BFA_DEFS_MFG_COMM_H__
#define __BFA_DEFS_MFG_COMM_H__

#include "cna.h"
#include "bfa_defs.h"

/**
+0 −46
Original line number Diff line number Diff line
@@ -73,20 +73,6 @@ struct bfi_mhdr {
 ****************************************************************************
 */

#define BFI_SGE_INLINE	1
#define BFI_SGE_INLINE_MAX	(BFI_SGE_INLINE + 1)

/**
 * SG Flags
 */
enum {
	BFI_SGE_DATA		= 0,	/*!< data address, not last	     */
	BFI_SGE_DATA_CPL	= 1,	/*!< data addr, last in current page */
	BFI_SGE_DATA_LAST	= 3,	/*!< data address, last		     */
	BFI_SGE_LINK		= 2,	/*!< link address		     */
	BFI_SGE_PGDLEN		= 2,	/*!< cumulative data length for page */
};

/**
 * DMA addresses
 */
@@ -97,33 +83,6 @@ union bfi_addr_u {
	} a32;
};

/**
 * Scatter Gather Element
 */
struct bfi_sge {
#ifdef __BIGENDIAN
	u32	flags:2,
			rsvd:2,
			sg_len:28;
#else
	u32	sg_len:28,
			rsvd:2,
			flags:2;
#endif
	union bfi_addr_u sga;
};

/**
 * Scatter Gather Page
 */
#define BFI_SGPG_DATA_SGES		7
#define BFI_SGPG_SGES_MAX		(BFI_SGPG_DATA_SGES + 1)
#define BFI_SGPG_RSVD_WD_LEN	8
struct bfi_sgpg {
	struct bfi_sge sges[BFI_SGPG_SGES_MAX];
	u32	rsvd[BFI_SGPG_RSVD_WD_LEN];
};

/*
 * Large Message structure - 128 Bytes size Msgs
 */
@@ -131,11 +90,6 @@ struct bfi_sgpg {
#define BFI_LMSG_PL_WSZ	\
			((BFI_LMSG_SZ - sizeof(struct bfi_mhdr)) / 4)

struct bfi_msg {
	struct bfi_mhdr mhdr;
	u32	pl[BFI_LMSG_PL_WSZ];
};

/**
 * Mailbox message structure
 */
+7 −11
Original line number Diff line number Diff line
@@ -10,12 +10,17 @@
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 */
/*
 * Copyright (c) 2005-2011 Brocade Communications Systems, Inc.
 * All rights reserved
 * www.brocade.com
 */
#ifndef __BNA_H__
#define __BNA_H__

#include "bfa_cs.h"
#include "bfa_defs.h"
#include "bfa_ioc.h"
#include "cna.h"
#include "bfi_enet.h"
#include "bna_types.h"

extern const u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX];
@@ -395,12 +400,8 @@ void bna_mod_init(struct bna *bna, struct bna_res_info *res_info);
void bna_uninit(struct bna *bna);
int bna_num_txq_set(struct bna *bna, int num_txq);
int bna_num_rxp_set(struct bna *bna, int num_rxp);
void bna_stats_get(struct bna *bna);
void bna_get_perm_mac(struct bna *bna, u8 *mac);
void bna_hw_stats_get(struct bna *bna);

/* APIs for Rx */

/* APIs for RxF */
struct bna_mac *bna_ucam_mod_mac_get(struct bna_ucam_mod *ucam_mod);
void bna_ucam_mod_mac_put(struct bna_ucam_mod *ucam_mod,
@@ -521,11 +522,6 @@ bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode,
void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id);
void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id);
void bna_rx_vlanfilter_enable(struct bna_rx *rx);
void bna_rx_hds_enable(struct bna_rx *rx, struct bna_hds_config *hds_config,
		       void (*cbfn)(struct bnad *, struct bna_rx *));
void bna_rx_hds_disable(struct bna_rx *rx,
			void (*cbfn)(struct bnad *, struct bna_rx *));

/**
 * ENET
 */
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
#include "cna.h"
#include "bna_hw_defs.h"
#include "bfa_cee.h"
#include "bfi_enet.h"
#include "bfa_msgq.h"

/**
Loading