netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@linux.vnet.ibm.com>
To: ram.vepa@neterion.com, santosh.rastapur@neterion.com,
	sivakumar.subramani@neterion.com, sreenivasa.honnur@neterion.com
Cc: jeff@garzik.org, Jay Vosburgh <fubar@us.ibm.com>,
	netdev <netdev@vger.kernel.org>, Lorandi <rafaello@br.ibm.com>
Subject: [PATCH 1/1 net-2.6] s2io: enabling VLAN tag stripping at driver initialization
Date: Thu, 04 Sep 2008 14:46:03 -0300	[thread overview]
Message-ID: <48C01EDB.7020001@linux.vnet.ibm.com> (raw)

Actually s2io has a bug in VLAN support. VLAN doesn't work except if
you'd opened the interface in promiscuous mode before. 
This happens because VLAN tag stripping is not enable by default (when
the device is loaded). It is only enabled when the device leaves
promiscuous mode.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

---

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index a2b0730..e656c80 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -8206,6 +8206,14 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
 	/* Initialize device name */
 	sprintf(sp->name, "%s Neterion %s", dev->name, sp->product_name);
 
+	/* Initialize VLAN tag strip */
+	if (vlan_tag_strip) {
+		val64 = readq(&bar0->rx_pa_cfg);
+		val64 |= RX_PA_CFG_STRIP_VLAN_TAG;
+		writeq(val64, &bar0->rx_pa_cfg);
+		vlan_strip_flag = 1;
+	}
+
 	/*
 	 * Make Link state as off at this point, when the Link change
 	 * interrupt comes the state will be automatically changed to

             reply	other threads:[~2008-09-04 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04 17:46 Breno Leitao [this message]
2008-09-04 19:10 ` [PATCH 1/1 net-2.6] s2io: enabling VLAN tag stripping at driver initialization Ramkrishna Vepa
2008-09-04 20:52   ` Breno Leitao
2008-09-04 21:00     ` Ramkrishna Vepa
2008-09-13 20:26     ` Jeff Garzik

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=48C01EDB.7020001@linux.vnet.ibm.com \
    --to=leitao@linux.vnet.ibm.com \
    --cc=fubar@us.ibm.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=rafaello@br.ibm.com \
    --cc=ram.vepa@neterion.com \
    --cc=santosh.rastapur@neterion.com \
    --cc=sivakumar.subramani@neterion.com \
    --cc=sreenivasa.honnur@neterion.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).