netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: netdev@vger.kernel.org
Cc: rasesh.mody@qlogic.com, joe@perches.com
Subject: [PATCH net-next v2 11/19] bna: remove paused from bna_rx_config and flags from bna_rxf
Date: Thu, 11 Jun 2015 15:52:23 +0200	[thread overview]
Message-ID: <1434030751-28835-12-git-send-email-ivecera@redhat.com> (raw)
In-Reply-To: <1434030751-28835-1-git-send-email-ivecera@redhat.com>

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.
---
 drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 36 +---------------------------
 drivers/net/ethernet/brocade/bna/bna_types.h |  6 -----
 2 files changed, 1 insertion(+), 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 ccf48a1..896aa82 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,
 
 bfa_fsm_state_decl(bna_rxf, stopped, struct bna_rxf,
 			enum bna_rxf_event);
-bfa_fsm_state_decl(bna_rxf, paused, struct bna_rxf,
-			enum bna_rxf_event);
 bfa_fsm_state_decl(bna_rxf, cfg_wait, struct bna_rxf,
 			enum bna_rxf_event);
 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)
 {
 	switch (event) {
 	case RXF_E_START:
-		if (rxf->flags & BNA_RXF_F_PAUSED) {
-			bfa_fsm_set_state(rxf, bna_rxf_sm_paused);
-			call_rxf_start_cbfn(rxf);
-		} else
-			bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait);
+		bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait);
 		break;
 
 	case RXF_E_STOP:
@@ -104,29 +98,6 @@ bna_rxf_sm_stopped(struct bna_rxf *rxf, enum bna_rxf_event event)
 }
 
 static void
-bna_rxf_sm_paused_entry(struct bna_rxf *rxf)
-{
-}
-
-static void
-bna_rxf_sm_paused(struct bna_rxf *rxf, enum bna_rxf_event event)
-{
-	switch (event) {
-	case RXF_E_STOP:
-	case RXF_E_FAIL:
-		bfa_fsm_set_state(rxf, bna_rxf_sm_stopped);
-		break;
-
-	case RXF_E_CONFIG:
-		call_rxf_cam_fltr_cbfn(rxf);
-		break;
-
-	default:
-		bfa_sm_fault(event);
-	}
-}
-
-static void
 bna_rxf_sm_cfg_wait_entry(struct bna_rxf *rxf)
 {
 	if (!bna_rxf_cfg_apply(rxf)) {
@@ -679,9 +650,6 @@ bna_rxf_init(struct bna_rxf *rxf,
 	INIT_LIST_HEAD(&rxf->mcast_active_q);
 	INIT_LIST_HEAD(&rxf->mcast_handle_q);
 
-	if (q_config->paused)
-		rxf->flags |= BNA_RXF_F_PAUSED;
-
 	rxf->rit = (u8 *)
 		res_info[BNA_RX_RES_MEM_T_RIT].res_u.mem_info.mdl[0].kva;
 	bna_rit_init(rxf, q_config->num_paths);
@@ -742,8 +710,6 @@ bna_rxf_uninit(struct bna_rxf *rxf)
 	rxf->rss_pending = 0;
 	rxf->vlan_strip_pending = false;
 
-	rxf->flags = 0;
-
 	rxf->rx = NULL;
 }
 
diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h
index e56f650..134abf7 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 {
 	BNA_RX_MOD_F_ENET_LOOPBACK	= 2,
 };
 
-enum bna_rxf_flags {
-	BNA_RXF_F_PAUSED		= 1,
-};
-
 enum bna_rxf_event {
 	RXF_E_START			= 1,
 	RXF_E_STOP			= 2,
@@ -668,7 +664,6 @@ struct bna_rx_config {
 	enum bna_rx_type rx_type;
 	int			num_paths;
 	enum bna_rxp_type rxp_type;
-	int			paused;
 	int			coalescing_timeo;
 	/*
 	 * Small/Large (or Header/Data) buffer size to be configured
@@ -713,7 +708,6 @@ struct bna_rxp {
 /* RxF structure (hardware Rx Function) */
 struct bna_rxf {
 	bfa_fsm_t		fsm;
-	enum bna_rxf_flags flags;
 
 	struct bfa_msgq_cmd_entry msgq_cmd;
 	union {
-- 
2.3.6

  parent reply	other threads:[~2015-06-11 13:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 13:52 [PATCH net-next v2 00/19] bna: clean-up Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 01/19] bna: use ether_addr_copy instead of memcpy Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 02/19] bna: get rid of mac_t Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 03/19] bna: replace pragma(pack) with attribute __packed Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 04/19] bna: get rid of duplicate and unused macros Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 05/19] bna: use BIT(x) instead of (1 << x) Ivan Vecera
2015-06-12 13:30   ` David Laight
2015-06-16  8:43     ` Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 06/19] bna: remove unused cbfn parameter Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 07/19] bna: remove pause_cbfn from struct bna_enet Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 08/19] bna: remove oper_state_cbfn from struct bna_rxf Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 09/19] bna: remove prio_change_cbfn oper_state_cbfn from struct bna_tx Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 10/19] bna: remove RXF_E_PAUSE and RXF_E_RESUME events Ivan Vecera
2015-06-11 13:52 ` Ivan Vecera [this message]
2015-06-11 13:52 ` [PATCH net-next v2 12/19] bna: remove TX_E_PRIO_CHANGE event and BNA_TX_F_PRIO_CHANGED flag Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 13/19] bna: correct comparisons/assignments to bool Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 14/19] bna: use memdup_user to copy userspace buffers Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 15/19] bna: remove useless pointer assignment Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 16/19] bna: get rid of private macros for manipulation with lists Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 17/19] bna: use list_for_each_entry where appropriate Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 18/19] bna: fix timeout API argument type Ivan Vecera
2015-06-11 13:52 ` [PATCH net-next v2 19/19] bna: use netdev_* and dev_* instead of printk and pr_* Ivan Vecera
2015-06-11 22:57 ` [PATCH net-next v2 00/19] bna: clean-up David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434030751-28835-12-git-send-email-ivecera@redhat.com \
    --to=ivecera@redhat.com \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=rasesh.mody@qlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).