From: Tiago Pierezan Camargo <tcamargo@gmail.com>
To: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Subject: Re: Problem with VLANs and via-velocity driver
Date: Thu, 11 Feb 2010 14:50:07 -0200 [thread overview]
Message-ID: <2ab8a3251002110850k2def5137qb791b100145a3bd2@mail.gmail.com> (raw)
In-Reply-To: <4B72E2FC.1060003@trash.net>
Patrick McHardy <kaber <at> trash.net> writes:
> > ...
> >
> > Any suggestions?
>
> This should be fixed in the driver as discussed previously.
Well, the following patch completely disables hw vlan filtering
(against 2.6.31).
--- ../via_kernel_org/via-velocity.c 2010-02-10 11:45:14.000000000 -0200
+++ via-velocity.c 2010-02-11 11:24:37.000000000 -0200
@@ -607,9 +607,10 @@
{
struct mac_regs __iomem * regs = vptr->mac_regs;
- /* Turn on MCFG_PQEN, turn off MCFG_RTGOPT */
- WORD_REG_BITS_SET(MCFG_PQEN, MCFG_RTGOPT, ®s->MCFG);
- WORD_REG_BITS_ON(MCFG_VIDFR, ®s->MCFG);
+ /* Completely disable vlan filtering */
+ WORD_REG_BITS_OFF(MCFG_PQEN, ®s->MCFG);
+ WORD_REG_BITS_OFF(MCFG_VIDFR, ®s->MCFG);
+ WORD_REG_BITS_OFF(MCFG_RTGOPT, ®s->MCFG);
/* Disable all CAMs */
memset(vptr->vCAMmask, 0, sizeof(u8) * 8);
@@ -1406,7 +1407,7 @@
/*
* Don't drop CE or RL error frame although RXOK is off
*/
- if (rd->rdesc0.RSR & (RSR_RXOK | RSR_CE | RSR_RL)) {
+ if (rd->rdesc0.RSR & (RSR_RXOK | RSR_CE | RSR_RL | RSR_VIDM)) {
if (velocity_receive_frame(vptr, rd_curr) < 0)
stats->rx_dropped++;
I know it's not the best solution. I can come up with a better patch
but I'm a bit confused about the expected behavior.
- Should we only disable vlan filtering when promiscuous mode is
enabled? (should we care about hw tag stripping?)
- Should we disable vlan filtering entirely and let the software deal
with it? (this seems to be the semantics implemented in the freebsd
driver)
Suggestions?
Regards,
--
Tiago Pierezan Camargo
tcamargo at gmail dot com
next prev parent reply other threads:[~2010-02-11 16:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 3:32 Problem with VLANs and via-velocity driver Kevin Shanahan
2009-11-13 6:40 ` Patrick McHardy
2009-11-13 10:36 ` Séguier Régis
2009-11-13 11:11 ` Patrick McHardy
2009-11-13 11:40 ` Séguier Régis
2009-11-19 15:17 ` Patrick McHardy
2009-11-16 0:57 ` Kevin Shanahan
2009-11-19 15:18 ` Patrick McHardy
2010-02-10 16:43 ` Tiago Pierezan Camargo
2010-02-10 16:46 ` Patrick McHardy
2010-02-11 16:50 ` Tiago Pierezan Camargo [this message]
2010-02-11 16:59 ` Patrick McHardy
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=2ab8a3251002110850k2def5137qb791b100145a3bd2@mail.gmail.com \
--to=tcamargo@gmail.com \
--cc=kaber@trash.net \
--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).