netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marek Behún" <marek.behun@nic.cz>
To: Klaus Kudielka <klaus.kudielka@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	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
Subject: Re: [PATCH net-next v4 4/4] net: dsa: mv88e6xxx: mask apparently non-existing phys during probing
Date: Sun, 19 Mar 2023 11:06:06 +0100	[thread overview]
Message-ID: <20230319110606.23e30050@thinkpad> (raw)
In-Reply-To: <20230315163846.3114-5-klaus.kudielka@gmail.com>

On Wed, 15 Mar 2023 17:38:46 +0100
Klaus Kudielka <klaus.kudielka@gmail.com> 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>
> ---
> 
> Notes:
>     v2: Patch is new
> 
>  drivers/net/dsa/mv88e6xxx/chip.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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));

shouldnt this be
  GENMASK(31, mv88e6xxx_num_ports(chip) + chip->info->phy_base_addr) |
  GENMASK(chip->info->phy_base_addr, 0)
?
Or alternatively
  ~GENMASK(chip->info->phy_base_addr + mv88e6xxx_num_ports(chip),
           chip->info->phy_base_addr)

Marek

  parent reply	other threads:[~2023-03-19 10:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 16:38 [PATCH net-next v4 0/4] net: dsa: mv88e6xxx: accelerate C45 scan Klaus Kudielka
2023-03-15 16:38 ` [PATCH net-next v4 1/4] net: dsa: mv88e6xxx: don't dispose of Global2 IRQ mappings from mdiobus code Klaus Kudielka
2023-03-17 15:30   ` Vladimir Oltean
2023-03-17 17:06   ` Florian Fainelli
2023-03-15 16:38 ` [PATCH net-next v4 2/4] net: dsa: mv88e6xxx: re-order functions Klaus Kudielka
2023-03-17 15:31   ` Vladimir Oltean
2023-03-17 17:07   ` Florian Fainelli
2023-03-15 16:38 ` [PATCH net-next v4 3/4] net: dsa: mv88e6xxx: move call to mv88e6xxx_mdios_register() Klaus Kudielka
2023-03-17 15:32   ` Vladimir Oltean
2023-03-17 17:07   ` Florian Fainelli
2023-03-15 16:38 ` [PATCH net-next v4 4/4] net: dsa: mv88e6xxx: mask apparently non-existing phys during probing Klaus Kudielka
2023-03-17 15:33   ` Vladimir Oltean
2023-03-17 17:07   ` Florian Fainelli
2023-03-19 10:06   ` Marek Behún [this message]
2023-03-19 13:34     ` Vladimir Oltean
2023-03-19 13:35     ` Vladimir Oltean
2023-03-18  5:40 ` [PATCH net-next v4 0/4] net: dsa: mv88e6xxx: accelerate C45 scan patchwork-bot+netdevbpf

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=20230319110606.23e30050@thinkpad \
    --to=marek.behun@nic.cz \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=klaus.kudielka@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@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).