<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/mdio.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-15T02:16:13+00:00</updated>
<entry>
<title>net: mdio: use macro module_driver to avoid boilerplate code</title>
<updated>2025-10-15T02:16:13+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2025-10-13T20:50:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10c4b4f60f5d0dbd29fa819be76e888501c7b729'/>
<id>urn:sha1:10c4b4f60f5d0dbd29fa819be76e888501c7b729</id>
<content type='text'>
Use macro module_driver to avoid boilerplate code.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Link: https://patch.msgid.link/e5c37417-4984-4b57-8154-264deef61e0d@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: assign default match function for non-PHY MDIO devices</title>
<updated>2025-06-13T01:12:37+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2025-06-10T06:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b1b36680107ede3a4ec7fa41d052971606d6b325'/>
<id>urn:sha1:b1b36680107ede3a4ec7fa41d052971606d6b325</id>
<content type='text'>
Make mdio_device_bus_match() the default match function for non-PHY
MDIO devices. Benefit is that we don't have to export this function
any longer. As long as mdiodev-&gt;modalias isn't set, there's no change
in behavior. mdiobus_create_device() is the only place where
mdiodev-&gt;modalias gets set, but this function sets
mdio_device_bus_match() as match function anyway.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Link: https://patch.msgid.link/6c94e3d3-bfb0-4ddc-a518-6fddbc64e1d0@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: fix up const issues in to_mdio_device() and to_phy_device()</title>
<updated>2025-05-28T00:35:25+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2025-05-22T11:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9cb929670a1e98b592b30f03f06e9e20110f318'/>
<id>urn:sha1:e9cb929670a1e98b592b30f03f06e9e20110f318</id>
<content type='text'>
Both to_mdio_device() and to_phy_device() "throw away" the const pointer
attribute passed to them and return a non-const pointer, which generally
is not a good thing overall.  Fix this up by using container_of_const()
which was designed for this very problem.

Cc: Alexander Lobakin &lt;alobakin@pm.me&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Fixes: 7eab14de73a8 ("mdio, phy: fix -Wshadow warnings triggered by nested container_of()")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2025052246-conduit-glory-8fc9@gregkh
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mdio: Remove mdio45_ethtool_gset_npage()</title>
<updated>2024-11-15T03:08:55+00:00</updated>
<author>
<name>Alistair Francis</name>
<email>alistair.francis@wdc.com</email>
</author>
<published>2024-11-12T10:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=575092a7f0ce4c6d5907cd908d28c0f69690a136'/>
<id>urn:sha1:575092a7f0ce4c6d5907cd908d28c0f69690a136</id>
<content type='text'>
The mdio45_ethtool_gset_npage() function isn't called, so let's remove
it.

Signed-off-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Link: https://patch.msgid.link/20241112105430.438491-2-alistair@alistair23.me
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>include: mdio: Remove mdio45_ethtool_gset()</title>
<updated>2024-11-15T03:08:55+00:00</updated>
<author>
<name>Alistair Francis</name>
<email>alistair.francis@wdc.com</email>
</author>
<published>2024-11-12T10:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e7cb7cf43afb96a4fd8f68c2dfb9b2fbdd444654'/>
<id>urn:sha1:e7cb7cf43afb96a4fd8f68c2dfb9b2fbdd444654</id>
<content type='text'>
mdio45_ethtool_gset() is never called, so let's remove it.

Signed-off-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Link: https://patch.msgid.link/20241112105430.438491-1-alistair@alistair23.me
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>driver core: have match() callback in struct bus_type take a const *</title>
<updated>2024-07-03T13:16:54+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-07-01T12:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d69d804845985c29ab5be5a4b3b1f4787893daf8'/>
<id>urn:sha1:d69d804845985c29ab5be5a4b3b1f4787893daf8</id>
<content type='text'>
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *.  This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.

Because the match() callback is in all busses, all busses are modified
to handle this properly.  This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.

For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.

Cc: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Reviewed-by: Alex Elder &lt;elder@kernel.org&gt;
Acked-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: phy: Support 100/1000BT1 linkmode advertisements</title>
<updated>2024-02-21T22:56:58+00:00</updated>
<author>
<name>Dimitri Fedrau</name>
<email>dima.fedrau@gmail.com</email>
</author>
<published>2024-02-18T07:57:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac0c530619cefa68fba816dabbcf6f4ffbf60c3d'/>
<id>urn:sha1:ac0c530619cefa68fba816dabbcf6f4ffbf60c3d</id>
<content type='text'>
Extend helper functions mii_t1_adv_m_mod_linkmode_t and
linkmode_adv_to_mii_t1_adv_m_t to support 100BT1 and 1000BT1 linkmode
advertisements.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Dimitri Fedrau &lt;dima.fedrau@gmail.com&gt;
Link: https://lore.kernel.org/r/20240218075753.18067-3-dima.fedrau@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: mdio: add helpers for accessing the EEE CAP2 registers</title>
<updated>2024-02-17T18:45:06+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2024-02-14T20:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80e4021c25d8c1ddae0dd655ed5f6b1e938dd79b'/>
<id>urn:sha1:80e4021c25d8c1ddae0dd655ed5f6b1e938dd79b</id>
<content type='text'>
This adds helpers for accessing the EEE CAP2 registers.
For now only 2500baseT and 5000baseT modes are supported.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: mdio_device: Reset device only when necessary</title>
<updated>2023-12-01T07:11:21+00:00</updated>
<author>
<name>Andrew Halaney</name>
<email>ahalaney@redhat.com</email>
</author>
<published>2023-11-27T21:41:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df16c1c51d8166958f533c0c886766f7ee9dd50f'/>
<id>urn:sha1:df16c1c51d8166958f533c0c886766f7ee9dd50f</id>
<content type='text'>
Currently the phy reset sequence is as shown below for a
devicetree described mdio phy on boot:

