All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Fritz <chf.fritz@googlemail.com>
To: Mugunthan V N <mugunthanvnm@ti.com>, Felipe Balbi <balbi@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [BUG?] drivers: net:ethernet: cpsw: add support for VLAN
Date: Thu, 23 Apr 2015 00:28:22 +0200	[thread overview]
Message-ID: <1429741702.29353.28.camel@mars> (raw)

Hi,

 has commit 3b72c2fe0c6bbec42e ("drivers: net:ethernet: cpsw: add
support for VLAN") introduced a bug by defining CPSW_VLAN_AWARE as
BIT(1) instead of BIT(2)?

+#define CPSW_VLAN_AWARE		BIT(1)
<snip>
 	/* switch to vlan unaware mode */
-	cpsw_ale_control_set(priv->ale, 0, ALE_VLAN_AWARE, 0);
+	cpsw_ale_control_set(priv->ale, priv->host_port, ALE_VLAN_AWARE,
+			     CPSW_ALE_VLAN_AWARE);
+	control_reg = readl(&priv->regs->control);
+	control_reg |= CPSW_VLAN_AWARE;
+	writel(control_reg, &priv->regs->control);

See TRM [1] page 1980 (14.5.1.2 CONTROL Register), there bit
CPSW_VLAN_AWARE is number 2.

I didn't do any tests, just stumbled upon.

[1]: http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf

Thanks
 -- Christoph


WARNING: multiple messages have this Message-ID (diff)
From: chf.fritz@googlemail.com (Christoph Fritz)
To: linux-arm-kernel@lists.infradead.org
Subject: [BUG?] drivers: net:ethernet: cpsw: add support for VLAN
Date: Thu, 23 Apr 2015 00:28:22 +0200	[thread overview]
Message-ID: <1429741702.29353.28.camel@mars> (raw)

Hi,

 has commit 3b72c2fe0c6bbec42e ("drivers: net:ethernet: cpsw: add
support for VLAN") introduced a bug by defining CPSW_VLAN_AWARE as
BIT(1) instead of BIT(2)?

+#define CPSW_VLAN_AWARE		BIT(1)
<snip>
 	/* switch to vlan unaware mode */
-	cpsw_ale_control_set(priv->ale, 0, ALE_VLAN_AWARE, 0);
+	cpsw_ale_control_set(priv->ale, priv->host_port, ALE_VLAN_AWARE,
+			     CPSW_ALE_VLAN_AWARE);
+	control_reg = readl(&priv->regs->control);
+	control_reg |= CPSW_VLAN_AWARE;
+	writel(control_reg, &priv->regs->control);

See TRM [1] page 1980 (14.5.1.2 CONTROL Register), there bit
CPSW_VLAN_AWARE is number 2.

I didn't do any tests, just stumbled upon.

[1]: http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf

Thanks
 -- Christoph

             reply	other threads:[~2015-04-22 22:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 22:28 Christoph Fritz [this message]
2015-04-22 22:28 ` [BUG?] drivers: net:ethernet: cpsw: add support for VLAN Christoph Fritz
2015-04-24  5:57 ` Mugunthan V N
2015-04-24  5:57   ` Mugunthan V N

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=1429741702.29353.28.camel@mars \
    --to=chf.fritz@googlemail.com \
    --cc=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mugunthanvnm@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.