Netdev List
 help / color / mirror / Atom feed
From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org,
	Len Sorensen <lsorense@csclub.uwaterloo.ca>
Subject: ucc_geth doesn't work properly with vlans enabled.
Date: Fri, 27 Nov 2009 10:08:26 -0500	[thread overview]
Message-ID: <20091127150826.GA13458@caffeine.csclub.uwaterloo.ca> (raw)

We just started using vlans on our powerpc platform, and we noticed that
we were getting dropped packets when using the vlan interfaces.
After a bit of debuging it turned out that dropping the MUT on the
client machine to 1496 made the problem go away, which was of course
also very suspicious.

So looking through the driver I found the max packet length is set to 1518
which of course is the right size for a 1500byte packet as long as it is
not vlan tagged.  The UCC happens to have support for recognizing vlan
tagged packets and dynamically increasing the allowed size in the vlan
tagged case by 4 bytes which is great if it works.  Well it turns out,
that feature works, but isn't actually enabled in the driver.  The code
to handle activating it is there, but there is no code anywhere to ever
set that parameter.

Specifically:

        if (ug_info->dynamicMaxFrameLength)
                remoder |= REMODER_DYNAMIC_MAX_FRAME_LENGTH;

This code works fine, but ug_info->dynamicMaxFrameLength is never touched
anywhere other than being memset to 0 initially as part of the struct.

So a simple hack of:

        if (ug_info->dynamicMaxFrameLength || 1)
                remoder |= REMODER_DYNAMIC_MAX_FRAME_LENGTH;

makes it work perfectly with vlans, but is obviously not the right way
to solve this.

What would be the right way to solve this?  What was the intent here I
wonder when it was written?  Certainly the current behaviour means vlans
can't be used on this driver.

-- 
Len Sorensen

                 reply	other threads:[~2009-11-27 15:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20091127150826.GA13458@caffeine.csclub.uwaterloo.ca \
    --to=lsorense@csclub.uwaterloo.ca \
    --cc=avorontsov@ru.mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --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