From: Klaus Kudielka <klaus.kudielka@gmail.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH net-next v2 4/6] net: mdio: scan bus based on bus capabilities for C22 and C45
Date: Fri, 10 Mar 2023 21:22:56 +0100 [thread overview]
Message-ID: <10da10caea22a8f5da8f1779df3e13b948e8a363.camel@gmail.com> (raw)
In-Reply-To: <70f5bca0-322c-4bae-b880-742e56365abe@lunn.ch>
On Thu, 2023-03-09 at 17:36 +0100, Andrew Lunn wrote:
>
> I was wrong about something i said earlier. A C22 scan reads two
> registers for each of the 32 possible locations of a C22 PHY on the
> bus. A C45 scan is however much more expensive. It will read 30 time
> two registers for each of the 32 possible locations of a C45 PHY on
> the bus.
>
> One things that could help is moving some code around a bit. Currently
> mv88e6xxx_mdios_register() is called at the end of
> mv88e6xxx_probe(). Try moving it to the beginning of
> mv88e6xxx_setup(). The call to mv88e6xxx_mdios_unregister() then need
> to move into mv88e6xxx_teardown().
>
Yes, that helps. Primarily, because mdiobus_scan_bus_c45 now is called only once,
and at least some things are done in parallel.
(Still, ~2s waiting for the C45 scan to complete).
[ 0.382715] mdio_bus mv88e6xxx-0: *** mdiobus_scan_bus_c22 call ***
[ 0.387571] mmc0: new high speed MMC card at address 0001
[ 0.387953] mmcblk0: mmc0:0001 H8G4a\x92 7.28 GiB
[ 0.388929] mmcblk0: p1
[ 0.389197] mmcblk0boot0: mmc0:0001 H8G4a\x92 4.00 MiB
[ 0.389508] mmcblk0boot1: mmc0:0001 H8G4a\x92 4.00 MiB
[ 0.389850] mmcblk0rpmb: mmc0:0001 H8G4a\x92 4.00 MiB, chardev (250:0)
[ 0.393323] ata2: SATA link down (SStatus 0 SControl 300)
[ 0.486839] mdio_bus mv88e6xxx-0: *** mdiobus_scan_bus_c22 return ***
[ 0.486850] mdio_bus mv88e6xxx-0: *** mdiobus_scan_bus_c45 call ***
[ 0.554696] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 0.555373] ata1.00: supports DRM functions and may not be fully accessible
[ 0.555378] ata1.00: ATA-10: KINGSTON SKC600MS512G, S4800105, max UDMA/133
[ 0.555384] ata1.00: 1000215216 sectors, multi 1: LBA48 NCQ (depth 32)
[ 0.556055] ata1.00: Features: Trust Dev-Sleep
[ 0.556150] ata1.00: supports DRM functions and may not be fully accessible
[ 0.556800] ata1.00: configured for UDMA/133
[ 0.556981] scsi 0:0:0:0: Direct-Access ATA KINGSTON SKC600M 0105 PQ: 0 ANSI: 5
[ 0.557506] sd 0:0:0:0: [sda] 1000215216 512-byte logical blocks: (512 GB/477 GiB)
[ 0.557515] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 0.557552] sd 0:0:0:0: [sda] Write Protect is off
[ 0.557557] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 0.557613] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 0.557736] sd 0:0:0:0: [sda] Preferred minimum I/O size 4096 bytes
[ 0.558295] sda: sda1
[ 0.558417] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 0.685992] sfp sfp: module TP-LINK TL-SM321B rev sn 1403076900 dc 140401
[ 0.686009] mvneta f1034000.ethernet eth2: switched to inband/1000base-x link mode
[ 2.820390] mdio_bus mv88e6xxx-0: *** mdiobus_scan_bus_c45 return ***
[ 3.464461] mv88e6085 f1072004.mdio-mii:10: configuring for fixed/rgmii-id link mode
[ 3.466123] mv88e6085 f1072004.mdio-mii:10: configuring for fixed/rgmii-id link mode
[ 3.467397] mv88e6085 f1072004.mdio-mii:10: Link is Up - 1Gbps/Full - flow control off
[ 3.471263] mv88e6085 f1072004.mdio-mii:10: Link is Up - 1Gbps/Full - flow control off
[ 3.538112] mv88e6085 f1072004.mdio-mii:10 lan0 (uninitialized): PHY [mv88e6xxx-0:00] driver [Marvell 88E1540] (irq=68)
[ 3.602833] mv88e6085 f1072004.mdio-mii:10 lan1 (uninitialized): PHY [mv88e6xxx-0:01] driver [Marvell 88E1540] (irq=69)
[ 3.674111] mv88e6085 f1072004.mdio-mii:10 lan2 (uninitialized): PHY [mv88e6xxx-0:02] driver [Marvell 88E1540] (irq=70)
[ 3.746290] mv88e6085 f1072004.mdio-mii:10 lan3 (uninitialized): PHY [mv88e6xxx-0:03] driver [Marvell 88E1540] (irq=71)
[ 3.818291] mv88e6085 f1072004.mdio-mii:10 lan4 (uninitialized): PHY [mv88e6xxx-0:04] driver [Marvell 88E1540] (irq=72)
[ 3.820845] device eth1 entered promiscuous mode
[ 3.821730] device eth0 entered promiscuous mode
[ 3.821749] DSA: tree 0 setup
[ 3.822563] Freeing unused kernel image (initmem) memory: 1024K
[ 3.822727] Run /init as init process
Regards, Klaus
next prev parent reply other threads:[~2023-03-10 20:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 10:01 [PATCH net-next v2 0/6] net: phy: Remove probe_capabilities Michael Walle
2023-01-18 10:01 ` [PATCH net-next v2 1/6] net: mdio: Move mdiobus_scan() within file Michael Walle
2023-01-18 10:01 ` [PATCH net-next v2 2/6] net: mdio: Rework scanning of bus ready for quirks Michael Walle
2023-01-18 10:01 ` [PATCH net-next v2 3/6] net: mdio: Add workaround for Micrel PHYs which are not C45 compatible Michael Walle
2023-01-18 10:01 ` [PATCH net-next v2 4/6] net: mdio: scan bus based on bus capabilities for C22 and C45 Michael Walle
2023-03-05 18:13 ` Klaus Kudielka
2023-03-05 18:35 ` Andrew Lunn
2023-03-06 18:40 ` Klaus Kudielka
2023-03-06 19:02 ` Andrew Lunn
2023-03-07 19:48 ` Klaus Kudielka
2023-03-07 20:35 ` Andrew Lunn
2023-03-08 18:34 ` Klaus Kudielka
2023-03-09 16:36 ` Andrew Lunn
2023-03-10 20:22 ` Klaus Kudielka [this message]
2023-03-10 23:49 ` Andrew Lunn
2023-03-11 6:49 ` Klaus Kudielka
2023-03-11 15:39 ` Andrew Lunn
2023-03-11 16:11 ` Klaus Kudielka
2023-03-11 17:32 ` Klaus Kudielka
2023-03-11 17:57 ` Andrew Lunn
2023-03-12 2:53 ` Andrew Lunn
2023-03-12 9:04 ` Klaus Kudielka
2023-03-12 15:15 ` Klaus Kudielka
2023-03-12 23:57 ` Andrew Lunn
2023-01-18 10:01 ` [PATCH net-next v2 5/6] net: phy: Decide on C45 capabilities based on presence of method Michael Walle
2023-01-18 10:01 ` [PATCH net-next v2 6/6] net: phy: Remove probe_capabilities Michael Walle
2023-01-19 5:02 ` Andrew Jeffery
2023-01-19 15:30 ` [PATCH net-next v2 0/6] " patchwork-bot+netdevbpf
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=10da10caea22a8f5da8f1779df3e13b948e8a363.camel@gmail.com \
--to=klaus.kudielka@gmail.com \
--cc=linux-aspeed@lists.ozlabs.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