[PATCH] net: cpsw: remove unnecessary mdiobus_scan()

Andreas Schmidt list at schmidt-andreas.de
Sat Feb 17 01:18:16 PST 2018


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xBEA6DEA0.asc
Type: application/pgp-keys
Size: 3082 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20180217/ddeb3938/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20180217/ddeb3938/attachment.sig>


More information about the barebox mailing list