<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/phy/phy.c, branch v4.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-10-13T16:03:47Z</updated>
<entry>
<title>net: phy: Trigger state machine on state change and not polling.</title>
<updated>2016-10-13T16:03:47Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2016-10-12T20:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c293f4e08b58ad5b78f78d89ca1fd41f87f8729'/>
<id>urn:sha1:3c293f4e08b58ad5b78f78d89ca1fd41f87f8729</id>
<content type='text'>
The phy_start() is used to indicate the PHY is now ready to do its
work. The state is changed, normally to PHY_UP which means that both
the MAC and the PHY are ready.

If the phy driver is using polling, when the next poll happens, the
state machine notices the PHY is now in PHY_UP, and kicks off
auto-negotiation, if needed.

If however, the PHY is using interrupts, there is no polling. The phy
is stuck in PHY_UP until the next interrupt comes along. And there is
no reason for the PHY to interrupt.

Have phy_start() schedule the state machine to run, which both speeds
up the polling use case, and makes the interrupt use case actually
work.

This problems exists whenever there is a state change which will not
cause an interrupt. Trigger the state machine in these cases,
e.g. phy_error().

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Kyle Roeschley &lt;kyle.roeschley@ni.com&gt;
Tested-by: Kyle Roeschley &lt;kyle.roeschley@ni.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "phy: IRQ cannot be shared"</title>
<updated>2016-08-25T23:53:47Z</updated>
<author>
<name>Xander Huff</name>
<email>xander.huff@ni.com</email>
</author>
<published>2016-08-24T21:47:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3e70edd7c2eed6acd234627a6007627f5c76e8e'/>
<id>urn:sha1:c3e70edd7c2eed6acd234627a6007627f5c76e8e</id>
<content type='text'>
This reverts:
  commit 33c133cc7598 ("phy: IRQ cannot be shared")

On hardware with multiple PHY devices hooked up to the same IRQ line, allow
them to share it.

Sergei Shtylyov says:
  "I'm not sure now what was the reason I concluded that the IRQ sharing
  was impossible... most probably I thought that the kernel IRQ handling
  code exited the loop over the IRQ actions once IRQ_HANDLED was returned
  -- which is obviously not so in reality..."

Signed-off-by: Xander Huff &lt;xander.huff@ni.com&gt;
Signed-off-by: Nathan Sullivan &lt;nathan.sullivan@ni.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-05-15T17:32:48Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-05-15T17:32:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=909b27f706433a0b3dff79aa259de63aafe40a42'/>
<id>urn:sha1:909b27f706433a0b3dff79aa259de63aafe40a42</id>
<content type='text'>
The nf_conntrack_core.c fix in 'net' is not relevant in 'net-next'
because we no longer have a per-netns conntrack hash.

The ip_gre.c conflict as well as the iwlwifi ones were cases of
overlapping changes.

Conflicts:
	drivers/net/wireless/intel/iwlwifi/mvm/tx.c
	net/ipv4/ip_gre.c
	net/netfilter/nf_conntrack_core.c

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phylib: fix interrupts re-enablement in phy_start</title>
<updated>2016-05-10T19:59:49Z</updated>
<author>
<name>Shaohui Xie</name>
<email>Shaohui.Xie@nxp.com</email>
</author>
<published>2016-05-10T09:42:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84a527a41f38a80353f185d05e41b021e1ff672b'/>
<id>urn:sha1:84a527a41f38a80353f185d05e41b021e1ff672b</id>
<content type='text'>
If phy was suspended and is starting, current driver always enable
phy's interrupts, if phy works in polling, phy can raise unexpected
interrupt which will not be handled, the interrupt will block system
enter suspend again. So interrupts should only be re-enabled if phy
works in interrupt.

Signed-off-by: Shaohui Xie &lt;Shaohui.Xie@nxp.com&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>net: phy: add phy_ethtool_{get|set}_link_ksettings</title>
<updated>2016-05-10T19:06:19Z</updated>
<author>
<name>Philippe Reynes</name>
<email>tremyfr@gmail.com</email>
</author>
<published>2016-05-09T22:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d9a77cee1ab53dc6419b1ab9da88c4e9342d26a'/>
<id>urn:sha1:9d9a77cee1ab53dc6419b1ab9da88c4e9342d26a</id>
<content type='text'>
Ethtool callbacks {get|set}_link_ksettings are often the same, so
we add two generics functions phy_ethtool_{get|set}_link_ksettings
to avoid writing severals times the same function.