1. Assert the phy_device's reset as part of registering
2. Deassert the phy_device's reset as part of registering
3. Deassert the phy_device's reset as part of phy_probe
4. Deassert the phy_device's reset as part of phy_hw_init

The extra two deasserts include waiting the deassert delay afterwards,
which is adding unnecessary delay.

This applies to both possible types of resets (reset controller
reference and a reset gpio) that can be used.

Here's some snipped tracing output using the following command line
params "trace_event=gpio:* trace_options=stacktrace" illustrating
the reset handling and where its coming from:

    /* Assert */
       systemd-udevd-283     [002] .....     6.780434: gpio_value: 544 set 0
       systemd-udevd-283     [002] .....     6.783849: &lt;stack trace&gt;
     =&gt; gpiod_set_raw_value_commit
     =&gt; gpiod_set_value_nocheck
     =&gt; gpiod_set_value_cansleep
     =&gt; mdio_device_reset
     =&gt; mdiobus_register_device
     =&gt; phy_device_register
     =&gt; fwnode_mdiobus_phy_device_register
     =&gt; fwnode_mdiobus_register_phy
     =&gt; __of_mdiobus_register
     =&gt; stmmac_mdio_register
     =&gt; stmmac_dvr_probe
     =&gt; stmmac_pltfr_probe
     =&gt; devm_stmmac_pltfr_probe
     =&gt; qcom_ethqos_probe
     =&gt; platform_probe

    /* Deassert */
       systemd-udevd-283     [002] .....     6.802480: gpio_value: 544 set 1
       systemd-udevd-283     [002] .....     6.805886: &lt;stack trace&gt;
     =&gt; gpiod_set_raw_value_commit
     =&gt; gpiod_set_value_nocheck
     =&gt; gpiod_set_value_cansleep
     =&gt; mdio_device_reset
     =&gt; phy_device_register
     =&gt; fwnode_mdiobus_phy_device_register
     =&gt; fwnode_mdiobus_register_phy
     =&gt; __of_mdiobus_register
     =&gt; stmmac_mdio_register
     =&gt; stmmac_dvr_probe
     =&gt; stmmac_pltfr_probe
     =&gt; devm_stmmac_pltfr_probe
     =&gt; qcom_ethqos_probe
     =&gt; platform_probe

    /* Deassert */
       systemd-udevd-283     [002] .....     6.882601: gpio_value: 544 set 1
       systemd-udevd-283     [002] .....     6.886014: &lt;stack trace&gt;
     =&gt; gpiod_set_raw_value_commit
     =&gt; gpiod_set_value_nocheck
     =&gt; gpiod_set_value_cansleep
     =&gt; mdio_device_reset
     =&gt; phy_probe
     =&gt; really_probe
     =&gt; __driver_probe_device
     =&gt; driver_probe_device
     =&gt; __device_attach_driver
     =&gt; bus_for_each_drv
     =&gt; __device_attach
     =&gt; device_initial_probe
     =&gt; bus_probe_device
     =&gt; device_add
     =&gt; phy_device_register
     =&gt; fwnode_mdiobus_phy_device_register
     =&gt; fwnode_mdiobus_register_phy
     =&gt; __of_mdiobus_register
     =&gt; stmmac_mdio_register
     =&gt; stmmac_dvr_probe
     =&gt; stmmac_pltfr_probe
     =&gt; devm_stmmac_pltfr_probe
     =&gt; qcom_ethqos_probe
     =&gt; platform_probe

    /* Deassert */
      NetworkManager-477     [000] .....     7.023144: gpio_value: 544 set 1
      NetworkManager-477     [000] .....     7.026596: &lt;stack trace&gt;
     =&gt; gpiod_set_raw_value_commit
     =&gt; gpiod_set_value_nocheck
     =&gt; gpiod_set_value_cansleep
     =&gt; mdio_device_reset
     =&gt; phy_init_hw
     =&gt; phy_attach_direct
     =&gt; phylink_fwnode_phy_connect
     =&gt; __stmmac_open
     =&gt; stmmac_open

There's a lot of paths where the device is getting its reset
asserted and deasserted. Let's track the state and only actually
do the assert/deassert when it changes.

Reported-by: Sagar Cheluvegowda &lt;quic_scheluve@quicinc.com&gt;
Signed-off-by: Andrew Halaney &lt;ahalaney@redhat.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://lore.kernel.org/r/20231127-net-phy-reset-once-v2-1-448e8658779e@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: mdio: fix typo in header</title>
<updated>2023-11-13T11:02:30+00:00</updated>
<author>
<name>Marek Behún</name>
<email>kabel@kernel.org</email>
</author>
<published>2023-11-10T12:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=438cbcdf105d84449fceb39a2d0e16d0ec20708f'/>
<id>urn:sha1:438cbcdf105d84449fceb39a2d0e16d0ec20708f</id>
<content type='text'>
The quotes symbol in
  "EEE "link partner ability 1
should be at the end of the register name
  "EEE link partner ability 1"

Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
