<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/phy, branch v4.20</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-19T05:48:15Z</updated>
<entry>
<title>net: phy: Fix the issue that netif always links up after resuming</title>
<updated>2018-12-19T05:48:15Z</updated>
<author>
<name>Kunihiko Hayashi</name>
<email>hayashi.kunihiko@socionext.com</email>
</author>
<published>2018-12-18T07:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8742beb50f2db903d3b6d69ddd81d67ce9914453'/>
<id>urn:sha1:8742beb50f2db903d3b6d69ddd81d67ce9914453</id>
<content type='text'>
Even though the link is down before entering hibernation,
there is an issue that the network interface always links up after resuming
from hibernation.

If the link is still down before enabling the network interface,
and after resuming from hibernation, the phydev-&gt;state is forcibly set
to PHY_UP in mdio_bus_phy_restore(), and the link becomes up.

In suspend sequence, only if the PHY is attached, mdio_bus_phy_suspend()
calls phy_stop_machine(), and mdio_bus_phy_resume() calls
phy_start_machine().
In resume sequence, it's enough to do the same as mdio_bus_phy_resume()
because the state has been preserved.

This patch fixes the issue by calling phy_start_machine() in
mdio_bus_phy_restore() in the same way as mdio_bus_phy_resume().

Fixes: bc87922ff59d ("phy: Move PHY PM operations into phy_device")
Suggested-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: Revert toggling reset changes.</title>
<updated>2018-12-04T16:47:44Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-12-04T16:47:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b566f70e1bf65b189b66eb3de6f431c30f7dff2'/>
<id>urn:sha1:7b566f70e1bf65b189b66eb3de6f431c30f7dff2</id>
<content type='text'>
This reverts:

ef1b5bf506b1 ("net: phy: Fix not to call phy_resume() if PHY is not attached")
8c85f4b81296 ("net: phy: micrel: add toggling phy reset if PHY is not  attached")

Andrew Lunn informs me that there are alternative efforts
underway to fix this more properly.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: micrel: add toggling phy reset if PHY is not attached</title>
<updated>2018-12-03T23:20:18Z</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2018-11-28T09:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c85f4b81296a530b8af2796c110fa482ac42d4f'/>
<id>urn:sha1:8c85f4b81296a530b8af2796c110fa482ac42d4f</id>
<content type='text'>
This patch adds toggling phy reset if PHY is not attached. Otherwise,
some boards (e.g. R-Car H3 Salvator-XS) cannot link up correctly if
we do the following method:

 1) Kernel boots by using initramfs.
 --&gt; No open the nic, so phy_device_register() and phy_probe()
     deasserts the reset.
 2) Kernel enters the suspend.
 --&gt; So, keep the reset signal as deassert.
 --&gt; On R-Car Salvator-XS board, unfortunately, the board power is
     turned off.
 3) Kernel returns from suspend.
 4) ifconfig eth0 up
 --&gt; Then, since edge signal of the reset doesn't happen,
     it cannot link up.
 5) ifconfig eth0 down
 6) ifconfig eth0 up
 --&gt; In this case, it can link up.

Reported-by: Hiromitsu Yamasaki &lt;hiromitsu.yamasaki.ym@renesas.com&gt;
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: Fix not to call phy_resume() if PHY is not attached</title>
<updated>2018-12-03T23:20:18Z</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2018-11-28T09:02:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef1b5bf506b1f0ee3edc98533e1f3ecb105eb46a'/>
<id>urn:sha1:ef1b5bf506b1f0ee3edc98533e1f3ecb105eb46a</id>
<content type='text'>
This patch fixes an issue that mdio_bus_phy_resume() doesn't call
phy_resume() if the PHY is not attached.

Fixes: 803dd9c77ac3 ("net: phy: avoid suspending twice a PHY")
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: don't allow __set_phy_supported to add unsupported modes</title>
<updated>2018-12-03T21:50:38Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2018-12-03T07:19:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2a36971ef595069b7a600d1144c2e0881a930a1'/>
<id>urn:sha1:d2a36971ef595069b7a600d1144c2e0881a930a1</id>
<content type='text'>
Currently __set_phy_supported allows to add modes w/o checking whether
the PHY supports them. This is wrong, it should never add modes but
only remove modes we don't want to support.

The commit marked as fixed didn't do anything wrong, it just copied
existing functionality to the helper which is being fixed now.

