Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2448996pxb; Fri, 29 Oct 2021 01:24:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCaiYSTIzwsBanQHawQEA1N647Ok1kiBarGQj7HKGVLBvRUx4TUYBZ7V7BW6dZ6psO+zlC X-Received: by 2002:a17:906:af72:: with SMTP id os18mr12006415ejb.331.1635495849522; Fri, 29 Oct 2021 01:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635495849; cv=none; d=google.com; s=arc-20160816; b=qDxtFzLh18iBJp0kaanfapjSH2kAMbTIj0FbgSxUcKnCjUCiMdVfC3ovgHcahtaYDb qnq7JcIk1LtJEYCJvWMTU8n/umWxHzTSJXjx3+3xiY2WqOqcwx4obaF2H+1HFEnLXJTq q5x8ErOneUGk7aTDicZQOVXxwXYoiG4J5dkZx6aemWEvEKEDSlOkEfu1UAGObuWsIlne bv7o5YG0eW6o6JqysLnAMQuqoPpYMe+prqdcwCFmD16YosxWY5RVauISx0j51xKWVGa2 PyqsUPL0HOMm5ooUAAuSHoBrlfwc4SXDXk06D5E/3Mc7hn3VhmkZAjQYs13CfUiPaf7x cDAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=R+jZXij5/Xk2QpRoQVNw9PyvFwMYQKCNbuQ5IodArJs=; b=VIN5Ms/k0l2cG4+cklpqYokJHF0jeRP7n1wYuokdvxqCp8InWtSKb0PFpNXnnH6i/N 69gmRUVxmkaMCx2zeQ67aDPfexBRsB4JPyAEIjW4UacmHNM6ukyNBmnaXf4oWpnI+bPE KKWPUe13aTPVKFzkYpGYbN/lvoIo42Okcexl+9Vvzv2tTeucg1EGGDW5Y/D45WiB6GtE vcZ26VkFjXffwd7X4qfJOpQh3hSz8jEyiaxKNLLJqGDegxcqOdiJtFmj0JlUpWk1yFBJ rKPP6lxNuWFU7rUIDI1J48kACMB/g2SLbJaAIYjd3uFfdP8LIq/y4QKbxm10z0ABhkI0 zqRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="nn/grtlZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq3si13321026ejc.142.2021.10.29.01.23.26; Fri, 29 Oct 2021 01:24:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="nn/grtlZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232443AbhJ2IYK (ORCPT + 99 others); Fri, 29 Oct 2021 04:24:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232433AbhJ2IYI (ORCPT ); Fri, 29 Oct 2021 04:24:08 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 085EEC061570; Fri, 29 Oct 2021 01:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: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=R+jZXij5/Xk2QpRoQVNw9PyvFwMYQKCNbuQ5IodArJs=; b=nn/grtlZsdiZ92/B5exkDezvj+ VL5sSPnLJWNGAmDVwis600h9Ro4QmOFsZBafp8VhMtPKVnscZeVkSZrYgpPh8sHIvGf8Jngfp//1L QTOqH2Tkif94bqxKVJaR9u+IpFGNRIrD84YAk76LQcaIwmFisyhMHBl849Bu5GIkrIJicw245G5Hk 32O3Z/edQ76y09Gt8vpP/2qfD8yuePIx6YXssIBBSNCrVWaJp+6XVWHFPou3IEUq7EX5CG52hFaa6 ZbZF7G+ZMv4TOc5cFxMUdol5OGRtlCjN1Xv4ooCDjnNA0cjkQdLZWU9NulqW1I0+sSXB2aiOMrS7l SnxZHdrg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55374) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mgN8q-0008Oe-6Y; Fri, 29 Oct 2021 09:21:37 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mgN8p-0001So-6W; Fri, 29 Oct 2021 09:21:35 +0100 Date: Fri, 29 Oct 2021 09:21:35 +0100 From: "Russell King (Oracle)" To: Prasanna Vengateshan Cc: andrew@lunn.ch, netdev@vger.kernel.org, olteanv@gmail.com, robh+dt@kernel.org, UNGLinuxDriver@microchip.com, Woojung.Huh@microchip.com, hkallweit1@gmail.com, davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org, vivien.didelot@gmail.com, f.fainelli@gmail.com, devicetree@vger.kernel.org Subject: Re: [PATCH v6 net-next 06/10] net: dsa: microchip: add support for phylink management Message-ID: References: <20211029052256.144739-1-prasanna.vengateshan@microchip.com> <20211029052256.144739-7-prasanna.vengateshan@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211029052256.144739-7-prasanna.vengateshan@microchip.com> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Sorry for missing this. The use of bitmap_foo() seems to have not been commented on, which are now unnecessary as linkmode_foo() helpers were added in b31cdffa2329 ("net: phy: Move linkmode helpers to somewhere public"). On Fri, Oct 29, 2021 at 10:52:52AM +0530, Prasanna Vengateshan wrote: > +static void lan937x_phylink_validate(struct dsa_switch *ds, int port, > + unsigned long *supported, > + struct phylink_link_state *state) > +{ > + struct ksz_device *dev = ds->priv; > + __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; > + > + /* Check for unsupported interfaces */ > + if (!phy_interface_mode_is_rgmii(state->interface) && > + state->interface != PHY_INTERFACE_MODE_RMII && > + state->interface != PHY_INTERFACE_MODE_MII && > + state->interface != PHY_INTERFACE_MODE_NA && > + state->interface != PHY_INTERFACE_MODE_INTERNAL) { > + bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS); linkmode_zero(supported); ... > + > + bitmap_and(supported, supported, mask, __ETHTOOL_LINK_MODE_MASK_NBITS); > + bitmap_and(state->advertising, state->advertising, mask, > + __ETHTOOL_LINK_MODE_MASK_NBITS); linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!