<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/phy/phy.c, branch linux-5.11.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-03-30T12:30:27+00:00</updated>
<entry>
<title>net: phy: introduce phydev-&gt;port</title>
<updated>2021-03-30T12:30:27+00:00</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2021-02-09T16:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc5c3466f2c371b7ee9fa9a1d0dbc1a4cec867fa'/>
<id>urn:sha1:bc5c3466f2c371b7ee9fa9a1d0dbc1a4cec867fa</id>
<content type='text'>
[ Upstream commit 4217a64e18a1647a0dbc68cb3169a5a06f054ec8 ]

At the moment, PORT_MII is reported in the ethtool ops. This is odd
because it is an interface between the MAC and the PHY and no external
port. Some network card drivers will overwrite the port to twisted pair
or fiber, though. Even worse, the MDI/MDIX setting is only used by
ethtool if the port is twisted pair.

Set the port to PORT_TP by default because most PHY drivers are copper
ones. If there is fibre support and it is enabled, the PHY driver will
set it to PORT_FIBRE.

This will change reporting PORT_MII to either PORT_TP or PORT_FIBRE;
except for the genphy fallback driver.

Suggested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: fix save wrong speed and duplex problem if autoneg is on</title>
<updated>2021-03-17T16:11:20+00:00</updated>
<author>
<name>Guangbin Huang</name>
<email>huangguangbin2@huawei.com</email>
</author>
<published>2021-02-27T03:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e14c42627f2cdac58ad9e036eee72240d1d8435'/>
<id>urn:sha1:3e14c42627f2cdac58ad9e036eee72240d1d8435</id>
<content type='text'>
commit d9032dba5a2b2bbf0fdce67c8795300ec9923b43 upstream.

If phy uses generic driver and autoneg is on, enter command
"ethtool -s eth0 speed 50" will not change phy speed actually, but
command "ethtool eth0" shows speed is 50Mb/s because phydev-&gt;speed
has been set to 50 and no update later.

And duplex setting has same problem too.

However, if autoneg is on, phy only changes speed and duplex according to
phydev-&gt;advertising, but not phydev-&gt;speed and phydev-&gt;duplex. So in this
case, phydev-&gt;speed and phydev-&gt;duplex don't need to be set in function
phy_ethtool_ksettings_set() if autoneg is on.

Fixes: 51e2a3846eab ("PHY: Avoid unnecessary aneg restarts")
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: Huazhong Tan &lt;tanhuazhong@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: phy: remove the .did_interrupt() and .ack_interrupt() callback</title>
<updated>2020-11-25T19:18:38+00:00</updated>
<author>
<name>Ioana Ciornei</name>
<email>ioana.ciornei@nxp.com</email>
</author>
<published>2020-11-23T15:38:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6527b938426f7fa66051273568d234b1fe01a15b'/>
<id>urn:sha1:6527b938426f7fa66051273568d234b1fe01a15b</id>
<content type='text'>
Now that all the PHY drivers have been migrated to directly implement
the generic .handle_interrupt() callback for a seamless support of
shared IRQs and all the .config_inter() implementations clear any
pending interrupts, we can safely remove the two callbacks.