Signed-off-by: Philippe Reynes &lt;tremyfr@gmail.com&gt;
Acked-By: David Decotigny &lt;decot@googlers.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: add generic function to support ksetting support</title>
<updated>2016-04-18T18:45:08Z</updated>
<author>
<name>Philippe Reynes</name>
<email>tremyfr@gmail.com</email>
</author>
<published>2016-04-14T22:35:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d55173e71b06c5a369489852d972304e14189fd'/>
<id>urn:sha1:2d55173e71b06c5a369489852d972304e14189fd</id>
<content type='text'>
The old ethtool api (get_setting and set_setting) has
generic phy functions phy_ethtool_sset and phy_ethtool_gset.
To supprt the new ethtool api (get_link_ksettings and
set_link_ksettings), we add generic phy function
phy_ethtool_ksettings_get and phy_ethtool_ksettings_set.

Signed-off-by: Philippe Reynes &lt;tremyfr@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: Fix phy_mac_interrupt()</title>
<updated>2016-01-21T18:48:51Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2016-01-19T03:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=deccd16f91f930af8e91ffbbfc839d0ad8da999d'/>
<id>urn:sha1:deccd16f91f930af8e91ffbbfc839d0ad8da999d</id>
<content type='text'>
Commit 5ea94e7686a3 ("phy: add phy_mac_interrupt()") to use with
PHY_IGNORE_INTERRUPT added a cancel_work_sync() into phy_mac_interrupt()
which is allowed to sleep, whereas phy_mac_interrupt() is expected to be
callable from interrupt context.

Now that we have fixed how the PHY state machine treats
PHY_IGNORE_INTERRUPT with respect to state changes, we can just set the
new link state, and queue the PHY state machine for execution so it is
going to read the new link state.

For that to work properly, we need to update phy_change() not to try to
invoke any interrupt callbacks if we have configured the PHY device for
PHY_IGNORE_INTERRUPT, because that PHY device and its driver are not
required to implement those.

Fixes: 5ea94e7686a3 ("phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS</title>
<updated>2016-01-21T18:48:51Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2016-01-19T03:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5c3d84657db57bd23ecd58b97f1c99dd42a7b80'/>
<id>urn:sha1:d5c3d84657db57bd23ecd58b97f1c99dd42a7b80</id>
<content type='text'>
Commit 2c7b49212a86 ("phy: fix the use of PHY_IGNORE_INTERRUPT") changed
a hunk in phy_state_machine() in the PHY_RUNNING case which was not
needed. The change essentially makes the PHY library treat PHY devices
with PHY_IGNORE_INTERRUPT to keep polling for the PHY device, even
though the intent is not to do it.

Fix this by reverting that specific hunk, which makes the PHY state
machine wait for state changes, and stay in the PHY_RUNNING state for as
long as needed.

Fixes: 2c7b49212a86 ("phy: fix the use of PHY_IGNORE_INTERRUPT")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: Add an mdio_device structure</title>
<updated>2016-01-07T19:31:26Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2016-01-06T19:11:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e5a03bfd873c29eb786655ef2e95e53ed242b404'/>
<id>urn:sha1:e5a03bfd873c29eb786655ef2e95e53ed242b404</id>
<content type='text'>
Not all devices attached to an MDIO bus are phys. So add an
mdio_device structure to represent the generic parts of an mdio
device, and place this structure into the phy_device.

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>phy: phy_{read|write}_mmd_indirect: get addr from phydev</title>
<updated>2016-01-07T19:31:25Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2016-01-06T19:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=053e7e169229adebbc27fc176c5369398e9f5eba'/>
<id>urn:sha1:053e7e169229adebbc27fc176c5369398e9f5eba</id>
<content type='text'>
The address of the device can be determined from the phydev structure,
rather than passing it as a parameter.

Signed-off-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>
</feed>
