<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/phy/smsc.c, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-31T01:14:11+00:00</updated>
<entry>
<title>net: phy: smsc: add proper reset flags for LAN8710A</title>
<updated>2025-07-31T01:14:11+00:00</updated>
<author>
<name>Buday Csaba</name>
<email>buday.csaba@prolan.hu</email>
</author>
<published>2025-07-28T15:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57ec5a8735dc5dccd1ee68afdb1114956a3fce0d'/>
<id>urn:sha1:57ec5a8735dc5dccd1ee68afdb1114956a3fce0d</id>
<content type='text'>
According to the LAN8710A datasheet (Rev. B, section 3.8.5.1), a hardware
reset is required after power-on, and the reference clock (REF_CLK) must be
established before asserting reset.

Signed-off-by: Buday Csaba &lt;buday.csaba@prolan.hu&gt;
Cc: Csókás Bence &lt;csokas.bence@prolan.hu&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://patch.msgid.link/20250728152916.46249-2-csokas.bence@prolan.hu
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: smsc: Fix link failure in forced mode with Auto-MDIX</title>
<updated>2025-07-09T01:12:49+00:00</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2025-07-03T11:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9dfe110cc0f6ef42af8e81ce52aef34a647d0b8a'/>
<id>urn:sha1:9dfe110cc0f6ef42af8e81ce52aef34a647d0b8a</id>
<content type='text'>
Force a fixed MDI-X mode when auto-negotiation is disabled to prevent
link instability.

When forcing the link speed and duplex on a LAN9500 PHY (e.g., with
`ethtool -s eth0 autoneg off ...`) while leaving MDI-X control in auto
mode, the PHY fails to establish a stable link. This occurs because the
PHY's Auto-MDIX algorithm is not designed to operate when
auto-negotiation is disabled. In this state, the PHY continuously
toggles the TX/RX signal pairs, which prevents the link partner from
synchronizing.

This patch resolves the issue by detecting when auto-negotiation is
disabled. If the MDI-X control mode is set to 'auto', the driver now
forces a specific, stable mode (ETH_TP_MDI) to prevent the pair
toggling. This choice of a fixed MDI mode mirrors the behavior the
hardware would exhibit if the AUTOMDIX_EN strap were configured for a
fixed MDI connection.

Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support")
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: Andre Edich &lt;andre.edich@microchip.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://patch.msgid.link/20250703114941.3243890-4-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: smsc: Force predictable MDI-X state on LAN87xx</title>
<updated>2025-07-09T01:12:49+00:00</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2025-07-03T11:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0713e55533c88a20edb53eea6517dc56786a0078'/>
<id>urn:sha1:0713e55533c88a20edb53eea6517dc56786a0078</id>
<content type='text'>
Override the hardware strap configuration for MDI-X mode to ensure a
predictable initial state for the driver. The initial mode of the LAN87xx
PHY is determined by the AUTOMDIX_EN strap pin, but the driver has no
documented way to read its latched status.

This unpredictability means the driver cannot know if the PHY has
initialized with Auto-MDIX enabled or disabled, preventing it from
providing a reliable interface to the user.

This patch introduces a `config_init` hook that forces the PHY into a
known state by explicitly enabling Auto-MDIX.

Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support")
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: Andre Edich &lt;andre.edich@microchip.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://patch.msgid.link/20250703114941.3243890-3-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: smsc: Fix Auto-MDIX configuration when disabled by strap</title>
<updated>2025-07-09T01:12:49+00:00</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2025-07-03T11:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a141af8eb2272ab0f677a7f2653874840bc9b214'/>
<id>urn:sha1:a141af8eb2272ab0f677a7f2653874840bc9b214</id>
<content type='text'>
Correct the Auto-MDIX configuration to ensure userspace settings are
respected when the feature is disabled by the AUTOMDIX_EN hardware strap.

The LAN9500 PHY allows its default MDI-X mode to be configured via a
hardware strap. If this strap sets the default to "MDI-X off", the
driver was previously unable to enable Auto-MDIX from userspace.

When handling the ETH_TP_MDI_AUTO case, the driver would set the
SPECIAL_CTRL_STS_AMDIX_ENABLE_ bit but neglected to set the required
SPECIAL_CTRL_STS_OVRRD_AMDIX_ bit. Without the override flag, the PHY
falls back to its hardware strap default, ignoring the software request.

