mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andreas Schmidt <list@schmidt-andreas.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH] net: cpsw: remove unnecessary mdiobus_scan()
Date: Sat, 17 Feb 2018 10:18:16 +0100	[thread overview]
Message-ID: <075169cf-a231-eb73-427a-65c37b8d5465@schmidt-andreas.de> (raw)
In-Reply-To: <20180216073946.1120-1-s.hauer@pengutronix.de>


[-- Attachment #1.1.1.1: Type: text/plain, Size: 1246 bytes --]

Hi Sascha,


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.

In case of a real phy (not fixed-link), I guess, it make sense to check
is phy work and exists.
If we not check phy, cpsw register eth device with maybe invalid phy.
(maybe never added in oftree)
Later, while calling cpsw_open, it maybe will be failed, because phy not
exists.

IHMO, it is a complex way checking if phy exists and is valid, but I
know no easier way to do that.

If I'm wrong and this part not needed anymore, this would make
my patch ([PATCH] net: cpsw: fix probe with fixed-link) shorter and
easier :)

[...]

Regards,
Andreas

[-- Attachment #1.1.1.2: 0xBEA6DEA0.asc --]
[-- Type: application/pgp-keys, Size: 3133 bytes --]

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

  reply	other threads:[~2018-02-17  9: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 [this message]
2018-02-19  6:54   ` Sascha Hauer
2018-02-19 11:08     ` list
2018-02-22  7:17       ` Sascha Hauer

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=075169cf-a231-eb73-427a-65c37b8d5465@schmidt-andreas.de \
    --to=list@schmidt-andreas.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