With this patch, phylib has a proper support for shared IRQs (and not
just for multi-PHY devices. A PHY driver must implement both the
.handle_interrupt() and .config_intr() callbacks for the IRQs to be
actually used.

Signed-off-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: fix kernel-doc markups</title>
<updated>2020-11-17T22:15:03+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2020-11-16T10:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69280228d2b1cf650b6c9fc43e3158fa911b13d1'/>
<id>urn:sha1:69280228d2b1cf650b6c9fc43e3158fa911b13d1</id>
<content type='text'>
Some functions have different names between their prototypes
and the kernel-doc markup.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: export phy_error and phy_trigger_machine</title>
<updated>2020-11-06T00:31:59+00:00</updated>
<author>
<name>Ioana Ciornei</name>
<email>ioana.ciornei@nxp.com</email>
</author>
<published>2020-11-01T12:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=293e9a3d950dfebc76d9fa6931e6f91ef856b9ab'/>
<id>urn:sha1:293e9a3d950dfebc76d9fa6931e6f91ef856b9ab</id>
<content type='text'>
These functions are currently used by phy_interrupt() to either signal
an error condition or to trigger the link state machine. In an attempt
to actually support shared PHY IRQs, export these two functions so that
the actual PHY drivers can use them.

Cc: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Cc: Andre Edich &lt;andre.edich@microchip.com&gt;
Cc: Antoine Tenart &lt;atenart@kernel.org&gt;
Cc: Baruch Siach &lt;baruch@tkos.co.il&gt;
Cc: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Cc: Dan Murphy &lt;dmurphy@ti.com&gt;
Cc: Divya Koppera &lt;Divya.Koppera@microchip.com&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Cc: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Cc: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Cc: Kavya Sree Kotagiri &lt;kavyasree.kotagiri@microchip.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Marco Felsch &lt;m.felsch@pengutronix.de&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Cc: Mathias Kresin &lt;dev@kresin.me&gt;
Cc: Maxim Kochetkov &lt;fido_max@inbox.ru&gt;
Cc: Michael Walle &lt;michael@walle.cc&gt;
Cc: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Cc: Nisar Sayed &lt;Nisar.Sayed@microchip.com&gt;
Cc: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
Cc: Willy Liu &lt;willy.liu@realtek.com&gt;
Cc: Yuiko Oshino &lt;yuiko.oshino@microchip.com&gt;
Signed-off-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: Document core PHY structures</title>
<updated>2020-09-24T01:02:49+00:00</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2020-09-22T22:29:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4069a572d423b73919ae40a500dfc4b10f8a6f32'/>
<id>urn:sha1:4069a572d423b73919ae40a500dfc4b10f8a6f32</id>
<content type='text'>
Add kerneldoc for the core PHY data structures, a few inline functions
and exported functions which are not already documented.

v2
Typos
g/phy/PHY/s

Signed-off-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: Do not warn in phy_stop() on PHY_DOWN</title>
<updated>2020-09-17T23:55:35+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2020-09-17T03:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5116a8ade333b6c2e180782139c9c516a437b21c'/>
<id>urn:sha1:5116a8ade333b6c2e180782139c9c516a437b21c</id>
<content type='text'>
When phy_is_started() was added to catch incorrect PHY states,
phy_stop() would not be qualified against PHY_DOWN. It is possible to
reach that state when the PHY driver has been unbound and the network
device is then brought down.

Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking")
Signed-off-by: Florian Fainelli &lt;f.fainelli@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>treewide: Use fallthrough pseudo-keyword</title>
<updated>2020-08-23T22:36:59+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-08-23T22:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df561f6688fef775baa341a0f5d960becd248b11'/>
<id>urn:sha1:df561f6688fef775baa341a0f5d960becd248b11</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: Uninline PHY ethtool statistics operations</title>
<updated>2020-07-08T19:39:05+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2020-07-08T16:46:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=17809516a03a045565ad6a80e6241754615871ac'/>
<id>urn:sha1:17809516a03a045565ad6a80e6241754615871ac</id>
<content type='text'>
Now that we have moved the PHY ethtool statistics to be dynamically
registered, we no longer need to inline those for ethtool. This used to
be done to avoid cross symbol referencing and allow ethtool to be
decoupled from PHYLIB entirely.

Signed-off-by: Florian Fainelli &lt;f.fainelli@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: make phy_disable_interrupts() non-static</title>
<updated>2020-06-24T21:52:49+00:00</updated>
<author>
<name>Jisheng Zhang</name>
<email>Jisheng.Zhang@synaptics.com</email>
</author>
<published>2020-06-24T07:58:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3dd4ef1bdbac959bb20faec93937720ddd9917c6'/>
<id>urn:sha1:3dd4ef1bdbac959bb20faec93937720ddd9917c6</id>
<content type='text'>
We face an issue with rtl8211f, a pin is shared between INTB and PMEB,
and the PHY Register Accessible Interrupt is enabled by default, so
the INTB/PMEB pin is always active in polling mode case.

As Heiner pointed out "I was thinking about calling
phy_disable_interrupts() in phy_init_hw(), to have a defined init
state as we don't know in which state the PHY is if the PHY driver is
loaded. We shouldn't assume that it's the chip power-on defaults, BIOS
or boot loader could have changed this. Or in case of dual-boot
systems the other OS could leave the PHY in whatever state."

Make phy_disable_interrupts() non-static so that it could be used in
phy_init_hw() to have a defined init state.

Suggested-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jisheng Zhang &lt;Jisheng.Zhang@synaptics.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
