linux/drivers/net
Stas Sergeev a3bebdce41 add fixed_phy_update_state() - update state of fixed_phy
Currently fixed_phy uses a callback to periodically poll the link state.
This patch adds the fixed_phy_update_state() API.
It solves the following problems:
- On link state interrupt, MAC driver can't update status.
Instead it needs to provide the callback to periodically query
the HW about the link state. It is more efficient to update status
after interrupt.
- The callback needs to be unregistered before phy_disconnect(),
or otherwise it will be called with net_dev==NULL. phy_disconnect()
does not have enough info to unregister the callback automatically.
- The callback needs to be registered before of_phy_connect() to
avoid running with outdated state, but of_phy_connect() returns the
phy_device pointer, which is needed to register the callback. Registering
it before of_phy_connect() will therefore require a hack to get the
pointer earlier.

Overall, this addition makes the subsequent patch that implements
SGMII link status for mvneta, much cleaner.

CC: Florian Fainelli <f.fainelli@gmail.com>
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-03 15:08:20 -04:00
..
appletalk net/appletalk: LTPC needs virt_to_bus 2015-02-20 16:28:46 -05:00
arcnet net: Kill dev_rebuild_header 2015-03-02 16:43:41 -05:00
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
caif caif: remove unused struct member 2015-04-01 12:43:09 -04:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
cris
dsa net: dsa: mv88e6xxx: Fix stats counters for 6352 family 2015-04-01 22:55:41 -04:00
ethernet i40e: Bump to version 1.3.1 2015-04-03 03:54:32 -07:00
fddi
hamradio ax25: remove unneeded NULL test in ax_xmit() 2015-03-06 21:50:42 -05:00
hippi
hyperv hv_netvsc: Eliminate memory allocation in the packet send path 2015-03-31 14:12:36 -04:00
ieee802154 at86rf230: fix is_tx while error handling 2015-03-27 19:18:51 +01:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
irda
phy add fixed_phy_update_state() - update state of fixed_phy 2015-04-03 15:08:20 -04:00
plip
ppp ipv4: hash net ptr into fragmentation bucket selection 2015-03-25 14:07:04 -04:00
slip
team team: Don't segment multiple tagged packets on team device 2015-03-29 13:33:24 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
vmxnet3 vmxnet3: spelling fixes 2015-04-01 22:52:29 -04:00
wan wan: cosa: replace current->state by set_current_state() 2015-02-22 15:24:10 -05:00
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-02 16:16:53 -04:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-20 18:51:09 -04:00
dummy.c
eql.c
ifb.c
Kconfig ipvlan: Fix text that talks about ip util support 2015-02-20 16:35:44 -05:00
LICENSE.SRC
loopback.c
macvlan.c macvlan: implement ndo_get_iflink 2015-04-02 14:05:00 -04:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
Makefile
mdio.c
mii.c
netconsole.c netconsole: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:37 -05:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
veth.c veth: set iflink to the peer veth 2015-04-02 14:05:01 -04:00
virtio_net.c virtio: simplify the using of received in virtnet_poll 2015-03-29 12:37:17 -07:00
vxlan.c vxlan: correct spelling in comments 2015-04-01 22:52:29 -04:00
xen-netfront.c xen-netfront: Use static attribute groups for sysfs entries 2015-02-05 00:31:12 -08:00