diff options
author | Ivan Vecera <ivecera@redhat.com> | 2015-06-11 09:52:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-11 18:57:16 -0400 |
commit | d7548e6725656d007798b78676bc1d863a89583c (patch) | |
tree | 365a950fa10394976635d56292861cf28d96d2b4 /drivers/net/ethernet/brocade | |
parent | 82362d73b04cc440a5d6d23cc79ce63df321e0f4 (diff) |
bna: remove paused from bna_rx_config and flags from bna_rxf
The bna_rx_config struct member paused can be removed as it is never
written and as it cannot have non-zero value the bna_rxf struct member
flags also cannot have BNA_RXF_F_PAUSED value and is always zero.
So the flags member can be removed as well as bna_rxf_flags enum and
the code-paths that needs to have non-zero bna_rxf->flags.
This clean-up makes bna_rxf_sm_paused state unsed and can be also removed.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 36 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bna_types.h | 6 |
2 files changed, 1 insertions, 41 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c index ccf48a1956a1..896aa8287a66 100644 --- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c +++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c | |||
@@ -59,8 +59,6 @@ static int bna_rxf_allmulti_cfg_reset(struct bna_rxf *rxf, | |||
59 | 59 | ||
60 | bfa_fsm_state_decl(bna_rxf, stopped, struct bna_rxf, | 60 | bfa_fsm_state_decl(bna_rxf, stopped, struct bna_rxf, |
61 | enum bna_rxf_event); | 61 | enum bna_rxf_event); |
62 | bfa_fsm_state_decl(bna_rxf, paused, struct bna_rxf, | ||
63 | enum bna_rxf_event); | ||
64 | bfa_fsm_state_decl(bna_rxf, cfg_wait, struct bna_rxf, | 62 | bfa_fsm_state_decl(bna_rxf, cfg_wait, struct bna_rxf, |
65 | enum bna_rxf_event); | 63 | enum bna_rxf_event); |
66 | bfa_fsm_state_decl(bna_rxf, started, struct bna_rxf, | 64 | bfa_fsm_state_decl(bna_rxf, started, struct bna_rxf, |
@@ -79,11 +77,7 @@ bna_rxf_sm_stopped(struct bna_rxf *rxf, enum bna_rxf_event event) | |||
79 | { | 77 | { |
80 | switch (event) { | 78 | switch (event) { |
81 | case RXF_E_START: | 79 | case RXF_E_START: |
82 | if (rxf->flags & BNA_RXF_F_PAUSED) { | 80 | bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); |
83 | bfa_fsm_set_state(rxf, bna_rxf_sm_paused); | ||
84 | call_rxf_start_cbfn(rxf); | ||
85 | } else | ||
86 | bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); | ||
87 | break; | 81 | break; |
88 | 82 | ||
89 | case RXF_E_STOP: | 83 | case RXF_E_STOP: |
@@ -104,29 +98,6 @@ bna_rxf_sm_stopped(struct bna_rxf *rxf, enum bna_rxf_event event) | |||
104 | } | 98 | } |
105 | 99 | ||
106 | static void | 100 | static void |
107 | bna_rxf_sm_paused_entry(struct bna_rxf *rxf) | ||
108 | { | ||
109 | } | ||
110 | |||
111 | static void | ||
112 | bna_rxf_sm_paused(struct bna_rxf *rxf, enum bna_rxf_event event) | ||
113 | { | ||
114 | switch (event) { | ||
115 | case RXF_E_STOP: | ||
116 | case RXF_E_FAIL: | ||
117 | bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); | ||
118 | break; | ||
119 | |||
120 | case RXF_E_CONFIG: | ||
121 | call_rxf_cam_fltr_cbfn(rxf); | ||
122 | break; | ||
123 | |||
124 | default: | ||
125 | bfa_sm_fault(event); | ||
126 | } | ||
127 | } | ||
128 | |||
129 | static void | ||
130 | bna_rxf_sm_cfg_wait_entry(struct bna_rxf *rxf) | 101 | bna_rxf_sm_cfg_wait_entry(struct bna_rxf *rxf) |
131 | { | 102 | { |
132 | if (!bna_rxf_cfg_apply(rxf)) { | 103 | if (!bna_rxf_cfg_apply(rxf)) { |
@@ -679,9 +650,6 @@ bna_rxf_init(struct bna_rxf *rxf, | |||
679 | INIT_LIST_HEAD(&rxf->mcast_active_q); | 650 | INIT_LIST_HEAD(&rxf->mcast_active_q); |
680 | INIT_LIST_HEAD(&rxf->mcast_handle_q); | 651 | INIT_LIST_HEAD(&rxf->mcast_handle_q); |
681 | 652 | ||
682 | if (q_config->paused) | ||
683 | rxf->flags |= BNA_RXF_F_PAUSED; | ||
684 | |||
685 | rxf->rit = (u8 *) | 653 | rxf->rit = (u8 *) |
686 | res_info[BNA_RX_RES_MEM_T_RIT].res_u.mem_info.mdl[0].kva; | 654 | res_info[BNA_RX_RES_MEM_T_RIT].res_u.mem_info.mdl[0].kva; |
687 | bna_rit_init(rxf, q_config->num_paths); | 655 | bna_rit_init(rxf, q_config->num_paths); |
@@ -742,8 +710,6 @@ bna_rxf_uninit(struct bna_rxf *rxf) | |||
742 | rxf->rss_pending = 0; | 710 | rxf->rss_pending = 0; |
743 | rxf->vlan_strip_pending = false; | 711 | rxf->vlan_strip_pending = false; |
744 | 712 | ||
745 | rxf->flags = 0; | ||
746 | |||
747 | rxf->rx = NULL; | 713 | rxf->rx = NULL; |
748 | } | 714 | } |
749 | 715 | ||
diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h index e56f6503e37d..134abf7f7681 100644 --- a/drivers/net/ethernet/brocade/bna/bna_types.h +++ b/drivers/net/ethernet/brocade/bna/bna_types.h | |||
@@ -182,10 +182,6 @@ enum bna_rx_mod_flags { | |||
182 | BNA_RX_MOD_F_ENET_LOOPBACK = 2, | 182 | BNA_RX_MOD_F_ENET_LOOPBACK = 2, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | enum bna_rxf_flags { | ||
186 | BNA_RXF_F_PAUSED = 1, | ||
187 | }; | ||
188 | |||
189 | enum bna_rxf_event { | 185 | enum bna_rxf_event { |
190 | RXF_E_START = 1, | 186 | RXF_E_START = 1, |
191 | RXF_E_STOP = 2, | 187 | RXF_E_STOP = 2, |
@@ -668,7 +664,6 @@ struct bna_rx_config { | |||
668 | enum bna_rx_type rx_type; | 664 | enum bna_rx_type rx_type; |
669 | int num_paths; | 665 | int num_paths; |
670 | enum bna_rxp_type rxp_type; | 666 | enum bna_rxp_type rxp_type; |
671 | int paused; | ||
672 | int coalescing_timeo; | 667 | int coalescing_timeo; |
673 | /* | 668 | /* |
674 | * Small/Large (or Header/Data) buffer size to be configured | 669 | * Small/Large (or Header/Data) buffer size to be configured |
@@ -713,7 +708,6 @@ struct bna_rxp { | |||
713 | /* RxF structure (hardware Rx Function) */ | 708 | /* RxF structure (hardware Rx Function) */ |
714 | struct bna_rxf { | 709 | struct bna_rxf { |
715 | bfa_fsm_t fsm; | 710 | bfa_fsm_t fsm; |
716 | enum bna_rxf_flags flags; | ||
717 | 711 | ||
718 | struct bfa_msgq_cmd_entry msgq_cmd; | 712 | struct bfa_msgq_cmd_entry msgq_cmd; |
719 | union { | 713 | union { |