linux_dsm_epyc7002/drivers/net
Vaibhav Gupta 7b46681cf4 typhoon: use generic power management
With legacy PM, drivers themselves were responsible for managing the
device's power states and takes care of register states. And they use PCI
helper functions to do it.

After upgrading to the generic structure, PCI core will take care of
required tasks and drivers should do only device-specific operations.

In this driver:
typhoon_resume() calls typhoon_wakeup() which then calls PCI helper
functions pci_set_power_state() and pci_restore_state(). The only other
function, using typhoon_wakeup() is typhoon_open().

Thus remove the pci_*() calls from tyhpoon_wakeup() and place them in
typhoon_open(), maintaining the order, to retain the normal behavior of
the function

Now, typhoon_suspend() calls typhoon_sleep() which then calls PCI helper
functions pci_enable_wake(), pci_disable_device() and
pci_set_power_state(). Other functions:
 - typhoon_open()
 - typhoon_close()
 - typhoon_init_one()
are also invoking typhoon_sleep(). Thus, in this case, cannot simply
move PCI helper functions call.

Hence, define a new function typhoon_sleep_early() which will do all the
operations, which typhoon_sleep() was doing before calling PCI helper
functions. Now typhoon_sleep() will call typhoon_sleep_early() to do
those tasks, hence, the behavior for _open(), _close and _init_one() remain
unchanged. And typhon_suspend() only requires typhoon_sleep_early().

Compile-tested only.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-01 12:58:33 -07:00
..
appletalk docs: networking: move AppleTalk / LocalTalk drivers to the hw driver section 2020-06-26 16:08:45 -07:00
arcnet
bonding bonding: Remove extraneous parentheses in bond_setup 2020-06-26 12:18:40 -07:00
caif caif: fix cfv_netdev_tx()'s return type 2020-06-28 20:52:53 -07:00
can
dsa net: dsa/bcm_sf2: move pause mode setting into mac_link_up() 2020-06-30 13:05:10 -07:00
ethernet typhoon: use generic power management 2020-07-01 12:58:33 -07:00
fddi docs: networking: move FDDI drivers to the hw driver section 2020-06-26 16:08:45 -07:00
fjes
hamradio docs: networking: move baycom to the hw driver section 2020-06-26 16:08:44 -07:00
hippi
hyperv
ieee802154
ipa
ipvlan
netdevsim
phy of: mdio: provide devm_of_mdiobus_register() 2020-06-30 15:57:34 -07:00
plip net: plip: fix plip_tx_packet()'s return type 2020-06-28 20:52:53 -07:00
ppp
slip
team
usb usbnet: ipheth: fix ipheth_tx()'s return type 2020-06-28 20:52:53 -07:00
vmxnet3
wan
wimax
wireguard wireguard: receive: account for napi_gro_receive never returning GRO_DROP 2020-06-25 16:16:21 -07:00
wireless docs: networking: move ray_cs to the hw driver section 2020-06-26 16:08:44 -07:00
xen-netback
bareudp.c bareudp: Added attribute to enable & disable rx metadata collection 2020-06-28 20:48:20 -07:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c net: thunderbolt: Add comment clarifying prtcstns flags 2020-06-23 20:36:02 -07:00
tun.c
veth.c
virtio_net.c
vrf.c
vsockmon.c
vxlan.c vxlan: fix last fdb index during dump of fdb with nhid 2020-06-25 16:12:34 -07:00
xen-netfront.c