netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: weinholt@csbnet.se (Göran Weinholt)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org, bugzilla-daemon@bugzilla.kernel.org,
	bugme-daemon@bugzilla.kernel.org,
	Steve Glendinning <steve.glendinning@smsc.com>
Subject: Re: [Bugme-new] [Bug 30092] New: smsc911x.c drops long packets with VLAN tags
Date: Wed, 02 Mar 2011 15:07:21 +0100	[thread overview]
Message-ID: <lnsjv58vl2.fsf@desktop3.csbnet.se> (raw)
In-Reply-To: <20110301161547.13480e90.akpm@linux-foundation.org> (Andrew Morton's message of "Tue, 1 Mar 2011 16:15:47 -0800")

Andrew Morton <akpm@linux-foundation.org> writes:

> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
> On Mon, 28 Feb 2011 15:57:14 GMT
> bugzilla-daemon@bugzilla.kernel.org wrote:
>
>> https://bugzilla.kernel.org/show_bug.cgi?id=30092
>> 
> Thanks.  Become famous, get more girls: send us a patch as per
> Documentation/SubmittingPatches :)

There's a register called VLAN1 that wasn't being configured. Setting it
to 0x8100 fixes the problem I reported. There's also a VLAN2 register,
possibly meant for stacked VLANs, but the description in the datasheet
doesn't make sense to me, and I can't test stacked VLANs, so I'm not
going to change it.

Subject: [PATCH] net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem
From: Göran Weinholt <weinholt@csbnet.se>

The smsc911x driver would drop frames longer than 1518 bytes, which is a
problem for networks with VLAN tagging. The VLAN1 tag register is used
to increase the legal frame size to 1522 when a VLAN tag is identified.

Signed-off-by: Göran Weinholt <weinholt@csbnet.se>
---
diff -uprN linux-2.6.36.4-vanilla/drivers/net/smsc911x.c linux-2.6.36.4/drivers/net/smsc911x.c
--- linux-2.6.36.4-vanilla/drivers/net/smsc911x.c	2011-02-18 00:14:38.000000000 +0100
+++ linux-2.6.36.4/drivers/net/smsc911x.c	2011-03-02 14:29:11.884382251 +0100
@@ -1178,6 +1178,11 @@ static int smsc911x_open(struct net_devi
 	smsc911x_reg_write(pdata, HW_CFG, 0x00050000);
 	smsc911x_reg_write(pdata, AFC_CFG, 0x006E3740);
 
+	/* Increase the legal frame size of VLAN tagged frames to 1522 bytes */
+	spin_lock_irq(&pdata->mac_lock);
+	smsc911x_mac_write(pdata, VLAN1, ETH_P_8021Q);
+	spin_unlock_irq(&pdata->mac_lock);
+
 	/* Make sure EEPROM has finished loading before setting GPIO_CFG */
 	timeout = 50;
 	while ((smsc911x_reg_read(pdata, E2P_CMD) & E2P_CMD_EPC_BUSY_) &&



-- 
Göran Weinholt
Network Administrator
Chalmers Studentbostäder (AS48514)

  reply	other threads:[~2011-03-02 14:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-30092-10286@https.bugzilla.kernel.org/>
2011-03-02  0:15 ` [Bugme-new] [Bug 30092] New: smsc911x.c drops long packets with VLAN tags Andrew Morton
2011-03-02 14:07   ` Göran Weinholt [this message]
2011-03-07 20:31     ` David Miller
2011-03-08 10:27       ` Steve.Glendinning

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=lnsjv58vl2.fsf@desktop3.csbnet.se \
    --to=weinholt@csbnet.se \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steve.glendinning@smsc.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).