aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-07-10 06:56:59 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-11 02:13:46 -0400
commit1aa8b471e09f227455c11d55c4bc94a655ee8497 (patch)
tree7a7726e11b688094e88f46374eefd9e7eb0c508d
parent49ce9c2cda18f62b13055dc715e7b514157c2da8 (diff)
drivers/net/ethernet: Fix non-kernel-doc comments with kernel-doc start markers
Convert doxygen (or similar) formatted comments to kernel-doc or unformatted comment. Delete a few that are content-free. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x.h9
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_fw_defs.h4
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h3
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c3
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h3
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h36
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c5
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c4
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_cee.c61
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_cs.h34
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_defs.h63
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_defs_cna.h15
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h35
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_defs_status.h3
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_ioc.c393
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_ioc.h43
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c48
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_msgq.c4
-rw-r--r--drivers/net/ethernet/brocade/bna/bfi.h81
-rw-r--r--drivers/net/ethernet/brocade/bna/bfi_cna.h42
-rw-r--r--drivers/net/ethernet/brocade/bna/bfi_enet.h107
-rw-r--r--drivers/net/ethernet/brocade/bna/bfi_reg.h4
-rw-r--r--drivers/net/ethernet/brocade/bna/bna.h51
-rw-r--r--drivers/net/ethernet/brocade/bna/bna_enet.c15
-rw-r--r--drivers/net/ethernet/brocade/bna/bna_hw_defs.h33
-rw-r--r--drivers/net/ethernet/brocade/bna/bna_tx_rx.c17
-rw-r--r--drivers/net/ethernet/brocade/bna/bna_types.h66
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.c12
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.h4
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_qmr.c4
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c9
-rw-r--r--drivers/net/ethernet/micrel/ks8851_mll.c6
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-main.h3
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c3
-rw-r--r--drivers/net/ethernet/sfc/mcdi_pcol.h3
-rw-r--r--drivers/net/ethernet/ti/davinci_emac.c8
36 files changed, 342 insertions, 892 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index d2dc420df5bd..52f33b8c41e5 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -1741,15 +1741,6 @@ int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac,
1741 struct bnx2x_vlan_mac_obj *obj, bool set, 1741 struct bnx2x_vlan_mac_obj *obj, bool set,
1742 int mac_type, unsigned long *ramrod_flags); 1742 int mac_type, unsigned long *ramrod_flags);
1743/** 1743/**
1744 * Deletes all MACs configured for the specific MAC object.
1745 *
1746 * @param bp Function driver instance
1747 * @param mac_obj MAC object to cleanup
1748 *
1749 * @return zero if all MACs were cleaned
1750 */
1751
1752/**
1753 * bnx2x_del_all_macs - delete all MACs configured for the specific MAC object 1744 * bnx2x_del_all_macs - delete all MACs configured for the specific MAC object
1754 * 1745 *
1755 * @bp: driver handle 1746 * @bp: driver handle
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_fw_defs.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_fw_defs.h
index 426f77aa721a..bbc66ced9c25 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_fw_defs.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_fw_defs.h
@@ -321,9 +321,7 @@
321#define DISABLE_STATISTIC_COUNTER_ID_VALUE 0 321#define DISABLE_STATISTIC_COUNTER_ID_VALUE 0
322 322
323 323
324/** 324/* This file defines HSI constants common to all microcode flows */
325 * This file defines HSI constants common to all microcode flows
326 */
327 325
328#define PROTOCOL_STATE_BIT_OFFSET 6 326#define PROTOCOL_STATE_BIT_OFFSET 6
329 327
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
index c05f9d94938f..51cac8130051 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
@@ -493,8 +493,7 @@ struct bnx2x_ets_params {
493 struct bnx2x_ets_cos_params cos[DCBX_MAX_NUM_COS]; 493 struct bnx2x_ets_cos_params cos[DCBX_MAX_NUM_COS];
494}; 494};
495 495
496/** 496/* Used to update the PFC attributes in EMAC, BMAC, NIG and BRB
497 * Used to update the PFC attributes in EMAC, BMAC, NIG and BRB
498 * when link is already up 497 * when link is already up
499 */ 498 */
500int bnx2x_update_pfc(struct link_params *params, 499int bnx2x_update_pfc(struct link_params *params,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 5b8b521bdbc3..08eca3ff7db6 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -11560,8 +11560,7 @@ static void bnx2x_prep_ops(const u8 *_source, u8 *_target, u32 n)
11560 } 11560 }
11561} 11561}
11562 11562
11563/** 11563/* IRO array is stored in the following format:
11564 * IRO array is stored in the following format:
11565 * {base(24bit), m1(16bit), m2(16bit), m3(16bit), size(16bit) } 11564 * {base(24bit), m1(16bit), m2(16bit), m3(16bit), size(16bit) }
11566 */ 11565 */
11567static void bnx2x_prep_iro(const u8 *_source, u8 *_target, u32 n) 11566static void bnx2x_prep_iro(const u8 *_source, u8 *_target, u32 n)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
index f371e3c06094..ec62a5c8bd37 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
@@ -7275,8 +7275,7 @@ Theotherbitsarereservedandshouldbezero*/
7275#define CDU_REGION_NUMBER_UCM_AG 4 7275#define CDU_REGION_NUMBER_UCM_AG 4
7276 7276
7277 7277
7278/** 7278/* String-to-compress [31:8] = CID (all 24 bits)
7279 * String-to-compress [31:8] = CID (all 24 bits)
7280 * String-to-compress [7:4] = Region 7279 * String-to-compress [7:4] = Region
7281 * String-to-compress [3:0] = Type 7280 * String-to-compress [3:0] = Type
7282 */ 7281 */
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
index 76818ef08f9b..f83e033da6da 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
@@ -167,9 +167,8 @@ typedef int (*exe_q_remove)(struct bnx2x *bp,
167 union bnx2x_qable_obj *o, 167 union bnx2x_qable_obj *o,
168 struct bnx2x_exeq_elem *elem); 168 struct bnx2x_exeq_elem *elem);
169 169
170/** 170/* Return positive if entry was optimized, 0 - if not, negative
171 * @return positive is entry was optimized, 0 - if not, negative 171 * in case of an error.
172 * in case of an error.
173 */ 172 */
174typedef int (*exe_q_optimize)(struct bnx2x *bp, 173typedef int (*exe_q_optimize)(struct bnx2x *bp,
175 union bnx2x_qable_obj *o, 174 union bnx2x_qable_obj *o,
@@ -1286,12 +1285,11 @@ void bnx2x_init_rx_mode_obj(struct bnx2x *bp,
1286 struct bnx2x_rx_mode_obj *o); 1285 struct bnx2x_rx_mode_obj *o);
1287 1286
1288/** 1287/**
1289 * Send and RX_MODE ramrod according to the provided parameters. 1288 * bnx2x_config_rx_mode - Send and RX_MODE ramrod according to the provided parameters.
1290 * 1289 *
1291 * @param bp 1290 * @p: Command parameters
1292 * @param p Command parameters
1293 * 1291 *
1294 * @return 0 - if operation was successfull and there is no pending completions, 1292 * Return: 0 - if operation was successfull and there is no pending completions,
1295 * positive number - if there are pending completions, 1293 * positive number - if there are pending completions,
1296 * negative - if there were errors 1294 * negative - if there were errors
1297 */ 1295 */
@@ -1308,7 +1306,11 @@ void bnx2x_init_mcast_obj(struct bnx2x *bp,
1308 bnx2x_obj_type type); 1306 bnx2x_obj_type type);
1309 1307
1310/** 1308/**
1311 * Configure multicast MACs list. May configure a new list 1309 * bnx2x_config_mcast - Configure multicast MACs list.
1310 *
1311 * @cmd: command to execute: BNX2X_MCAST_CMD_X
1312 *
1313 * May configure a new list
1312 * provided in p->mcast_list (BNX2X_MCAST_CMD_ADD), clean up 1314 * provided in p->mcast_list (BNX2X_MCAST_CMD_ADD), clean up
1313 * (BNX2X_MCAST_CMD_DEL) or restore (BNX2X_MCAST_CMD_RESTORE) a current 1315 * (BNX2X_MCAST_CMD_DEL) or restore (BNX2X_MCAST_CMD_RESTORE) a current
1314 * configuration, continue to execute the pending commands 1316 * configuration, continue to execute the pending commands
@@ -1319,11 +1321,7 @@ void bnx2x_init_mcast_obj(struct bnx2x *bp,
1319 * the current command will be enqueued to the tail of the 1321 * the current command will be enqueued to the tail of the
1320 * pending commands list. 1322 * pending commands list.
1321 * 1323 *
1322 * @param bp 1324 * Return: 0 is operation was sucessfull and there are no pending completions,
1323 * @param p
1324 * @param command to execute: BNX2X_MCAST_CMD_X
1325 *
1326 * @return 0 is operation was sucessfull and there are no pending completions,
1327 * negative if there were errors, positive if there are pending 1325 * negative if there were errors, positive if there are pending
1328 * completions. 1326 * completions.
1329 */ 1327 */
@@ -1348,21 +1346,17 @@ void bnx2x_init_rss_config_obj(struct bnx2x *bp,
1348 bnx2x_obj_type type); 1346 bnx2x_obj_type type);
1349 1347
1350/** 1348/**
1351 * Updates RSS configuration according to provided parameters. 1349 * bnx2x_config_rss - Updates RSS configuration according to provided parameters
1352 *
1353 * @param bp
1354 * @param p
1355 * 1350 *
1356 * @return 0 in case of success 1351 * Return: 0 in case of success
1357 */ 1352 */
1358int bnx2x_config_rss(struct bnx2x *bp, 1353int bnx2x_config_rss(struct bnx2x *bp,
1359 struct bnx2x_config_rss_params *p); 1354 struct bnx2x_config_rss_params *p);
1360 1355
1361/** 1356/**
1362 * Return the current ind_table configuration. 1357 * bnx2x_get_rss_ind_table - Return the current ind_table configuration.
1363 * 1358 *
1364 * @param bp 1359 * @ind_table: buffer to fill with the current indirection
1365 * @param ind_table buffer to fill with the current indirection
1366 * table content. Should be at least 1360 * table content. Should be at least
1367 * T_ETH_INDIRECTION_TABLE_SIZE bytes long. 1361 * T_ETH_INDIRECTION_TABLE_SIZE bytes long.
1368 */ 1362 */
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 514a528f6ddf..667d89042d35 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -1321,12 +1321,9 @@ static void bnx2x_port_stats_base_init(struct bnx2x *bp)
1321 bnx2x_stats_comp(bp); 1321 bnx2x_stats_comp(bp);
1322} 1322}
1323 1323
1324/** 1324/* This function will prepare the statistics ramrod data the way
1325 * This function will prepare the statistics ramrod data the way
1326 * we will only have to increment the statistics counter and 1325 * we will only have to increment the statistics counter and
1327 * send the ramrod each time we have to. 1326 * send the ramrod each time we have to.
1328 *
1329 * @param bp
1330 */ 1327 */
1331static void bnx2x_prep_fw_stats_req(struct bnx2x *bp) 1328static void bnx2x_prep_fw_stats_req(struct bnx2x *bp)
1332{ 1329{
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index 22ad7b6d9048..650c545705f3 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -5542,9 +5542,7 @@ static void cnic_rcv_netevent(struct cnic_local *cp, unsigned long event,
5542 rcu_read_unlock(); 5542 rcu_read_unlock();
5543} 5543}
5544 5544
5545/** 5545/* netdev event handler */
5546 * netdev event handler
5547 */
5548static int cnic_netdev_event(struct notifier_block *this, unsigned long event, 5546static int cnic_netdev_event(struct notifier_block *this, unsigned long event,
5549 void *ptr) 5547 void *ptr)
5550{ 5548{
diff --git a/drivers/net/ethernet/brocade/bna/bfa_cee.c b/drivers/net/ethernet/brocade/bna/bfa_cee.c
index 8532a8159025..550d2521ba76 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_cee.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_cee.c
@@ -127,13 +127,7 @@ bfa_cee_reset_stats_isr(struct bfa_cee *cee, enum bfa_status status)
127 cee->cbfn.reset_stats_cbfn(cee->cbfn.reset_stats_cbarg, status); 127 cee->cbfn.reset_stats_cbfn(cee->cbfn.reset_stats_cbarg, status);
128} 128}
129/** 129/**
130 * bfa_nw_cee_meminfo() 130 * bfa_nw_cee_meminfo - Returns the size of the DMA memory needed by CEE module
131 *
132 * @brief Returns the size of the DMA memory needed by CEE module
133 *
134 * @param[in] void
135 *
136 * @return Size of DMA region
137 */ 131 */
138u32 132u32
139bfa_nw_cee_meminfo(void) 133bfa_nw_cee_meminfo(void)
@@ -142,15 +136,11 @@ bfa_nw_cee_meminfo(void)
142} 136}
143 137
144/** 138/**
145 * bfa_nw_cee_mem_claim() 139 * bfa_nw_cee_mem_claim - Initialized CEE DMA Memory
146 *
147 * @brief Initialized CEE DMA Memory
148 *
149 * @param[in] cee CEE module pointer
150 * dma_kva Kernel Virtual Address of CEE DMA Memory
151 * dma_pa Physical Address of CEE DMA Memory
152 * 140 *
153 * @return void 141 * @cee: CEE module pointer
142 * @dma_kva: Kernel Virtual Address of CEE DMA Memory
143 * @dma_pa: Physical Address of CEE DMA Memory
154 */ 144 */
155void 145void
156bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, u64 dma_pa) 146bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, u64 dma_pa)
@@ -165,13 +155,11 @@ bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva, u64 dma_pa)
165} 155}
166 156
167/** 157/**
168 * bfa_cee_get_attr() 158 * bfa_cee_get_attr - Send the request to the f/w to fetch CEE attributes.
169 *
170 * @brief Send the request to the f/w to fetch CEE attributes.
171 * 159 *
172 * @param[in] Pointer to the CEE module data structure. 160 * @cee: Pointer to the CEE module data structure.
173 * 161 *
174 * @return Status 162 * Return: status
175 */ 163 */
176enum bfa_status 164enum bfa_status
177bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr, 165bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr,
@@ -200,13 +188,7 @@ bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr,
200} 188}
201 189
202/** 190/**
203 * bfa_cee_isrs() 191 * bfa_cee_isrs - Handles Mail-box interrupts for CEE module.
204 *
205 * @brief Handles Mail-box interrupts for CEE module.
206 *
207 * @param[in] Pointer to the CEE module data structure.
208 *
209 * @return void
210 */ 192 */
211 193
212static void 194static void
@@ -233,14 +215,9 @@ bfa_cee_isr(void *cbarg, struct bfi_mbmsg *m)
233} 215}
234 216
235/** 217/**
236 * bfa_cee_notify() 218 * bfa_cee_notify - CEE module heart-beat failure handler.
237 *
238 * @brief CEE module heart-beat failure handler.
239 * @brief CEE module IOC event handler.
240 *
241 * @param[in] IOC event type
242 * 219 *
243 * @return void 220 * @event: IOC event type
244 */ 221 */
245 222
246static void 223static void
@@ -287,17 +264,13 @@ bfa_cee_notify(void *arg, enum bfa_ioc_event event)
287} 264}
288 265
289/** 266/**
290 * bfa_nw_cee_attach() 267 * bfa_nw_cee_attach - CEE module-attach API
291 *
292 * @brief CEE module-attach API
293 * 268 *
294 * @param[in] cee - Pointer to the CEE module data structure 269 * @cee: Pointer to the CEE module data structure
295 * ioc - Pointer to the ioc module data structure 270 * @ioc: Pointer to the ioc module data structure
296 * dev - Pointer to the device driver module data structure 271 * @dev: Pointer to the device driver module data structure.
297 * The device driver specific mbox ISR functions have 272 * The device driver specific mbox ISR functions have
298 * this pointer as one of the parameters. 273 * this pointer as one of the parameters.
299 *
300 * @return void
301 */ 274 */
302void 275void
303bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, 276bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc,
diff --git a/drivers/net/ethernet/brocade/bna/bfa_cs.h b/drivers/net/ethernet/brocade/bna/bfa_cs.h
index 3da1a946ccdd..ad004a4c3897 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_cs.h
+++ b/drivers/net/ethernet/brocade/bna/bfa_cs.h
@@ -16,23 +16,18 @@
16 * www.brocade.com 16 * www.brocade.com
17 */ 17 */
18 18
19/** 19/* BFA common services */
20 * @file bfa_cs.h BFA common services
21 */
22 20
23#ifndef __BFA_CS_H__ 21#ifndef __BFA_CS_H__
24#define __BFA_CS_H__ 22#define __BFA_CS_H__
25 23
26#include "cna.h" 24#include "cna.h"
27 25
28/** 26/* BFA state machine interfaces */
29 * @ BFA state machine interfaces
30 */
31 27
32typedef void (*bfa_sm_t)(void *sm, int event); 28typedef void (*bfa_sm_t)(void *sm, int event);
33 29
34/** 30/* oc - object class eg. bfa_ioc
35 * oc - object class eg. bfa_ioc
36 * st - state, eg. reset 31 * st - state, eg. reset
37 * otype - object type, eg. struct bfa_ioc 32 * otype - object type, eg. struct bfa_ioc
38 * etype - object type, eg. enum ioc_event 33 * etype - object type, eg. enum ioc_event
@@ -45,9 +40,7 @@ typedef void (*bfa_sm_t)(void *sm, int event);
45#define bfa_sm_get_state(_sm) ((_sm)->sm) 40#define bfa_sm_get_state(_sm) ((_sm)->sm)
46#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (bfa_sm_t)(_state)) 41#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (bfa_sm_t)(_state))
47 42
48/** 43/* For converting from state machine function to state encoding. */
49 * For converting from state machine function to state encoding.
50 */
51struct bfa_sm_table { 44struct bfa_sm_table {
52 bfa_sm_t sm; /*!< state machine function */ 45 bfa_sm_t sm; /*!< state machine function */
53 int state; /*!< state machine encoding */ 46 int state; /*!< state machine encoding */
@@ -55,13 +48,10 @@ struct bfa_sm_table {
55}; 48};
56#define BFA_SM(_sm) ((bfa_sm_t)(_sm)) 49#define BFA_SM(_sm) ((bfa_sm_t)(_sm))
57 50
58/** 51/* State machine with entry actions. */
59 * State machine with entry actions.
60 */
61typedef void (*bfa_fsm_t)(void *fsm, int event); 52typedef void (*bfa_fsm_t)(void *fsm, int event);
62 53
63/** 54/* oc - object class eg. bfa_ioc
64 * oc - object class eg. bfa_ioc
65 * st - state, eg. reset 55 * st - state, eg. reset
66 * otype - object type, eg. struct bfa_ioc 56 * otype - object type, eg. struct bfa_ioc
67 * etype - object type, eg. enum ioc_event 57 * etype - object type, eg. enum ioc_event
@@ -90,9 +80,7 @@ bfa_sm_to_state(const struct bfa_sm_table *smt, bfa_sm_t sm)
90 return smt[i].state; 80 return smt[i].state;
91} 81}
92 82
93/** 83/* Generic wait counter. */
94 * @ Generic wait counter.
95 */
96 84
97typedef void (*bfa_wc_resume_t) (void *cbarg); 85typedef void (*bfa_wc_resume_t) (void *cbarg);
98 86
@@ -116,9 +104,7 @@ bfa_wc_down(struct bfa_wc *wc)
116 wc->wc_resume(wc->wc_cbarg); 104 wc->wc_resume(wc->wc_cbarg);
117} 105}
118 106
119/** 107/* Initialize a waiting counter. */
120 * Initialize a waiting counter.
121 */
122static inline void 108static inline void
123bfa_wc_init(struct bfa_wc *wc, bfa_wc_resume_t wc_resume, void *wc_cbarg) 109bfa_wc_init(struct bfa_wc *wc, bfa_wc_resume_t wc_resume, void *wc_cbarg)
124{ 110{
@@ -128,9 +114,7 @@ bfa_wc_init(struct bfa_wc *wc, bfa_wc_resume_t wc_resume, void *wc_cbarg)
128 bfa_wc_up(wc); 114 bfa_wc_up(wc);
129} 115}
130 116
131/** 117/* Wait for counter to reach zero */
132 * Wait for counter to reach zero
133 */
134static inline void 118static inline void
135bfa_wc_wait(struct bfa_wc *wc) 119bfa_wc_wait(struct bfa_wc *wc)
136{ 120{
diff --git a/drivers/net/ethernet/brocade/bna/bfa_defs.h b/drivers/net/ethernet/brocade/bna/bfa_defs.h
index 48f877337390..e423f82da490 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_defs.h
+++ b/drivers/net/ethernet/brocade/bna/bfa_defs.h
@@ -26,13 +26,9 @@
26#define BFA_STRING_32 32 26#define BFA_STRING_32 32
27#define BFA_VERSION_LEN 64 27#define BFA_VERSION_LEN 64
28 28
29/** 29/* ---------------------- adapter definitions ------------ */
30 * ---------------------- adapter definitions ------------
31 */
32 30
33/** 31/* BFA adapter level attributes. */
34 * BFA adapter level attributes.
35 */
36enum { 32enum {
37 BFA_ADAPTER_SERIAL_NUM_LEN = STRSZ(BFA_MFG_SERIALNUM_SIZE), 33 BFA_ADAPTER_SERIAL_NUM_LEN = STRSZ(BFA_MFG_SERIALNUM_SIZE),
38 /* 34 /*
@@ -74,18 +70,14 @@ struct bfa_adapter_attr {
74 u8 trunk_capable; 70 u8 trunk_capable;
75}; 71};
76 72
77/** 73/* ---------------------- IOC definitions ------------ */
78 * ---------------------- IOC definitions ------------
79 */
80 74
81enum { 75enum {
82 BFA_IOC_DRIVER_LEN = 16, 76 BFA_IOC_DRIVER_LEN = 16,
83 BFA_IOC_CHIP_REV_LEN = 8, 77 BFA_IOC_CHIP_REV_LEN = 8,
84}; 78};
85 79
86/** 80/* Driver and firmware versions. */
87 * Driver and firmware versions.
88 */
89struct bfa_ioc_driver_attr { 81struct bfa_ioc_driver_attr {
90 char driver[BFA_IOC_DRIVER_LEN]; /*!< driver name */ 82 char driver[BFA_IOC_DRIVER_LEN]; /*!< driver name */
91 char driver_ver[BFA_VERSION_LEN]; /*!< driver version */ 83 char driver_ver[BFA_VERSION_LEN]; /*!< driver version */
@@ -95,9 +87,7 @@ struct bfa_ioc_driver_attr {
95 char ob_ver[BFA_VERSION_LEN]; /*!< openboot version */ 87 char ob_ver[BFA_VERSION_LEN]; /*!< openboot version */
96}; 88};
97 89
98/** 90/* IOC PCI device attributes */
99 * IOC PCI device attributes
100 */
101struct bfa_ioc_pci_attr { 91struct bfa_ioc_pci_attr {
102 u16 vendor_id; /*!< PCI vendor ID */ 92 u16 vendor_id; /*!< PCI vendor ID */
103 u16 device_id; /*!< PCI device ID */ 93 u16 device_id; /*!< PCI device ID */
@@ -108,9 +98,7 @@ struct bfa_ioc_pci_attr {
108 char chip_rev[BFA_IOC_CHIP_REV_LEN]; /*!< chip revision */ 98 char chip_rev[BFA_IOC_CHIP_REV_LEN]; /*!< chip revision */
109}; 99};
110 100
111/** 101/* IOC states */
112 * IOC states
113 */
114enum bfa_ioc_state { 102enum bfa_ioc_state {
115 BFA_IOC_UNINIT = 1, /*!< IOC is in uninit state */ 103 BFA_IOC_UNINIT = 1, /*!< IOC is in uninit state */
116 BFA_IOC_RESET = 2, /*!< IOC is in reset state */ 104 BFA_IOC_RESET = 2, /*!< IOC is in reset state */
@@ -127,9 +115,7 @@ enum bfa_ioc_state {
127 BFA_IOC_HWFAIL = 13, /*!< PCI mapping doesn't exist */ 115 BFA_IOC_HWFAIL = 13, /*!< PCI mapping doesn't exist */
128}; 116};
129 117
130/** 118/* IOC firmware stats */
131 * IOC firmware stats
132 */
133struct bfa_fw_ioc_stats { 119struct bfa_fw_ioc_stats {
134 u32 enable_reqs; 120 u32 enable_reqs;
135 u32 disable_reqs; 121 u32 disable_reqs;
@@ -139,9 +125,7 @@ struct bfa_fw_ioc_stats {
139 u32 unknown_reqs; 125 u32 unknown_reqs;
140}; 126};
141 127
142/** 128/* IOC driver stats */
143 * IOC driver stats
144 */
145struct bfa_ioc_drv_stats { 129struct bfa_ioc_drv_stats {
146 u32 ioc_isrs; 130 u32 ioc_isrs;
147 u32 ioc_enables; 131 u32 ioc_enables;
@@ -157,9 +141,7 @@ struct bfa_ioc_drv_stats {
157 u32 rsvd; 141 u32 rsvd;
158}; 142};
159 143
160/** 144/* IOC statistics */
161 * IOC statistics
162 */
163struct bfa_ioc_stats { 145struct bfa_ioc_stats {
164 struct bfa_ioc_drv_stats drv_stats; /*!< driver IOC stats */ 146 struct bfa_ioc_drv_stats drv_stats; /*!< driver IOC stats */
165 struct bfa_fw_ioc_stats fw_stats; /*!< firmware IOC stats */ 147 struct bfa_fw_ioc_stats fw_stats; /*!< firmware IOC stats */
@@ -171,9 +153,7 @@ enum bfa_ioc_type {
171 BFA_IOC_TYPE_LL = 3, 153 BFA_IOC_TYPE_LL = 3,
172}; 154};
173 155
174/** 156/* IOC attributes returned in queries */
175 * IOC attributes returned in queries
176 */
177struct bfa_ioc_attr { 157struct bfa_ioc_attr {
178 enum bfa_ioc_type ioc_type; 158 enum bfa_ioc_type ioc_type;
179 enum bfa_ioc_state state; /*!< IOC state */ 159 enum bfa_ioc_state state; /*!< IOC state */
@@ -187,22 +167,16 @@ struct bfa_ioc_attr {
187 u8 rsvd[4]; /*!< 64bit align */ 167 u8 rsvd[4]; /*!< 64bit align */
188}; 168};
189 169
190/** 170/* Adapter capability mask definition */
191 * Adapter capability mask definition
192 */
193enum { 171enum {
194 BFA_CM_HBA = 0x01, 172 BFA_CM_HBA = 0x01,
195 BFA_CM_CNA = 0x02, 173 BFA_CM_CNA = 0x02,
196 BFA_CM_NIC = 0x04, 174 BFA_CM_NIC = 0x04,
197}; 175};
198 176
199/** 177/* ---------------------- mfg definitions ------------ */
200 * ---------------------- mfg definitions ------------
201 */
202 178
203/** 179/* Checksum size */
204 * Checksum size
205 */
206#define BFA_MFG_CHKSUM_SIZE 16 180#define BFA_MFG_CHKSUM_SIZE 16
207 181
208#define BFA_MFG_PARTNUM_SIZE 14 182#define BFA_MFG_PARTNUM_SIZE 14
@@ -213,8 +187,7 @@ enum {
213 187
214#pragma pack(1) 188#pragma pack(1)
215 189
216/** 190/* BFA adapter manufacturing block definition.
217 * @brief BFA adapter manufacturing block definition.
218 * 191 *
219 * All numerical fields are in big-endian format. 192 * All numerical fields are in big-endian format.
220 */ 193 */
@@ -256,9 +229,7 @@ struct bfa_mfg_block {
256 229
257#pragma pack() 230#pragma pack()
258 231
259/** 232/* ---------------------- pci definitions ------------ */
260 * ---------------------- pci definitions ------------
261 */
262 233
263/* 234/*
264 * PCI device ID information 235 * PCI device ID information
@@ -275,9 +246,7 @@ enum {
275#define bfa_asic_id_ctc(device) \ 246#define bfa_asic_id_ctc(device) \
276 (bfa_asic_id_ct(device) || bfa_asic_id_ct2(device)) 247 (bfa_asic_id_ct(device) || bfa_asic_id_ct2(device))
277 248
278/** 249/* PCI sub-system device and vendor ID information */
279 * PCI sub-system device and vendor ID information
280 */
281enum { 250enum {
282 BFA_PCI_FCOE_SSDEVICE_ID = 0x14, 251 BFA_PCI_FCOE_SSDEVICE_ID = 0x14,
283 BFA_PCI_CT2_SSID_FCoE = 0x22, 252 BFA_PCI_CT2_SSID_FCoE = 0x22,
diff --git a/drivers/net/ethernet/brocade/bna/bfa_defs_cna.h b/drivers/net/ethernet/brocade/bna/bfa_defs_cna.h
index 8ab33ee2c2bc..b39c5f23974b 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_defs_cna.h
+++ b/drivers/net/ethernet/brocade/bna/bfa_defs_cna.h
@@ -20,10 +20,7 @@
20 20
21#include "bfa_defs.h" 21#include "bfa_defs.h"
22 22
23/** 23/* FC physical port statistics. */
24 * @brief
25 * FC physical port statistics.
26 */
27struct bfa_port_fc_stats { 24struct bfa_port_fc_stats {
28 u64 secs_reset; /*!< Seconds since stats is reset */ 25 u64 secs_reset; /*!< Seconds since stats is reset */
29 u64 tx_frames; /*!< Tx frames */ 26 u64 tx_frames; /*!< Tx frames */
@@ -59,10 +56,7 @@ struct bfa_port_fc_stats {
59 u64 bbsc_link_resets; /*!< Credit Recovery-Link Resets */ 56 u64 bbsc_link_resets; /*!< Credit Recovery-Link Resets */
60}; 57};
61 58
62/** 59/* Eth Physical Port statistics. */
63 * @brief
64 * Eth Physical Port statistics.
65 */
66struct bfa_port_eth_stats { 60struct bfa_port_eth_stats {
67 u64 secs_reset; /*!< Seconds since stats is reset */ 61 u64 secs_reset; /*!< Seconds since stats is reset */
68 u64 frame_64; /*!< Frames 64 bytes */ 62 u64 frame_64; /*!< Frames 64 bytes */
@@ -108,10 +102,7 @@ struct bfa_port_eth_stats {
108 u64 tx_iscsi_zero_pause; /*!< Tx iSCSI zero pause */ 102 u64 tx_iscsi_zero_pause; /*!< Tx iSCSI zero pause */
109}; 103};
110 104
111/** 105/* Port statistics. */
112 * @brief
113 * Port statistics.
114 */
115union bfa_port_stats_u { 106union bfa_port_stats_u {
116 struct bfa_port_fc_stats fc; 107 struct bfa_port_fc_stats fc;
117 struct bfa_port_eth_stats eth; 108 struct bfa_port_eth_stats eth;
diff --git a/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h b/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h
index 6681fe87c1e1..7fb396fe679d 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h
+++ b/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h
@@ -20,33 +20,23 @@
20 20
21#include "bfa_defs.h" 21#include "bfa_defs.h"
22 22
23/** 23/* Manufacturing block version */
24 * Manufacturing block version
25 */
26#define BFA_MFG_VERSION 3 24#define BFA_MFG_VERSION 3
27#define BFA_MFG_VERSION_UNINIT 0xFF 25#define BFA_MFG_VERSION_UNINIT 0xFF
28 26
29/** 27/* Manufacturing block encrypted version */
30 * Manufacturing block encrypted version
31 */
32#define BFA_MFG_ENC_VER 2 28#define BFA_MFG_ENC_VER 2
33 29
34/** 30/* Manufacturing block version 1 length */
35 * Manufacturing block version 1 length
36 */
37#define BFA_MFG_VER1_LEN 128 31#define BFA_MFG_VER1_LEN 128
38 32
39/** 33/* Manufacturing block header length */
40 * Manufacturing block header length
41 */
42#define BFA_MFG_HDR_LEN 4 34#define BFA_MFG_HDR_LEN 4
43 35
44#define BFA_MFG_SERIALNUM_SIZE 11 36#define BFA_MFG_SERIALNUM_SIZE 11
45#define STRSZ(_n) (((_n) + 4) & ~3) 37#define STRSZ(_n) (((_n) + 4) & ~3)
46 38
47/** 39/* Manufacturing card type */
48 * Manufacturing card type
49 */
50enum { 40enum {
51 BFA_MFG_TYPE_CB_MAX = 825, /*!< Crossbow card type max */ 41 BFA_MFG_TYPE_CB_MAX = 825, /*!< Crossbow card type max */
52 BFA_MFG_TYPE_FC8P2 = 825, /*!< 8G 2port FC card */ 42 BFA_MFG_TYPE_FC8P2 = 825, /*!< 8G 2port FC card */
@@ -70,9 +60,7 @@ enum {
70 60
71#pragma pack(1) 61#pragma pack(1)
72 62
73/** 63/* Check if Mezz card */
74 * Check if Mezz card
75 */
76#define bfa_mfg_is_mezz(type) (( \ 64#define bfa_mfg_is_mezz(type) (( \
77 (type) == BFA_MFG_TYPE_JAYHAWK || \ 65 (type) == BFA_MFG_TYPE_JAYHAWK || \
78 (type) == BFA_MFG_TYPE_WANCHESE || \ 66 (type) == BFA_MFG_TYPE_WANCHESE || \
@@ -127,9 +115,7 @@ do { \
127 } \ 115 } \
128} while (0) 116} while (0)
129 117
130/** 118/* VPD data length */
131 * VPD data length
132 */
133#define BFA_MFG_VPD_LEN 512 119#define BFA_MFG_VPD_LEN 512
134#define BFA_MFG_VPD_LEN_INVALID 0 120#define BFA_MFG_VPD_LEN_INVALID 0
135 121
@@ -137,9 +123,7 @@ do { \
137#define BFA_MFG_VPD_PCI_VER_MASK 0x07 /*!< version mask 3 bits */ 123#define BFA_MFG_VPD_PCI_VER_MASK 0x07 /*!< version mask 3 bits */
138#define BFA_MFG_VPD_PCI_VDR_MASK 0xf8 /*!< vendor mask 5 bits */ 124#define BFA_MFG_VPD_PCI_VDR_MASK 0xf8 /*!< vendor mask 5 bits */
139 125
140/** 126/* VPD vendor tag */
141 * VPD vendor tag
142 */
143enum { 127enum {
144 BFA_MFG_VPD_UNKNOWN = 0, /*!< vendor unknown */ 128 BFA_MFG_VPD_UNKNOWN = 0, /*!< vendor unknown */
145 BFA_MFG_VPD_IBM = 1, /*!< vendor IBM */ 129 BFA_MFG_VPD_IBM = 1, /*!< vendor IBM */
@@ -151,8 +135,7 @@ enum {
151 BFA_MFG_VPD_PCI_BRCD = 0xf8, /*!< PCI VPD Brocade */ 135 BFA_MFG_VPD_PCI_BRCD = 0xf8, /*!< PCI VPD Brocade */
152}; 136};
153 137
154/** 138/* BFA adapter flash vpd data definition.
155 * @brief BFA adapter flash vpd data definition.
156 * 139 *
157 * All numerical fields are in big-endian format. 140 * All numerical fields are in big-endian format.
158 */ 141 */
diff --git a/drivers/net/ethernet/brocade/bna/bfa_defs_status.h b/drivers/net/ethernet/brocade/bna/bfa_defs_status.h
index 7c5fe6c2e80e..ea9af9ae754d 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_defs_status.h
+++ b/drivers/net/ethernet/brocade/bna/bfa_defs_status.h
@@ -18,8 +18,7 @@
18#ifndef __BFA_DEFS_STATUS_H__ 18#ifndef __BFA_DEFS_STATUS_H__
19#define __BFA_DEFS_STATUS_H__ 19#define __BFA_DEFS_STATUS_H__
20 20
21/** 21/* API status return values
22 * API status return values
23 * 22 *
24 * NOTE: The error msgs are auto generated from the comments. Only singe line 23 * NOTE: The error msgs are auto generated from the comments. Only singe line
25 * comments are supported 24 * comments are supported
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index 0b640fafbda3..959c58ef972a 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -20,13 +20,9 @@
20#include "bfi_reg.h" 20#include "bfi_reg.h"
21#include "bfa_defs.h" 21#include "bfa_defs.h"
22 22
23/** 23/* IOC local definitions */
24 * IOC local definitions
25 */
26 24
27/** 25/* Asic specific macros : see bfa_hw_cb.c and bfa_hw_ct.c for details. */
28 * Asic specific macros : see bfa_hw_cb.c and bfa_hw_ct.c for details.
29 */
30 26
31#define bfa_ioc_firmware_lock(__ioc) \ 27#define bfa_ioc_firmware_lock(__ioc) \
32 ((__ioc)->ioc_hwif->ioc_firmware_lock(__ioc)) 28 ((__ioc)->ioc_hwif->ioc_firmware_lock(__ioc))
@@ -96,9 +92,7 @@ static void bfa_ioc_get_adapter_manufacturer(struct bfa_ioc *ioc,
96static void bfa_ioc_get_adapter_model(struct bfa_ioc *ioc, char *model); 92static void bfa_ioc_get_adapter_model(struct bfa_ioc *ioc, char *model);
97static u64 bfa_ioc_get_pwwn(struct bfa_ioc *ioc); 93static u64 bfa_ioc_get_pwwn(struct bfa_ioc *ioc);
98 94
99/** 95/* IOC state machine definitions/declarations */
100 * IOC state machine definitions/declarations
101 */
102enum ioc_event { 96enum ioc_event {
103 IOC_E_RESET = 1, /*!< IOC reset request */ 97 IOC_E_RESET = 1, /*!< IOC reset request */
104 IOC_E_ENABLE = 2, /*!< IOC enable request */ 98 IOC_E_ENABLE = 2, /*!< IOC enable request */
@@ -148,9 +142,7 @@ static void bfa_iocpf_initfail(struct bfa_ioc *ioc);
148static void bfa_iocpf_getattrfail(struct bfa_ioc *ioc); 142static void bfa_iocpf_getattrfail(struct bfa_ioc *ioc);
149static void bfa_iocpf_stop(struct bfa_ioc *ioc); 143static void bfa_iocpf_stop(struct bfa_ioc *ioc);
150 144
151/** 145/* IOCPF state machine events */
152 * IOCPF state machine events
153 */
154enum iocpf_event { 146enum iocpf_event {
155 IOCPF_E_ENABLE = 1, /*!< IOCPF enable request */ 147 IOCPF_E_ENABLE = 1, /*!< IOCPF enable request */
156 IOCPF_E_DISABLE = 2, /*!< IOCPF disable request */ 148 IOCPF_E_DISABLE = 2, /*!< IOCPF disable request */
@@ -166,9 +158,7 @@ enum iocpf_event {
166 IOCPF_E_SEM_ERROR = 12, /*!< h/w sem mapping error */ 158 IOCPF_E_SEM_ERROR = 12, /*!< h/w sem mapping error */
167}; 159};
168 160
169/** 161/* IOCPF states */
170 * IOCPF states
171 */
172enum bfa_iocpf_state { 162enum bfa_iocpf_state {
173 BFA_IOCPF_RESET = 1, /*!< IOC is in reset state */ 163 BFA_IOCPF_RESET = 1, /*!< IOC is in reset state */
174 BFA_IOCPF_SEMWAIT = 2, /*!< Waiting for IOC h/w semaphore */ 164 BFA_IOCPF_SEMWAIT = 2, /*!< Waiting for IOC h/w semaphore */
@@ -215,21 +205,15 @@ static struct bfa_sm_table iocpf_sm_table[] = {
215 {BFA_SM(bfa_iocpf_sm_disabled), BFA_IOCPF_DISABLED}, 205 {BFA_SM(bfa_iocpf_sm_disabled), BFA_IOCPF_DISABLED},
216}; 206};
217 207
218/** 208/* IOC State Machine */
219 * IOC State Machine
220 */
221 209
222/** 210/* Beginning state. IOC uninit state. */
223 * Beginning state. IOC uninit state.
224 */
225static void 211static void
226bfa_ioc_sm_uninit_entry(struct bfa_ioc *ioc) 212bfa_ioc_sm_uninit_entry(struct bfa_ioc *ioc)
227{ 213{
228} 214}
229 215
230/** 216/* IOC is in uninit state. */
231 * IOC is in uninit state.
232 */
233static void 217static void
234bfa_ioc_sm_uninit(struct bfa_ioc *ioc, enum ioc_event event) 218bfa_ioc_sm_uninit(struct bfa_ioc *ioc, enum ioc_event event)
235{ 219{
@@ -243,18 +227,14 @@ bfa_ioc_sm_uninit(struct bfa_ioc *ioc, enum ioc_event event)
243 } 227 }
244} 228}
245 229
246/** 230/* Reset entry actions -- initialize state machine */
247 * Reset entry actions -- initialize state machine
248 */
249static void 231static void
250bfa_ioc_sm_reset_entry(struct bfa_ioc *ioc) 232bfa_ioc_sm_reset_entry(struct bfa_ioc *ioc)
251{ 233{
252 bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); 234 bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset);
253} 235}
254 236
255/** 237/* IOC is in reset state. */
256 * IOC is in reset state.
257 */
258static void 238static void
259bfa_ioc_sm_reset(struct bfa_ioc *ioc, enum ioc_event event) 239bfa_ioc_sm_reset(struct bfa_ioc *ioc, enum ioc_event event)
260{ 240{
@@ -282,8 +262,7 @@ bfa_ioc_sm_enabling_entry(struct bfa_ioc *ioc)
282 bfa_iocpf_enable(ioc); 262 bfa_iocpf_enable(ioc);
283} 263}
284 264
285/** 265/* Host IOC function is being enabled, awaiting response from firmware.
286 * Host IOC function is being enabled, awaiting response from firmware.
287 * Semaphore is acquired. 266 * Semaphore is acquired.
288 */ 267 */
289static void 268static void
@@ -325,9 +304,7 @@ bfa_ioc_sm_enabling(struct bfa_ioc *ioc, enum ioc_event event)
325 } 304 }
326} 305}
327 306
328/** 307/* Semaphore should be acquired for version check. */
329 * Semaphore should be acquired for version check.
330 */
331static void 308static void
332bfa_ioc_sm_getattr_entry(struct bfa_ioc *ioc) 309bfa_ioc_sm_getattr_entry(struct bfa_ioc *ioc)
333{ 310{
@@ -336,9 +313,7 @@ bfa_ioc_sm_getattr_entry(struct bfa_ioc *ioc)
336 bfa_ioc_send_getattr(ioc); 313 bfa_ioc_send_getattr(ioc);
337} 314}
338 315
339/** 316/* IOC configuration in progress. Timer is active. */
340 * IOC configuration in progress. Timer is active.
341 */
342static void 317static void
343bfa_ioc_sm_getattr(struct bfa_ioc *ioc, enum ioc_event event) 318bfa_ioc_sm_getattr(struct bfa_ioc *ioc, enum ioc_event event)
344{ 319{
@@ -419,9 +394,7 @@ bfa_ioc_sm_disabling_entry(struct bfa_ioc *ioc)
419 bfa_iocpf_disable(ioc); 394 bfa_iocpf_disable(ioc);
420} 395}
421 396
422/** 397/* IOC is being disabled */
423 * IOC is being disabled
424 */
425static void 398static void
426bfa_ioc_sm_disabling(struct bfa_ioc *ioc, enum ioc_event event) 399bfa_ioc_sm_disabling(struct bfa_ioc *ioc, enum ioc_event event)
427{ 400{
@@ -449,9 +422,7 @@ bfa_ioc_sm_disabling(struct bfa_ioc *ioc, enum ioc_event event)
449 } 422 }
450} 423}
451 424
452/** 425/* IOC disable completion entry. */
453 * IOC disable completion entry.
454 */
455static void 426static void
456bfa_ioc_sm_disabled_entry(struct bfa_ioc *ioc) 427bfa_ioc_sm_disabled_entry(struct bfa_ioc *ioc)
457{ 428{
@@ -485,9 +456,7 @@ bfa_ioc_sm_fail_retry_entry(struct bfa_ioc *ioc)
485{ 456{
486} 457}
487 458
488/** 459/* Hardware initialization retry. */
489 * Hardware initialization retry.
490 */
491static void 460static void
492bfa_ioc_sm_fail_retry(struct bfa_ioc *ioc, enum ioc_event event) 461bfa_ioc_sm_fail_retry(struct bfa_ioc *ioc, enum ioc_event event)
493{ 462{
@@ -534,9 +503,7 @@ bfa_ioc_sm_fail_entry(struct bfa_ioc *ioc)
534{ 503{
535} 504}
536 505
537/** 506/* IOC failure. */
538 * IOC failure.
539 */
540static void 507static void
541bfa_ioc_sm_fail(struct bfa_ioc *ioc, enum ioc_event event) 508bfa_ioc_sm_fail(struct bfa_ioc *ioc, enum ioc_event event)
542{ 509{
@@ -568,9 +535,7 @@ bfa_ioc_sm_hwfail_entry(struct bfa_ioc *ioc)
568{ 535{
569} 536}
570 537
571/** 538/* IOC failure. */
572 * IOC failure.
573 */
574static void 539static void
575bfa_ioc_sm_hwfail(struct bfa_ioc *ioc, enum ioc_event event) 540bfa_ioc_sm_hwfail(struct bfa_ioc *ioc, enum ioc_event event)
576{ 541{
@@ -593,13 +558,9 @@ bfa_ioc_sm_hwfail(struct bfa_ioc *ioc, enum ioc_event event)
593 } 558 }
594} 559}
595 560
596/** 561/* IOCPF State Machine */
597 * IOCPF State Machine
598 */
599 562
600/** 563/* Reset entry actions -- initialize state machine */
601 * Reset entry actions -- initialize state machine
602 */
603static void 564static void
604bfa_iocpf_sm_reset_entry(struct bfa_iocpf *iocpf) 565bfa_iocpf_sm_reset_entry(struct bfa_iocpf *iocpf)
605{ 566{
@@ -607,9 +568,7 @@ bfa_iocpf_sm_reset_entry(struct bfa_iocpf *iocpf)
607 iocpf->auto_recover = bfa_nw_auto_recover; 568 iocpf->auto_recover = bfa_nw_auto_recover;
608} 569}
609 570
610/** 571/* Beginning state. IOC is in reset state. */
611 * Beginning state. IOC is in reset state.
612 */
613static void 572static void
614bfa_iocpf_sm_reset(struct bfa_iocpf *iocpf, enum iocpf_event event) 573bfa_iocpf_sm_reset(struct bfa_iocpf *iocpf, enum iocpf_event event)
615{ 574{
@@ -626,9 +585,7 @@ bfa_iocpf_sm_reset(struct bfa_iocpf *iocpf, enum iocpf_event event)
626 } 585 }
627} 586}
628 587
629/** 588/* Semaphore should be acquired for version check. */
630 * Semaphore should be acquired for version check.
631 */
632static void 589static void
633bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf *iocpf) 590bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf *iocpf)
634{ 591{
@@ -636,9 +593,7 @@ bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf *iocpf)
636 bfa_ioc_hw_sem_get(iocpf->ioc); 593 bfa_ioc_hw_sem_get(iocpf->ioc);
637} 594}
638 595
639/** 596/* Awaiting h/w semaphore to continue with version check. */
640 * Awaiting h/w semaphore to continue with version check.
641 */
642static void 597static void
643bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event) 598bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event)
644{ 599{
@@ -683,9 +638,7 @@ bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event)
683 } 638 }
684} 639}
685 640
686/** 641/* Notify enable completion callback */
687 * Notify enable completion callback
688 */
689static void 642static void
690bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf) 643bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf)
691{ 644{
@@ -698,9 +651,7 @@ bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf)
698 msecs_to_jiffies(BFA_IOC_TOV)); 651 msecs_to_jiffies(BFA_IOC_TOV));
699} 652}
700 653
701/** 654/* Awaiting firmware version match. */
702 * Awaiting firmware version match.
703 */
704static void 655static void
705bfa_iocpf_sm_mismatch(struct bfa_iocpf *iocpf, enum iocpf_event event) 656bfa_iocpf_sm_mismatch(struct bfa_iocpf *iocpf, enum iocpf_event event)
706{ 657{
@@ -727,18 +678,14 @@ bfa_iocpf_sm_mismatch(struct bfa_iocpf *iocpf, enum iocpf_event event)
727 } 678 }
728} 679}
729 680
730/** 681/* Request for semaphore. */
731 * Request for semaphore.
732 */
733static void 682static void
734bfa_iocpf_sm_semwait_entry(struct bfa_iocpf *iocpf) 683bfa_iocpf_sm_semwait_entry(struct bfa_iocpf *iocpf)
735{ 684{
736 bfa_ioc_hw_sem_get(iocpf->ioc); 685 bfa_ioc_hw_sem_get(iocpf->ioc);
737} 686}
738 687
739/** 688/* Awaiting semaphore for h/w initialzation. */
740 * Awaiting semaphore for h/w initialzation.
741 */
742static void 689static void
743bfa_iocpf_sm_semwait(struct bfa_iocpf *iocpf, enum iocpf_event event) 690bfa_iocpf_sm_semwait(struct bfa_iocpf *iocpf, enum iocpf_event event)
744{ 691{
@@ -778,8 +725,7 @@ bfa_iocpf_sm_hwinit_entry(struct bfa_iocpf *iocpf)
778 bfa_ioc_reset(iocpf->ioc, false); 725 bfa_ioc_reset(iocpf->ioc, false);
779} 726}
780 727
781/** 728/* Hardware is being initialized. Interrupts are enabled.
782 * Hardware is being initialized. Interrupts are enabled.
783 * Holding hardware semaphore lock. 729 * Holding hardware semaphore lock.
784 */ 730 */
785static void 731static void
@@ -822,8 +768,7 @@ bfa_iocpf_sm_enabling_entry(struct bfa_iocpf *iocpf)
822 bfa_ioc_send_enable(iocpf->ioc); 768 bfa_ioc_send_enable(iocpf->ioc);
823} 769}
824 770
825/** 771/* Host IOC function is being enabled, awaiting response from firmware.
826 * Host IOC function is being enabled, awaiting response from firmware.
827 * Semaphore is acquired. 772 * Semaphore is acquired.
828 */ 773 */
829static void 774static void
@@ -896,9 +841,7 @@ bfa_iocpf_sm_disabling_entry(struct bfa_iocpf *iocpf)
896 bfa_ioc_send_disable(iocpf->ioc); 841 bfa_ioc_send_disable(iocpf->ioc);
897} 842}
898 843
899/** 844/* IOC is being disabled */
900 * IOC is being disabled
901 */
902static void 845static void
903bfa_iocpf_sm_disabling(struct bfa_iocpf *iocpf, enum iocpf_event event) 846bfa_iocpf_sm_disabling(struct bfa_iocpf *iocpf, enum iocpf_event event)
904{ 847{
@@ -935,9 +878,7 @@ bfa_iocpf_sm_disabling_sync_entry(struct bfa_iocpf *iocpf)
935 bfa_ioc_hw_sem_get(iocpf->ioc); 878 bfa_ioc_hw_sem_get(iocpf->ioc);
936} 879}
937 880
938/** 881/* IOC hb ack request is being removed. */
939 * IOC hb ack request is being removed.
940 */
941static void 882static void
942bfa_iocpf_sm_disabling_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) 883bfa_iocpf_sm_disabling_sync(struct bfa_iocpf *iocpf, enum iocpf_event event)
943{ 884{
@@ -963,9 +904,7 @@ bfa_iocpf_sm_disabling_sync(struct bfa_iocpf *iocpf, enum iocpf_event event)
963 } 904 }
964} 905}
965 906
966/** 907/* IOC disable completion entry. */
967 * IOC disable completion entry.
968 */
969static void 908static void
970bfa_iocpf_sm_disabled_entry(struct bfa_iocpf *iocpf) 909bfa_iocpf_sm_disabled_entry(struct bfa_iocpf *iocpf)
971{ 910{
@@ -1000,9 +939,7 @@ bfa_iocpf_sm_initfail_sync_entry(struct bfa_iocpf *iocpf)
1000 bfa_ioc_hw_sem_get(iocpf->ioc); 939 bfa_ioc_hw_sem_get(iocpf->ioc);
1001} 940}
1002 941
1003/** 942/* Hardware initialization failed. */
1004 * Hardware initialization failed.
1005 */
1006static void 943static void
1007bfa_iocpf_sm_initfail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) 944bfa_iocpf_sm_initfail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event)
1008{ 945{
@@ -1046,9 +983,7 @@ bfa_iocpf_sm_initfail_entry(struct bfa_iocpf *iocpf)
1046{ 983{
1047} 984}
1048 985
1049/** 986/* Hardware initialization failed. */
1050 * Hardware initialization failed.
1051 */
1052static void 987static void
1053bfa_iocpf_sm_initfail(struct bfa_iocpf *iocpf, enum iocpf_event event) 988bfa_iocpf_sm_initfail(struct bfa_iocpf *iocpf, enum iocpf_event event)
1054{ 989{
@@ -1084,9 +1019,7 @@ bfa_iocpf_sm_fail_sync_entry(struct bfa_iocpf *iocpf)
1084 bfa_ioc_hw_sem_get(iocpf->ioc); 1019 bfa_ioc_hw_sem_get(iocpf->ioc);
1085} 1020}
1086 1021
1087/** 1022/* IOC is in failed state. */
1088 * IOC is in failed state.
1089 */
1090static void 1023static void
1091bfa_iocpf_sm_fail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event) 1024bfa_iocpf_sm_fail_sync(struct bfa_iocpf *iocpf, enum iocpf_event event)
1092{ 1025{
@@ -1134,10 +1067,7 @@ bfa_iocpf_sm_fail_entry(struct bfa_iocpf *iocpf)
1134{ 1067{
1135} 1068}
1136 1069
1137/** 1070/* IOC is in failed state. */
1138 * @brief
1139 * IOC is in failed state.
1140 */
1141static void 1071static void
1142bfa_iocpf_sm_fail(struct bfa_iocpf *iocpf, enum iocpf_event event) 1072bfa_iocpf_sm_fail(struct bfa_iocpf *iocpf, enum iocpf_event event)
1143{ 1073{
@@ -1151,13 +1081,9 @@ bfa_iocpf_sm_fail(struct bfa_iocpf *iocpf, enum iocpf_event event)
1151 } 1081 }
1152} 1082}
1153 1083
1154/** 1084/* BFA IOC private functions */
1155 * BFA IOC private functions
1156 */
1157 1085
1158/** 1086/* Notify common modules registered for notification. */
1159 * Notify common modules registered for notification.
1160 */
1161static void 1087static void
1162bfa_ioc_event_notify(struct bfa_ioc *ioc, enum bfa_ioc_event event) 1088bfa_ioc_event_notify(struct bfa_ioc *ioc, enum bfa_ioc_event event)
1163{ 1089{
@@ -1298,10 +1224,7 @@ bfa_ioc_hw_sem_get_cancel(struct bfa_ioc *ioc)
1298 del_timer(&ioc->sem_timer); 1224 del_timer(&ioc->sem_timer);
1299} 1225}
1300 1226
1301/** 1227/* Initialize LPU local memory (aka secondary memory / SRAM) */
1302 * @brief
1303 * Initialize LPU local memory (aka secondary memory / SRAM)
1304 */
1305static void 1228static void
1306bfa_ioc_lmem_init(struct bfa_ioc *ioc) 1229bfa_ioc_lmem_init(struct bfa_ioc *ioc)
1307{ 1230{
@@ -1366,9 +1289,7 @@ bfa_ioc_lpu_stop(struct bfa_ioc *ioc)
1366 writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); 1289 writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg);
1367} 1290}
1368 1291
1369/** 1292/* Get driver and firmware versions. */
1370 * Get driver and firmware versions.
1371 */
1372void 1293void
1373bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) 1294bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr)
1374{ 1295{
@@ -1388,9 +1309,7 @@ bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr)
1388 } 1309 }
1389} 1310}
1390 1311
1391/** 1312/* Returns TRUE if same. */
1392 * Returns TRUE if same.
1393 */
1394bool 1313bool
1395bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) 1314bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr)
1396{ 1315{
@@ -1408,8 +1327,7 @@ bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr)
1408 return true; 1327 return true;
1409} 1328}
1410 1329
1411/** 1330/* Return true if current running version is valid. Firmware signature and
1412 * Return true if current running version is valid. Firmware signature and
1413 * execution context (driver/bios) must match. 1331 * execution context (driver/bios) must match.
1414 */ 1332 */
1415static bool 1333static bool
@@ -1430,9 +1348,7 @@ bfa_ioc_fwver_valid(struct bfa_ioc *ioc, u32 boot_env)
1430 return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr); 1348 return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr);
1431} 1349}
1432 1350
1433/** 1351/* Conditionally flush any pending message from firmware at start. */
1434 * Conditionally flush any pending message from firmware at start.
1435 */
1436static void 1352static void
1437bfa_ioc_msgflush(struct bfa_ioc *ioc) 1353bfa_ioc_msgflush(struct bfa_ioc *ioc)
1438{ 1354{
@@ -1443,9 +1359,6 @@ bfa_ioc_msgflush(struct bfa_ioc *ioc)
1443 writel(1, ioc->ioc_regs.lpu_mbox_cmd); 1359 writel(1, ioc->ioc_regs.lpu_mbox_cmd);
1444} 1360}
1445 1361
1446/**
1447 * @img ioc_init_logic.jpg
1448 */
1449static void 1362static void
1450bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) 1363bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force)
1451{ 1364{
@@ -1603,10 +1516,7 @@ bfa_ioc_hb_stop(struct bfa_ioc *ioc)
1603 del_timer(&ioc->hb_timer); 1516 del_timer(&ioc->hb_timer);
1604} 1517}
1605 1518
1606/** 1519/* Initiate a full firmware download. */
1607 * @brief
1608 * Initiate a full firmware download.
1609 */
1610static void 1520static void
1611bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, 1521bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type,
1612 u32 boot_env) 1522 u32 boot_env)
@@ -1672,9 +1582,7 @@ bfa_ioc_reset(struct bfa_ioc *ioc, bool force)
1672 bfa_ioc_hwinit(ioc, force); 1582 bfa_ioc_hwinit(ioc, force);
1673} 1583}
1674 1584
1675/** 1585/* BFA ioc enable reply by firmware */
1676 * BFA ioc enable reply by firmware
1677 */
1678static void 1586static void
1679bfa_ioc_enable_reply(struct bfa_ioc *ioc, enum bfa_mode port_mode, 1587bfa_ioc_enable_reply(struct bfa_ioc *ioc, enum bfa_mode port_mode,
1680 u8 cap_bm) 1588 u8 cap_bm)
@@ -1686,10 +1594,7 @@ bfa_ioc_enable_reply(struct bfa_ioc *ioc, enum bfa_mode port_mode,
1686 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_ENABLE); 1594 bfa_fsm_send_event(iocpf, IOCPF_E_FWRSP_ENABLE);
1687} 1595}
1688 1596
1689/** 1597/* Update BFA configuration from firmware configuration. */
1690 * @brief
1691 * Update BFA configuration from firmware configuration.
1692 */
1693static void 1598static void
1694bfa_ioc_getattr_reply(struct bfa_ioc *ioc) 1599bfa_ioc_getattr_reply(struct bfa_ioc *ioc)
1695{ 1600{
@@ -1702,9 +1607,7 @@ bfa_ioc_getattr_reply(struct bfa_ioc *ioc)
1702 bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR); 1607 bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR);
1703} 1608}
1704 1609
1705/** 1610/* Attach time initialization of mbox logic. */
1706 * Attach time initialization of mbox logic.
1707 */
1708static void 1611static void
1709bfa_ioc_mbox_attach(struct bfa_ioc *ioc) 1612bfa_ioc_mbox_attach(struct bfa_ioc *ioc)
1710{ 1613{
@@ -1718,9 +1621,7 @@ bfa_ioc_mbox_attach(struct bfa_ioc *ioc)
1718 } 1621 }
1719} 1622}
1720 1623
1721/** 1624/* Mbox poll timer -- restarts any pending mailbox requests. */
1722 * Mbox poll timer -- restarts any pending mailbox requests.
1723 */
1724static void 1625static void
1725bfa_ioc_mbox_poll(struct bfa_ioc *ioc) 1626bfa_ioc_mbox_poll(struct bfa_ioc *ioc)
1726{ 1627{
@@ -1760,9 +1661,7 @@ bfa_ioc_mbox_poll(struct bfa_ioc *ioc)
1760 } 1661 }
1761} 1662}
1762 1663
1763/** 1664/* Cleanup any pending requests. */
1764 * Cleanup any pending requests.
1765 */
1766static void 1665static void
1767bfa_ioc_mbox_flush(struct bfa_ioc *ioc) 1666bfa_ioc_mbox_flush(struct bfa_ioc *ioc)
1768{ 1667{
@@ -1774,12 +1673,12 @@ bfa_ioc_mbox_flush(struct bfa_ioc *ioc)
1774} 1673}
1775 1674
1776/** 1675/**
1777 * Read data from SMEM to host through PCI memmap 1676 * bfa_nw_ioc_smem_read - Read data from SMEM to host through PCI memmap
1778 * 1677 *
1779 * @param[in] ioc memory for IOC 1678 * @ioc: memory for IOC
1780 * @param[in] tbuf app memory to store data from smem 1679 * @tbuf: app memory to store data from smem
1781 * @param[in] soff smem offset 1680 * @soff: smem offset
1782 * @param[in] sz size of smem in bytes 1681 * @sz: size of smem in bytes
1783 */ 1682 */
1784static int 1683static int
1785bfa_nw_ioc_smem_read(struct bfa_ioc *ioc, void *tbuf, u32 soff, u32 sz) 1684bfa_nw_ioc_smem_read(struct bfa_ioc *ioc, void *tbuf, u32 soff, u32 sz)
@@ -1826,9 +1725,7 @@ bfa_nw_ioc_smem_read(struct bfa_ioc *ioc, void *tbuf, u32 soff, u32 sz)
1826 return 0; 1725 return 0;
1827} 1726}
1828 1727
1829/** 1728/* Retrieve saved firmware trace from a prior IOC failure. */
1830 * Retrieve saved firmware trace from a prior IOC failure.
1831 */
1832int 1729int
1833bfa_nw_ioc_debug_fwtrc(struct bfa_ioc *ioc, void *trcdata, int *trclen) 1730bfa_nw_ioc_debug_fwtrc(struct bfa_ioc *ioc, void *trcdata, int *trclen)
1834{ 1731{
@@ -1844,9 +1741,7 @@ bfa_nw_ioc_debug_fwtrc(struct bfa_ioc *ioc, void *trcdata, int *trclen)
1844 return status; 1741 return status;
1845} 1742}
1846 1743
1847/** 1744/* Save firmware trace if configured. */
1848 * Save firmware trace if configured.
1849 */
1850static void 1745static void
1851bfa_nw_ioc_debug_save_ftrc(struct bfa_ioc *ioc) 1746bfa_nw_ioc_debug_save_ftrc(struct bfa_ioc *ioc)
1852{ 1747{
@@ -1861,9 +1756,7 @@ bfa_nw_ioc_debug_save_ftrc(struct bfa_ioc *ioc)
1861 } 1756 }
1862} 1757}
1863 1758
1864/** 1759/* Retrieve saved firmware trace from a prior IOC failure. */
1865 * Retrieve saved firmware trace from a prior IOC failure.
1866 */
1867int 1760int
1868bfa_nw_ioc_debug_fwsave(struct bfa_ioc *ioc, void *trcdata, int *trclen) 1761bfa_nw_ioc_debug_fwsave(struct bfa_ioc *ioc, void *trcdata, int *trclen)
1869{ 1762{
@@ -1892,9 +1785,7 @@ bfa_ioc_fail_notify(struct bfa_ioc *ioc)
1892 bfa_nw_ioc_debug_save_ftrc(ioc); 1785 bfa_nw_ioc_debug_save_ftrc(ioc);
1893} 1786}
1894 1787
1895/** 1788/* IOCPF to IOC interface */
1896 * IOCPF to IOC interface
1897 */
1898static void 1789static void
1899bfa_ioc_pf_enabled(struct bfa_ioc *ioc) 1790bfa_ioc_pf_enabled(struct bfa_ioc *ioc)
1900{ 1791{
@@ -1928,9 +1819,7 @@ bfa_ioc_pf_fwmismatch(struct bfa_ioc *ioc)
1928 ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); 1819 ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE);
1929} 1820}
1930 1821
1931/** 1822/* IOC public */
1932 * IOC public
1933 */
1934static enum bfa_status 1823static enum bfa_status
1935bfa_ioc_pll_init(struct bfa_ioc *ioc) 1824bfa_ioc_pll_init(struct bfa_ioc *ioc)
1936{ 1825{
@@ -1954,8 +1843,7 @@ bfa_ioc_pll_init(struct bfa_ioc *ioc)
1954 return BFA_STATUS_OK; 1843 return BFA_STATUS_OK;
1955} 1844}
1956 1845
1957/** 1846/* Interface used by diag module to do firmware boot with memory test
1958 * Interface used by diag module to do firmware boot with memory test
1959 * as the entry vector. 1847 * as the entry vector.
1960 */ 1848 */
1961static void 1849static void
@@ -1983,9 +1871,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, enum bfi_fwboot_type boot_type,
1983 bfa_ioc_lpu_start(ioc); 1871 bfa_ioc_lpu_start(ioc);
1984} 1872}
1985 1873
1986/** 1874/* Enable/disable IOC failure auto recovery. */
1987 * Enable/disable IOC failure auto recovery.
1988 */
1989void 1875void
1990bfa_nw_ioc_auto_recover(bool auto_recover) 1876bfa_nw_ioc_auto_recover(bool auto_recover)
1991{ 1877{
@@ -2056,10 +1942,10 @@ bfa_ioc_isr(struct bfa_ioc *ioc, struct bfi_mbmsg *m)
2056} 1942}
2057 1943
2058/** 1944/**
2059 * IOC attach time initialization and setup. 1945 * bfa_nw_ioc_attach - IOC attach time initialization and setup.
2060 * 1946 *
2061 * @param[in] ioc memory for IOC 1947 * @ioc: memory for IOC
2062 * @param[in] bfa driver instance structure 1948 * @bfa: driver instance structure
2063 */ 1949 */
2064void 1950void
2065bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa, struct bfa_ioc_cbfn *cbfn) 1951bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa, struct bfa_ioc_cbfn *cbfn)
@@ -2078,9 +1964,7 @@ bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa, struct bfa_ioc_cbfn *cbfn)
2078 bfa_fsm_send_event(ioc, IOC_E_RESET); 1964 bfa_fsm_send_event(ioc, IOC_E_RESET);
2079} 1965}
2080 1966
2081/** 1967/* Driver detach time IOC cleanup. */
2082 * Driver detach time IOC cleanup.
2083 */
2084void 1968void
2085bfa_nw_ioc_detach(struct bfa_ioc *ioc) 1969bfa_nw_ioc_detach(struct bfa_ioc *ioc)
2086{ 1970{
@@ -2091,9 +1975,9 @@ bfa_nw_ioc_detach(struct bfa_ioc *ioc)
2091} 1975}
2092 1976
2093/** 1977/**
2094 * Setup IOC PCI properties. 1978 * bfa_nw_ioc_pci_init - Setup IOC PCI properties.
2095 * 1979 *
2096 * @param[in] pcidev PCI device information for this IOC 1980 * @pcidev: PCI device information for this IOC
2097 */ 1981 */
2098void 1982void
2099bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev, 1983bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev,
@@ -2160,10 +2044,10 @@ bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev,
2160} 2044}
2161 2045
2162/** 2046/**
2163 * Initialize IOC dma memory 2047 * bfa_nw_ioc_mem_claim - Initialize IOC dma memory
2164 * 2048 *
2165 * @param[in] dm_kva kernel virtual address of IOC dma memory 2049 * @dm_kva: kernel virtual address of IOC dma memory
2166 * @param[in] dm_pa physical address of IOC dma memory 2050 * @dm_pa: physical address of IOC dma memory
2167 */ 2051 */
2168void 2052void
2169bfa_nw_ioc_mem_claim(struct bfa_ioc *ioc, u8 *dm_kva, u64 dm_pa) 2053bfa_nw_ioc_mem_claim(struct bfa_ioc *ioc, u8 *dm_kva, u64 dm_pa)
@@ -2176,9 +2060,7 @@ bfa_nw_ioc_mem_claim(struct bfa_ioc *ioc, u8 *dm_kva, u64 dm_pa)
2176 ioc->attr = (struct bfi_ioc_attr *) dm_kva; 2060 ioc->attr = (struct bfi_ioc_attr *) dm_kva;
2177} 2061}
2178 2062
2179/** 2063/* Return size of dma memory required. */
2180 * Return size of dma memory required.
2181 */
2182u32 2064u32
2183bfa_nw_ioc_meminfo(void) 2065bfa_nw_ioc_meminfo(void)
2184{ 2066{
@@ -2201,9 +2083,7 @@ bfa_nw_ioc_disable(struct bfa_ioc *ioc)
2201 bfa_fsm_send_event(ioc, IOC_E_DISABLE); 2083 bfa_fsm_send_event(ioc, IOC_E_DISABLE);
2202} 2084}
2203 2085
2204/** 2086/* Initialize memory for saving firmware trace. */
2205 * Initialize memory for saving firmware trace.
2206 */
2207void 2087void
2208bfa_nw_ioc_debug_memclaim(struct bfa_ioc *ioc, void *dbg_fwsave) 2088bfa_nw_ioc_debug_memclaim(struct bfa_ioc *ioc, void *dbg_fwsave)
2209{ 2089{
@@ -2217,9 +2097,7 @@ bfa_ioc_smem_pgnum(struct bfa_ioc *ioc, u32 fmaddr)
2217 return PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, fmaddr); 2097 return PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, fmaddr);
2218} 2098}
2219 2099
2220/** 2100/* Register mailbox message handler function, to be called by common modules */
2221 * Register mailbox message handler function, to be called by common modules
2222 */
2223void 2101void
2224bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc, 2102bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc,
2225 bfa_ioc_mbox_mcfunc_t cbfn, void *cbarg) 2103 bfa_ioc_mbox_mcfunc_t cbfn, void *cbarg)
@@ -2231,11 +2109,12 @@ bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc,
2231} 2109}
2232 2110
2233/** 2111/**
2234 * Queue a mailbox command request to firmware. Waits if mailbox is busy. 2112 * bfa_nw_ioc_mbox_queue - Queue a mailbox command request to firmware.
2235 * Responsibility of caller to serialize
2236 * 2113 *
2237 * @param[in] ioc IOC instance 2114 * @ioc: IOC instance
2238 * @param[i] cmd Mailbox command 2115 * @cmd: Mailbox command
2116 *
2117 * Waits if mailbox is busy. Responsibility of caller to serialize
2239 */ 2118 */
2240bool 2119bool
2241bfa_nw_ioc_mbox_queue(struct bfa_ioc *ioc, struct bfa_mbox_cmd *cmd, 2120bfa_nw_ioc_mbox_queue(struct bfa_ioc *ioc, struct bfa_mbox_cmd *cmd,
@@ -2272,9 +2151,7 @@ bfa_nw_ioc_mbox_queue(struct bfa_ioc *ioc, struct bfa_mbox_cmd *cmd,
2272 return false; 2151 return false;
2273} 2152}
2274 2153
2275/** 2154/* Handle mailbox interrupts */
2276 * Handle mailbox interrupts
2277 */
2278void 2155void
2279bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc) 2156bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc)
2280{ 2157{
@@ -2314,9 +2191,7 @@ bfa_nw_ioc_error_isr(struct bfa_ioc *ioc)
2314 bfa_fsm_send_event(ioc, IOC_E_HWERROR); 2191 bfa_fsm_send_event(ioc, IOC_E_HWERROR);
2315} 2192}
2316 2193
2317/** 2194/* return true if IOC is disabled */
2318 * return true if IOC is disabled
2319 */
2320bool 2195bool
2321bfa_nw_ioc_is_disabled(struct bfa_ioc *ioc) 2196bfa_nw_ioc_is_disabled(struct bfa_ioc *ioc)
2322{ 2197{
@@ -2324,17 +2199,14 @@ bfa_nw_ioc_is_disabled(struct bfa_ioc *ioc)
2324 bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled); 2199 bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled);
2325} 2200}
2326 2201
2327/** 2202/* return true if IOC is operational */
2328 * return true if IOC is operational
2329 */
2330bool 2203bool
2331bfa_nw_ioc_is_operational(struct bfa_ioc *ioc) 2204bfa_nw_ioc_is_operational(struct bfa_ioc *ioc)
2332{ 2205{
2333 return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_op); 2206 return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_op);
2334} 2207}
2335 2208
2336/** 2209/* Add to IOC heartbeat failure notification queue. To be used by common
2337 * Add to IOC heartbeat failure notification queue. To be used by common
2338 * modules such as cee, port, diag. 2210 * modules such as cee, port, diag.
2339 */ 2211 */
2340void 2212void
@@ -2518,9 +2390,7 @@ bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr)
2518 bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev); 2390 bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev);
2519} 2391}
2520 2392
2521/** 2393/* WWN public */
2522 * WWN public
2523 */
2524static u64 2394static u64
2525bfa_ioc_get_pwwn(struct bfa_ioc *ioc) 2395bfa_ioc_get_pwwn(struct bfa_ioc *ioc)
2526{ 2396{
@@ -2533,9 +2403,7 @@ bfa_nw_ioc_get_mac(struct bfa_ioc *ioc)
2533 return ioc->attr->mac; 2403 return ioc->attr->mac;
2534} 2404}
2535 2405
2536/** 2406/* Firmware failure detected. Start recovery actions. */
2537 * Firmware failure detected. Start recovery actions.
2538 */
2539static void 2407static void
2540bfa_ioc_recover(struct bfa_ioc *ioc) 2408bfa_ioc_recover(struct bfa_ioc *ioc)
2541{ 2409{
@@ -2545,10 +2413,7 @@ bfa_ioc_recover(struct bfa_ioc *ioc)
2545 bfa_fsm_send_event(ioc, IOC_E_HBFAIL); 2413 bfa_fsm_send_event(ioc, IOC_E_HBFAIL);
2546} 2414}
2547 2415
2548/** 2416/* BFA IOC PF private functions */
2549 * @dg hal_iocpf_pvt BFA IOC PF private functions
2550 * @{
2551 */
2552 2417
2553static void 2418static void
2554bfa_iocpf_enable(struct bfa_ioc *ioc) 2419bfa_iocpf_enable(struct bfa_ioc *ioc)
@@ -2669,8 +2534,6 @@ bfa_flash_notify(void *cbarg, enum bfa_ioc_event event)
2669 2534
2670/* 2535/*
2671 * Send flash write request. 2536 * Send flash write request.
2672 *
2673 * @param[in] cbarg - callback argument
2674 */ 2537 */
2675static void 2538static void
2676bfa_flash_write_send(struct bfa_flash *flash) 2539bfa_flash_write_send(struct bfa_flash *flash)
@@ -2699,10 +2562,10 @@ bfa_flash_write_send(struct bfa_flash *flash)
2699 flash->offset += len; 2562 flash->offset += len;
2700} 2563}
2701 2564
2702/* 2565/**
2703 * Send flash read request. 2566 * bfa_flash_read_send - Send flash read request.
2704 * 2567 *
2705 * @param[in] cbarg - callback argument 2568 * @cbarg: callback argument
2706 */ 2569 */
2707static void 2570static void
2708bfa_flash_read_send(void *cbarg) 2571bfa_flash_read_send(void *cbarg)
@@ -2724,11 +2587,11 @@ bfa_flash_read_send(void *cbarg)
2724 bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL); 2587 bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL);
2725} 2588}
2726 2589
2727/* 2590/**
2728 * Process flash response messages upon receiving interrupts. 2591 * bfa_flash_intr - Process flash response messages upon receiving interrupts.
2729 * 2592 *
2730 * @param[in] flasharg - flash structure 2593 * @flasharg: flash structure
2731 * @param[in] msg - message structure 2594 * @msg: message structure
2732 */ 2595 */
2733static void 2596static void
2734bfa_flash_intr(void *flasharg, struct bfi_mbmsg *msg) 2597bfa_flash_intr(void *flasharg, struct bfi_mbmsg *msg)
@@ -2821,12 +2684,12 @@ bfa_nw_flash_meminfo(void)
2821 return roundup(BFA_FLASH_DMA_BUF_SZ, BFA_DMA_ALIGN_SZ); 2684 return roundup(BFA_FLASH_DMA_BUF_SZ, BFA_DMA_ALIGN_SZ);
2822} 2685}
2823 2686
2824/* 2687/**
2825 * Flash attach API. 2688 * bfa_nw_flash_attach - Flash attach API.
2826 * 2689 *
2827 * @param[in] flash - flash structure 2690 * @flash: flash structure
2828 * @param[in] ioc - ioc structure 2691 * @ioc: ioc structure
2829 * @param[in] dev - device structure 2692 * @dev: device structure
2830 */ 2693 */
2831void 2694void
2832bfa_nw_flash_attach(struct bfa_flash *flash, struct bfa_ioc *ioc, void *dev) 2695bfa_nw_flash_attach(struct bfa_flash *flash, struct bfa_ioc *ioc, void *dev)
@@ -2842,12 +2705,12 @@ bfa_nw_flash_attach(struct bfa_flash *flash, struct bfa_ioc *ioc, void *dev)
2842 list_add_tail(&flash->ioc_notify.qe, &flash->ioc->notify_q); 2705 list_add_tail(&flash->ioc_notify.qe, &flash->ioc->notify_q);
2843} 2706}
2844 2707
2845/* 2708/**
2846 * Claim memory for flash 2709 * bfa_nw_flash_memclaim - Claim memory for flash
2847 * 2710 *
2848 * @param[in] flash - flash structure 2711 * @flash: flash structure
2849 * @param[in] dm_kva - pointer to virtual memory address 2712 * @dm_kva: pointer to virtual memory address
2850 * @param[in] dm_pa - physical memory address 2713 * @dm_pa: physical memory address
2851 */ 2714 */
2852void 2715void
2853bfa_nw_flash_memclaim(struct bfa_flash *flash, u8 *dm_kva, u64 dm_pa) 2716bfa_nw_flash_memclaim(struct bfa_flash *flash, u8 *dm_kva, u64 dm_pa)
@@ -2859,13 +2722,13 @@ bfa_nw_flash_memclaim(struct bfa_flash *flash, u8 *dm_kva, u64 dm_pa)
2859 dm_pa += roundup(BFA_FLASH_DMA_BUF_SZ, BFA_DMA_ALIGN_SZ); 2722 dm_pa += roundup(BFA_FLASH_DMA_BUF_SZ, BFA_DMA_ALIGN_SZ);
2860} 2723}
2861 2724
2862/* 2725/**
2863 * Get flash attribute. 2726 * bfa_nw_flash_get_attr - Get flash attribute.
2864 * 2727 *
2865 * @param[in] flash - flash structure 2728 * @flash: flash structure
2866 * @param[in] attr - flash attribute structure 2729 * @attr: flash attribute structure
2867 * @param[in] cbfn - callback function 2730 * @cbfn: callback function
2868 * @param[in] cbarg - callback argument 2731 * @cbarg: callback argument
2869 * 2732 *
2870 * Return status. 2733 * Return status.
2871 */ 2734 */
@@ -2895,17 +2758,17 @@ bfa_nw_flash_get_attr(struct bfa_flash *flash, struct bfa_flash_attr *attr,
2895 return BFA_STATUS_OK; 2758 return BFA_STATUS_OK;
2896} 2759}
2897 2760
2898/* 2761/**
2899 * Update flash partition. 2762 * bfa_nw_flash_update_part - Update flash partition.
2900 * 2763 *
2901 * @param[in] flash - flash structure 2764 * @flash: flash structure
2902 * @param[in] type - flash partition type 2765 * @type: flash partition type
2903 * @param[in] instance - flash partition instance 2766 * @instance: flash partition instance
2904 * @param[in] buf - update data buffer 2767 * @buf: update data buffer
2905 * @param[in] len - data buffer length 2768 * @len: data buffer length
2906 * @param[in] offset - offset relative to the partition starting address 2769 * @offset: offset relative to the partition starting address
2907 * @param[in] cbfn - callback function 2770 * @cbfn: callback function
2908 * @param[in] cbarg - callback argument 2771 * @cbarg: callback argument
2909 * 2772 *
2910 * Return status. 2773 * Return status.
2911 */ 2774 */
@@ -2944,17 +2807,17 @@ bfa_nw_flash_update_part(struct bfa_flash *flash, u32 type, u8 instance,
2944 return BFA_STATUS_OK; 2807 return BFA_STATUS_OK;
2945} 2808}
2946 2809
2947/* 2810/**
2948 * Read flash partition. 2811 * bfa_nw_flash_read_part - Read flash partition.
2949 * 2812 *
2950 * @param[in] flash - flash structure 2813 * @flash: flash structure
2951 * @param[in] type - flash partition type 2814 * @type: flash partition type
2952 * @param[in] instance - flash partition instance 2815 * @instance: flash partition instance
2953 * @param[in] buf - read data buffer 2816 * @buf: read data buffer
2954 * @param[in] len - data buffer length 2817 * @len: data buffer length
2955 * @param[in] offset - offset relative to the partition starting address 2818 * @offset: offset relative to the partition starting address
2956 * @param[in] cbfn - callback function 2819 * @cbfn: callback function
2957 * @param[in] cbarg - callback argument 2820 * @cbarg: callback argument
2958 * 2821 *
2959 * Return status. 2822 * Return status.
2960 */ 2823 */
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.h b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
index 3b4460fdc148..63a85e555df8 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.h
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
@@ -30,9 +30,7 @@
30#define BNA_DBG_FWTRC_LEN (BFI_IOC_TRC_ENTS * BFI_IOC_TRC_ENT_SZ + \ 30#define BNA_DBG_FWTRC_LEN (BFI_IOC_TRC_ENTS * BFI_IOC_TRC_ENT_SZ + \
31 BFI_IOC_TRC_HDR_SZ) 31 BFI_IOC_TRC_HDR_SZ)
32 32
33/** 33/* PCI device information required by IOC */
34 * PCI device information required by IOC
35 */
36struct bfa_pcidev { 34struct bfa_pcidev {
37 int pci_slot; 35 int pci_slot;
38 u8 pci_func; 36 u8 pci_func;
@@ -41,8 +39,7 @@ struct bfa_pcidev {
41 void __iomem *pci_bar_kva; 39 void __iomem *pci_bar_kva;
42}; 40};
43 41
44/** 42/* Structure used to remember the DMA-able memory block's KVA and Physical
45 * Structure used to remember the DMA-able memory block's KVA and Physical
46 * Address 43 * Address
47 */ 44 */
48struct bfa_dma { 45struct bfa_dma {
@@ -52,15 +49,11 @@ struct bfa_dma {
52 49
53#define BFA_DMA_ALIGN_SZ 256 50#define BFA_DMA_ALIGN_SZ 256
54 51
55/** 52/* smem size for Crossbow and Catapult */
56 * smem size for Crossbow and Catapult
57 */
58#define BFI_SMEM_CB_SIZE 0x200000U /* ! 2MB for crossbow */ 53#define BFI_SMEM_CB_SIZE 0x200000U /* ! 2MB for crossbow */
59#define BFI_SMEM_CT_SIZE 0x280000U /* ! 2.5MB for catapult */ 54#define BFI_SMEM_CT_SIZE 0x280000U /* ! 2.5MB for catapult */
60 55
61/** 56/* BFA dma address assignment macro. (big endian format) */
62 * @brief BFA dma address assignment macro. (big endian format)
63 */
64#define bfa_dma_be_addr_set(dma_addr, pa) \ 57#define bfa_dma_be_addr_set(dma_addr, pa) \
65 __bfa_dma_be_addr_set(&dma_addr, (u64)pa) 58 __bfa_dma_be_addr_set(&dma_addr, (u64)pa)
66static inline void 59static inline void
@@ -108,9 +101,7 @@ struct bfa_ioc_regs {
108 u32 smem_pg0; 101 u32 smem_pg0;
109}; 102};
110 103
111/** 104/* IOC Mailbox structures */
112 * IOC Mailbox structures
113 */
114typedef void (*bfa_mbox_cmd_cbfn_t)(void *cbarg); 105typedef void (*bfa_mbox_cmd_cbfn_t)(void *cbarg);
115struct bfa_mbox_cmd { 106struct bfa_mbox_cmd {
116 struct list_head qe; 107 struct list_head qe;
@@ -119,9 +110,7 @@ struct bfa_mbox_cmd {
119 u32 msg[BFI_IOC_MSGSZ]; 110 u32 msg[BFI_IOC_MSGSZ];
120}; 111};
121 112
122/** 113/* IOC mailbox module */
123 * IOC mailbox module
124 */
125typedef void (*bfa_ioc_mbox_mcfunc_t)(void *cbarg, struct bfi_mbmsg *m); 114typedef void (*bfa_ioc_mbox_mcfunc_t)(void *cbarg, struct bfi_mbmsg *m);
126struct bfa_ioc_mbox_mod { 115struct bfa_ioc_mbox_mod {
127 struct list_head cmd_q; /*!< pending mbox queue */ 116 struct list_head cmd_q; /*!< pending mbox queue */
@@ -132,9 +121,7 @@ struct bfa_ioc_mbox_mod {
132 } mbhdlr[BFI_MC_MAX]; 121 } mbhdlr[BFI_MC_MAX];
133}; 122};
134 123
135/** 124/* IOC callback function interfaces */
136 * IOC callback function interfaces
137 */
138typedef void (*bfa_ioc_enable_cbfn_t)(void *bfa, enum bfa_status status); 125typedef void (*bfa_ioc_enable_cbfn_t)(void *bfa, enum bfa_status status);
139typedef void (*bfa_ioc_disable_cbfn_t)(void *bfa); 126typedef void (*bfa_ioc_disable_cbfn_t)(void *bfa);
140typedef void (*bfa_ioc_hbfail_cbfn_t)(void *bfa); 127typedef void (*bfa_ioc_hbfail_cbfn_t)(void *bfa);
@@ -146,9 +133,7 @@ struct bfa_ioc_cbfn {
146 bfa_ioc_reset_cbfn_t reset_cbfn; 133 bfa_ioc_reset_cbfn_t reset_cbfn;
147}; 134};
148 135
149/** 136/* IOC event notification mechanism. */
150 * IOC event notification mechanism.
151 */
152enum bfa_ioc_event { 137enum bfa_ioc_event {
153 BFA_IOC_E_ENABLED = 1, 138 BFA_IOC_E_ENABLED = 1,
154 BFA_IOC_E_DISABLED = 2, 139 BFA_IOC_E_DISABLED = 2,
@@ -163,9 +148,7 @@ struct bfa_ioc_notify {
163 void *cbarg; 148 void *cbarg;
164}; 149};
165 150
166/** 151/* Initialize a IOC event notification structure */
167 * Initialize a IOC event notification structure
168 */
169#define bfa_ioc_notify_init(__notify, __cbfn, __cbarg) do { \ 152#define bfa_ioc_notify_init(__notify, __cbfn, __cbarg) do { \
170 (__notify)->cbfn = (__cbfn); \ 153 (__notify)->cbfn = (__cbfn); \
171 (__notify)->cbarg = (__cbarg); \ 154 (__notify)->cbarg = (__cbarg); \
@@ -261,9 +244,7 @@ struct bfa_ioc_hwif {
261#define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS) 244#define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS)
262#define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS) 245#define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS)
263 246
264/** 247/* IOC mailbox interface */
265 * IOC mailbox interface
266 */
267bool bfa_nw_ioc_mbox_queue(struct bfa_ioc *ioc, 248bool bfa_nw_ioc_mbox_queue(struct bfa_ioc *ioc,
268 struct bfa_mbox_cmd *cmd, 249 struct bfa_mbox_cmd *cmd,
269 bfa_mbox_cmd_cbfn_t cbfn, void *cbarg); 250 bfa_mbox_cmd_cbfn_t cbfn, void *cbarg);
@@ -271,9 +252,7 @@ void bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc);
271void bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc, 252void bfa_nw_ioc_mbox_regisr(struct bfa_ioc *ioc, enum bfi_mclass mc,
272 bfa_ioc_mbox_mcfunc_t cbfn, void *cbarg); 253 bfa_ioc_mbox_mcfunc_t cbfn, void *cbarg);
273 254
274/** 255/* IOC interfaces */
275 * IOC interfaces
276 */
277 256
278#define bfa_ioc_pll_init_asic(__ioc) \ 257#define bfa_ioc_pll_init_asic(__ioc) \
279 ((__ioc)->ioc_hwif->ioc_pll_init((__ioc)->pcidev.pci_bar_kva, \ 258 ((__ioc)->ioc_hwif->ioc_pll_init((__ioc)->pcidev.pci_bar_kva, \
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c b/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
index b6b036a143ae..5df0b0c68c5a 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c
@@ -87,9 +87,7 @@ static const struct bfa_ioc_hwif nw_hwif_ct2 = {
87 .ioc_sync_complete = bfa_ioc_ct_sync_complete, 87 .ioc_sync_complete = bfa_ioc_ct_sync_complete,
88}; 88};
89 89
90/** 90/* Called from bfa_ioc_attach() to map asic specific calls. */
91 * Called from bfa_ioc_attach() to map asic specific calls.
92 */
93void 91void
94bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc) 92bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc)
95{ 93{
@@ -102,9 +100,7 @@ bfa_nw_ioc_set_ct2_hwif(struct bfa_ioc *ioc)
102 ioc->ioc_hwif = &nw_hwif_ct2; 100 ioc->ioc_hwif = &nw_hwif_ct2;
103} 101}
104 102
105/** 103/* Return true if firmware of current driver matches the running firmware. */
106 * Return true if firmware of current driver matches the running firmware.
107 */
108static bool 104static bool
109bfa_ioc_ct_firmware_lock(struct bfa_ioc *ioc) 105bfa_ioc_ct_firmware_lock(struct bfa_ioc *ioc)
110{ 106{
@@ -182,9 +178,7 @@ bfa_ioc_ct_firmware_unlock(struct bfa_ioc *ioc)
182 bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg); 178 bfa_nw_ioc_sem_release(ioc->ioc_regs.ioc_usage_sem_reg);
183} 179}
184 180
185/** 181/* Notify other functions on HB failure. */
186 * Notify other functions on HB failure.
187 */
188static void 182static void
189bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc) 183bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc)
190{ 184{
@@ -195,9 +189,7 @@ bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc)
195 readl(ioc->ioc_regs.alt_ll_halt); 189 readl(ioc->ioc_regs.alt_ll_halt);
196} 190}
197 191
198/** 192/* Host to LPU mailbox message addresses */
199 * Host to LPU mailbox message addresses
200 */
201static const struct { 193static const struct {
202 u32 hfn_mbox; 194 u32 hfn_mbox;
203 u32 lpu_mbox; 195 u32 lpu_mbox;
@@ -209,9 +201,7 @@ static const struct {
209 { HOSTFN3_LPU_MBOX0_8, LPU_HOSTFN3_MBOX0_8, HOST_PAGE_NUM_FN3 } 201 { HOSTFN3_LPU_MBOX0_8, LPU_HOSTFN3_MBOX0_8, HOST_PAGE_NUM_FN3 }
210}; 202};
211 203
212/** 204/* Host <-> LPU mailbox command/status registers - port 0 */
213 * Host <-> LPU mailbox command/status registers - port 0
214 */
215static const struct { 205static const struct {
216 u32 hfn; 206 u32 hfn;
217 u32 lpu; 207 u32 lpu;
@@ -222,9 +212,7 @@ static const struct {
222 { HOSTFN3_LPU0_CMD_STAT, LPU0_HOSTFN3_CMD_STAT } 212 { HOSTFN3_LPU0_CMD_STAT, LPU0_HOSTFN3_CMD_STAT }
223}; 213};
224 214
225/** 215/* Host <-> LPU mailbox command/status registers - port 1 */
226 * Host <-> LPU mailbox command/status registers - port 1
227 */
228static const struct { 216static const struct {
229 u32 hfn; 217 u32 hfn;
230 u32 lpu; 218 u32 lpu;
@@ -368,9 +356,7 @@ bfa_ioc_ct2_reg_init(struct bfa_ioc *ioc)
368 ioc->ioc_regs.err_set = rb + ERR_SET_REG; 356 ioc->ioc_regs.err_set = rb + ERR_SET_REG;
369} 357}
370 358
371/** 359/* Initialize IOC to port mapping. */
372 * Initialize IOC to port mapping.
373 */
374 360
375#define FNC_PERS_FN_SHIFT(__fn) ((__fn) * 8) 361#define FNC_PERS_FN_SHIFT(__fn) ((__fn) * 8)
376static void 362static void
@@ -398,9 +384,7 @@ bfa_ioc_ct2_map_port(struct bfa_ioc *ioc)
398 ioc->port_id = ((r32 & __FC_LL_PORT_MAP__MK) >> __FC_LL_PORT_MAP__SH); 384 ioc->port_id = ((r32 & __FC_LL_PORT_MAP__MK) >> __FC_LL_PORT_MAP__SH);
399} 385}
400 386
401/** 387/* Set interrupt mode for a function: INTX or MSIX */
402 * Set interrupt mode for a function: INTX or MSIX
403 */
404static void 388static void
405bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix) 389bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix)
406{ 390{
@@ -443,9 +427,7 @@ bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc *ioc)
443 return false; 427 return false;
444} 428}
445 429
446/** 430/* MSI-X resource allocation for 1860 with no asic block */
447 * MSI-X resource allocation for 1860 with no asic block
448 */
449#define HOSTFN_MSIX_DEFAULT 64 431#define HOSTFN_MSIX_DEFAULT 64
450#define HOSTFN_MSIX_VT_INDEX_MBOX_ERR 0x30138 432#define HOSTFN_MSIX_VT_INDEX_MBOX_ERR 0x30138
451#define HOSTFN_MSIX_VT_OFST_NUMVT 0x3013c 433#define HOSTFN_MSIX_VT_OFST_NUMVT 0x3013c
@@ -473,9 +455,7 @@ bfa_nw_ioc_ct2_poweron(struct bfa_ioc *ioc)
473 rb + HOSTFN_MSIX_VT_INDEX_MBOX_ERR); 455 rb + HOSTFN_MSIX_VT_INDEX_MBOX_ERR);
474} 456}
475 457
476/** 458/* Cleanup hw semaphore and usecnt registers */
477 * Cleanup hw semaphore and usecnt registers
478 */
479static void 459static void
480bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc) 460bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc)
481{ 461{
@@ -492,9 +472,7 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc)
492 bfa_nw_ioc_hw_sem_release(ioc); 472 bfa_nw_ioc_hw_sem_release(ioc);
493} 473}
494 474
495/** 475/* Synchronized IOC failure processing routines */
496 * Synchronized IOC failure processing routines
497 */
498static bool 476static bool
499bfa_ioc_ct_sync_start(struct bfa_ioc *ioc) 477bfa_ioc_ct_sync_start(struct bfa_ioc *ioc)
500{ 478{
@@ -518,9 +496,7 @@ bfa_ioc_ct_sync_start(struct bfa_ioc *ioc)
518 496
519 return bfa_ioc_ct_sync_complete(ioc); 497 return bfa_ioc_ct_sync_complete(ioc);
520} 498}
521/** 499/* Synchronized IOC failure processing routines */
522 * Synchronized IOC failure processing routines
523 */
524static void 500static void
525bfa_ioc_ct_sync_join(struct bfa_ioc *ioc) 501bfa_ioc_ct_sync_join(struct bfa_ioc *ioc)
526{ 502{
diff --git a/drivers/net/ethernet/brocade/bna/bfa_msgq.c b/drivers/net/ethernet/brocade/bna/bfa_msgq.c
index dd36427f4752..55067d0d25cf 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_msgq.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_msgq.c
@@ -16,9 +16,7 @@
16 * www.brocade.com 16 * www.brocade.com
17 */ 17 */
18 18
19/** 19/* MSGQ module source file. */
20 * @file bfa_msgq.c MSGQ module source file.
21 */
22 20
23#include "bfi.h" 21#include "bfi.h"
24#include "bfa_msgq.h" 22#include "bfa_msgq.h"
diff --git a/drivers/net/ethernet/brocade/bna/bfi.h b/drivers/net/ethernet/brocade/bna/bfi.h
index 0d9df695397a..1f24c23dc786 100644
--- a/drivers/net/ethernet/brocade/bna/bfi.h
+++ b/drivers/net/ethernet/brocade/bna/bfi.h
@@ -22,15 +22,11 @@
22 22
23#pragma pack(1) 23#pragma pack(1)
24 24
25/** 25/* BFI FW image type */
26 * BFI FW image type
27 */
28#define BFI_FLASH_CHUNK_SZ 256 /*!< Flash chunk size */ 26#define BFI_FLASH_CHUNK_SZ 256 /*!< Flash chunk size */
29#define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) 27#define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32))
30 28
31/** 29/* Msg header common to all msgs */
32 * Msg header common to all msgs
33 */
34struct bfi_mhdr { 30struct bfi_mhdr {
35 u8 msg_class; /*!< @ref enum bfi_mclass */ 31 u8 msg_class; /*!< @ref enum bfi_mclass */
36 u8 msg_id; /*!< msg opcode with in the class */ 32 u8 msg_id; /*!< msg opcode with in the class */
@@ -65,17 +61,14 @@ struct bfi_mhdr {
65#define BFI_I2H_OPCODE_BASE 128 61#define BFI_I2H_OPCODE_BASE 128
66#define BFA_I2HM(_x) ((_x) + BFI_I2H_OPCODE_BASE) 62#define BFA_I2HM(_x) ((_x) + BFI_I2H_OPCODE_BASE)
67 63
68/** 64/****************************************************************************
69 ****************************************************************************
70 * 65 *
71 * Scatter Gather Element and Page definition 66 * Scatter Gather Element and Page definition
72 * 67 *
73 **************************************************************************** 68 ****************************************************************************
74 */ 69 */
75 70
76/** 71/* DMA addresses */
77 * DMA addresses
78 */
79union bfi_addr_u { 72union bfi_addr_u {
80 struct { 73 struct {
81 u32 addr_lo; 74 u32 addr_lo;
@@ -83,9 +76,7 @@ union bfi_addr_u {
83 } a32; 76 } a32;
84}; 77};
85 78
86/** 79/* Generic DMA addr-len pair. */
87 * Generic DMA addr-len pair.
88 */
89struct bfi_alen { 80struct bfi_alen {
90 union bfi_addr_u al_addr; /* DMA addr of buffer */ 81 union bfi_addr_u al_addr; /* DMA addr of buffer */
91 u32 al_len; /* length of buffer */ 82 u32 al_len; /* length of buffer */
@@ -98,26 +89,20 @@ struct bfi_alen {
98#define BFI_LMSG_PL_WSZ \ 89#define BFI_LMSG_PL_WSZ \
99 ((BFI_LMSG_SZ - sizeof(struct bfi_mhdr)) / 4) 90 ((BFI_LMSG_SZ - sizeof(struct bfi_mhdr)) / 4)
100 91
101/** 92/* Mailbox message structure */
102 * Mailbox message structure
103 */
104#define BFI_MBMSG_SZ 7 93#define BFI_MBMSG_SZ 7
105struct bfi_mbmsg { 94struct bfi_mbmsg {
106 struct bfi_mhdr mh; 95 struct bfi_mhdr mh;
107 u32 pl[BFI_MBMSG_SZ]; 96 u32 pl[BFI_MBMSG_SZ];
108}; 97};
109 98
110/** 99/* Supported PCI function class codes (personality) */
111 * Supported PCI function class codes (personality)
112 */
113enum bfi_pcifn_class { 100enum bfi_pcifn_class {
114 BFI_PCIFN_CLASS_FC = 0x0c04, 101 BFI_PCIFN_CLASS_FC = 0x0c04,
115 BFI_PCIFN_CLASS_ETH = 0x0200, 102 BFI_PCIFN_CLASS_ETH = 0x0200,
116}; 103};
117 104
118/** 105/* Message Classes */
119 * Message Classes
120 */
121enum bfi_mclass { 106enum bfi_mclass {
122 BFI_MC_IOC = 1, /*!< IO Controller (IOC) */ 107 BFI_MC_IOC = 1, /*!< IO Controller (IOC) */
123 BFI_MC_DIAG = 2, /*!< Diagnostic Msgs */ 108 BFI_MC_DIAG = 2, /*!< Diagnostic Msgs */
@@ -159,15 +144,12 @@ enum bfi_mclass {
159 144
160#define BFI_FWBOOT_ENV_OS 0 145#define BFI_FWBOOT_ENV_OS 0
161 146
162/** 147/*----------------------------------------------------------------------
163 *----------------------------------------------------------------------
164 * IOC 148 * IOC
165 *---------------------------------------------------------------------- 149 *----------------------------------------------------------------------
166 */ 150 */
167 151
168/** 152/* Different asic generations */
169 * Different asic generations
170 */
171enum bfi_asic_gen { 153enum bfi_asic_gen {
172 BFI_ASIC_GEN_CB = 1, 154 BFI_ASIC_GEN_CB = 1,
173 BFI_ASIC_GEN_CT = 2, 155 BFI_ASIC_GEN_CT = 2,
@@ -196,9 +178,7 @@ enum bfi_ioc_i2h_msgs {
196 BFI_IOC_I2H_HBEAT = BFA_I2HM(4), 178 BFI_IOC_I2H_HBEAT = BFA_I2HM(4),
197}; 179};
198 180
199/** 181/* BFI_IOC_H2I_GETATTR_REQ message */
200 * BFI_IOC_H2I_GETATTR_REQ message
201 */
202struct bfi_ioc_getattr_req { 182struct bfi_ioc_getattr_req {
203 struct bfi_mhdr mh; 183 struct bfi_mhdr mh;
204 union bfi_addr_u attr_addr; 184 union bfi_addr_u attr_addr;
@@ -231,30 +211,22 @@ struct bfi_ioc_attr {
231 u32 card_type; /*!< card type */ 211 u32 card_type; /*!< card type */
232}; 212};
233 213
234/** 214/* BFI_IOC_I2H_GETATTR_REPLY message */
235 * BFI_IOC_I2H_GETATTR_REPLY message
236 */
237struct bfi_ioc_getattr_reply { 215struct bfi_ioc_getattr_reply {
238 struct bfi_mhdr mh; /*!< Common msg header */ 216 struct bfi_mhdr mh; /*!< Common msg header */
239 u8 status; /*!< cfg reply status */ 217 u8 status; /*!< cfg reply status */
240 u8 rsvd[3]; 218 u8 rsvd[3];
241}; 219};
242 220
243/** 221/* Firmware memory page offsets */
244 * Firmware memory page offsets
245 */
246#define BFI_IOC_SMEM_PG0_CB (0x40) 222#define BFI_IOC_SMEM_PG0_CB (0x40)
247#define BFI_IOC_SMEM_PG0_CT (0x180) 223#define BFI_IOC_SMEM_PG0_CT (0x180)
248 224
249/** 225/* Firmware statistic offset */
250 * Firmware statistic offset
251 */
252#define BFI_IOC_FWSTATS_OFF (0x6B40) 226#define BFI_IOC_FWSTATS_OFF (0x6B40)
253#define BFI_IOC_FWSTATS_SZ (4096) 227#define BFI_IOC_FWSTATS_SZ (4096)
254 228
255/** 229/* Firmware trace offset */
256 * Firmware trace offset
257 */
258#define BFI_IOC_TRC_OFF (0x4b00) 230#define BFI_IOC_TRC_OFF (0x4b00)
259#define BFI_IOC_TRC_ENTS 256 231#define BFI_IOC_TRC_ENTS 256
260#define BFI_IOC_TRC_ENT_SZ 16 232#define BFI_IOC_TRC_ENT_SZ 16
@@ -299,9 +271,7 @@ struct bfi_ioc_hbeat {
299 u32 hb_count; /*!< current heart beat count */ 271 u32 hb_count; /*!< current heart beat count */
300}; 272};
301 273
302/** 274/* IOC hardware/firmware state */
303 * IOC hardware/firmware state
304 */
305enum bfi_ioc_state { 275enum bfi_ioc_state {
306 BFI_IOC_UNINIT = 0, /*!< not initialized */ 276 BFI_IOC_UNINIT = 0, /*!< not initialized */
307 BFI_IOC_INITING = 1, /*!< h/w is being initialized */ 277 BFI_IOC_INITING = 1, /*!< h/w is being initialized */
@@ -345,9 +315,7 @@ enum {
345 ((__adap_type) & (BFI_ADAPTER_TTV | BFI_ADAPTER_PROTO | \ 315 ((__adap_type) & (BFI_ADAPTER_TTV | BFI_ADAPTER_PROTO | \
346 BFI_ADAPTER_UNSUPP)) 316 BFI_ADAPTER_UNSUPP))
347 317
348/** 318/* BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages */
349 * BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages
350 */
351struct bfi_ioc_ctrl_req { 319struct bfi_ioc_ctrl_req {
352 struct bfi_mhdr mh; 320 struct bfi_mhdr mh;
353 u16 clscode; 321 u16 clscode;
@@ -355,9 +323,7 @@ struct bfi_ioc_ctrl_req {
355 u32 tv_sec; 323 u32 tv_sec;
356}; 324};
357 325
358/** 326/* BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages */
359 * BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages
360 */
361struct bfi_ioc_ctrl_reply { 327struct bfi_ioc_ctrl_reply {
362 struct bfi_mhdr mh; /*!< Common msg header */ 328 struct bfi_mhdr mh; /*!< Common msg header */
363 u8 status; /*!< enable/disable status */ 329 u8 status; /*!< enable/disable status */
@@ -367,9 +333,7 @@ struct bfi_ioc_ctrl_reply {
367}; 333};
368 334
369#define BFI_IOC_MSGSZ 8 335#define BFI_IOC_MSGSZ 8
370/** 336/* H2I Messages */
371 * H2I Messages
372 */
373union bfi_ioc_h2i_msg_u { 337union bfi_ioc_h2i_msg_u {
374 struct bfi_mhdr mh; 338 struct bfi_mhdr mh;
375 struct bfi_ioc_ctrl_req enable_req; 339 struct bfi_ioc_ctrl_req enable_req;
@@ -378,17 +342,14 @@ union bfi_ioc_h2i_msg_u {
378 u32 mboxmsg[BFI_IOC_MSGSZ]; 342 u32 mboxmsg[BFI_IOC_MSGSZ];
379}; 343};
380 344
381/** 345/* I2H Messages */
382 * I2H Messages
383 */
384union bfi_ioc_i2h_msg_u { 346union bfi_ioc_i2h_msg_u {
385 struct bfi_mhdr mh; 347 struct bfi_mhdr mh;
386 struct bfi_ioc_ctrl_reply fw_event; 348 struct bfi_ioc_ctrl_reply fw_event;
387 u32 mboxmsg[BFI_IOC_MSGSZ]; 349 u32 mboxmsg[BFI_IOC_MSGSZ];
388}; 350};
389 351
390/** 352/*----------------------------------------------------------------------
391 *----------------------------------------------------------------------
392 * MSGQ 353 * MSGQ
393 *---------------------------------------------------------------------- 354 *----------------------------------------------------------------------
394 */ 355 */
diff --git a/drivers/net/ethernet/brocade/bna/bfi_cna.h b/drivers/net/ethernet/brocade/bna/bfi_cna.h
index 4eecabea397b..6704a4392973 100644
--- a/drivers/net/ethernet/brocade/bna/bfi_cna.h
+++ b/drivers/net/ethernet/brocade/bna/bfi_cna.h
@@ -37,18 +37,14 @@ enum bfi_port_i2h {
37 BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4), 37 BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4),
38}; 38};
39 39
40/** 40/* Generic REQ type */
41 * Generic REQ type
42 */
43struct bfi_port_generic_req { 41struct bfi_port_generic_req {
44 struct bfi_mhdr mh; /*!< msg header */ 42 struct bfi_mhdr mh; /*!< msg header */
45 u32 msgtag; /*!< msgtag for reply */ 43 u32 msgtag; /*!< msgtag for reply */
46 u32 rsvd; 44 u32 rsvd;
47}; 45};
48 46
49/** 47/* Generic RSP type */
50 * Generic RSP type
51 */
52struct bfi_port_generic_rsp { 48struct bfi_port_generic_rsp {
53 struct bfi_mhdr mh; /*!< common msg header */ 49 struct bfi_mhdr mh; /*!< common msg header */
54 u8 status; /*!< port enable status */ 50 u8 status; /*!< port enable status */
@@ -56,44 +52,12 @@ struct bfi_port_generic_rsp {
56 u32 msgtag; /*!< msgtag for reply */ 52 u32 msgtag; /*!< msgtag for reply */
57}; 53};
58 54
59/** 55/* BFI_PORT_H2I_GET_STATS_REQ */
60 * @todo
61 * BFI_PORT_H2I_ENABLE_REQ
62 */
63
64/**
65 * @todo
66 * BFI_PORT_I2H_ENABLE_RSP
67 */
68
69/**
70 * BFI_PORT_H2I_DISABLE_REQ
71 */
72
73/**
74 * BFI_PORT_I2H_DISABLE_RSP
75 */
76
77/**
78 * BFI_PORT_H2I_GET_STATS_REQ
79 */
80struct bfi_port_get_stats_req { 56struct bfi_port_get_stats_req {
81 struct bfi_mhdr mh; /*!< common msg header */ 57 struct bfi_mhdr mh; /*!< common msg header */
82 union bfi_addr_u dma_addr; 58 union bfi_addr_u dma_addr;
83}; 59};
84 60
85/**
86 * BFI_PORT_I2H_GET_STATS_RSP
87 */
88
89/**
90 * BFI_PORT_H2I_CLEAR_STATS_REQ
91 */
92
93/**
94 * BFI_PORT_I2H_CLEAR_STATS_RSP
95 */
96
97union bfi_port_h2i_msg_u { 61union bfi_port_h2i_msg_u {
98 struct bfi_mhdr mh; 62 struct bfi_mhdr mh;
99 struct bfi_port_generic_req enable_req; 63 struct bfi_port_generic_req enable_req;
diff --git a/drivers/net/ethernet/brocade/bna/bfi_enet.h b/drivers/net/ethernet/brocade/bna/bfi_enet.h
index a90f1cf46b41..eef6e1f8aecc 100644
--- a/drivers/net/ethernet/brocade/bna/bfi_enet.h
+++ b/drivers/net/ethernet/brocade/bna/bfi_enet.h
@@ -16,12 +16,9 @@
16 * www.brocade.com 16 * www.brocade.com
17 */ 17 */
18 18
19/** 19/* BNA Hardware and Firmware Interface */
20 * @file bfi_enet.h BNA Hardware and Firmware Interface
21 */
22 20
23/** 21/* Skipping statistics collection to avoid clutter.
24 * Skipping statistics collection to avoid clutter.
25 * Command is no longer needed: 22 * Command is no longer needed:
26 * MTU 23 * MTU
27 * TxQ Stop 24 * TxQ Stop
@@ -64,9 +61,7 @@ union bfi_addr_be_u {
64 } a32; 61 } a32;
65}; 62};
66 63
67/** 64/* T X Q U E U E D E F I N E S */
68 * T X Q U E U E D E F I N E S
69 */
70/* TxQ Vector (a.k.a. Tx-Buffer Descriptor) */ 65/* TxQ Vector (a.k.a. Tx-Buffer Descriptor) */
71/* TxQ Entry Opcodes */ 66/* TxQ Entry Opcodes */
72#define BFI_ENET_TXQ_WI_SEND (0x402) /* Single Frame Transmission */ 67#define BFI_ENET_TXQ_WI_SEND (0x402) /* Single Frame Transmission */
@@ -106,10 +101,7 @@ struct bfi_enet_txq_wi_vector { /* Tx Buffer Descriptor */
106 union bfi_addr_be_u addr; 101 union bfi_addr_be_u addr;
107}; 102};
108 103
109/** 104/* TxQ Entry Structure */
110 * TxQ Entry Structure
111 *
112 */
113struct bfi_enet_txq_entry { 105struct bfi_enet_txq_entry {
114 union { 106 union {
115 struct bfi_enet_txq_wi_base base; 107 struct bfi_enet_txq_wi_base base;
@@ -124,16 +116,12 @@ struct bfi_enet_txq_entry {
124#define BFI_ENET_TXQ_WI_L4_HDR_N_OFFSET(_hdr_size, _offset) \ 116#define BFI_ENET_TXQ_WI_L4_HDR_N_OFFSET(_hdr_size, _offset) \
125 (((_hdr_size) << 10) | ((_offset) & 0x3FF)) 117 (((_hdr_size) << 10) | ((_offset) & 0x3FF))
126 118
127/** 119/* R X Q U E U E D E F I N E S */
128 * R X Q U E U E D E F I N E S
129 */
130struct bfi_enet_rxq_entry { 120struct bfi_enet_rxq_entry {
131 union bfi_addr_be_u rx_buffer; 121 union bfi_addr_be_u rx_buffer;
132}; 122};
133 123
134/** 124/* R X C O M P L E T I O N Q U E U E D E F I N E S */
135 * R X C O M P L E T I O N Q U E U E D E F I N E S
136 */
137/* CQ Entry Flags */ 125/* CQ Entry Flags */
138#define BFI_ENET_CQ_EF_MAC_ERROR (1 << 0) 126#define BFI_ENET_CQ_EF_MAC_ERROR (1 << 0)
139#define BFI_ENET_CQ_EF_FCS_ERROR (1 << 1) 127#define BFI_ENET_CQ_EF_FCS_ERROR (1 << 1)
@@ -174,9 +162,7 @@ struct bfi_enet_cq_entry {
174 u8 rxq_id; 162 u8 rxq_id;
175}; 163};
176 164
177/** 165/* E N E T C O N T R O L P A T H C O M M A N D S */
178 * E N E T C O N T R O L P A T H C O M M A N D S
179 */
180struct bfi_enet_q { 166struct bfi_enet_q {
181 union bfi_addr_u pg_tbl; 167 union bfi_addr_u pg_tbl;
182 union bfi_addr_u first_entry; 168 union bfi_addr_u first_entry;
@@ -222,9 +208,7 @@ struct bfi_enet_ib {
222 u16 rsvd; 208 u16 rsvd;
223}; 209};
224 210
225/** 211/* ENET command messages */
226 * ENET command messages
227 */
228enum bfi_enet_h2i_msgs { 212enum bfi_enet_h2i_msgs {
229 /* Rx Commands */ 213 /* Rx Commands */
230 BFI_ENET_H2I_RX_CFG_SET_REQ = 1, 214 BFI_ENET_H2I_RX_CFG_SET_REQ = 1,
@@ -350,9 +334,7 @@ enum bfi_enet_i2h_msgs {
350 BFI_ENET_I2H_BW_UPDATE_AEN = BFA_I2HM(BFI_ENET_H2I_MAX + 4), 334 BFI_ENET_I2H_BW_UPDATE_AEN = BFA_I2HM(BFI_ENET_H2I_MAX + 4),
351}; 335};
352 336
353/** 337/* The following error codes can be returned by the enet commands */
354 * The following error codes can be returned by the enet commands
355 */
356enum bfi_enet_err { 338enum bfi_enet_err {
357 BFI_ENET_CMD_OK = 0, 339 BFI_ENET_CMD_OK = 0,
358 BFI_ENET_CMD_FAIL = 1, 340 BFI_ENET_CMD_FAIL = 1,
@@ -364,8 +346,7 @@ enum bfi_enet_err {
364 BFI_ENET_CMD_PORT_DISABLED = 7, /* !< port in disabled state */ 346 BFI_ENET_CMD_PORT_DISABLED = 7, /* !< port in disabled state */
365}; 347};
366 348
367/** 349/* Generic Request
368 * Generic Request
369 * 350 *
370 * bfi_enet_req is used by: 351 * bfi_enet_req is used by:
371 * BFI_ENET_H2I_RX_CFG_CLR_REQ 352 * BFI_ENET_H2I_RX_CFG_CLR_REQ
@@ -375,8 +356,7 @@ struct bfi_enet_req {
375 struct bfi_msgq_mhdr mh; 356 struct bfi_msgq_mhdr mh;
376}; 357};
377 358
378/** 359/* Enable/Disable Request
379 * Enable/Disable Request
380 * 360 *
381 * bfi_enet_enable_req is used by: 361 * bfi_enet_enable_req is used by:
382 * BFI_ENET_H2I_RSS_ENABLE_REQ (enet_id must be zero) 362 * BFI_ENET_H2I_RSS_ENABLE_REQ (enet_id must be zero)
@@ -391,9 +371,7 @@ struct bfi_enet_enable_req {
391 u8 rsvd[3]; 371 u8 rsvd[3];
392}; 372};
393 373
394/** 374/* Generic Response */
395 * Generic Response
396 */
397struct bfi_enet_rsp { 375struct bfi_enet_rsp {
398 struct bfi_msgq_mhdr mh; 376 struct bfi_msgq_mhdr mh;
399 u8 error; /*!< if error see cmd_offset */ 377 u8 error; /*!< if error see cmd_offset */
@@ -401,20 +379,16 @@ struct bfi_enet_rsp {
401 u16 cmd_offset; /*!< offset to invalid parameter */ 379 u16 cmd_offset; /*!< offset to invalid parameter */
402}; 380};
403 381
404/** 382/* GLOBAL CONFIGURATION */
405 * GLOBAL CONFIGURATION
406 */
407 383
408/** 384/* bfi_enet_attr_req is used by:
409 * bfi_enet_attr_req is used by:
410 * BFI_ENET_H2I_GET_ATTR_REQ 385 * BFI_ENET_H2I_GET_ATTR_REQ
411 */ 386 */
412struct bfi_enet_attr_req { 387struct bfi_enet_attr_req {
413 struct bfi_msgq_mhdr mh; 388 struct bfi_msgq_mhdr mh;
414}; 389};
415 390
416/** 391/* bfi_enet_attr_rsp is used by:
417 * bfi_enet_attr_rsp is used by:
418 * BFI_ENET_I2H_GET_ATTR_RSP 392 * BFI_ENET_I2H_GET_ATTR_RSP
419 */ 393 */
420struct bfi_enet_attr_rsp { 394struct bfi_enet_attr_rsp {
@@ -427,8 +401,7 @@ struct bfi_enet_attr_rsp {
427 u32 rit_size; 401 u32 rit_size;
428}; 402};
429 403
430/** 404/* Tx Configuration
431 * Tx Configuration
432 * 405 *
433 * bfi_enet_tx_cfg is used by: 406 * bfi_enet_tx_cfg is used by:
434 * BFI_ENET_H2I_TX_CFG_SET_REQ 407 * BFI_ENET_H2I_TX_CFG_SET_REQ
@@ -477,8 +450,7 @@ struct bfi_enet_tx_cfg_rsp {
477 } q_handles[BFI_ENET_TXQ_PRIO_MAX]; 450 } q_handles[BFI_ENET_TXQ_PRIO_MAX];
478}; 451};
479 452
480/** 453/* Rx Configuration
481 * Rx Configuration
482 * 454 *
483 * bfi_enet_rx_cfg is used by: 455 * bfi_enet_rx_cfg is used by:
484 * BFI_ENET_H2I_RX_CFG_SET_REQ 456 * BFI_ENET_H2I_RX_CFG_SET_REQ
@@ -553,8 +525,7 @@ struct bfi_enet_rx_cfg_rsp {
553 } q_handles[BFI_ENET_RX_QSET_MAX]; 525 } q_handles[BFI_ENET_RX_QSET_MAX];
554}; 526};
555 527
556/** 528/* RIT
557 * RIT
558 * 529 *
559 * bfi_enet_rit_req is used by: 530 * bfi_enet_rit_req is used by:
560 * BFI_ENET_H2I_RIT_CFG_REQ 531 * BFI_ENET_H2I_RIT_CFG_REQ
@@ -566,8 +537,7 @@ struct bfi_enet_rit_req {
566 u8 table[BFI_ENET_RSS_RIT_MAX]; 537 u8 table[BFI_ENET_RSS_RIT_MAX];
567}; 538};
568 539
569/** 540/* RSS
570 * RSS
571 * 541 *
572 * bfi_enet_rss_cfg_req is used by: 542 * bfi_enet_rss_cfg_req is used by:
573 * BFI_ENET_H2I_RSS_CFG_REQ 543 * BFI_ENET_H2I_RSS_CFG_REQ
@@ -591,8 +561,7 @@ struct bfi_enet_rss_cfg_req {
591 struct bfi_enet_rss_cfg cfg; 561 struct bfi_enet_rss_cfg cfg;
592}; 562};
593 563
594/** 564/* MAC Unicast
595 * MAC Unicast
596 * 565 *
597 * bfi_enet_rx_vlan_req is used by: 566 * bfi_enet_rx_vlan_req is used by:
598 * BFI_ENET_H2I_MAC_UCAST_SET_REQ 567 * BFI_ENET_H2I_MAC_UCAST_SET_REQ
@@ -606,17 +575,14 @@ struct bfi_enet_ucast_req {
606 u8 rsvd[2]; 575 u8 rsvd[2];
607}; 576};
608 577
609/** 578/* MAC Unicast + VLAN */
610 * MAC Unicast + VLAN
611 */
612struct bfi_enet_mac_n_vlan_req { 579struct bfi_enet_mac_n_vlan_req {
613 struct bfi_msgq_mhdr mh; 580 struct bfi_msgq_mhdr mh;
614 u16 vlan_id; 581 u16 vlan_id;
615 mac_t mac_addr; 582 mac_t mac_addr;
616}; 583};
617 584
618/** 585/* MAC Multicast
619 * MAC Multicast
620 * 586 *
621 * bfi_enet_mac_mfilter_add_req is used by: 587 * bfi_enet_mac_mfilter_add_req is used by:
622 * BFI_ENET_H2I_MAC_MCAST_ADD_REQ 588 * BFI_ENET_H2I_MAC_MCAST_ADD_REQ
@@ -627,8 +593,7 @@ struct bfi_enet_mcast_add_req {
627 u8 rsvd[2]; 593 u8 rsvd[2];
628}; 594};
629 595
630/** 596/* bfi_enet_mac_mfilter_add_rsp is used by:
631 * bfi_enet_mac_mfilter_add_rsp is used by:
632 * BFI_ENET_I2H_MAC_MCAST_ADD_RSP 597 * BFI_ENET_I2H_MAC_MCAST_ADD_RSP
633 */ 598 */
634struct bfi_enet_mcast_add_rsp { 599struct bfi_enet_mcast_add_rsp {
@@ -640,8 +605,7 @@ struct bfi_enet_mcast_add_rsp {
640 u8 rsvd1[2]; 605 u8 rsvd1[2];
641}; 606};
642 607
643/** 608/* bfi_enet_mac_mfilter_del_req is used by:
644 * bfi_enet_mac_mfilter_del_req is used by:
645 * BFI_ENET_H2I_MAC_MCAST_DEL_REQ 609 * BFI_ENET_H2I_MAC_MCAST_DEL_REQ
646 */ 610 */
647struct bfi_enet_mcast_del_req { 611struct bfi_enet_mcast_del_req {
@@ -650,8 +614,7 @@ struct bfi_enet_mcast_del_req {
650 u8 rsvd[2]; 614 u8 rsvd[2];
651}; 615};
652 616
653/** 617/* VLAN
654 * VLAN
655 * 618 *
656 * bfi_enet_rx_vlan_req is used by: 619 * bfi_enet_rx_vlan_req is used by:
657 * BFI_ENET_H2I_RX_VLAN_SET_REQ 620 * BFI_ENET_H2I_RX_VLAN_SET_REQ
@@ -663,8 +626,7 @@ struct bfi_enet_rx_vlan_req {
663 u32 bit_mask[BFI_ENET_VLAN_WORDS_MAX]; 626 u32 bit_mask[BFI_ENET_VLAN_WORDS_MAX];
664}; 627};
665 628
666/** 629/* PAUSE
667 * PAUSE
668 * 630 *
669 * bfi_enet_set_pause_req is used by: 631 * bfi_enet_set_pause_req is used by:
670 * BFI_ENET_H2I_SET_PAUSE_REQ 632 * BFI_ENET_H2I_SET_PAUSE_REQ
@@ -676,8 +638,7 @@ struct bfi_enet_set_pause_req {
676 u8 rx_pause; /* 1 = enable; 0 = disable */ 638 u8 rx_pause; /* 1 = enable; 0 = disable */
677}; 639};
678 640
679/** 641/* DIAGNOSTICS
680 * DIAGNOSTICS
681 * 642 *
682 * bfi_enet_diag_lb_req is used by: 643 * bfi_enet_diag_lb_req is used by:
683 * BFI_ENET_H2I_DIAG_LOOPBACK 644 * BFI_ENET_H2I_DIAG_LOOPBACK
@@ -689,16 +650,13 @@ struct bfi_enet_diag_lb_req {
689 u8 enable; /* 1 = enable; 0 = disable */ 650 u8 enable; /* 1 = enable; 0 = disable */
690}; 651};
691 652
692/** 653/* enum for Loopback opmodes */
693 * enum for Loopback opmodes
694 */
695enum { 654enum {
696 BFI_ENET_DIAG_LB_OPMODE_EXT = 0, 655 BFI_ENET_DIAG_LB_OPMODE_EXT = 0,
697 BFI_ENET_DIAG_LB_OPMODE_CBL = 1, 656 BFI_ENET_DIAG_LB_OPMODE_CBL = 1,
698}; 657};
699 658
700/** 659/* STATISTICS
701 * STATISTICS
702 * 660 *
703 * bfi_enet_stats_req is used by: 661 * bfi_enet_stats_req is used by:
704 * BFI_ENET_H2I_STATS_GET_REQ 662 * BFI_ENET_H2I_STATS_GET_REQ
@@ -713,9 +671,7 @@ struct bfi_enet_stats_req {
713 union bfi_addr_u host_buffer; 671 union bfi_addr_u host_buffer;
714}; 672};
715 673
716/** 674/* defines for "stats_mask" above. */
717 * defines for "stats_mask" above.
718 */
719#define BFI_ENET_STATS_MAC (1 << 0) /* !< MAC Statistics */ 675#define BFI_ENET_STATS_MAC (1 << 0) /* !< MAC Statistics */
720#define BFI_ENET_STATS_BPC (1 << 1) /* !< Pause Stats from BPC */ 676#define BFI_ENET_STATS_BPC (1 << 1) /* !< Pause Stats from BPC */
721#define BFI_ENET_STATS_RAD (1 << 2) /* !< Rx Admission Statistics */ 677#define BFI_ENET_STATS_RAD (1 << 2) /* !< Rx Admission Statistics */
@@ -881,8 +837,7 @@ struct bfi_enet_stats_mac {
881 u64 tx_fragments; 837 u64 tx_fragments;
882}; 838};
883 839
884/** 840/* Complete statistics, DMAed from fw to host followed by
885 * Complete statistics, DMAed from fw to host followed by
886 * BFI_ENET_I2H_STATS_GET_RSP 841 * BFI_ENET_I2H_STATS_GET_RSP
887 */ 842 */
888struct bfi_enet_stats { 843struct bfi_enet_stats {
diff --git a/drivers/net/ethernet/brocade/bna/bfi_reg.h b/drivers/net/ethernet/brocade/bna/bfi_reg.h
index 0e094fe46dfd..c49fa312ddbd 100644
--- a/drivers/net/ethernet/brocade/bna/bfi_reg.h
+++ b/drivers/net/ethernet/brocade/bna/bfi_reg.h
@@ -221,9 +221,7 @@ enum {
221#define __PMM_1T_RESET_P 0x00000001 221#define __PMM_1T_RESET_P 0x00000001
222#define PMM_1T_RESET_REG_P1 0x00023c1c 222#define PMM_1T_RESET_REG_P1 0x00023c1c
223 223
224/** 224/* Brocade 1860 Adapter specific defines */
225 * Brocade 1860 Adapter specific defines
226 */
227#define CT2_PCI_CPQ_BASE 0x00030000 225#define CT2_PCI_CPQ_BASE 0x00030000
228#define CT2_PCI_APP_BASE 0x00030100 226#define CT2_PCI_APP_BASE 0x00030100
229#define CT2_PCI_ETH_BASE 0x00030400 227#define CT2_PCI_ETH_BASE 0x00030400
diff --git a/drivers/net/ethernet/brocade/bna/bna.h b/drivers/net/ethernet/brocade/bna/bna.h
index 4d7a5de08e12..ede532b4e9db 100644
--- a/drivers/net/ethernet/brocade/bna/bna.h
+++ b/drivers/net/ethernet/brocade/bna/bna.h
@@ -25,11 +25,7 @@
25 25
26extern const u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX]; 26extern const u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX];
27 27
28/** 28/* Macros and constants */
29 *
30 * Macros and constants
31 *
32 */
33 29
34#define BNA_IOC_TIMER_FREQ 200 30#define BNA_IOC_TIMER_FREQ 200
35 31
@@ -356,11 +352,7 @@ do { \
356 } \ 352 } \
357} while (0) 353} while (0)
358 354
359/** 355/* Inline functions */
360 *
361 * Inline functions
362 *
363 */
364 356
365static inline struct bna_mac *bna_mac_find(struct list_head *q, u8 *addr) 357static inline struct bna_mac *bna_mac_find(struct list_head *q, u8 *addr)
366{ 358{
@@ -377,15 +369,9 @@ static inline struct bna_mac *bna_mac_find(struct list_head *q, u8 *addr)
377 369
378#define bna_attr(_bna) (&(_bna)->ioceth.attr) 370#define bna_attr(_bna) (&(_bna)->ioceth.attr)
379 371
380/** 372/* Function prototypes */
381 *
382 * Function prototypes
383 *
384 */
385 373
386/** 374/* BNA */
387 * BNA
388 */
389 375
390/* FW response handlers */ 376/* FW response handlers */
391void bna_bfi_stats_clr_rsp(struct bna *bna, struct bfi_msgq_mhdr *msghdr); 377void bna_bfi_stats_clr_rsp(struct bna *bna, struct bfi_msgq_mhdr *msghdr);
@@ -413,24 +399,19 @@ struct bna_mcam_handle *bna_mcam_mod_handle_get(struct bna_mcam_mod *mod);
413void bna_mcam_mod_handle_put(struct bna_mcam_mod *mcam_mod, 399void bna_mcam_mod_handle_put(struct bna_mcam_mod *mcam_mod,
414 struct bna_mcam_handle *handle); 400 struct bna_mcam_handle *handle);
415 401
416/** 402/* MBOX */
417 * MBOX
418 */
419 403
420/* API for BNAD */ 404/* API for BNAD */
421void bna_mbox_handler(struct bna *bna, u32 intr_status); 405void bna_mbox_handler(struct bna *bna, u32 intr_status);
422 406
423/** 407/* ETHPORT */
424 * ETHPORT
425 */
426 408
427/* Callbacks for RX */ 409/* Callbacks for RX */
428void bna_ethport_cb_rx_started(struct bna_ethport *ethport); 410void bna_ethport_cb_rx_started(struct bna_ethport *ethport);
429void bna_ethport_cb_rx_stopped(struct bna_ethport *ethport); 411void bna_ethport_cb_rx_stopped(struct bna_ethport *ethport);
430 412
431/** 413/* TX MODULE AND TX */
432 * TX MODULE AND TX 414
433 */
434/* FW response handelrs */ 415/* FW response handelrs */
435void bna_bfi_tx_enet_start_rsp(struct bna_tx *tx, 416void bna_bfi_tx_enet_start_rsp(struct bna_tx *tx,
436 struct bfi_msgq_mhdr *msghdr); 417 struct bfi_msgq_mhdr *msghdr);
@@ -462,9 +443,7 @@ void bna_tx_disable(struct bna_tx *tx, enum bna_cleanup_type type,
462void bna_tx_cleanup_complete(struct bna_tx *tx); 443void bna_tx_cleanup_complete(struct bna_tx *tx);
463void bna_tx_coalescing_timeo_set(struct bna_tx *tx, int coalescing_timeo); 444void bna_tx_coalescing_timeo_set(struct bna_tx *tx, int coalescing_timeo);
464 445
465/** 446/* RX MODULE, RX, RXF */
466 * RX MODULE, RX, RXF
467 */
468 447
469/* FW response handlers */ 448/* FW response handlers */
470void bna_bfi_rx_enet_start_rsp(struct bna_rx *rx, 449void bna_bfi_rx_enet_start_rsp(struct bna_rx *rx,
@@ -522,9 +501,7 @@ bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode,
522void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id); 501void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id);
523void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id); 502void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id);
524void bna_rx_vlanfilter_enable(struct bna_rx *rx); 503void bna_rx_vlanfilter_enable(struct bna_rx *rx);
525/** 504/* ENET */
526 * ENET
527 */
528 505
529/* API for RX */ 506/* API for RX */
530int bna_enet_mtu_get(struct bna_enet *enet); 507int bna_enet_mtu_get(struct bna_enet *enet);
@@ -544,18 +521,14 @@ void bna_enet_mtu_set(struct bna_enet *enet, int mtu,
544 void (*cbfn)(struct bnad *)); 521 void (*cbfn)(struct bnad *));
545void bna_enet_perm_mac_get(struct bna_enet *enet, mac_t *mac); 522void bna_enet_perm_mac_get(struct bna_enet *enet, mac_t *mac);
546 523
547/** 524/* IOCETH */
548 * IOCETH
549 */
550 525
551/* APIs for BNAD */ 526/* APIs for BNAD */
552void bna_ioceth_enable(struct bna_ioceth *ioceth); 527void bna_ioceth_enable(struct bna_ioceth *ioceth);
553void bna_ioceth_disable(struct bna_ioceth *ioceth, 528void bna_ioceth_disable(struct bna_ioceth *ioceth,
554 enum bna_cleanup_type type); 529 enum bna_cleanup_type type);
555 530
556/** 531/* BNAD */
557 * BNAD
558 */
559 532
560/* Callbacks for ENET */ 533/* Callbacks for ENET */
561void bnad_cb_ethport_link_status(struct bnad *bnad, 534void bnad_cb_ethport_link_status(struct bnad *bnad,
diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c
index 9ccc586e3767..db14f69d63bc 100644
--- a/drivers/net/ethernet/brocade/bna/bna_enet.c
+++ b/drivers/net/ethernet/brocade/bna/bna_enet.c
@@ -378,9 +378,8 @@ bna_msgq_rsp_handler(void *arg, struct bfi_msgq_mhdr *msghdr)
378 } 378 }
379} 379}
380 380
381/** 381/* ETHPORT */
382 * ETHPORT 382
383 */
384#define call_ethport_stop_cbfn(_ethport) \ 383#define call_ethport_stop_cbfn(_ethport) \
385do { \ 384do { \
386 if ((_ethport)->stop_cbfn) { \ 385 if ((_ethport)->stop_cbfn) { \
@@ -804,9 +803,8 @@ bna_ethport_cb_rx_stopped(struct bna_ethport *ethport)
804 } 803 }
805} 804}
806 805
807/** 806/* ENET */
808 * ENET 807
809 */
810#define bna_enet_chld_start(enet) \ 808#define bna_enet_chld_start(enet) \
811do { \ 809do { \
812 enum bna_tx_type tx_type = \ 810 enum bna_tx_type tx_type = \
@@ -1328,9 +1326,8 @@ bna_enet_perm_mac_get(struct bna_enet *enet, mac_t *mac)
1328 *mac = bfa_nw_ioc_get_mac(&enet->bna->ioceth.ioc); 1326 *mac = bfa_nw_ioc_get_mac(&enet->bna->ioceth.ioc);
1329} 1327}
1330 1328
1331/** 1329/* IOCETH */
1332 * IOCETH 1330
1333 */
1334#define enable_mbox_intr(_ioceth) \ 1331#define enable_mbox_intr(_ioceth) \
1335do { \ 1332do { \
1336 u32 intr_status; \ 1333 u32 intr_status; \
diff --git a/drivers/net/ethernet/brocade/bna/bna_hw_defs.h b/drivers/net/ethernet/brocade/bna/bna_hw_defs.h
index 4c6aab2a9534..b8c4e21fbf4c 100644
--- a/drivers/net/ethernet/brocade/bna/bna_hw_defs.h
+++ b/drivers/net/ethernet/brocade/bna/bna_hw_defs.h
@@ -16,20 +16,15 @@
16 * www.brocade.com 16 * www.brocade.com
17 */ 17 */
18 18
19/** 19/* File for interrupt macros and functions */
20 * File for interrupt macros and functions
21 */
22 20
23#ifndef __BNA_HW_DEFS_H__ 21#ifndef __BNA_HW_DEFS_H__
24#define __BNA_HW_DEFS_H__ 22#define __BNA_HW_DEFS_H__
25 23
26#include "bfi_reg.h" 24#include "bfi_reg.h"
27 25
28/** 26/* SW imposed limits */
29 * 27
30 * SW imposed limits
31 *
32 */
33#define BFI_ENET_DEF_TXQ 1 28#define BFI_ENET_DEF_TXQ 1
34#define BFI_ENET_DEF_RXP 1 29#define BFI_ENET_DEF_RXP 1
35#define BFI_ENET_DEF_UCAM 1 30#define BFI_ENET_DEF_UCAM 1
@@ -141,11 +136,8 @@
141} 136}
142 137
143#define bna_port_id_get(_bna) ((_bna)->ioceth.ioc.port_id) 138#define bna_port_id_get(_bna) ((_bna)->ioceth.ioc.port_id)
144/** 139
145 * 140/* Interrupt related bits, flags and macros */
146 * Interrupt related bits, flags and macros
147 *
148 */
149 141
150#define IB_STATUS_BITS 0x0000ffff 142#define IB_STATUS_BITS 0x0000ffff
151 143
@@ -280,11 +272,7 @@ do { \
280 (writel(BNA_DOORBELL_Q_PRD_IDX((_rcb)->producer_index), \ 272 (writel(BNA_DOORBELL_Q_PRD_IDX((_rcb)->producer_index), \
281 (_rcb)->q_dbell)); 273 (_rcb)->q_dbell));
282 274
283/** 275/* TxQ, RxQ, CQ related bits, offsets, macros */
284 *
285 * TxQ, RxQ, CQ related bits, offsets, macros
286 *
287 */
288 276
289/* TxQ Entry Opcodes */ 277/* TxQ Entry Opcodes */
290#define BNA_TXQ_WI_SEND (0x402) /* Single Frame Transmission */ 278#define BNA_TXQ_WI_SEND (0x402) /* Single Frame Transmission */
@@ -334,11 +322,7 @@ do { \
334 322
335#define BNA_CQ_EF_LOCAL (1 << 20) 323#define BNA_CQ_EF_LOCAL (1 << 20)
336 324
337/** 325/* Data structures */
338 *
339 * Data structures
340 *
341 */
342 326
343struct bna_reg_offset { 327struct bna_reg_offset {
344 u32 fn_int_status; 328 u32 fn_int_status;
@@ -371,8 +355,7 @@ struct bna_txq_wi_vector {
371 struct bna_dma_addr host_addr; /* Tx-Buf DMA addr */ 355 struct bna_dma_addr host_addr; /* Tx-Buf DMA addr */
372}; 356};
373 357
374/** 358/* TxQ Entry Structure
375 * TxQ Entry Structure
376 * 359 *
377 * BEWARE: Load values into this structure with correct endianess. 360 * BEWARE: Load values into this structure with correct endianess.
378 */ 361 */
diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
index 276fcb589f4b..71144b396e02 100644
--- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
+++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
@@ -18,9 +18,7 @@
18#include "bna.h" 18#include "bna.h"
19#include "bfi.h" 19#include "bfi.h"
20 20
21/** 21/* IB */
22 * IB
23 */
24static void 22static void
25bna_ib_coalescing_timeo_set(struct bna_ib *ib, u8 coalescing_timeo) 23bna_ib_coalescing_timeo_set(struct bna_ib *ib, u8 coalescing_timeo)
26{ 24{
@@ -29,9 +27,7 @@ bna_ib_coalescing_timeo_set(struct bna_ib *ib, u8 coalescing_timeo)
29 (u32)ib->coalescing_timeo, 0); 27 (u32)ib->coalescing_timeo, 0);
30} 28}
31 29
32/** 30/* RXF */
33 * RXF
34 */
35 31
36#define bna_rxf_vlan_cfg_soft_reset(rxf) \ 32#define bna_rxf_vlan_cfg_soft_reset(rxf) \
37do { \ 33do { \
@@ -1312,9 +1308,7 @@ bna_rxf_vlan_strip_cfg_apply(struct bna_rxf *rxf)
1312 return 0; 1308 return 0;
1313} 1309}
1314 1310
1315/** 1311/* RX */
1316 * RX
1317 */
1318 1312
1319#define BNA_GET_RXQS(qcfg) (((qcfg)->rxp_type == BNA_RXP_SINGLE) ? \ 1313#define BNA_GET_RXQS(qcfg) (((qcfg)->rxp_type == BNA_RXP_SINGLE) ? \
1320 (qcfg)->num_paths : ((qcfg)->num_paths * 2)) 1314 (qcfg)->num_paths : ((qcfg)->num_paths * 2))
@@ -2791,9 +2785,8 @@ const u32 bna_napi_dim_vector[BNA_LOAD_T_MAX][BNA_BIAS_T_MAX] = {
2791 {1, 2}, 2785 {1, 2},
2792}; 2786};
2793 2787
2794/** 2788/* TX */
2795 * TX 2789
2796 */
2797#define call_tx_stop_cbfn(tx) \ 2790#define call_tx_stop_cbfn(tx) \
2798do { \ 2791do { \
2799 if ((tx)->stop_cbfn) { \ 2792 if ((tx)->stop_cbfn) { \
diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h
index e8d3ab7ea6cb..d3eb8bddfb2a 100644
--- a/drivers/net/ethernet/brocade/bna/bna_types.h
+++ b/drivers/net/ethernet/brocade/bna/bna_types.h
@@ -23,11 +23,7 @@
23#include "bfa_cee.h" 23#include "bfa_cee.h"
24#include "bfa_msgq.h" 24#include "bfa_msgq.h"
25 25
26/** 26/* Forward declarations */
27 *
28 * Forward declarations
29 *
30 */
31 27
32struct bna_mcam_handle; 28struct bna_mcam_handle;
33struct bna_txq; 29struct bna_txq;
@@ -40,11 +36,7 @@ struct bna_enet;
40struct bna; 36struct bna;
41struct bnad; 37struct bnad;
42 38
43/** 39/* Enums, primitive data types */
44 *
45 * Enums, primitive data types
46 *
47 */
48 40
49enum bna_status { 41enum bna_status {
50 BNA_STATUS_T_DISABLED = 0, 42 BNA_STATUS_T_DISABLED = 0,
@@ -331,11 +323,7 @@ struct bna_attr {
331 int max_rit_size; 323 int max_rit_size;
332}; 324};
333 325
334/** 326/* IOCEth */
335 *
336 * IOCEth
337 *
338 */
339 327
340struct bna_ioceth { 328struct bna_ioceth {
341 bfa_fsm_t fsm; 329 bfa_fsm_t fsm;
@@ -351,11 +339,7 @@ struct bna_ioceth {
351 struct bna *bna; 339 struct bna *bna;
352}; 340};
353 341
354/** 342/* Enet */
355 *
356 * Enet
357 *
358 */
359 343
360/* Pause configuration */ 344/* Pause configuration */
361struct bna_pause_config { 345struct bna_pause_config {
@@ -390,11 +374,7 @@ struct bna_enet {
390 struct bna *bna; 374 struct bna *bna;
391}; 375};
392 376
393/** 377/* Ethport */
394 *
395 * Ethport
396 *
397 */
398 378
399struct bna_ethport { 379struct bna_ethport {
400 bfa_fsm_t fsm; 380 bfa_fsm_t fsm;
@@ -419,11 +399,7 @@ struct bna_ethport {
419 struct bna *bna; 399 struct bna *bna;
420}; 400};
421 401
422/** 402/* Interrupt Block */
423 *
424 * Interrupt Block
425 *
426 */
427 403
428/* Doorbell structure */ 404/* Doorbell structure */
429struct bna_ib_dbell { 405struct bna_ib_dbell {
@@ -447,11 +423,7 @@ struct bna_ib {
447 int interpkt_timeo; 423 int interpkt_timeo;
448}; 424};
449 425
450/** 426/* Tx object */
451 *
452 * Tx object
453 *
454 */
455 427
456/* Tx datapath control structure */ 428/* Tx datapath control structure */
457#define BNA_Q_NAME_SIZE 16 429#define BNA_Q_NAME_SIZE 16
@@ -585,11 +557,7 @@ struct bna_tx_mod {
585 struct bna *bna; 557 struct bna *bna;
586}; 558};
587 559
588/** 560/* Rx object */
589 *
590 * Rx object
591 *
592 */
593 561
594/* Rx datapath control structure */ 562/* Rx datapath control structure */
595struct bna_rcb { 563struct bna_rcb {
@@ -898,11 +866,7 @@ struct bna_rx_mod {
898 u32 rid_mask; 866 u32 rid_mask;
899}; 867};
900 868
901/** 869/* CAM */
902 *
903 * CAM
904 *
905 */
906 870
907struct bna_ucam_mod { 871struct bna_ucam_mod {
908 struct bna_mac *ucmac; /* BFI_MAX_UCMAC entries */ 872 struct bna_mac *ucmac; /* BFI_MAX_UCMAC entries */
@@ -927,11 +891,7 @@ struct bna_mcam_mod {
927 struct bna *bna; 891 struct bna *bna;
928}; 892};
929 893
930/** 894/* Statistics */
931 *
932 * Statistics
933 *
934 */
935 895
936struct bna_stats { 896struct bna_stats {
937 struct bna_dma_addr hw_stats_dma; 897 struct bna_dma_addr hw_stats_dma;
@@ -949,11 +909,7 @@ struct bna_stats_mod {
949 struct bfi_enet_stats_req stats_clr; 909 struct bfi_enet_stats_req stats_clr;
950}; 910};
951 911
952/** 912/* BNA */
953 *
954 * BNA
955 *
956 */
957 913
958struct bna { 914struct bna {
959 struct bna_ident ident; 915 struct bna_ident ident;
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index 67cd2ed0306a..b441f33258e7 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -1302,8 +1302,7 @@ bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr_source src,
1302 return 0; 1302 return 0;
1303} 1303}
1304 1304
1305/** 1305/* NOTE: Should be called for MSIX only
1306 * NOTE: Should be called for MSIX only
1307 * Unregisters Tx MSIX vector(s) from the kernel 1306 * Unregisters Tx MSIX vector(s) from the kernel
1308 */ 1307 */
1309static void 1308static void
@@ -1322,8 +1321,7 @@ bnad_tx_msix_unregister(struct bnad *bnad, struct bnad_tx_info *tx_info,
1322 } 1321 }
1323} 1322}
1324 1323
1325/** 1324/* NOTE: Should be called for MSIX only
1326 * NOTE: Should be called for MSIX only
1327 * Registers Tx MSIX vector(s) and ISR(s), cookie with the kernel 1325 * Registers Tx MSIX vector(s) and ISR(s), cookie with the kernel
1328 */ 1326 */
1329static int 1327static int
@@ -1354,8 +1352,7 @@ err_return:
1354 return -1; 1352 return -1;
1355} 1353}
1356 1354
1357/** 1355/* NOTE: Should be called for MSIX only
1358 * NOTE: Should be called for MSIX only
1359 * Unregisters Rx MSIX vector(s) from the kernel 1356 * Unregisters Rx MSIX vector(s) from the kernel
1360 */ 1357 */
1361static void 1358static void
@@ -1375,8 +1372,7 @@ bnad_rx_msix_unregister(struct bnad *bnad, struct bnad_rx_info *rx_info,
1375 } 1372 }
1376} 1373}
1377 1374
1378/** 1375/* NOTE: Should be called for MSIX only
1379 * NOTE: Should be called for MSIX only
1380 * Registers Tx MSIX vector(s) and ISR(s), cookie with the kernel 1376 * Registers Tx MSIX vector(s) and ISR(s), cookie with the kernel
1381 */ 1377 */
1382static int 1378static int
diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h
index 72742be11277..d78339224751 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.h
+++ b/drivers/net/ethernet/brocade/bna/bnad.h
@@ -389,9 +389,7 @@ extern void bnad_netdev_hwstats_fill(struct bnad *bnad,
389void bnad_debugfs_init(struct bnad *bnad); 389void bnad_debugfs_init(struct bnad *bnad);
390void bnad_debugfs_uninit(struct bnad *bnad); 390void bnad_debugfs_uninit(struct bnad *bnad);
391 391
392/** 392/* MACROS */
393 * MACROS
394 */
395/* To set & get the stats counters */ 393/* To set & get the stats counters */
396#define BNAD_UPDATE_CTR(_bnad, _ctr) \ 394#define BNAD_UPDATE_CTR(_bnad, _ctr) \
397 (((_bnad)->stats.drv_stats._ctr)++) 395 (((_bnad)->stats.drv_stats._ctr)++)
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
index 4fb47f14dbfe..cb66f574dc97 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
@@ -376,9 +376,7 @@ int ehea_destroy_eq(struct ehea_eq *eq)
376 return 0; 376 return 0;
377} 377}
378 378
379/** 379/* allocates memory for a queue and registers pages in phyp */
380 * allocates memory for a queue and registers pages in phyp
381 */
382static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue, 380static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,
383 int nr_pages, int wqe_size, int act_nr_sges, 381 int nr_pages, int wqe_size, int act_nr_sges,
384 struct ehea_adapter *adapter, int h_call_q_selector) 382 struct ehea_adapter *adapter, int h_call_q_selector)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 183a4a3224ba..3bfbb8df8989 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -721,9 +721,7 @@ void e1000_reset(struct e1000_adapter *adapter)
721 e1000_release_manageability(adapter); 721 e1000_release_manageability(adapter);
722} 722}
723 723
724/** 724/* Dump the eeprom for users having checksum issues */
725 * Dump the eeprom for users having checksum issues
726 **/
727static void e1000_dump_eeprom(struct e1000_adapter *adapter) 725static void e1000_dump_eeprom(struct e1000_adapter *adapter)
728{ 726{
729 struct net_device *netdev = adapter->netdev; 727 struct net_device *netdev = adapter->netdev;
@@ -3056,14 +3054,13 @@ static void e1000_tx_queue(struct e1000_adapter *adapter,
3056 mmiowb(); 3054 mmiowb();
3057} 3055}
3058 3056
3059/** 3057/* 82547 workaround to avoid controller hang in half-duplex environment.
3060 * 82547 workaround to avoid controller hang in half-duplex environment.
3061 * The workaround is to avoid queuing a large packet that would span 3058 * The workaround is to avoid queuing a large packet that would span
3062 * the internal Tx FIFO ring boundary by notifying the stack to resend 3059 * the internal Tx FIFO ring boundary by notifying the stack to resend
3063 * the packet at a later time. This gives the Tx FIFO an opportunity to 3060 * the packet at a later time. This gives the Tx FIFO an opportunity to
3064 * flush all packets. When that occurs, we reset the Tx FIFO pointers 3061 * flush all packets. When that occurs, we reset the Tx FIFO pointers
3065 * to the beginning of the Tx FIFO. 3062 * to the beginning of the Tx FIFO.
3066 **/ 3063 */
3067 3064
3068#define E1000_FIFO_HDR 0x10 3065#define E1000_FIFO_HDR 0x10
3069#define E1000_82547_PAD_LEN 0x3E0 3066#define E1000_82547_PAD_LEN 0x3E0
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index 76bf1598c609..59ef568d5dd5 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -16,8 +16,7 @@
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19/** 19/* Supports:
20 * Supports:
21 * KS8851 16bit MLL chip from Micrel Inc. 20 * KS8851 16bit MLL chip from Micrel Inc.
22 */ 21 */
23 22
@@ -465,8 +464,7 @@ static int msg_enable;
465#define BE1 0x2000 /* Byte Enable 1 */ 464#define BE1 0x2000 /* Byte Enable 1 */
466#define BE0 0x1000 /* Byte Enable 0 */ 465#define BE0 0x1000 /* Byte Enable 0 */
467 466
468/** 467/* register read/write calls.
469 * register read/write calls.
470 * 468 *
471 * All these calls issue transactions to access the chip's registers. They 469 * All these calls issue transactions to access the chip's registers. They
472 * all require that the necessary lock is held to prevent accesses when the 470 * all require that the necessary lock is held to prevent accesses when the
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.h b/drivers/net/ethernet/neterion/vxge/vxge-main.h
index 35f3e7552ec2..36ca40f8f249 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.h
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.h
@@ -430,8 +430,7 @@ void vxge_initialize_ethtool_ops(struct net_device *ndev);
430enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev); 430enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
431int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override); 431int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override);
432 432
433/** 433/* #define VXGE_DEBUG_INIT: debug for initialization functions
434 * #define VXGE_DEBUG_INIT: debug for initialization functions
435 * #define VXGE_DEBUG_TX : debug transmit related functions 434 * #define VXGE_DEBUG_TX : debug transmit related functions
436 * #define VXGE_DEBUG_RX : debug recevice related functions 435 * #define VXGE_DEBUG_RX : debug recevice related functions
437 * #define VXGE_DEBUG_MEM : debug memory module 436 * #define VXGE_DEBUG_MEM : debug memory module
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index c503fbebdf7e..8b7c5129c7e1 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -3552,8 +3552,7 @@ static irqreturn_t nv_nic_irq(int foo, void *data)
3552 return IRQ_HANDLED; 3552 return IRQ_HANDLED;
3553} 3553}
3554 3554
3555/** 3555/* All _optimized functions are used to help increase performance
3556 * All _optimized functions are used to help increase performance
3557 * (reduce CPU and increase throughput). They use descripter version 3, 3556 * (reduce CPU and increase throughput). They use descripter version 3,
3558 * compiler directives, and reduce memory accesses. 3557 * compiler directives, and reduce memory accesses.
3559 */ 3558 */
diff --git a/drivers/net/ethernet/sfc/mcdi_pcol.h b/drivers/net/ethernet/sfc/mcdi_pcol.h
index 0310b9f08c9b..db4beed97669 100644
--- a/drivers/net/ethernet/sfc/mcdi_pcol.h
+++ b/drivers/net/ethernet/sfc/mcdi_pcol.h
@@ -48,8 +48,7 @@
48 48
49/* Unused commands: 0x23, 0x27, 0x30, 0x31 */ 49/* Unused commands: 0x23, 0x27, 0x30, 0x31 */
50 50
51/** 51/* MCDI version 1
52 * MCDI version 1
53 * 52 *
54 * Each MCDI request starts with an MCDI_HEADER, which is a 32byte 53 * Each MCDI request starts with an MCDI_HEADER, which is a 32byte
55 * structure, filled in by the client. 54 * structure, filled in by the client.
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 9cdd6197a176..ab0bbb78699a 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -614,11 +614,9 @@ static int emac_set_coalesce(struct net_device *ndev,
614} 614}
615 615
616 616
617/** 617/* ethtool_ops: DaVinci EMAC Ethtool structure
618 * ethtool_ops: DaVinci EMAC Ethtool structure
619 * 618 *
620 * Ethtool support for EMAC adapter 619 * Ethtool support for EMAC adapter
621 *
622 */ 620 */
623static const struct ethtool_ops ethtool_ops = { 621static const struct ethtool_ops ethtool_ops = {
624 .get_drvinfo = emac_get_drvinfo, 622 .get_drvinfo = emac_get_drvinfo,
@@ -2015,9 +2013,7 @@ static const struct dev_pm_ops davinci_emac_pm_ops = {
2015 .resume = davinci_emac_resume, 2013 .resume = davinci_emac_resume,
2016}; 2014};
2017 2015
2018/** 2016/* davinci_emac_driver: EMAC platform driver structure */
2019 * davinci_emac_driver: EMAC platform driver structure
2020 */
2021static struct platform_driver davinci_emac_driver = { 2017static struct platform_driver davinci_emac_driver = {
2022 .driver = { 2018 .driver = {
2023 .name = "davinci_emac", 2019 .name = "davinci_emac",