linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Hubert Feurstein <h.feurstein@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Subject: Re: [PATCH 1/4] net: dsa: mv88e6xxx: add support for MV88E6220
Date: Tue, 30 Jul 2019 15:49:24 +0200	[thread overview]
Message-ID: <20190730134924.GH28552@lunn.ch> (raw)
In-Reply-To: <20190730100429.32479-2-h.feurstein@gmail.com>

On Tue, Jul 30, 2019 at 12:04:26PM +0200, Hubert Feurstein wrote:
> The MV88E6220 is almost the same as MV88E6250 except that the ports 2-4 are
> not routed to pins. So the usable ports are 0, 1, 5 and 6.

Hi Hubert

Do the registers for the ports exist?

> +	[MV88E6220] = {
> +		.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6220,
> +		.family = MV88E6XXX_FAMILY_6250,
> +		.name = "Marvell 88E6220",
> +		.num_databases = 64,
> +
> +		/* Ports 2-4 are not routed to pins
> +		 * => usable ports 0, 1, 5, 6
> +		 */
> +		.num_ports = 7,

I'm wondering if we should add something like

		.invalid_port_mask = BIT(2) | BIT(3) | BIT(4)


and

        /* Setup Switch Port Registers */
        for (i = 0; i < mv88e6xxx_num_ports(chip); i++) {
+		if (chip->info->invalid_port_mask & BIT(i) &&
+		    !dsa_is_unused_port(ds, i))
+		    return -EINVAL;
                if (dsa_is_unused_port(ds, i)) {
                        err = mv88e6xxx_port_set_state(chip, i,
                                                       BR_STATE_DISABLED);
  
	Andrew

  parent reply	other threads:[~2019-07-30 13:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 10:04 [PATCH 0/4] net: dsa: mv88e6xxx: add support for MV88E6220 Hubert Feurstein
2019-07-30 10:04 ` [PATCH 1/4] " Hubert Feurstein
2019-07-30 13:36   ` Andrew Lunn
2019-07-30 13:49   ` Andrew Lunn [this message]
2019-07-30 14:00     ` Hubert Feurstein
2019-07-30 10:04 ` [PATCH 2/4] dt-bindings: net: dsa: marvell: add 6220 model to the 6250 family Hubert Feurstein
2019-07-30 13:37   ` Andrew Lunn
2019-07-30 10:04 ` [PATCH 3/4] net: dsa: mv88e6xxx: setup message port is not supported in " Hubert Feurstein
2019-07-30 13:40   ` Andrew Lunn
2019-07-30 10:04 ` [PATCH 4/4] net: dsa: mv88e6xxx: add PTP support for MV88E6250 family Hubert Feurstein
2019-07-30 13:58   ` Andrew Lunn
2019-07-30 16:00   ` Richard Cochran
2019-07-30 16:20     ` Hubert Feurstein
2019-07-30 17:12       ` Richard Cochran
2019-07-30 20:46         ` Vladimir Oltean
2019-07-31  4:30           ` Richard Cochran
2019-07-30 14:03 ` [PATCH 0/4] net: dsa: mv88e6xxx: add support for MV88E6220 Andrew Lunn

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=20190730134924.GH28552@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=h.feurstein@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=vivien.didelot@gmail.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).