This patch corrects the behavior by also setting the override bit when
enabling Auto-MDIX. This ensures that the userspace configuration takes
precedence over the hardware strap, allowing Auto-MDIX to be enabled
correctly in all scenarios.

Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support")
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: Andre Edich &lt;andre.edich@microchip.com&gt;
Reviewed-by: Maxime Chevallier &lt;maxime.chevallier@bootlin.com&gt;
Link: https://patch.msgid.link/20250703114941.3243890-2-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: Constify struct mdio_device_id</title>
<updated>2025-01-14T23:01:32+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2025-01-12T14:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b01b59a4fa87831b8504f1e8fc553ce599e7362d'/>
<id>urn:sha1:b01b59a4fa87831b8504f1e8fc553ce599e7362d</id>
<content type='text'>
'struct mdio_device_id' is not modified in these drivers.

Constifying these structures moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  27014	  12792	      0	  39806	   9b7e	drivers/net/phy/broadcom.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  27206	  12600	      0	  39806	   9b7e	drivers/net/phy/broadcom.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://patch.msgid.link/403c381b7d9156b67ad68ffc44b8eee70c5e86a9.1736691226.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: smsc: use devm_clk_get_optional_enabled_with_rate()</title>
<updated>2024-10-08T22:36:28+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2024-10-07T13:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=881c98f44fdf3b6643ebf74a56d56fccf6b2ce03'/>
<id>urn:sha1:881c98f44fdf3b6643ebf74a56d56fccf6b2ce03</id>
<content type='text'>
Fold the separate call to clk_set_rate() into the clock getter.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://patch.msgid.link/20241007134100.107921-1-brgl@bgdev.pl
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: Convert some ethtool_sprintf() to ethtool_puts()</title>
<updated>2023-12-08T10:56:25+00:00</updated>
<author>
<name>justinstitt@google.com</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-12-06T23:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e403cffff1a46ab1a95d3bc72e92634445d68328'/>
<id>urn:sha1:e403cffff1a46ab1a95d3bc72e92634445d68328</id>
<content type='text'>
This patch converts some basic cases of ethtool_sprintf() to
ethtool_puts().

The conversions are used in cases where ethtool_sprintf() was being used
with just two arguments:
|       ethtool_sprintf(&amp;data, buffer[i].name);
or when it's used with format string: "%s"
|       ethtool_sprintf(&amp;data, "%s", buffer[i].name);
which both now become:
|       ethtool_puts(&amp;data, buffer[i].name);

Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Reviewed-by: Wei Fang &lt;wei.fang@nxp.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Louis Peens &lt;louis.peens@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: smsc: replace deprecated strncpy with ethtool_sprintf</title>
<updated>2023-10-16T23:15:00+00:00</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-10-12T22:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4ddc1f1f7339e0a03bbf235a6670d497bbb22fb3'/>
<id>urn:sha1:4ddc1f1f7339e0a03bbf235a6670d497bbb22fb3</id>
<content type='text'>
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.

ethtool_sprintf() is designed specifically for get_strings() usage.
Let's replace strncpy in favor of this dedicated helper function.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://lore.kernel.org/r/20231012-strncpy-drivers-net-phy-smsc-c-v1-1-00528f7524b3@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: smsc: add WoL support to LAN8740/LAN8742 PHYs</title>
<updated>2023-07-27T04:24:40+00:00</updated>
<author>
<name>Tristram Ha</name>
<email>Tristram.Ha@microchip.com</email>
</author>
<published>2023-07-25T23:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8b305ee2a91c3c4c89cb82ea940265b247eb0a13'/>
<id>urn:sha1:8b305ee2a91c3c4c89cb82ea940265b247eb0a13</id>
<content type='text'>
Microchip LAN8740/LAN8742 PHYs support basic unicast, broadcast, and
Magic Packet WoL.  They have one pattern filter matching up to 128 bytes
of frame data, which can be used to implement ARP or multicast WoL.

ARP WoL matches any ARP frame with broadcast address.

Multicast WoL matches any multicast frame.

Signed-off-by: Tristram Ha &lt;Tristram.Ha@microchip.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Link: https://lore.kernel.org/r/1690329270-2873-1-git-send-email-Tristram.Ha@microchip.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: smsc: enable edpd tunable support</title>
<updated>2023-04-03T09:08:43+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2023-04-02T15:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c4c3b3e6d414c50f6858f027a2ca2206e1ce583'/>
<id>urn:sha1:3c4c3b3e6d414c50f6858f027a2ca2206e1ce583</id>
<content type='text'>
Enable EDPD PHY tunable support for all drivers using
lan87xx_read_status.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
