netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan Wu <cooloney@kernel.org>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Graf Yang <graf.yang@analog.com>, Bryan Wu <cooloney@kernel.org>
Subject: [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver
Date: Thu,  8 Jan 2009 00:14:39 +0800	[thread overview]
Message-ID: <1231344879-26069-3-git-send-email-cooloney@kernel.org> (raw)
In-Reply-To: <1231344879-26069-1-git-send-email-cooloney@kernel.org>

From: Graf Yang <graf.yang@analog.com>

Fill EMAC_VLAN1 with 0x8100 to admit 1522 long bytes frames. EMAC_VLAN2
seems need not use for now.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/net/bfin_mac.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 78e31aa..15d7e62 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -517,6 +517,14 @@ void setup_system_regs(struct net_device *dev)
 
 	bfin_write_EMAC_MMC_CTL(RSTC | CROLL);
 
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#define VLAN_ETHER_TYPE 0x8100
+	/* The legal length of the frame is increased to 1522 bytes */
+	bfin_write_EMAC_VLAN1(VLAN_ETHER_TYPE);
+	/* The legal length of the frame is increased to 1538 bytes */
+	/*bfin_write_EMAC_VLAN2(VLAN_ETHER_TYPE);*/
+#endif
+
 	/* Initialize the TX DMA channel registers */
 	bfin_write_DMA2_X_COUNT(0);
 	bfin_write_DMA2_X_MODIFY(4);
-- 
1.5.6


  parent reply	other threads:[~2009-01-07 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 16:14 [PATCH 0/2] Blackfin EMAC driver updates Bryan Wu
2009-01-07 16:14 ` [PATCH 1/2] netdev: bfin_mac: enable bfin_mac net dev driver for BF51x Bryan Wu
2009-01-08 18:52   ` David Miller
2009-01-07 16:14 ` Bryan Wu [this message]
2009-01-08 18:55   ` [PATCH 2/2] netdev: bfin_mac: enable VLAN support in Blackfin MAC driver David Miller
2009-01-08 19:01     ` Mike Frysinger
2009-01-08 19:05       ` Mike Frysinger
2009-01-08 19:30         ` David Miller
2009-01-08 19:34           ` Mike Frysinger
2009-01-08 19:29       ` David Miller

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=1231344879-26069-3-git-send-email-cooloney@kernel.org \
    --to=cooloney@kernel.org \
    --cc=graf.yang@analog.com \
    --cc=jeff@garzik.org \
    --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;
as well as URLs for NNTP newsgroup(s).