From: sbabic@denx.de
To: Tim Harvey <tharvey@gateworks.com>,u-boot@lists.denx.de
Subject: [PATCH 2/9] net: fec: use device sequence vs index when fetching fec
Date: Sat, 10 Jul 2021 21:35:20 +0200 (CEST) [thread overview]
Message-ID: <20210710193520.1572D8331F@phobos.denx.de> (raw)
In-Reply-To: <20210630235010.27536-3-tharvey@gateworks.com>
> When using uclass_get_device* to get the FEC device we need to use
> device sequence instead of index into UCLASS_ETH. In systems where for
> example a I2C based DSA switch exists it will probe before the FEC
> master and its ports will be registered first and have the first
> indexes yet the FEC's sequence comes from the device-tree alias.
> Take for example the imx8mm-venice-gw7901 board which has an i2c based
> DSA switch:
> u-boot=> net list
> eth1 : lan1 00:0d:8d:aa:00:2f
> eth2 : lan2 00:0d:8d:aa:00:30
> eth3 : lan3 00:0d:8d:aa:00:31
> eth4 : lan4 00:0d:8d:aa:00:32
> eth0 : ethernet@30be0000 00:0d:8d:aa:00:2e active
> Thus in this case uclass_get_device(UCLASS_ETH, 0, &dev) returns lan1
> which is wrong but uclass_get_device_seq(UCLASS_ETH, 0, &dev) returns
> ethernet@30be000 which is correct.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
next prev parent reply other threads:[~2021-07-10 19:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 23:50 [PATCH 0/9] Add support for imx8mm-venice-gw7901 and DSA switch Tim Harvey
2021-06-30 23:50 ` [PATCH 1/9] board: gateworks: venice: add imx8mm-gw7901 support Tim Harvey
2021-07-10 19:35 ` sbabic
2021-06-30 23:50 ` [PATCH 2/9] net: fec: use device sequence vs index when fetching fec Tim Harvey
2021-07-02 9:44 ` Ramon Fried
2021-07-10 19:35 ` sbabic [this message]
2021-06-30 23:50 ` [PATCH 3/9] net: fec: set phy_of_node properly for fixed-link phy Tim Harvey
2021-07-02 9:44 ` Ramon Fried
2021-07-10 19:34 ` sbabic
2021-06-30 23:50 ` [PATCH 4/9] net: add set_promisc function to enable/disable Promiscuous mode Tim Harvey
2021-07-02 9:46 ` Ramon Fried
2021-07-10 19:36 ` sbabic
2021-06-30 23:50 ` [PATCH 5/9] net: fec: add set_promisc function Tim Harvey
2021-07-02 9:46 ` Ramon Fried
2021-07-10 19:35 ` sbabic
2021-06-30 23:50 ` [PATCH 6/9] net: dsa: enable master promisc mode if available and needed Tim Harvey
2021-07-02 9:47 ` Ramon Fried
2021-07-10 19:35 ` sbabic
2021-06-30 23:50 ` [PATCH 7/9] net: add support for KSZ9477/KSZ9897/KSZ9567 GbE switch Tim Harvey
2021-07-02 9:49 ` Ramon Fried
2021-07-10 19:35 ` sbabic
2021-06-30 23:50 ` [PATCH 8/9] arm: dts: imx8mm-venice-gw7901.dts: fix dsa switch configuration Tim Harvey
2021-07-10 19:35 ` sbabic
2021-06-30 23:50 ` [PATCH 9/9] configs: imx8mm_venice_defconfig: add support for gbe switch Tim Harvey
2021-07-10 19:37 ` sbabic
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=20210710193520.1572D8331F@phobos.denx.de \
--to=sbabic@denx.de \
--cc=tharvey@gateworks.com \
--cc=u-boot@lists.denx.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