Commit graph

858,660 commits

Author SHA1 Message Date
qctecmdr
c9fa75eefb Merge "net: qrtr: Add node assignment on new server" 2019-10-10 15:56:44 -07:00
qctecmdr
7e256c1af4 Merge "net: qrtr: Rename qrtr_all_nodes to qrtr_all_epts" 2019-10-10 15:16:51 -07:00
qctecmdr
e3f1343384 Merge "net: qrtr: Add support for multiple nodes on a single ept" 2019-10-10 14:36:42 -07:00
qctecmdr
6a4fdbd9f8 Merge "net: qrtr: use alloc_skb_with_frags() in rx path" 2019-10-10 13:55:40 -07:00
qctecmdr
dff88d9803 Merge "net: qrtr: Check function pointer before calling" 2019-10-10 13:16:54 -07:00
qctecmdr
ced544985b Merge "net: qrtr: Prevent stale ports from sending" 2019-10-10 12:29:55 -07:00
qctecmdr
e6c9811c7a Merge "net: qrtr: Detach socket from sock during release" 2019-10-10 11:41:01 -07:00
qctecmdr
0e0da9c48b Merge "arm64: defconfig: Enable IPC IRQ driver for Lahaina" 2019-10-09 13:38:24 -07:00
qctecmdr
1da27d7311 Merge "clk: qcom: Export clk_lucid_5lpe_pll_configure()" 2019-10-09 12:45:26 -07:00
qctecmdr
f62c401333 Merge "msm: ipa: mark the IPA clock on in virtual/emulation mode" 2019-10-09 12:45:26 -07:00
qctecmdr
97d4ac5021 Merge "arm64: defconfig: Enable CONFIG_QGKI for Non GKI build" 2019-10-09 11:55:04 -07:00
qctecmdr
ba4a2a4950 Merge "msm: ipa3: remove ipa3_ctx access from wan driver and qmi service" 2019-10-09 11:55:03 -07:00
Chris Lew
b92521c119 net: qrtr: Add node assignment on new server
The remote processor will not forward a hello packet for the other
processors that it is forwarding from. Discover nodes through
QRTR_TYPE_NEW_SERVER messages as well in order to find remote hosts
which require more than one hop to reach it.

Change-Id: Ia79df1fa2730250786d221fb847029046a53bea4
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-09 11:35:20 -07:00
Chris Lew
5afd5bc51d net: qrtr: Rename qrtr_all_nodes to qrtr_all_epts
The node list only respresents the adjacent nodes in the system. Rename
the list to qrtr_all_epts to better describe the list contents. Rename
qrtr_nodes_lock to qrtr_epts_lock to better describe lock.

Change-Id: I168ca597d5b9b30d6c064c2a56b6e8b2dffa387b
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-09 11:35:20 -07:00
Chris Lew
162cff4d10 net: qrtr: Add support for multiple nodes on a single ept
An ept can be associated with multiple node ids in network. The node
tree should keep track of how to send to a specific node id where as
the node list should keep track of all the adjacent nodes in the
network. Use the node list to broadcast control messages to adjacent
nodes.

Change-Id: If0f4828da149b6e590525518a8410f497f5e3894
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-09 11:35:19 -07:00
Arun Kumar Neelakantam
33685bb27f net: qrtr: use alloc_skb_with_frags() in rx path
net_dev_alloc() fails for high order allocations in system where memory
is fragmented and cause communication stall due to packet drops.

Use alloc_skb_with_frags() to avoid packet drops in memory fragmented case.

