mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: list@schmidt-andreas.de
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] net: cpsw: remove unnecessary mdiobus_scan()
Date: Thu, 22 Feb 2018 08:17:58 +0100	[thread overview]
Message-ID: <20180222071758.hkyimkehvbkgb5cx@pengutronix.de> (raw)
In-Reply-To: <b7c837eb63fe7d64236a54b5da612904@schmidt-andreas.de>

On Mon, Feb 19, 2018 at 12:08:34PM +0100, list@schmidt-andreas.de wrote:
> On 2018-02-19 07:54, Sascha Hauer wrote:
> > On Sat, Feb 17, 2018 at 10:18:16AM +0100, Andreas Schmidt wrote:
> [...]
> > > On 16.02.2018 08:39, Sascha Hauer wrote:
> > > > No need to call mdiobus_scan() manually. it is called from
> > > > phy_device_connect() already in cpsw_open() which does all
> > > > the magic to connect a network device with its phy.
> > > You added call of mdiobus_scan to check if the slave has valid phy,
> > > I guess.
> > > Or I misunderstood your commit:
> > > b2568de82d62c18fd5dc8affb0e4dc050403c498
> > > net: cpsw: ignore error on slave setup ?
> > > 
> > > I guess it should work in follow:
> > > If slave has a valid phy (determined by mdiobus_scan), slave will be
> > > continue to register (call eth_register),
> > > if not, cpsw_clave_setup function will exit with an error and next
> > > slave
> > > will be try to register.
> > 
> > You're right. I have overlooked the case that we do not want to register
> > ethernet devices for slaves which do not have a valid phy.
> > 
> > In this case, how about the following variant?
> Yes, it's better. I tested it with fixed-link and with real phy and it
> works.
> Except a little bug, see comments below.

Ok, applied with your fixup added.

Sascha

-- 
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:[~2018-02-22  7:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16  7:39 Sascha Hauer
2018-02-17  9:18 ` Andreas Schmidt
2018-02-19  6:54   ` Sascha Hauer
2018-02-19 11:08     ` list
2018-02-22  7:17       ` 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=20180222071758.hkyimkehvbkgb5cx@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=list@schmidt-andreas.de \
    /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