diff options
author | Rasesh Mody <rmody@brocade.com> | 2011-08-08 12:21:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-11 10:30:13 -0400 |
commit | f6d46a2ea909f96a318635674f4924b816c161c4 (patch) | |
tree | 9c32877eea102608766a94b97414c351f2606d0b /drivers | |
parent | 078086f3c17fae8af6c077153773c4a10392ffbf (diff) |
bna: Remove Unused Code
Remove unused code.
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfa_cee.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfa_ioc.h | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfi.h | 22 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bna.h | 122 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bna_types.h | 230 |
6 files changed, 2 insertions, 388 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bfa_cee.c b/drivers/net/ethernet/brocade/bna/bfa_cee.c index 39e5ab9fde59..b45b8eb3b9b0 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_cee.c +++ b/drivers/net/ethernet/brocade/bna/bfa_cee.c | |||
@@ -22,9 +22,6 @@ | |||
22 | #include "bfi_cna.h" | 22 | #include "bfi_cna.h" |
23 | #include "bfa_ioc.h" | 23 | #include "bfa_ioc.h" |
24 | 24 | ||
25 | #define bfa_ioc_portid(__ioc) ((__ioc)->port_id) | ||
26 | #define bfa_lpuid(__arg) bfa_ioc_portid(&(__arg)->ioc) | ||
27 | |||
28 | static void bfa_cee_format_lldp_cfg(struct bfa_cee_lldp_cfg *lldp_cfg); | 25 | static void bfa_cee_format_lldp_cfg(struct bfa_cee_lldp_cfg *lldp_cfg); |
29 | static void bfa_cee_format_cee_cfg(void *buffer); | 26 | static void bfa_cee_format_cee_cfg(void *buffer); |
30 | 27 | ||
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 f84d8f674812..7ddd16f819f9 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h +++ b/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h | |||
@@ -67,14 +67,6 @@ enum { | |||
67 | #pragma pack(1) | 67 | #pragma pack(1) |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * Check if 1-port card | ||
71 | */ | ||
72 | #define bfa_mfg_is_1port(type) (( \ | ||
73 | (type) == BFA_MFG_TYPE_FC8P1 || \ | ||
74 | (type) == BFA_MFG_TYPE_FC4P1 || \ | ||
75 | (type) == BFA_MFG_TYPE_CNA10P1)) | ||
76 | |||
77 | /** | ||
78 | * Check if Mezz card | 70 | * Check if Mezz card |
79 | */ | 71 | */ |
80 | #define bfa_mfg_is_mezz(type) (( \ | 72 | #define bfa_mfg_is_mezz(type) (( \ |
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.h b/drivers/net/ethernet/brocade/bna/bfa_ioc.h index 7514c722ebc3..f5a3d4e82078 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_ioc.h +++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #define BFA_IOC_TOV 3000 /* msecs */ | 26 | #define BFA_IOC_TOV 3000 /* msecs */ |
27 | #define BFA_IOC_HWSEM_TOV 500 /* msecs */ | 27 | #define BFA_IOC_HWSEM_TOV 500 /* msecs */ |
28 | #define BFA_IOC_HB_TOV 500 /* msecs */ | 28 | #define BFA_IOC_HB_TOV 500 /* msecs */ |
29 | #define BFA_IOC_HWINIT_MAX 5 | ||
30 | #define BFA_IOC_POLL_TOV 200 /* msecs */ | 29 | #define BFA_IOC_POLL_TOV 200 /* msecs */ |
31 | 30 | ||
32 | /** | 31 | /** |
@@ -250,10 +249,6 @@ struct bfa_ioc_hwif { | |||
250 | #define bfa_ioc_stats_hb_count(_ioc, _hb_count) \ | 249 | #define bfa_ioc_stats_hb_count(_ioc, _hb_count) \ |
251 | ((_ioc)->stats.hb_count = (_hb_count)) | 250 | ((_ioc)->stats.hb_count = (_hb_count)) |
252 | #define BFA_IOC_FWIMG_MINSZ (16 * 1024) | 251 | #define BFA_IOC_FWIMG_MINSZ (16 * 1024) |
253 | #define BFA_IOC_FWIMG_TYPE(__ioc) \ | ||
254 | (((__ioc)->ctdev) ? \ | ||
255 | (((__ioc)->fcmode) ? BFI_IMAGE_CT_FC : BFI_IMAGE_CT_CNA) : \ | ||
256 | BFI_IMAGE_CB_FC) | ||
257 | #define BFA_IOC_FW_SMEM_SIZE(__ioc) \ | 252 | #define BFA_IOC_FW_SMEM_SIZE(__ioc) \ |
258 | ((bfa_ioc_asic_gen(__ioc) == BFI_ASIC_GEN_CB) \ | 253 | ((bfa_ioc_asic_gen(__ioc) == BFI_ASIC_GEN_CB) \ |
259 | ? BFI_SMEM_CB_SIZE : BFI_SMEM_CT_SIZE) | 254 | ? BFI_SMEM_CB_SIZE : BFI_SMEM_CT_SIZE) |
diff --git a/drivers/net/ethernet/brocade/bna/bfi.h b/drivers/net/ethernet/brocade/bna/bfi.h index 978e1bc12dc1..19654cc7abab 100644 --- a/drivers/net/ethernet/brocade/bna/bfi.h +++ b/drivers/net/ethernet/brocade/bna/bfi.h | |||
@@ -15,7 +15,6 @@ | |||
15 | * All rights reserved | 15 | * All rights reserved |
16 | * www.brocade.com | 16 | * www.brocade.com |
17 | */ | 17 | */ |
18 | |||
19 | #ifndef __BFI_H__ | 18 | #ifndef __BFI_H__ |
20 | #define __BFI_H__ | 19 | #define __BFI_H__ |
21 | 20 | ||
@@ -28,12 +27,6 @@ | |||
28 | */ | 27 | */ |
29 | #define BFI_FLASH_CHUNK_SZ 256 /*!< Flash chunk size */ | 28 | #define BFI_FLASH_CHUNK_SZ 256 /*!< Flash chunk size */ |
30 | #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) | 29 | #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) |
31 | enum { | ||
32 | BFI_IMAGE_CB_FC, | ||
33 | BFI_IMAGE_CT_FC, | ||
34 | BFI_IMAGE_CT_CNA, | ||
35 | BFI_IMAGE_MAX, | ||
36 | }; | ||
37 | 30 | ||
38 | /** | 31 | /** |
39 | * Msg header common to all msgs | 32 | * Msg header common to all msgs |
@@ -195,15 +188,6 @@ enum bfi_mclass { | |||
195 | #define BFI_IOC_MAX_CQS_ASIC 8 | 188 | #define BFI_IOC_MAX_CQS_ASIC 8 |
196 | #define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */ | 189 | #define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */ |
197 | 190 | ||
198 | #define BFI_BOOT_TYPE_OFF 8 | ||
199 | #define BFI_BOOT_LOADER_OFF 12 | ||
200 | |||
201 | #define BFI_BOOT_TYPE_NORMAL 0 | ||
202 | #define BFI_BOOT_TYPE_FLASH 1 | ||
203 | #define BFI_BOOT_TYPE_MEMTEST 2 | ||
204 | |||
205 | #define BFI_BOOT_LOADER_OS 0 | ||
206 | |||
207 | #define BFI_FWBOOT_ENV_OS 0 | 191 | #define BFI_FWBOOT_ENV_OS 0 |
208 | 192 | ||
209 | #define BFI_BOOT_MEMTEST_RES_ADDR 0x900 | 193 | #define BFI_BOOT_MEMTEST_RES_ADDR 0x900 |
@@ -344,12 +328,6 @@ enum bfi_port_mode { | |||
344 | /** | 328 | /** |
345 | * BFI_IOC_I2H_READY_EVENT message | 329 | * BFI_IOC_I2H_READY_EVENT message |
346 | */ | 330 | */ |
347 | struct bfi_ioc_rdy_event { | ||
348 | struct bfi_mhdr mh; /*!< common msg header */ | ||
349 | u8 init_status; /*!< init event status */ | ||
350 | u8 rsvd[3]; | ||
351 | }; | ||
352 | |||
353 | struct bfi_ioc_hbeat { | 331 | struct bfi_ioc_hbeat { |
354 | struct bfi_mhdr mh; /*!< common msg header */ | 332 | struct bfi_mhdr mh; /*!< common msg header */ |
355 | u32 hb_count; /*!< current heart beat count */ | 333 | u32 hb_count; /*!< current heart beat count */ |
diff --git a/drivers/net/ethernet/brocade/bna/bna.h b/drivers/net/ethernet/brocade/bna/bna.h index f9781a3d559b..1f1fa936894c 100644 --- a/drivers/net/ethernet/brocade/bna/bna.h +++ b/drivers/net/ethernet/brocade/bna/bna.h | |||
@@ -32,14 +32,6 @@ extern const u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX]; | |||
32 | /* Log string size */ | 32 | /* Log string size */ |
33 | #define BNA_MESSAGE_SIZE 256 | 33 | #define BNA_MESSAGE_SIZE 256 |
34 | 34 | ||
35 | /* MBOX API for PORT, TX, RX */ | ||
36 | #define bna_mbox_qe_fill(_qe, _cmd, _cmd_len, _cbfn, _cbarg) \ | ||
37 | do { \ | ||
38 | memcpy(&((_qe)->cmd.msg[0]), (_cmd), (_cmd_len)); \ | ||
39 | (_qe)->cbfn = (_cbfn); \ | ||
40 | (_qe)->cbarg = (_cbarg); \ | ||
41 | } while (0) | ||
42 | |||
43 | #define bna_is_small_rxq(_id) ((_id) & 0x1) | 35 | #define bna_is_small_rxq(_id) ((_id) & 0x1) |
44 | 36 | ||
45 | #define BNA_MAC_IS_EQUAL(_mac1, _mac2) \ | 37 | #define BNA_MAC_IS_EQUAL(_mac1, _mac2) \ |
@@ -177,32 +169,6 @@ do { \ | |||
177 | #define BNA_Q_IN_USE_COUNT(_q_ptr) \ | 169 | #define BNA_Q_IN_USE_COUNT(_q_ptr) \ |
178 | (BNA_QE_IN_USE_CNT(&(_q_ptr)->q, (_q_ptr)->q.q_depth)) | 170 | (BNA_QE_IN_USE_CNT(&(_q_ptr)->q, (_q_ptr)->q.q_depth)) |
179 | 171 | ||
180 | /* These macros build the data portion of the TxQ/RxQ doorbell */ | ||
181 | #define BNA_DOORBELL_Q_PRD_IDX(_pi) (0x80000000 | (_pi)) | ||
182 | #define BNA_DOORBELL_Q_STOP (0x40000000) | ||
183 | |||
184 | /* These macros build the data portion of the IB doorbell */ | ||
185 | #define BNA_DOORBELL_IB_INT_ACK(_timeout, _events) \ | ||
186 | (0x80000000 | ((_timeout) << 16) | (_events)) | ||
187 | #define BNA_DOORBELL_IB_INT_DISABLE (0x40000000) | ||
188 | |||
189 | /* Set the coalescing timer for the given ib */ | ||
190 | #define bna_ib_coalescing_timer_set(_i_dbell, _cls_timer) \ | ||
191 | ((_i_dbell)->doorbell_ack = BNA_DOORBELL_IB_INT_ACK((_cls_timer), 0)); | ||
192 | |||
193 | /* Acks 'events' # of events for a given ib */ | ||
194 | #define bna_ib_ack(_i_dbell, _events) \ | ||
195 | (writel(((_i_dbell)->doorbell_ack | (_events)), \ | ||
196 | (_i_dbell)->doorbell_addr)); | ||
197 | |||
198 | #define bna_txq_prod_indx_doorbell(_tcb) \ | ||
199 | (writel(BNA_DOORBELL_Q_PRD_IDX((_tcb)->producer_index), \ | ||
200 | (_tcb)->q_dbell)); | ||
201 | |||
202 | #define bna_rxq_prod_indx_doorbell(_rcb) \ | ||
203 | (writel(BNA_DOORBELL_Q_PRD_IDX((_rcb)->producer_index), \ | ||
204 | (_rcb)->q_dbell)); | ||
205 | |||
206 | #define BNA_LARGE_PKT_SIZE 1000 | 172 | #define BNA_LARGE_PKT_SIZE 1000 |
207 | 173 | ||
208 | #define BNA_UPDATE_PKT_CNT(_pkt, _len) \ | 174 | #define BNA_UPDATE_PKT_CNT(_pkt, _len) \ |
@@ -435,7 +401,6 @@ void bna_get_perm_mac(struct bna *bna, u8 *mac); | |||
435 | void bna_hw_stats_get(struct bna *bna); | 401 | void bna_hw_stats_get(struct bna *bna); |
436 | 402 | ||
437 | /* APIs for Rx */ | 403 | /* APIs for Rx */ |
438 | int bna_rit_mod_can_satisfy(struct bna_rit_mod *rit_mod, int seg_size); | ||
439 | 404 | ||
440 | /* APIs for RxF */ | 405 | /* APIs for RxF */ |
441 | struct bna_mac *bna_ucam_mod_mac_get(struct bna_ucam_mod *ucam_mod); | 406 | struct bna_mac *bna_ucam_mod_mac_get(struct bna_ucam_mod *ucam_mod); |
@@ -447,53 +412,13 @@ void bna_mcam_mod_mac_put(struct bna_mcam_mod *mcam_mod, | |||
447 | struct bna_mcam_handle *bna_mcam_mod_handle_get(struct bna_mcam_mod *mod); | 412 | struct bna_mcam_handle *bna_mcam_mod_handle_get(struct bna_mcam_mod *mod); |
448 | void bna_mcam_mod_handle_put(struct bna_mcam_mod *mcam_mod, | 413 | void bna_mcam_mod_handle_put(struct bna_mcam_mod *mcam_mod, |
449 | struct bna_mcam_handle *handle); | 414 | struct bna_mcam_handle *handle); |
450 | struct bna_rit_segment * | ||
451 | bna_rit_mod_seg_get(struct bna_rit_mod *rit_mod, int seg_size); | ||
452 | void bna_rit_mod_seg_put(struct bna_rit_mod *rit_mod, | ||
453 | struct bna_rit_segment *seg); | ||
454 | |||
455 | /** | ||
456 | * DEVICE | ||
457 | */ | ||
458 | |||
459 | /* APIs for BNAD */ | ||
460 | void bna_device_enable(struct bna_device *device); | ||
461 | void bna_device_disable(struct bna_device *device, | ||
462 | enum bna_cleanup_type type); | ||
463 | 415 | ||
464 | /** | 416 | /** |
465 | * MBOX | 417 | * MBOX |
466 | */ | 418 | */ |
467 | 419 | ||
468 | /* APIs for PORT, TX, RX */ | ||
469 | void bna_mbox_handler(struct bna *bna, u32 intr_status); | ||
470 | void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe); | ||
471 | |||
472 | /** | ||
473 | * PORT | ||
474 | */ | ||
475 | |||
476 | /* API for RX */ | ||
477 | int bna_port_mtu_get(struct bna_port *port); | ||
478 | void bna_llport_rx_started(struct bna_llport *llport); | ||
479 | void bna_llport_rx_stopped(struct bna_llport *llport); | ||
480 | |||
481 | /* API for BNAD */ | 420 | /* API for BNAD */ |
482 | void bna_port_enable(struct bna_port *port); | 421 | void bna_mbox_handler(struct bna *bna, u32 intr_status); |
483 | void bna_port_disable(struct bna_port *port, enum bna_cleanup_type type, | ||
484 | void (*cbfn)(void *, enum bna_cb_status)); | ||
485 | void bna_port_pause_config(struct bna_port *port, | ||
486 | struct bna_pause_config *pause_config, | ||
487 | void (*cbfn)(struct bnad *, enum bna_cb_status)); | ||
488 | void bna_port_mtu_set(struct bna_port *port, int mtu, | ||
489 | void (*cbfn)(struct bnad *, enum bna_cb_status)); | ||
490 | void bna_port_mac_get(struct bna_port *port, mac_t *mac); | ||
491 | |||
492 | /* Callbacks for TX, RX */ | ||
493 | void bna_port_cb_tx_stopped(struct bna_port *port, | ||
494 | enum bna_cb_status status); | ||
495 | void bna_port_cb_rx_stopped(struct bna_port *port, | ||
496 | enum bna_cb_status status); | ||
497 | 422 | ||
498 | /** | 423 | /** |
499 | * ETHPORT | 424 | * ETHPORT |
@@ -504,15 +429,6 @@ void bna_ethport_cb_rx_started(struct bna_ethport *ethport); | |||
504 | void bna_ethport_cb_rx_stopped(struct bna_ethport *ethport); | 429 | void bna_ethport_cb_rx_stopped(struct bna_ethport *ethport); |
505 | 430 | ||
506 | /** | 431 | /** |
507 | * IB | ||
508 | */ | ||
509 | |||
510 | /* APIs for BNA */ | ||
511 | void bna_ib_mod_init(struct bna_ib_mod *ib_mod, struct bna *bna, | ||
512 | struct bna_res_info *res_info); | ||
513 | void bna_ib_mod_uninit(struct bna_ib_mod *ib_mod); | ||
514 | |||
515 | /** | ||
516 | * TX MODULE AND TX | 432 | * TX MODULE AND TX |
517 | */ | 433 | */ |
518 | /* FW response handelrs */ | 434 | /* FW response handelrs */ |
@@ -526,14 +442,11 @@ void bna_bfi_bw_update_aen(struct bna_tx_mod *tx_mod); | |||
526 | void bna_tx_mod_init(struct bna_tx_mod *tx_mod, struct bna *bna, | 442 | void bna_tx_mod_init(struct bna_tx_mod *tx_mod, struct bna *bna, |
527 | struct bna_res_info *res_info); | 443 | struct bna_res_info *res_info); |
528 | void bna_tx_mod_uninit(struct bna_tx_mod *tx_mod); | 444 | void bna_tx_mod_uninit(struct bna_tx_mod *tx_mod); |
529 | int bna_tx_state_get(struct bna_tx *tx); | ||
530 | 445 | ||
531 | /* APIs for ENET */ | 446 | /* APIs for ENET */ |
532 | void bna_tx_mod_start(struct bna_tx_mod *tx_mod, enum bna_tx_type type); | 447 | void bna_tx_mod_start(struct bna_tx_mod *tx_mod, enum bna_tx_type type); |
533 | void bna_tx_mod_stop(struct bna_tx_mod *tx_mod, enum bna_tx_type type); | 448 | void bna_tx_mod_stop(struct bna_tx_mod *tx_mod, enum bna_tx_type type); |
534 | void bna_tx_mod_fail(struct bna_tx_mod *tx_mod); | 449 | void bna_tx_mod_fail(struct bna_tx_mod *tx_mod); |
535 | void bna_tx_mod_prio_changed(struct bna_tx_mod *tx_mod, int prio); | ||
536 | void bna_tx_mod_cee_link_status(struct bna_tx_mod *tx_mod, int cee_link); | ||
537 | 450 | ||
538 | /* APIs for BNAD */ | 451 | /* APIs for BNAD */ |
539 | void bna_tx_res_req(int num_txq, int txq_depth, | 452 | void bna_tx_res_req(int num_txq, int txq_depth, |
@@ -553,27 +466,6 @@ void bna_tx_coalescing_timeo_set(struct bna_tx *tx, int coalescing_timeo); | |||
553 | * RX MODULE, RX, RXF | 466 | * RX MODULE, RX, RXF |
554 | */ | 467 | */ |
555 | 468 | ||
556 | /* Internal APIs */ | ||
557 | void rxf_cb_cam_fltr_mbox_cmd(void *arg, int status); | ||
558 | void rxf_cam_mbox_cmd(struct bna_rxf *rxf, u8 cmd, | ||
559 | const struct bna_mac *mac_addr); | ||
560 | void __rxf_vlan_filter_set(struct bna_rxf *rxf, enum bna_status status); | ||
561 | void bna_rxf_adv_init(struct bna_rxf *rxf, | ||
562 | struct bna_rx *rx, | ||
563 | struct bna_rx_config *q_config); | ||
564 | int rxf_process_packet_filter_ucast(struct bna_rxf *rxf); | ||
565 | int rxf_process_packet_filter_promisc(struct bna_rxf *rxf); | ||
566 | int rxf_process_packet_filter_default(struct bna_rxf *rxf); | ||
567 | int rxf_process_packet_filter_allmulti(struct bna_rxf *rxf); | ||
568 | int rxf_clear_packet_filter_ucast(struct bna_rxf *rxf); | ||
569 | int rxf_clear_packet_filter_promisc(struct bna_rxf *rxf); | ||
570 | int rxf_clear_packet_filter_default(struct bna_rxf *rxf); | ||
571 | int rxf_clear_packet_filter_allmulti(struct bna_rxf *rxf); | ||
572 | void rxf_reset_packet_filter_ucast(struct bna_rxf *rxf); | ||
573 | void rxf_reset_packet_filter_promisc(struct bna_rxf *rxf); | ||
574 | void rxf_reset_packet_filter_default(struct bna_rxf *rxf); | ||
575 | void rxf_reset_packet_filter_allmulti(struct bna_rxf *rxf); | ||
576 | |||
577 | /* FW response handlers */ | 469 | /* FW response handlers */ |
578 | void bna_bfi_rx_enet_start_rsp(struct bna_rx *rx, | 470 | void bna_bfi_rx_enet_start_rsp(struct bna_rx *rx, |
579 | struct bfi_msgq_mhdr *msghdr); | 471 | struct bfi_msgq_mhdr *msghdr); |
@@ -587,8 +479,6 @@ void bna_bfi_rxf_mcast_add_rsp(struct bna_rxf *rxf, | |||
587 | void bna_rx_mod_init(struct bna_rx_mod *rx_mod, struct bna *bna, | 479 | void bna_rx_mod_init(struct bna_rx_mod *rx_mod, struct bna *bna, |
588 | struct bna_res_info *res_info); | 480 | struct bna_res_info *res_info); |
589 | void bna_rx_mod_uninit(struct bna_rx_mod *rx_mod); | 481 | void bna_rx_mod_uninit(struct bna_rx_mod *rx_mod); |
590 | int bna_rx_state_get(struct bna_rx *rx); | ||
591 | int bna_rxf_state_get(struct bna_rxf *rxf); | ||
592 | 482 | ||
593 | /* APIs for ENET */ | 483 | /* APIs for ENET */ |
594 | void bna_rx_mod_start(struct bna_rx_mod *rx_mod, enum bna_rx_type type); | 484 | void bna_rx_mod_start(struct bna_rx_mod *rx_mod, enum bna_rx_type type); |
@@ -687,14 +577,4 @@ void bnad_cb_mbox_intr_disable(struct bnad *bnad); | |||
687 | void bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status, | 577 | void bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status, |
688 | struct bna_stats *stats); | 578 | struct bna_stats *stats); |
689 | 579 | ||
690 | /* Callbacks for DEVICE */ | ||
691 | void bnad_cb_device_enabled(struct bnad *bnad, enum bna_cb_status status); | ||
692 | void bnad_cb_device_disabled(struct bnad *bnad, enum bna_cb_status status); | ||
693 | void bnad_cb_device_enable_mbox_intr(struct bnad *bnad); | ||
694 | void bnad_cb_device_disable_mbox_intr(struct bnad *bnad); | ||
695 | |||
696 | /* Callbacks for port */ | ||
697 | void bnad_cb_port_link_status(struct bnad *bnad, | ||
698 | enum bna_link_status status); | ||
699 | |||
700 | #endif /* __BNA_H__ */ | 580 | #endif /* __BNA_H__ */ |
diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h index 655eb140bf94..8a6da0c3cd89 100644 --- a/drivers/net/ethernet/brocade/bna/bna_types.h +++ b/drivers/net/ethernet/brocade/bna/bna_types.h | |||
@@ -37,7 +37,6 @@ struct bna_rxq; | |||
37 | struct bna_cq; | 37 | struct bna_cq; |
38 | struct bna_rx; | 38 | struct bna_rx; |
39 | struct bna_rxf; | 39 | struct bna_rxf; |
40 | struct bna_port; | ||
41 | struct bna_enet; | 40 | struct bna_enet; |
42 | struct bna; | 41 | struct bna; |
43 | struct bnad; | 42 | struct bnad; |
@@ -90,21 +89,6 @@ enum bna_res_req_type { | |||
90 | BNA_RES_MEM_T_ATTR = 1, | 89 | BNA_RES_MEM_T_ATTR = 1, |
91 | BNA_RES_MEM_T_FWTRC = 2, | 90 | BNA_RES_MEM_T_FWTRC = 2, |
92 | BNA_RES_MEM_T_STATS = 3, | 91 | BNA_RES_MEM_T_STATS = 3, |
93 | BNA_RES_MEM_T_SWSTATS = 4, | ||
94 | BNA_RES_MEM_T_IBIDX = 5, | ||
95 | BNA_RES_MEM_T_IB_ARRAY = 6, | ||
96 | BNA_RES_MEM_T_INTR_ARRAY = 7, | ||
97 | BNA_RES_MEM_T_IDXSEG_ARRAY = 8, | ||
98 | BNA_RES_MEM_T_TX_ARRAY = 9, | ||
99 | BNA_RES_MEM_T_TXQ_ARRAY = 10, | ||
100 | BNA_RES_MEM_T_RX_ARRAY = 11, | ||
101 | BNA_RES_MEM_T_RXP_ARRAY = 12, | ||
102 | BNA_RES_MEM_T_RXQ_ARRAY = 13, | ||
103 | BNA_RES_MEM_T_UCMAC_ARRAY = 14, | ||
104 | BNA_RES_MEM_T_MCMAC_ARRAY = 15, | ||
105 | BNA_RES_MEM_T_RIT_ENTRY = 16, | ||
106 | BNA_RES_MEM_T_RIT_SEGMENT = 17, | ||
107 | BNA_RES_INTR_T_MBOX = 18, | ||
108 | BNA_RES_T_MAX | 92 | BNA_RES_T_MAX |
109 | }; | 93 | }; |
110 | 94 | ||
@@ -150,11 +134,6 @@ enum bna_rx_mem_type { | |||
150 | BNA_RX_RES_T_MAX = 15 | 134 | BNA_RX_RES_T_MAX = 15 |
151 | }; | 135 | }; |
152 | 136 | ||
153 | enum bna_mbox_state { | ||
154 | BNA_MBOX_FREE = 0, | ||
155 | BNA_MBOX_POSTED = 1 | ||
156 | }; | ||
157 | |||
158 | enum bna_tx_type { | 137 | enum bna_tx_type { |
159 | BNA_TX_T_REGULAR = 0, | 138 | BNA_TX_T_REGULAR = 0, |
160 | BNA_TX_T_LOOPBACK = 1, | 139 | BNA_TX_T_LOOPBACK = 1, |
@@ -200,14 +179,6 @@ enum bna_rx_event { | |||
200 | RX_E_CLEANUP_DONE = 8, | 179 | RX_E_CLEANUP_DONE = 8, |
201 | }; | 180 | }; |
202 | 181 | ||
203 | enum bna_rx_state { | ||
204 | BNA_RX_STOPPED = 1, | ||
205 | BNA_RX_RXF_START_WAIT = 2, | ||
206 | BNA_RX_STARTED = 3, | ||
207 | BNA_RX_RXF_STOP_WAIT = 4, | ||
208 | BNA_RX_RXQ_STOP_WAIT = 5, | ||
209 | }; | ||
210 | |||
211 | enum bna_rx_flags { | 182 | enum bna_rx_flags { |
212 | BNA_RX_F_ENET_STARTED = 1, | 183 | BNA_RX_F_ENET_STARTED = 1, |
213 | BNA_RX_F_ENABLED = 2, | 184 | BNA_RX_F_ENABLED = 2, |
@@ -218,11 +189,6 @@ enum bna_rx_mod_flags { | |||
218 | BNA_RX_MOD_F_ENET_LOOPBACK = 2, | 189 | BNA_RX_MOD_F_ENET_LOOPBACK = 2, |
219 | }; | 190 | }; |
220 | 191 | ||
221 | enum bna_rxf_oper_state { | ||
222 | BNA_RXF_OPER_STATE_RUNNING = 0x01, /* rxf operational */ | ||
223 | BNA_RXF_OPER_STATE_PAUSED = 0x02, /* rxf in PAUSED state */ | ||
224 | }; | ||
225 | |||
226 | enum bna_rxf_flags { | 192 | enum bna_rxf_flags { |
227 | BNA_RXF_F_PAUSED = 1, | 193 | BNA_RXF_F_PAUSED = 1, |
228 | }; | 194 | }; |
@@ -237,24 +203,6 @@ enum bna_rxf_event { | |||
237 | RXF_E_FW_RESP = 7, | 203 | RXF_E_FW_RESP = 7, |
238 | }; | 204 | }; |
239 | 205 | ||
240 | enum bna_rxf_state { | ||
241 | BNA_RXF_STOPPED = 1, | ||
242 | BNA_RXF_START_WAIT = 2, | ||
243 | BNA_RXF_CAM_FLTR_MOD_WAIT = 3, | ||
244 | BNA_RXF_STARTED = 4, | ||
245 | BNA_RXF_CAM_FLTR_CLR_WAIT = 5, | ||
246 | BNA_RXF_STOP_WAIT = 6, | ||
247 | BNA_RXF_PAUSE_WAIT = 7, | ||
248 | BNA_RXF_RESUME_WAIT = 8, | ||
249 | BNA_RXF_STAT_CLR_WAIT = 9, | ||
250 | }; | ||
251 | |||
252 | enum bna_port_type { | ||
253 | BNA_PORT_T_REGULAR = 0, | ||
254 | BNA_PORT_T_LOOPBACK_INTERNAL = 1, | ||
255 | BNA_PORT_T_LOOPBACK_EXTERNAL = 2, | ||
256 | }; | ||
257 | |||
258 | enum bna_enet_type { | 206 | enum bna_enet_type { |
259 | BNA_ENET_T_REGULAR = 0, | 207 | BNA_ENET_T_REGULAR = 0, |
260 | BNA_ENET_T_LOOPBACK_INTERNAL = 1, | 208 | BNA_ENET_T_LOOPBACK_INTERNAL = 1, |
@@ -267,25 +215,12 @@ enum bna_link_status { | |||
267 | BNA_CEE_UP = 2 | 215 | BNA_CEE_UP = 2 |
268 | }; | 216 | }; |
269 | 217 | ||
270 | enum bna_llport_flags { | ||
271 | BNA_LLPORT_F_ADMIN_UP = 1, | ||
272 | BNA_LLPORT_F_PORT_ENABLED = 2, | ||
273 | BNA_LLPORT_F_RX_STARTED = 4 | ||
274 | }; | ||
275 | |||
276 | enum bna_ethport_flags { | 218 | enum bna_ethport_flags { |
277 | BNA_ETHPORT_F_ADMIN_UP = 1, | 219 | BNA_ETHPORT_F_ADMIN_UP = 1, |
278 | BNA_ETHPORT_F_PORT_ENABLED = 2, | 220 | BNA_ETHPORT_F_PORT_ENABLED = 2, |
279 | BNA_ETHPORT_F_RX_STARTED = 4, | 221 | BNA_ETHPORT_F_RX_STARTED = 4, |
280 | }; | 222 | }; |
281 | 223 | ||
282 | enum bna_port_flags { | ||
283 | BNA_PORT_F_DEVICE_READY = 1, | ||
284 | BNA_PORT_F_ENABLED = 2, | ||
285 | BNA_PORT_F_PAUSE_CHANGED = 4, | ||
286 | BNA_PORT_F_MTU_CHANGED = 8 | ||
287 | }; | ||
288 | |||
289 | enum bna_enet_flags { | 224 | enum bna_enet_flags { |
290 | BNA_ENET_F_IOCETH_READY = 1, | 225 | BNA_ENET_F_IOCETH_READY = 1, |
291 | BNA_ENET_F_ENABLED = 2, | 226 | BNA_ENET_F_ENABLED = 2, |
@@ -418,32 +353,7 @@ struct bna_ioceth { | |||
418 | 353 | ||
419 | /** | 354 | /** |
420 | * | 355 | * |
421 | * Mail box | 356 | * Enet |
422 | * | ||
423 | */ | ||
424 | |||
425 | struct bna_mbox_qe { | ||
426 | /* This should be the first one */ | ||
427 | struct list_head qe; | ||
428 | |||
429 | struct bfa_mbox_cmd cmd; | ||
430 | u32 cmd_len; | ||
431 | /* Callback for port, tx, rx, rxf */ | ||
432 | void (*cbfn)(void *arg, int status); | ||
433 | void *cbarg; | ||
434 | }; | ||
435 | |||
436 | struct bna_mbox_mod { | ||
437 | enum bna_mbox_state state; | ||
438 | struct list_head posted_q; | ||
439 | u32 msg_pending; | ||
440 | u32 msg_ctr; | ||
441 | struct bna *bna; | ||
442 | }; | ||
443 | |||
444 | /** | ||
445 | * | ||
446 | * Port | ||
447 | * | 357 | * |
448 | */ | 358 | */ |
449 | 359 | ||
@@ -453,60 +363,6 @@ struct bna_pause_config { | |||
453 | enum bna_status rx_pause; | 363 | enum bna_status rx_pause; |
454 | }; | 364 | }; |
455 | 365 | ||
456 | struct bna_llport { | ||
457 | bfa_fsm_t fsm; | ||
458 | enum bna_llport_flags flags; | ||
459 | |||
460 | enum bna_port_type type; | ||
461 | |||
462 | enum bna_link_status link_status; | ||
463 | |||
464 | int rx_started_count; | ||
465 | |||
466 | void (*stop_cbfn)(struct bna_port *, enum bna_cb_status); | ||
467 | |||
468 | struct bna_mbox_qe mbox_qe; | ||
469 | |||
470 | struct bna *bna; | ||
471 | }; | ||
472 | |||
473 | struct bna_port { | ||
474 | bfa_fsm_t fsm; | ||
475 | enum bna_port_flags flags; | ||
476 | |||
477 | enum bna_port_type type; | ||
478 | |||
479 | struct bna_llport llport; | ||
480 | |||
481 | struct bna_pause_config pause_config; | ||
482 | u8 priority; | ||
483 | int mtu; | ||
484 | |||
485 | /* Callback for bna_port_disable(), port_stop() */ | ||
486 | void (*stop_cbfn)(void *, enum bna_cb_status); | ||
487 | void *stop_cbarg; | ||
488 | |||
489 | /* Callback for bna_port_pause_config() */ | ||
490 | void (*pause_cbfn)(struct bnad *, enum bna_cb_status); | ||
491 | |||
492 | /* Callback for bna_port_mtu_set() */ | ||
493 | void (*mtu_cbfn)(struct bnad *, enum bna_cb_status); | ||
494 | |||
495 | void (*link_cbfn)(struct bnad *, enum bna_link_status); | ||
496 | |||
497 | struct bfa_wc chld_stop_wc; | ||
498 | |||
499 | struct bna_mbox_qe mbox_qe; | ||
500 | |||
501 | struct bna *bna; | ||
502 | }; | ||
503 | |||
504 | /** | ||
505 | * | ||
506 | * Enet | ||
507 | * | ||
508 | */ | ||
509 | |||
510 | struct bna_enet { | 366 | struct bna_enet { |
511 | bfa_fsm_t fsm; | 367 | bfa_fsm_t fsm; |
512 | enum bna_enet_flags flags; | 368 | enum bna_enet_flags flags; |
@@ -569,27 +425,6 @@ struct bna_ethport { | |||
569 | * | 425 | * |
570 | */ | 426 | */ |
571 | 427 | ||
572 | /* IB index segment structure */ | ||
573 | struct bna_ibidx_seg { | ||
574 | /* This should be the first one */ | ||
575 | struct list_head qe; | ||
576 | |||
577 | u8 ib_seg_size; | ||
578 | u8 ib_idx_tbl_offset; | ||
579 | }; | ||
580 | |||
581 | /* Interrupt structure */ | ||
582 | struct bna_intr { | ||
583 | /* This should be the first one */ | ||
584 | struct list_head qe; | ||
585 | int ref_count; | ||
586 | |||
587 | enum bna_intr_type intr_type; | ||
588 | int vector; | ||
589 | |||
590 | struct bna_ib *ib; | ||
591 | }; | ||
592 | |||
593 | /* Doorbell structure */ | 428 | /* Doorbell structure */ |
594 | struct bna_ib_dbell { | 429 | struct bna_ib_dbell { |
595 | void *__iomem doorbell_addr; | 430 | void *__iomem doorbell_addr; |
@@ -752,33 +587,6 @@ struct bna_tx_mod { | |||
752 | 587 | ||
753 | /** | 588 | /** |
754 | * | 589 | * |
755 | * Receive Indirection Table | ||
756 | * | ||
757 | */ | ||
758 | |||
759 | /* One row of RIT table */ | ||
760 | struct bna_rit_entry { | ||
761 | u8 large_rxq_id; /* used for either large or data buffers */ | ||
762 | u8 small_rxq_id; /* used for either small or header buffers */ | ||
763 | }; | ||
764 | |||
765 | /* RIT segment */ | ||
766 | struct bna_rit_segment { | ||
767 | struct list_head qe; | ||
768 | |||
769 | u32 rit_offset; | ||
770 | u32 rit_size; | ||
771 | /** | ||
772 | * max_rit_size: Varies per RIT segment depending on how RIT is | ||
773 | * partitioned | ||
774 | */ | ||
775 | u32 max_rit_size; | ||
776 | |||
777 | struct bna_rit_entry *rit; | ||
778 | }; | ||
779 | |||
780 | /** | ||
781 | * | ||
782 | * Rx object | 590 | * Rx object |
783 | * | 591 | * |
784 | */ | 592 | */ |
@@ -1123,42 +931,6 @@ struct bna_mcam_mod { | |||
1123 | * | 931 | * |
1124 | */ | 932 | */ |
1125 | 933 | ||
1126 | struct bna_tx_stats { | ||
1127 | int tx_state; | ||
1128 | int tx_flags; | ||
1129 | int num_txqs; | ||
1130 | u32 txq_bmap[2]; | ||
1131 | int txf_id; | ||
1132 | }; | ||
1133 | |||
1134 | struct bna_rx_stats { | ||
1135 | int rx_state; | ||
1136 | int rx_flags; | ||
1137 | int num_rxps; | ||
1138 | int num_rxqs; | ||
1139 | u32 rxq_bmap[2]; | ||
1140 | u32 cq_bmap[2]; | ||
1141 | int rxf_id; | ||
1142 | int rxf_state; | ||
1143 | int rxf_oper_state; | ||
1144 | int num_active_ucast; | ||
1145 | int num_active_mcast; | ||
1146 | int rxmode_active; | ||
1147 | int vlan_filter_status; | ||
1148 | int rss_status; | ||
1149 | int hds_status; | ||
1150 | }; | ||
1151 | |||
1152 | struct bna_sw_stats { | ||
1153 | int device_state; | ||
1154 | int port_state; | ||
1155 | int port_flags; | ||
1156 | int llport_state; | ||
1157 | int priority; | ||
1158 | int num_active_tx; | ||
1159 | int num_active_rx; | ||
1160 | }; | ||
1161 | |||
1162 | struct bna_stats { | 934 | struct bna_stats { |
1163 | struct bna_dma_addr hw_stats_dma; | 935 | struct bna_dma_addr hw_stats_dma; |
1164 | struct bfi_enet_stats *hw_stats_kva; | 936 | struct bfi_enet_stats *hw_stats_kva; |