Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4870742ybi; Tue, 30 Jul 2019 09:33:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv0imh1mh+WbU3IwA12CGuctvrfwsYb7MdbsJQAeP5EY652XhD0SjzvRmqXcbNtYohW/mK X-Received: by 2002:a62:2f06:: with SMTP id v6mr43014428pfv.195.1564504416860; Tue, 30 Jul 2019 09:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564504416; cv=none; d=google.com; s=arc-20160816; b=wh/gzbWSdOYgeWIu8WXT7tsB8tUqoLcYqPfvTd3owSZGB6syhcBx24Ub/Tc/o8xFvv 6p0HtOqLqqnroBK0sxZWMaZIf2cTGN84GCmYL1xVfFj5WdG33jJjatlmdmXaSH+3Hdjy 7Lg3BDyYCpwYVP8FS2OMo07H3EVRMW7q87S5F5jI6PqYMLEgZlNkZkf+KHVc8bGTHpsS JgALmK5RRDrlB8Azf5tCwAqONvT+g9sJiE3zX+thajXpN6KQt9lEgFa70bRYbU161rmc /1UqEKBtMn12ne3mpVCx+o5zYfrd35YX61oUnDMjQOCCpwiIGic15VP2nKBYkPRQJk2o zngQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bMy8+dulgQaBaijk1anMSQXHRDRkHWnBbw4vTm4odwg=; b=pP+KM1miErUMje0l3p9b0U9U2F8fqGfzwLK7nisek003L/bc+KrMg7f6+BRYDdpn7k XU/xs0n11xNN4CDFLnn2QADtDA8b5latPFtHvA4p0KkcnRpXEua64rfLNE1k0y2osTT6 mVG1THnFSbRhcn7WHDPNSeF8ie8uyQ6z/OHrRCIQtvJI9ftymNALBNP8SxhF1gLdm6hU GJsCF/stAamQYfyb7is4xIkuHfPFwUL8VyWMUTPBjIdVzFaFkszcdQ6F7tMSXAGVDVaz 1YSWzJzfYTBfx+oIvUyQacdL9anwiL6Fvp+SvKjeWY9eGc7Dg7ZiE/F+AgTzmRDmbqlU 5Kbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Pyq1/qjp"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u91si9257466plb.243.2019.07.30.09.33.22; Tue, 30 Jul 2019 09:33:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Pyq1/qjp"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729379AbfG3OAp (ORCPT + 99 others); Tue, 30 Jul 2019 10:00:45 -0400 Received: from mail-lf1-f44.google.com ([209.85.167.44]:35853 "EHLO mail-lf1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727323AbfG3OAo (ORCPT ); Tue, 30 Jul 2019 10:00:44 -0400 Received: by mail-lf1-f44.google.com with SMTP id q26so44828250lfc.3; Tue, 30 Jul 2019 07:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bMy8+dulgQaBaijk1anMSQXHRDRkHWnBbw4vTm4odwg=; b=Pyq1/qjpp/VnceAmo91bY/5v35EmOlekZhGI+oMmsRxIqAvoPOD9Yo9OcSVVpWZHEf FMlqCrRAqSHFqN4Z4iSYPrN+f/ZqNM8iF8BXhr0ww6CrQsPfdzmmBSkR7kQD6I9IMXv8 htF1xk2D3gMHeIBwHvfAjSs4ntFv5oY54sHfkucZjV1TESC3ZFlcJJvy+SwMqiFo7WI7 5X87VF5aZLU/nMHMROQ5kcu2yaIR/kj96yVG9ggOS82VIpPeW+Qfh4HdsTN3w9JPBXt7 quVkv+Div03d37lxJwvUbgHTjWRUaHOcEvKxoUGdqZv3wubjk8xv+qf5LKf95RjpyuCU jN/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bMy8+dulgQaBaijk1anMSQXHRDRkHWnBbw4vTm4odwg=; b=O5jNJJ3eTBkPmFD0h5l69icm6IZAPvGzAjv0B3Ah5Vbvw3Uu5N8v1bT2C68jeHidor Tdw/a2F4trFkjU4YZKxGdm79okK9LNxs/nhprLSABJPk0OPi9r2NTCmoCiV1QZwrhY0Q 3ilhBTeqJY8iwXEnQyRjJfAkRZNGqqgYHG6PRYpcactjIGeGLN4BzT7TACIpmR193tOW i0H2u7BuXxtwg8ETmu6YizXn4r/ShbhvYpA3XKQGcEb0FaYHwwUJf8NiS9348uQ1Xexl WiUGS4oMxt2YxUYB8tOGJ0A/lvAgFItDccMuuMKHSSie7NPT9UeflcR2o0Am+F5Te+yQ ZieA== X-Gm-Message-State: APjAAAXi5lqnRzdKkI7q0hLv57F1ZhUOwzqsUYYAAHk7jIVNw1UVo25c IvzQOylZEoQiELUhmpBP4CWq2XC018elfZdQ/tE= X-Received: by 2002:ac2:5382:: with SMTP id g2mr53150361lfh.92.1564495242574; Tue, 30 Jul 2019 07:00:42 -0700 (PDT) MIME-Version: 1.0 References: <20190730100429.32479-1-h.feurstein@gmail.com> <20190730100429.32479-2-h.feurstein@gmail.com> <20190730134924.GH28552@lunn.ch> In-Reply-To: <20190730134924.GH28552@lunn.ch> From: Hubert Feurstein Date: Tue, 30 Jul 2019 16:00:31 +0200 Message-ID: Subject: Re: [PATCH 1/4] net: dsa: mv88e6xxx: add support for MV88E6220 To: Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vivien Didelot , Florian Fainelli , "David S. Miller" , Rasmus Villemoes Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, [...] > Do the registers for the ports exist? Yes, they do and they return sane values. > > + [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) > Would make sense. I'll add it to the next series. > > 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 Hubert