Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4918399ybi; Tue, 30 Jul 2019 10:24:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoIofTvHPxI40ixhbS/d2r9U2ZgLObPWGmWfJqOm+MPbuwWL/Q0YCnKoMFpSWLhL3KcJUj X-Received: by 2002:a17:90a:ac14:: with SMTP id o20mr119565095pjq.114.1564507491208; Tue, 30 Jul 2019 10:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564507491; cv=none; d=google.com; s=arc-20160816; b=WvYmpSFFLkOicZFqxErgalADcL9nCAPRRTC9iBmnEJ74+M0HXLICunImpF0elHiWVN eq5CCwS6UsKTLglazvGUGy47sCrt5G8Y9DFrfagW1Qw6CQqGcduO1wxnYpVfU23kI2Gl iM/oDa75Qtf2mYKIeUfbvJynPFFU1NvHmHmS0rAiE+JVkGyBXHY3/JZY6IuT5oC2Rfrq ay4o26SADx6z0F+d7JyGyHAYGwT8WZRPRj8MB/narZ/4b0+hCKIXSyHACCACPjPN8aIb gFcd1hZySQ4Ly4U+UNbc0J7CmQNt+A9OVwaiCrlRVoxS8J4sMuLy1KdjKLjPs76ifp2u Rm9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=z6G1T+G+Sh+UZiHP63MYhPyDhXCWooN/11V93iSPTqI=; b=rLiJQGoAKppfdaNG8jArIQ2fmpILHCfYntmDC/3DvJ6AdQvmnj4NL5VNi/87r9r80A bvmOWocRj72O76i/1yEzkLdZue3sUqHBR8bPOansibHRQ+0A/IX8K0MWLVlVwkHjSLPO VLARLR5/PvsNlpDxx3zkCJpN6JPXcPqIbmmj3Vu0/HcYkQDVeK2k5MECGBCvt2caYvrk YLivnrlzDltPH3USA8MozWZ53heuGzeuD7WXecwSSB33OCgxZQPjYCSLiM3rwxcEi07h 3tci57SY9Pa9/DiF7cqCgiBEk5DbEtPjMEpOlwbWznlLvsgy9Zd+YMolPPswKyvB/5/i rARg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=2Wk25Jui; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59si27544974plb.107.2019.07.30.10.24.35; Tue, 30 Jul 2019 10:24:51 -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=fail header.i=@lunn.ch header.s=20171124 header.b=2Wk25Jui; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727329AbfG3Nt1 (ORCPT + 99 others); Tue, 30 Jul 2019 09:49:27 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:47744 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbfG3Nt0 (ORCPT ); Tue, 30 Jul 2019 09:49:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=z6G1T+G+Sh+UZiHP63MYhPyDhXCWooN/11V93iSPTqI=; b=2Wk25JuibETR1EL8M7VecZlEQi czkPicuRevafjQcQ4Kx/zJkF9BY4H6Eh/Vb6YG+9HbTjOogmyiG1AJjwd4L7EdyayqKIkZJwKFD+7 /qlV5d4f5HT5IaamQMzBKUUhdKy08aBgnIGCNyQqhNkWX6qQLqOMMcDPUvnSRz8zdOIM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hsSVI-0007t8-Nc; Tue, 30 Jul 2019 15:49:24 +0200 Date: Tue, 30 Jul 2019 15:49:24 +0200 From: Andrew Lunn To: Hubert Feurstein Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vivien Didelot , Florian Fainelli , "David S. Miller" , Rasmus Villemoes Subject: Re: [PATCH 1/4] net: dsa: mv88e6xxx: add support for MV88E6220 Message-ID: <20190730134924.GH28552@lunn.ch> References: <20190730100429.32479-1-h.feurstein@gmail.com> <20190730100429.32479-2-h.feurstein@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190730100429.32479-2-h.feurstein@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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