]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: qmi_wwan: MDM9x30 specific power management
authorBjørn Mork <bjorn@mork.no>
Thu, 3 Dec 2015 18:24:18 +0000 (19:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 09:45:29 +0000 (11:45 +0200)
commit85338431fcf945d785b414a1a234d986d4140666
tree8aeb4984197da62fb1a993794ec360ba091ce18d
parente3f2b1f74779e98717cb4af4bda9b54576c9dd9a
net: qmi_wwan: MDM9x30 specific power management

[ Upstream commit 93725149794d3d418cf1eddcae60c7b536c5faa1 ]

MDM9x30 based modems appear to go into a deeper sleep when
suspended without "Remote Wakeup" enabled.  The QMI interface
will not respond unless a "set DTR" control request is sent
on resume. The effect is similar to a QMI_CTL SYNC request,
resetting (some of) the firmware state.

We allow userspace sessions to span multiple character device
open/close sequences.  This means that userspace can depend
on firmware state while both the netdev and the character
device are closed.  We have disabled "needs_remote_wakeup" at
this point to allow devices without remote wakeup support to
be auto-suspended.

To make sure the MDM9x30 keeps firmware state, we need to
keep "needs_remote_wakeup" always set. We also need to
issue a "set DTR" request to enable the QMI interface.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/qmi_wwan.c