linux/drivers/net/ethernet
Tony Lindgren b5133e7a98 net: davinci_emac: Fix runtime pm calls for davinci_emac
Commit 3ba9738134 ("net: ethernet: davinci_emac: add pm_runtime support")
added support for runtime PM, but it causes issues on omap3 related devices
that actually gate the clocks:

Unhandled fault: external abort on non-linefetch (0x1008)
...
[<c04160f0>] (emac_dev_getnetstats) from [<c04d6a3c>] (dev_get_stats+0x78/0xc8)
[<c04d6a3c>] (dev_get_stats) from [<c04e9ccc>] (rtnl_fill_ifinfo+0x3b8/0x938)
[<c04e9ccc>] (rtnl_fill_ifinfo) from [<c04eade4>] (rtmsg_ifinfo+0x68/0xd8)
[<c04eade4>] (rtmsg_ifinfo) from [<c04dd35c>] (register_netdevice+0x3a0/0x4ec)
[<c04dd35c>] (register_netdevice) from [<c04dd4bc>] (register_netdev+0x14/0x24)
[<c04dd4bc>] (register_netdev) from [<c041755c>] (davinci_emac_probe+0x408/0x5c8)
[<c041755c>] (davinci_emac_probe) from [<c0396d78>] (platform_drv_probe+0x48/0xa4)

Let's fix it by moving the pm_runtime_get() call earlier, and also add it to
the emac_dev_getnetstats(). Also note that we want to use pm_runtime_get_sync()
as we don't want to have deferred_resume happen. And let's also check the
return value for pm_runtime_get_sync() as noted by Felipe Balbi <balbi@ti.com>.

Cc: Brian Hutchinson <b.hutchman@gmail.com>
Acked-by: Mark A. Greer <mgreer@animalcreek.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-16 01:00:03 -05:00
..
3com
8390 ne2k-pci: Add pci_disable_device in error handling 2014-12-27 02:20:55 -05:00
adaptec
adi
aeroflex
agere
allwinner net: sun4i-emac: fix error return code 2014-12-31 19:19:00 -05:00
alteon
altera Altera TSE: Add missing phydev 2015-01-02 15:45:10 -05:00
amd Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
apm
apple
arc
atheros alx: fix alx_poll() 2015-01-11 21:45:50 -05:00
broadcom tg3: Release tp->lock before invoking synchronize_irq() 2015-01-14 17:05:51 -05:00
brocade net: incorrect use of init_completion fixup 2014-12-26 17:07:50 -05:00
cadence net/at91_ether: prepare and unprepare clock 2015-01-12 15:35:47 -05:00
calxeda
chelsio cxgb4vf: Fix queue allocation for 40G adapter 2015-01-14 16:48:08 -05:00
cirrus cirrus: cs89x0: fix time comparison 2014-12-15 11:44:21 -05:00
cisco enic: free all rq buffs when allocation fails 2015-01-02 16:43:45 -05:00
davicom Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dec uli526x: fix misspelling of current function in string 2014-12-09 16:18:46 -05:00
dlink
emulex be2net: Allow GRE to work concurrently while a VxLAN tunnel is configured 2015-01-15 01:55:05 -05:00
faraday
freescale net: fec: fix MDIO bus assignement for dual fec SoC's 2015-01-14 00:27:10 -05:00
fujitsu
hisilicon
hp hp100: fix misspelling of current function in string 2014-12-09 16:18:47 -05:00
i825xx
ibm Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
icplus
intel i40e: adds FCoE configure option 2015-01-14 16:48:39 -05:00
marvell Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mellanox net/mlx4: Don't disable vxlan offloads under DMFS-A0 optimized steering 2015-01-15 19:35:30 -05:00
micrel net: ethernet: micrel: ksz884x.c: Remove unused function 2014-12-22 16:23:09 -05:00
microchip
moxa
myricom myri10ge: fix error return code 2014-12-31 19:19:00 -05:00
natsemi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
neterion
nuvoton
nvidia
nxp
octeon
oki-semi
packetengines
pasemi net-PA Semi: Deletion of unnecessary checks before the function call "pci_dev_put" 2014-12-05 21:14:20 -08:00
qlogic qla3xxx: don't allow never end busy loop 2015-01-06 17:41:36 -05:00
qualcomm
rdc
realtek 8139too: Add netif_napi_del in the driver 2014-12-22 16:31:58 -05:00
renesas sh_eth: Fix addition of .trscer_err_mask to wrong SoC data 2015-01-15 14:09:37 -05:00
rocker rocker: remove swdev mode 2014-12-09 18:24:47 -05:00
samsung net: sxgbe: Fix waring for double kfree() 2015-01-15 19:01:10 -05:00
seeq
sfc ethtool: Support for configurable RSS hash function 2014-12-08 21:07:10 -05:00
sgi
silan
sis
smsc net: smc91x: Fix build without gpiolib 2014-12-15 11:46:54 -05:00
stmicro net: ethernet: stmicro: stmmac: drop owner assignment from platform_drivers 2014-12-22 16:30:00 -05:00
sun sunvnet: fix a memory leak in vnet_handle_offloads 2014-12-19 13:19:45 -05:00
tehuti
ti net: davinci_emac: Fix runtime pm calls for davinci_emac 2015-01-16 01:00:03 -05:00
tile
toshiba
tundra
via
wiznet Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
xilinx net: axienet: fix error return code 2014-12-31 19:19:00 -05:00
xircom
xscale
dnet.c net: dnet: fix dnet_poll() 2015-01-11 21:44:55 -05:00
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c jme: replace calls to redundant function 2014-12-12 15:15:41 -05:00
jme.h
Kconfig net: s6gmac: remove driver 2014-12-22 16:29:03 -05:00
korina.c
lantiq_etop.c
Makefile net: s6gmac: remove driver 2014-12-22 16:29:03 -05:00
netx-eth.c