[net-next,v3,4/4] net: dsa: mv88e6xxx: mask apparently non-existing phys during probing
Message ID | 20230314182659.63686-5-klaus.kudielka@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1918416wrd; Tue, 14 Mar 2023 11:32:18 -0700 (PDT) X-Google-Smtp-Source: AK7set/A9ENGKJCiWTQmov+kaBXvuGUh3j95rMRlOJR4clHklJ5W+3qaDc1hDb1280YdXaOYRr9f X-Received: by 2002:a05:6a20:3d15:b0:d5:58df:fbaa with SMTP id y21-20020a056a203d1500b000d558dffbaamr4065782pzi.12.1678818738545; Tue, 14 Mar 2023 11:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678818738; cv=none; d=google.com; s=arc-20160816; b=Vwh6oCZjyE1qyLZMUpyWjAIJMiLy+PuFdZyxHCEaqGM8rjapva/2+g5eACGky0fyMD VZoTWe2Otl7WY0wkWa5qC86x+zg7L8WIdH+3h1fuRgr0F37kQrqpaA63OkO9pGVfWqTk R7DfKPv3KpIu3yVMYy8DA1SSJkwU0W7cQhDkLOZuklap68c0TQyUGc3vcJsIqSU6Hukq LeDgWrvs2khc3udc0QeuXSBQFgZjdebUJ40cjGmPRGGP+Cl/50ZgxNRbmkjV5/tvrmIO FKUK5yB8ICr34+eZAsQ8fV1NBzsMXAVX27yD8FurmGPVjlMnNMvwraV4TbGLHZEFQXgR nGmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uCZkrMLZx8ZVMQLFuANkNwADh4tGUpOBmEXyzie1B/E=; b=bG9FgzCcG+f63VlfIyNKbfLFpSZLfUMn3nVdeZ/yi5IIz0DFKcw+cubiMemW4Ov1r6 WTykxJ06VA/xzyVkeOcAFONx1pgHRw/j4eVdYMy5D8HW/3j7syFpfdSicGrTZfnPZaJr 8WXuLmRdFWNSSC+MikuDg1b81IYv8NCGKA/N2rBnuX4uZFWThcgVXzOccNPZSDEeKgu2 6SdONf9kHHzkR8abpo0IQfudjXtPVtD2bC9BYy+4TD4nra8WRIZvKT3Kb395yn+vU1nU S2qAlXxL3vx0i8SIDXiBI3mdZIGhCvDjOPNMhmyiP55hJl8uNDUJVvdJqiJrX2gued/D OZFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UarJ3AuQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8-20020a635b48000000b004fb93a4016asi2786670pgm.483.2023.03.14.11.32.02; Tue, 14 Mar 2023 11:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UarJ3AuQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230304AbjCNS2v (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 14:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230281AbjCNS2m (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 14:28:42 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA824B4215; Tue, 14 Mar 2023 11:28:13 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so13812723wmb.5; Tue, 14 Mar 2023 11:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678818490; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uCZkrMLZx8ZVMQLFuANkNwADh4tGUpOBmEXyzie1B/E=; b=UarJ3AuQtgdT97POi2QL4jhEBe0WUGNTBL9LOFoKiy5WPNaL6vER6d6ibVrQIAmjlL DDfARMnIDTGFvCAd3DqhXAe44PBm5frJHA1s0/zqr+zMAbeDcpXvibgSPlpM5/rZgKSR iUIQKlOp3QIwPt0NS0vQ7szqSi5vvFkA6Uh53hal4F1lYAGBJ/QBvDwWoccPpAuIW2Vm NC4/EjVYiVKw4RC43f9xGHFi8/wDFWL//QIW5JoVAJgnCndFqwaHEAHJFBn5CYlamf28 13IqIpbvm7Jmty7Yl8l2xmSjX4s1qpnQt2Zek9q1Rq4orLMVHqjHdXxkiYrRy7iH6Asx wC1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678818490; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uCZkrMLZx8ZVMQLFuANkNwADh4tGUpOBmEXyzie1B/E=; b=YCSTzlN3x+wdVjSCfHWU8RO8bl0y8REJJl/+4cZW4Bjokj5TFk+h2/uT7bI63dNxHp CcJlF5ykbHwI83w4LXLFfis9x9f254D7y9ylx1/v976L+xme/3kSYj8RJOmPZswqFCGx SB70saJfdaOHC8gUPqudIeiEJfe0nJmYQCRC20wPffbcwwDN4iukj0un1A7j/WGfRzat GP1VnAEBsEvjpuSixZwrHrJ6bogm+Rc0ujboB/7XNPkvlkhaZzFjskkAKy6qYe/gcyeK dO4W4A+YRyFVOKs3RjIjaw6ahZSHlOkQpB6DuaA2pZlv288JwqpnEk1/dS1It+PY1qUl p6Jg== X-Gm-Message-State: AO0yUKXxyH3YaLyGstSXJO33/wE/MCJeB+cpQJLCmt4gJL6zR2/hSdNu VX0KwG389+8/2Lt3L3P9iRA= X-Received: by 2002:a05:600c:3c89:b0:3eb:38e6:f659 with SMTP id bg9-20020a05600c3c8900b003eb38e6f659mr15820259wmb.15.1678818490700; Tue, 14 Mar 2023 11:28:10 -0700 (PDT) Received: from mars.. ([2a02:168:6806:0:5862:40de:7045:5e1b]) by smtp.gmail.com with ESMTPSA id u7-20020a7bc047000000b003e206cc7237sm3443490wmc.24.2023.03.14.11.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 11:28:10 -0700 (PDT) From: Klaus Kudielka <klaus.kudielka@gmail.com> To: Andrew Lunn <andrew@lunn.ch> Cc: Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Richard Cochran <richardcochran@gmail.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Klaus Kudielka <klaus.kudielka@gmail.com> Subject: [PATCH net-next v3 4/4] net: dsa: mv88e6xxx: mask apparently non-existing phys during probing Date: Tue, 14 Mar 2023 19:26:59 +0100 Message-Id: <20230314182659.63686-5-klaus.kudielka@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230314182659.63686-1-klaus.kudielka@gmail.com> References: <20230314182659.63686-1-klaus.kudielka@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760369037445546464?= X-GMAIL-MSGID: =?utf-8?q?1760369037445546464?= |
Series |
net: dsa: mv88e6xxx: accelerate C45 scan
|
|
Commit Message
Klaus Kudielka
March 14, 2023, 6:26 p.m. UTC
To avoid excessive mdio bus transactions during probing, mask all phy
addresses that do not exist (there is a 1:1 mapping between switch port
number and phy address).
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
---
v2: Patch is new
v3: No change
drivers/net/dsa/mv88e6xxx/chip.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Tue, Mar 14, 2023 at 07:26:59PM +0100, Klaus Kudielka wrote: > To avoid excessive mdio bus transactions during probing, mask all phy > addresses that do not exist (there is a 1:1 mapping between switch port > number and phy address). > > Suggested-by: Andrew Lunn <andrew@lunn.ch> > Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 29b0f3bb1c..c52798d9ce 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3797,6 +3797,7 @@ static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip, bus->read_c45 = mv88e6xxx_mdio_read_c45; bus->write_c45 = mv88e6xxx_mdio_write_c45; bus->parent = chip->dev; + bus->phy_mask = GENMASK(31, mv88e6xxx_num_ports(chip)); if (!external) { err = mv88e6xxx_g2_irq_mdio_setup(chip, bus);