netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rasesh Mody <rmody@brocade.com>
To: <netdev@vger.kernel.org>
Cc: <huangj@brocade.com>, Rasesh Mody <rmody@brocade.com>,
	Debashis Dutt <ddutt@brocade.com>
Subject: [PATCH 04/10] bna: Enable pure priority tagged packet reception and rxf uninit cleanup fix
Date: Thu, 23 Dec 2010 23:45:04 -0800	[thread overview]
Message-ID: <1293176710-21335-5-git-send-email-rmody@brocade.com> (raw)
In-Reply-To: <1293176710-21335-1-git-send-email-rmody@brocade.com>

Change Details:
	- Enable reception of pure priority tagged packets by default by
	turning on VLAN Id = 0
	- Clear the promiscuous mode, all multicast mode flags when
	bna_rxf_uninit is called

Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
 drivers/net/bna/bna_txrx.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bna/bna_txrx.c b/drivers/net/bna/bna_txrx.c
index fb6cf1f..5076618 100644
--- a/drivers/net/bna/bna_txrx.c
+++ b/drivers/net/bna/bna_txrx.c
@@ -1441,12 +1441,16 @@ bna_rxf_init(struct bna_rxf *rxf,
 	memset(rxf->vlan_filter_table, 0,
 			(sizeof(u32) * ((BFI_MAX_VLAN + 1) / 32)));
 
+	/* Set up VLAN 0 for pure priority tagged packets */
+	rxf->vlan_filter_table[0] |= 1;
+
 	bfa_fsm_set_state(rxf, bna_rxf_sm_stopped);
 }
 
 static void
 bna_rxf_uninit(struct bna_rxf *rxf)
 {
+	struct bna *bna = rxf->rx->bna;
 	struct bna_mac *mac;
 
 	bna_rit_mod_seg_put(&rxf->rx->bna->rit_mod, rxf->rit_segment);
@@ -1473,6 +1477,27 @@ bna_rxf_uninit(struct bna_rxf *rxf)
 		bna_mcam_mod_mac_put(&rxf->rx->bna->mcam_mod, mac);
 	}
 
+	/* Turn off pending promisc mode */
+	if (is_promisc_enable(rxf->rxmode_pending,
+				rxf->rxmode_pending_bitmask)) {
+		/* system promisc state should be pending */
+		BUG_ON(!(bna->rxf_promisc_id == rxf->rxf_id));
+		promisc_inactive(rxf->rxmode_pending,
+				rxf->rxmode_pending_bitmask);
+		 bna->rxf_promisc_id = BFI_MAX_RXF;
+	}
+	/* Promisc mode should not be active */
+	BUG_ON(rxf->rxmode_active & BNA_RXMODE_PROMISC);
+
+	/* Turn off pending all-multi mode */
+	if (is_allmulti_enable(rxf->rxmode_pending,
+				rxf->rxmode_pending_bitmask)) {
+		allmulti_inactive(rxf->rxmode_pending,
+				rxf->rxmode_pending_bitmask);
+	}
+	/* Allmulti mode should not be active */
+	BUG_ON(rxf->rxmode_active & BNA_RXMODE_ALLMULTI);
+
 	rxf->rx = NULL;
 }
 
-- 
1.7.1


  parent reply	other threads:[~2010-12-24  7:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-24  7:45 [PATCH 00/10] bna: Update Brocade BNA Ethernet driver to v2.3.2.3 Rasesh Mody
2010-12-24  7:45 ` [PATCH 01/10] bna: TxRx and datapath fix Rasesh Mody
2010-12-24  7:45 ` [PATCH 02/10] bna: Port enable disable sync and txq priority fix Rasesh Mody
2010-12-24  7:45 ` [PATCH 03/10] bna: Fix ethtool register dump and reordered an API Rasesh Mody
2010-12-24  7:45 ` Rasesh Mody [this message]
2010-12-24  7:45 ` [PATCH 05/10] bna: Fix for TX queue Rasesh Mody
2010-12-24  7:45 ` [PATCH 06/10] bna: IOC uninit check and misc cleanup Rasesh Mody
2010-12-24  7:45 ` [PATCH 07/10] bna: Removed unused code Rasesh Mody
2010-12-24  7:45 ` [PATCH 08/10] bna: Restore VLAN filter table Rasesh Mody
2010-12-24  7:45 ` [PATCH 09/10] bna: IOC failure auto recovery fix Rasesh Mody
2010-12-24  7:45 ` [PATCH 10/10] bna: Update the driver version to 2.3.2.3 Rasesh Mody
  -- strict thread matches above, loose matches on Subject: below --
2010-12-22  7:23 [PATCH 00/10] bna: Update Brocade BNA Ethernet driver to v2.3.2.3 Rasesh Mody
2010-12-22  7:23 ` [PATCH 04/10] bna: Enable pure priority tagged packet reception and rxf uninit cleanup fix Rasesh Mody

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=1293176710-21335-5-git-send-email-rmody@brocade.com \
    --to=rmody@brocade.com \
    --cc=ddutt@brocade.com \
    --cc=huangj@brocade.com \
    --cc=netdev@vger.kernel.org \
    /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).