netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jochen Friedrich <jochen@scram.de>
Cc: netdev@vger.kernel.org
Subject: Re: b53 tags on bpi-r1 (bcm53125)
Date: Tue, 21 Nov 2017 10:04:22 -0800	[thread overview]
Message-ID: <86b7ba4c-e632-f35b-647b-fdba93f2e0ed@gmail.com> (raw)
In-Reply-To: <7c533a63-72e5-de68-99ff-8595492993a8@scram.de>

Hi Jochen,

On 11/21/2017 12:10 AM, Jochen Friedrich wrote:
> Hi Florian,
> 
> 
> i just tested the latest DSA patches for b53 on a bpi-r1 device (net:
> dsa: b53: Turn on Broadcom tags).
> 
> Unfortunately, the bcm53125 does not seem to handle the broadcom tags on
> CPU port although tuned on b53_brcm_hdr_setup(). The tag is still
> visible on a device connected to one of the switch ports.
> 
> I wonder if there is something else necessary to make the chip handle
> the tags or if the chip doesn't support broadcom tags after all. The
> documentation at
> https://sourceforge.net/p/ohvesw/svn/12/tree/document/bcm/53125U-DS02-R.pdf
> doesn't document register 3 in the management page, at all...

I am afraid U stands for unmanaged, which means we may not have any
possibility to enable Broadcom tags on that particular model. And you
are right, I also don't see any Broadcom HDR control register in the
datasheet, only the 53125M and S seem to have that, darn.

Does the following patch help at all (I don't really expect it to)?
Could you also provide me with two piieces of information that could
help detect such a switch model:

- what is the value of the revision register (should be printed along
with BCM53125 during boot)?
- what is the value of page 02, register 3 during b53_switch_detect()? A
managed switch should have this set to 0x3, whereas I would expect an
unmanaged switch to be 0x0

Thanks!

@@ -330,9 +331,9 @@ static void b53_set_forwarding(struct b53_device
*dev, int enable)
        b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt);

        if (enable)
-               mgmt |= SM_SW_FWD_EN;
+               mgmt |= SM_SW_FWD_EN | SM_SW_FWD_MODE;
        else
-               mgmt &= ~SM_SW_FWD_EN;
+               mgmt &= ~(SM_SW_FWD_EN | SM_SW_FWD_MODE);

        b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt);


-- 
Florian

  reply	other threads:[~2017-11-21 18:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21  8:10 b53 tags on bpi-r1 (bcm53125) Jochen Friedrich
2017-11-21 18:04 ` Florian Fainelli [this message]
2017-11-21 22:37   ` scram287
2017-11-21 23:07   ` Jochen Friedrich
2017-11-21 23:20     ` Florian Fainelli
2017-11-23 17:05       ` Jochen Friedrich
2017-11-23 17:18         ` Florian Fainelli
2017-11-23 19:14           ` Jochen Friedrich
2017-12-15  1:55             ` Florian Fainelli
2017-12-18 10:44               ` Jochen Friedrich
2017-12-29 20:21                 ` Florian Fainelli
2017-12-29 21:56                   ` Florian Fainelli
2017-12-30  3:22                     ` Florian Fainelli
2018-01-04  4:49                       ` Florian Fainelli
2018-01-08 16:51                         ` Jochen Friedrich

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=86b7ba4c-e632-f35b-647b-fdba93f2e0ed@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=jochen@scram.de \
    --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).