Fixes: f3a6bd393c2c ("phylib: Add phy_set_max_speed helper")
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: sfp: correct store of detected link modes</title>
<updated>2018-11-29T18:47:44Z</updated>
<author>
<name>Baruch Siach</name>
<email>baruch@tkos.co.il</email>
</author>
<published>2018-11-29T10:40:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7f7e0018b96fd1a30a968faa9464eb57372c1ec'/>
<id>urn:sha1:d7f7e0018b96fd1a30a968faa9464eb57372c1ec</id>
<content type='text'>
The link modes that sfp_parse_support() detects are stored in the
'modes' bitmap. There is no reason to make an exception for 1000Base-PX
or 1000Base-BX10.

Fixes: 03145864bd0f ("sfp: support 1G BiDi (eg, FiberStore SFP-GE-BX) modules")
Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: add workaround for issue where PHY driver doesn't bind to the device</title>
<updated>2018-11-27T23:00:24Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2018-11-23T18:41:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c85ddecae6e5e82ca3ae6f20c63f1d865e2ff5ea'/>
<id>urn:sha1:c85ddecae6e5e82ca3ae6f20c63f1d865e2ff5ea</id>
<content type='text'>
After switching the r8169 driver to use phylib some user reported that
their network is broken. This was caused by the genphy PHY driver being
used instead of the dedicated PHY driver for the RTL8211B. Users
reported that loading the Realtek PHY driver module upfront fixes the
issue. See also this mail thread:
https://marc.info/?t=154279781800003&amp;r=1&amp;w=2
The issue is quite weird and the root cause seems to be somewhere in
the base driver core. The patch works around the issue and may be
removed once the actual issue is fixed.

The Fixes tag refers to the first reported occurrence of the issue.
The issue itself may have been existing much longer and it may affect
users of other network chips as well. Users typically will recognize
this issue only if their PHY stops working when being used with the
genphy driver.

Fixes: f1e911d5d0df ("r8169: add basic phylib support")
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: mscc: fix deadlock in vsc85xx_default_config</title>
<updated>2018-11-24T06:34:40Z</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@bootlin.com</email>
</author>
<published>2018-11-23T18:01:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fa528b7682e73e906266bcd43728b8f923bf9b2'/>
<id>urn:sha1:3fa528b7682e73e906266bcd43728b8f923bf9b2</id>
<content type='text'>
The vsc85xx_default_config function called in the vsc85xx_config_init
function which is used by VSC8530, VSC8531, VSC8540 and VSC8541 PHYs
mistakenly calls phy_read and phy_write in-between phy_select_page and
phy_restore_page.

phy_select_page and phy_restore_page actually take and release the MDIO
bus lock and phy_write and phy_read take and release the lock to write
or read to a PHY register.

Let's fix this deadlock by using phy_modify_paged which handles
correctly a read followed by a write in a non-standard page.

Fixes: 6a0bfbbe20b0 ("net: phy: mscc: migrate to phy_select/restore_page functions")
Signed-off-by: Quentin Schulz &lt;quentin.schulz@bootlin.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs</title>
<updated>2018-11-18T05:11:51Z</updated>
<author>
<name>Martin Schiller</name>
<email>ms@dev.tdt.de</email>
</author>
<published>2018-11-16T07:38:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df5a8ec64eed7fe45b556cfff503acd6429ab817'/>
<id>urn:sha1:df5a8ec64eed7fe45b556cfff503acd6429ab817</id>
<content type='text'>
Up until commit 7e5fbd1e0700 ("net: mdio-gpio: Convert to use gpiod
functions where possible"), the _cansleep variants of the gpio_ API was
used. After that commit and the change to gpiod_ API, the _cansleep()
was dropped. This then results in WARN_ON() when used with GPIO
devices which do sleep. Add back the _cansleep() to avoid this.

Fixes: 7e5fbd1e0700 ("net: mdio-gpio: Convert to use gpiod functions where possible")
Signed-off-by: Martin Schiller &lt;ms@dev.tdt.de&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs"</title>
<updated>2018-11-17T07:04:37Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-11-17T07:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=160396a722e0c4dfd462f3eec779251bf944f438'/>
<id>urn:sha1:160396a722e0c4dfd462f3eec779251bf944f438</id>
<content type='text'>
This reverts commit dfa0d55ff6be64e7b6881212a291cb95f8da3b08.

Discussion still ongoing, I shouldn't have applied this.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
