linux_dsm_epyc7002/drivers/net
Hui Wang 107b871333 brcmfmac: Remove waitqueue_active check
We met a problem of pm_suspend  when repeated closing/opening the lid
on a Lenovo laptop (1/20 reproduce rate), below is the log:

[ 199.735876] PM: Entering mem sleep
[ 199.750516] e1000e: EEE TX LPI TIMER: 00000011
[ 199.856638] Trying to free nonexistent resource <000000000000d000-000000000000d0ff>
[ 201.753566] brcmfmac: brcmf_pcie_suspend: Timeout on response for entering D3 substate
[ 201.753581] pci_legacy_suspend(): brcmf_pcie_suspend+0x0/0x1f0 [brcmfmac] returns -5
[ 201.753585] dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -5
[ 201.753589] PM: Device 0000:04:00.0 failed to suspend async: error -5

Through debugging, we found when problem happens, it is not the device
fails to enter D3, but the signal D3_ACK comes too early to pass the
waitqueue_active() check.

Just like this:
brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D3_INFORM);
// signal is triggered here
wait_event_timeout(devinfo->mbdata_resp_wait, devinfo->mbdata_completed,
		   BRCMF_PCIE_MBDATA_TIMEOUT);

So far I think it is safe to remove waitqueue_active check since there
is only one place to trigger this signal (sending
BRCMF_H2D_HOST_D3_INFORM). And it is not a problem calling wake_up
event earlier than calling wait_event.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 14:57:56 +02:00
..
appletalk
arcnet
bonding net: bonding: use __ethtool_get_ksettings 2016-02-25 22:06:46 -05:00
caif
can can: rcar: add gen[12] fallback compatibility strings 2016-02-26 08:43:18 +01:00
cris
dsa net: dsa: mv88e6xxx: support VLAN filtering 2016-03-01 16:24:53 -05:00
ethernet net: ezchip: adapt driver to little endian architecture 2016-03-03 17:20:08 -05:00
fddi
fjes
hamradio dmascc: Return correct error codes 2016-02-16 15:32:34 -05:00
hippi
hyperv hv_netvsc: add ethtool support for set and get of settings 2016-02-29 17:08:50 -05:00
ieee802154 mrf24j40: add writeable missing reg 2016-02-23 20:29:40 +01:00
ipvlan net: ipvlan: use __ethtool_get_ksettings 2016-02-25 22:06:46 -05:00
irda
phy phy: marvell: Fix 88E1510 initialization 2016-02-25 16:08:37 -05:00
plip
ppp ppp: clarify parsing of user supplied data in ppp_set_compress() 2016-02-24 23:52:51 -05:00
slip
team net: team: use __ethtool_get_ksettings 2016-02-25 22:06:46 -05:00
usb lan78xx: add ethtool set & get pause functions 2016-02-29 17:12:07 -05:00
vmxnet3 Driver: Vmxnet3: Update Rx ring 2 max size 2016-02-21 22:04:15 -05:00
wan wan: lmc: Switch to using managed resources 2016-03-02 13:43:03 -05:00
wimax
wireless brcmfmac: Remove waitqueue_active check 2016-03-10 14:57:56 +02:00
xen-netback xen-netback: implement dynamic multicast control 2016-02-07 13:58:36 -05:00
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-02-23 00:09:14 -05:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c net: macvlan: use __ethtool_get_ksettings 2016-02-25 22:06:46 -05:00
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c net/tun: implement ndo_set_rx_headroom 2016-03-01 15:54:30 -05:00
veth.c veth: implement ndo_set_rx_headroom 2016-03-01 15:54:31 -05:00
virtio_net.c virtio_net: validate ethtool port setting and explain the user validation 2016-02-11 11:55:38 -05:00
vrf.c vrf: duplicate include of rtnetlink.h 2016-02-11 09:45:24 -05:00
vxlan.c vxlan: use reset to set header pointers 2016-03-04 22:45:13 -05:00
xen-netfront.c xen-netfront: request Tx response events more often 2016-01-28 16:08:55 -08:00