mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andreas Pretzsch <apr@cn-eng.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mdiobus: unbreak phy_device_connect(): honor masked out PHYs
Date: Mon, 12 Nov 2012 08:28:39 +0100	[thread overview]
Message-ID: <20121112072839.GF10369@pengutronix.de> (raw)
In-Reply-To: <1352329179-19809-1-git-send-email-apr@cn-eng.de>

On Wed, Nov 07, 2012 at 11:59:39PM +0100, Andreas Pretzsch wrote:
> commit 89dfe2d2af87f1b803f611d986d4ef383b6ad964 "mdiobus: do not scan
> the bus at registration time" dropped the check for struct mii_bus
> element phy_mask while scanning through all addresses.
> Re-add this check.
> 
> Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>

Applied, thanks

Sascha

> ---
> patch against branch "next" / commit 89dfe2d2af87f1b803f611d986d4ef383b6ad964
> Another one to fold into original patch. Sorry for missing it the first round.
> 
>  drivers/net/phy/phy.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 547e269..d8132b9 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -169,6 +169,10 @@ int phy_device_connect(struct eth_device *edev, struct mii_bus *bus, int addr,
>  				goto fail;
>  		} else {
>  			for (i = 0; i < PHY_MAX_ADDR && !edev->phydev; i++) {
> +				/* skip masked out PHY addresses */
> +				if (bus->phy_mask & (1 << i))
> +					continue;
> +
>  				dev = mdiobus_scan(bus, i);
>  				if (!dev || dev->attached_dev)
>  					continue;
> -- 
> 1.7.10.4
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-11-12  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07 22:59 Andreas Pretzsch
2012-11-12  7:28 ` Sascha Hauer [this message]

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=20121112072839.GF10369@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=apr@cn-eng.de \
    --cc=barebox@lists.infradead.org \
    /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