This change squashes the following commits from msm-4.14:
  commit 5121b211a5e6 ("net: qrtr: Use skb with fragments in memory
                        failure case")
  commit bdc91a0dae07 ("net: qrtr: use alloc_skb_with_frag() in rx path")

In addition, fix minor format issues and update the copyright.

Change-Id: I46b7e0da0ed04c9222c975ee930f0f8d9b41453b
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2019-10-09 11:35:19 -07:00
Arun Kumar Neelakantam
a8fb633c78 net: qrtr: Check function pointer before calling
sk_error_report callback function called without validating cause the NULL
pointer dereference.

Validate function pointer before using for error report.

Change-Id: I19d04f85a5457f3857623088f8e0578514f0c395
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2019-10-09 11:35:19 -07:00
Chris Lew
d2a5084230 net: qrtr: Prevent stale ports from sending
The current implementation of the control port bind releases and
reacquires the port lock between allocating the port idr and resetting
the existing sockets. This creates a race condition where sockets
can send to the control port during the control port bind. Hold the
lock for the duration of the control port bind to prevent this.

In order to prevent messages from stale sockets being sent, check if
ENETRESET has been set on the socket and drop the packet.

Change-Id: Ie9abc6c51139e82d3c9ebd4d546d1acd7269875e
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-09 11:35:18 -07:00
Chris Lew
0d116bcb6a net: qrtr: Detach socket from sock during release
There is a race between releasing a socket and a sock structure. Skbs
still in flight may hold references to the sock structure, preventing
it from being freed when the socket is released. Detach the socket in
the release call to prevent references to that sockets resources.

Change-Id: I44ac553cf73b3a2148ce50d7552c39b08f5e0f91
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-09 11:21:23 -07:00
qctecmdr
ffa1b3486d Merge "msm: gsi: gsi channel QoS register update" 2019-10-09 11:02:49 -07:00
qctecmdr
967986251f Merge "msm: ipa3: Fix to not remove endpoint delay if stop channel fails" 2019-10-09 10:17:35 -07:00
qctecmdr
b53f720c52 Merge "ion: msm: Correct OF node refcount handling in error paths" 2019-10-09 09:23:24 -07:00
qctecmdr
3f044b1ec2 Merge "ion: msm: enable debugfs for ion heaps" 2019-10-09 08:29:17 -07:00
qctecmdr
e8eaa8ee05 Merge "ion: msm: Assume devicetree support" 2019-10-09 06:41:46 -07:00
qctecmdr
6dad06ccde Merge "ion: msm: Upgrade the ION ABI version" 2019-10-09 06:03:01 -07:00
qctecmdr
6789de4ceb Merge "ion: msm: Fix several errors in the MSM ION kernel header" 2019-10-09 05:29:27 -07:00
Ashok Vuyyuru
a1575e6ec0 msm: ipa3: Fix to not remove endpoint delay if stop channel fails
Because of removing endpoint delay when the stop channel failed case
observing some junk packets received on a pipe. To avoid junk packets,
add change to avoid endpoint delay if stopping GSI channel fails.

Change-Id: I4d3d8d9a0de823229d780fe31c8d7f1162e20668
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2019-10-09 00:15:18 -07:00
qctecmdr
053a2be904 Merge "pinctrl: Add api to enable/disable wakeup capability for a gpio" 2019-10-09 00:09:01 -07:00
Jay Jayanna
af86cde1f5 arm64: defconfig: Enable IPC IRQ driver for Lahaina
Enable QSEE IPC IRQ driver for Lahaina. This can now be
compiled as a module.

Change-Id: I3c196a6f819c3422663379cb72b0a9355c7c0233
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
2019-10-08 23:31:01 -07:00
Jay Jayanna
6aa3534582 soc: qcom: Add snapshot for QSEE IPC IRQ driver
This snapshot is taken as of msm-4.19 'commit <d2f41beab007i>
("Merge "msm: npu: Add bandwidth monitor support"")'.
Update made to the license.

This is a basic driver for cascading interrupts from QSEE. This
driver will perform the common interrupt handling code for interrupts
from QSEE incluiding clearing the interrupt through a register write.

Change-Id: I8336a60749d3d642c96d0d045f0874f56812d04e
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
2019-10-08 23:25:43 -07:00
qctecmdr
9963fe6c8a Merge "defconfig: lahaina-gki: enable refgen regulator driver" 2019-10-08 23:11:50 -07:00
qctecmdr
f755b6b67f Merge "net: qrtr: Change port allocation to use cyclic idr" 2019-10-08 22:32:56 -07:00
qctecmdr
81b7681939 Merge "arm64: defconfig: Enable gcc clock driver for Lahaina" 2019-10-08 21:40:36 -07:00
qctecmdr
0468e66895 Merge "net: qrtr: Change node mutex to a rw_semaphore" 2019-10-08 21:00:30 -07:00
qctecmdr
13db81d1b0 Merge "msm: gsi: gsi 2.9 upgrade" 2019-10-08 20:16:25 -07:00
qctecmdr
f611892041 Merge "of: Make of_get_ddrtype module friendly" 2019-10-08 19:24:26 -07:00
qctecmdr
2810686555 Merge "soc: qcom: Add a config flag to know the build variant" 2019-10-08 18:40:12 -07:00
Rishabh Bhatnagar
9c23c34725 pinctrl: Add api to enable/disable wakeup capability for a gpio
Add api to write to mpm wakeup registers to configure a gpio
as wakeup capable.

Change-Id: Ia11a22160394e76969200691cfaf8fb1505bf5c1
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-10-08 14:28:03 -07:00
Jeevan Shriram
9c0e5c7054 drivers: pinctrl: Add support for read/write of QUP registers
Add support to read and write QUP mode registers in TLMM block.

Change-Id: I9878af50f6920c577fa74047e01e9b37c0542dd1
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
[eberman@codeaurora.org: reintroduce msm_pinctrl_data]
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-10-08 14:28:03 -07:00
Michael Adisumarta
32a50913d1 msm: ipa3: remove ipa3_ctx access from wan driver and qmi service
Access ipa3_ctx through ipa_utils.c instead of direct access
which is prohibited.

Change-Id: I8b76b536c4bebef3374dd0c93d4af58cae122f1d
Acked-by: Suhas Mallesh <smallesh@qti.qualcomm.com>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2019-10-08 11:45:36 -07:00
Bojun Pan
9fb4529961 msm: ipa: mark the IPA clock on in virtual/emulation mode
The IPA enable/disable clock logic will be stubbed out on virtual
or emulation mode. The change here is to set the IPA clock flag
to true always and assume we always have IPA clock on.

Change-Id: Ibece0630033a8cd129461e6831ecfc85f00e2121
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2019-10-08 11:10:01 -07:00
Bojun Pan
bc912e31b9 msm: gsi: gsi channel QoS register update
GSI QoS register upgrade for GSI v2.9, introduce the
new field of db_in_bytes.

Change-Id: I1d0ff4381a6b6ac1f5119d0be2efea29a49a5dcc
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2019-10-08 10:11:01 -07:00
Chris Lew
06809f9816 net: qrtr: Change port allocation to use cyclic idr
There is a race for clients that open sockets before the control port
is bound. If a client gets an idr that was allocated before the control
port is bound, there is a chance the previous address owner sent lookup
packets to the control port. The new address owner will get residual
responses to this the lookup packets.

Change the idr_alloc to idr_alloc_cyclic so new idr's are allocated
instead of trying to reuse the freed idrs.

Change-Id: Ie1bda7a818309503f80542e739bac646327296f7
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:50:11 -07:00
Chris Lew
5e6fd7cda2 net: qrtr: Change node mutex to a rw_semaphore
There is a chance for a remote processor to become unresponsive while
QRTR is trying to broadcast a control message. This results in the node
lock being held for an extended period of time and prevents node lookup
which is needed to send messages.

Change the mutex to a rw_semaphore to allow concurrency during node
lookups and broadcasts.

Change-Id: I2e3fdde22edaac64f164cf08900e9d09b16c380d
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:50:11 -07:00
Chris Lew
01b08fdd53 net: qrtr: Add socket mode optimization
A remote endpoint should not need to know when a client socket is freed
if the socket never established commnication with the endpoint. Add a
mode to keep track of which endpoints a socket communicates with.

There are three modes a socket can be in:
	INIT   - Socket has not sent anything or only local messages,
		 only send client close to local services.

	SINGLE - Socket has sent messages to a single ept, send event
		 to this single ept.

	MULTI  - Socket has sent messages to multiple epts, broadcast
		 release of this socket.

Server state changes should be broadcast throughout the system. Change
the ipc state of a port when it sends a NEW SERVER control packet. This
ensures the DEL CLIENT control packet is propagated correctly for
servers.

This change squashes the following commits from msm-4.14:
  commit 3373eb77cd6d ("net: qrtr: Add socket mode optimization")
  commit d984a2d6f150 ("net: qrtr: Make servers multi state ports")

In addition, fix minor format issues.

Change-Id: I416742cff598bf7aa9da2baa2e86a53b18367870
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:50:11 -07:00
Chris Lew
94869df328 net: qrtr: Do not send packets before hello negotiation
There is a race where broadcast packets can be sent to a node that has
not sent the hello message to the remote processor. This breaks the
protocol expectation. Add a status variable to track when the hello
packet has been sent.

An alternative solution attempted was to remove the nodes from the
broadcast list until the hello packet is sent. This is not a valid
solution because hello messages are broadcasted if the ns is restarted
or started late. There needs to be a status variable separate from the
broadcast list.

This change squashes the following commits from msm-4.14:
  commit abd3961d05be ("qrtr: Only broadcast to initialized nodes")
  commit 90cb0e473226 ("net: qrtr: Do not send packets before Hello
                        negotiation")
  commit 07abd1abe803 ("net: qrtr: Fix hello packet drop memory leak")

In addition, fix minor format issues.

Change-Id: I2a55e587f324e64e2bde4ea634de66008f190de1
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:49:48 -07:00
qctecmdr
c4787643fa Merge "net: qrtr: Align header and payload" 2019-10-07 15:20:46 -07:00
Isaac J. Manjarres
03bb3d6ddd ion: msm: Correct OF node refcount handling in error paths
The for_each_[available]_child_of_node iterators implicitly
increment the reference count on the current OF node at the
start of the iteration, and decrements it at the end of the
iteration.

However, if the control flow is such that the loop
can be broken out of prior to finishing an iteration, then
the reference count must be decremented in the subsequent
code path.

Thus, fix the error path in the MSM ION code to decrement the
reference on the current OF node when prematurely exiting
an of_node loop.

Change-Id: I5c2ec02a57eff416c04b1fe63c80d6e573a692d4
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-07 15:13:39 -07:00
qctecmdr
7f16200f1c Merge "soc: qcom: qmi_interface: Protect sk_user_data with RCU" 2019-10-07 14:24:19 -07:00
qctecmdr
226b72604a Merge "pinctrl: qcom: Add EGPIO feature support to pinctrl driver" 2019-10-04 19:27:42 -07:00