SMD_DTR_SIG and SMD_CTS_SIG signals are converted to TIOCM_DTR
and TIOCM_RTS respectively, for client notification. This is
incorrect conversion.
SMD_DTR_SIG and SMD_CTS_SIG signals conversion is modified to
TIOCM_DSR and TIOCM_CTS respectively.
CRs-Fixed: 2148119
Change-Id: I7cd61afe4639fc7c5fd993f4047fad3ff04c53a7
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
When a GVM exits normally, it should detach from the shmem
to notify those who are also attached to this shmem.
Change-Id: I37e9d89e321a2feabf1ea134ced4b6d8dd2d3622
Signed-off-by: Yong Ding <yongding@codeaurora.org>
With this profiling function, hab communication overhead can be
measured for performance debug.
Change-Id: I26dd487cfd1bbb811de69d8b35a7c095a21361ac
Signed-off-by: Yong Ding <yongding@codeaurora.org>
The export_desc structure is shared among Hypervisor and
GVMs(Guest Virtual Machines). With the explicit __packed
declared, it can have exactly the same memory layout in
Hypervisor and GVMs.
Change-Id: Iccd25e617dd3152f808593dd54b0a20baad02541
Signed-off-by: Yong Ding <yongding@codeaurora.org>
In the handshake stage of openning hab virtual channel,
hab backend should listen without timeout so that it just
keeps waiting for the coming connection from hab frontend.
Change-Id: I399fe050c5460bf3b56f862141320b2e2afe55e1
Signed-off-by: Yong Ding <yongding@codeaurora.org>
Add several more physical channels as MM_CAM2, MM_CLK_VM1
and MM_CLK_VM2.
Change-Id: I5f3138a9635e8ad0e1fcf2012d406b2d6a3db6c1
Signed-off-by: Yong Ding <yongding@codeaurora.org>
Add device pointer in all export symbol to
add support for numerous WLAN module.
CRs-Fixed: 2138446
Change-Id: I981155c165e4e5c2794b778afe647f8a588dd860
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Floor vote data needs to be protected with mutex lock to
avoid double free of memory due to race condtion.
Change-Id: Ifaa01a14d273ccba6b9463aff3a41c0038b05f06
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
For modem restart and device power off cases, there's no
need to remove MSA0 permission and collect ramdump as these
are normal behavior. Hence only collecting ramdump when
modem is crashed.
CRs-Fixed: 2141678
Change-Id: I42b44da3f08e62c8e375ae1749563d918e68be9d
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
When SSR happending during WLAN interface up, a deadlock will happen
in many places where it waits for FW response. When wlan module starts,
it will hold a rtnl_lock and wait for FW response. If SSR happened at
this point, it will send ssr notification to all the registed modules
one by one. It will send notification to IPA first, which will also
tried to get a hold of rtnl_lock. Since ssr notification is synchronized,
IPA won't be able to return because of failing to acquire the lock and
wlan driver won't release the rtnl_lock until it timeout and crash.
Only graceful to avoid this deadlock is to get early modem
crash notification from platform via a path which does not acquire
RTNL lock and this way once driver has received early crash
notification it can reject interface up.
Modem notification comes to icnss before IPA, hence send
early crash notification in modem SSR handler so that wlan driver
can release RTNL lock as soon as possible.
CRs-Fixed: 2141970
Change-Id: If77c54a2a39ce5cf0e129eb5c6599cd3fd722886
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
qmi_send_req_wait expects timeout argument to be passed in ms and not
in jiffies. Update the call in service-locator to pass in the correct
argument.
Change-Id: Ib2f8deedf2fb2a561c30b0c8511bb1edd5a37361
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
ENOMSG is not a real failure return code for qmi_recv_msg. Instead ENOMSG
signifies that we have finished reading the entirety of the message buffer.
Update the error condition to print errors only when any error message
other than ENOMSG is returned.
Change-Id: Id6b42df182cb02f2cbffaae9698363b7dafce4e4
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Max bandwidth vote on each bus device is required to be
printed when the device panics, so add a panic notifier
to print the max BW votes on each bus device.
Change-Id: I2256407638fe5085cb4b0f4d5a594dd00f4f3bce
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Writing data to DDR is not ensured to be completed even with addition
of data memory barrier. It is possible that CPU receive that write
instruction is completed but in reality data can be stuck in intermediate
buffer.
Readback of write index is added to ensure that remote side is sent
interrupt only after data is written on DDR.
CRs-Fixed: 2136645
Change-Id: I32c4967daf71991621b57421167e0ac8d38ce065
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
do_cleanup_data pointer is created for every SSR notification and
stored in cb_data. It is possible that the stored pointer can be
overwritten if two peripherals SSR happens at the same time.
Use do_cleanup_data pointer directly in pkt_priv, instead of
dereferencing from cb_data.
CRs-Fixed: 2121529
Change-Id: Ife68cdc460c0628623dea6827632b8acd8d1d955
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Add support to route QDSS data received from MDM via MHI
to USB. The driver will help route diag traffic over the
QDSS sub-system to USB on APPS side. It acts as a bridge
between PCIE MHI and USB interface.
Change-Id: I98bea976638ce3f80785d8f40e2a936fc62397eb
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
The existing state check will create a corner case that when FW
crashed during driver probe, platform driver won't send early
uevent notification to host driver, which create a small window where
host can communicate with FW when FW is crashed. This case can be
covered by checking FW_READY state instead.
CRs-Fixed: 2122702
Change-Id: I0bde9cb5a526ccd9fe81cd38bd4c27cf2e95042b
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
Check NMI STATUS register and dump the log if the err fatal caused
on subsystem is due to TZ NMI.
Change-Id: I8ac4190aca60aeedcd41fd06e2f7dd053edd0f30
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
When icnss driver sees a PD down, and if the recovery is already in
progress, it forces an assert in debug builds. That is to detect any
Modem failures during PDR or to catch any instance of recursive PDRs.
When system goes thru a reboot or shutdown, and if the recovery is in
progress then avoid calling this assert.
CRs-Fixed: 2135071
Change-Id: I28f5c79a4cd8b83f60a62111535b11c2fba6000b
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
During probe function of the Linux PIL kernel driver
Initialization of various resources are done.
This fix is for acquired resource cleanup, in case of error.
Change-Id: I0b3511cff7e2917fe83bddfc15086e939f5c2abc
Signed-off-by: Jitendra Sharma <shajit@codeaurora.org>
During SSR, down vote transport of xprt is not called.
This leads to transport not being able to go to idle state.
Downvote of transport is called in SSR path.
CRs-Fixed: 2131780
Change-Id: Ic374073187aab95b700aa3f795787819f34d3c3c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Name added for wake source is stored in stack memory. It does
not exist after the stack is gone, this leads to use after free
case.
Added name from Glink xprt struct which persists until
IPCRTR is not removed.
CRs-Fixed: 2124767
Change-Id: I580cf6d6d12682f1f3f25c2506c2b1a969ee89b8
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Update the virtualized audio ION driver to add SMMU support.
The virtualized audio ION driver will provide the ION memory
allocated from the guest VM to the physical VM to perform SMMU
mapping.
The virtualized audio ION driver will receive SMMU mapped
device address from physical VM and provide the device address
to its clients. Upon its client frees the memory, the virtualized
audio ION driver will request the physical VM to perform SMMU
un-mapping.
CRs-fixed: 2099245
Change-Id: Idca4ecda65910308d7f7af288381866ab4ce4a7a
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
Add support for virtualized APR and ION frontend driver
for audio.
Virtualized APR frontend driver resides in guest VM and
supports all legacy APR APIs. It will rely on MSM_HAB
to communicate with APR backend driver, which resides in
physical VM, where legacy SMD is utilized for communication
between APPS and ADSP.
Virtualized ION driver currently is designed to extract
physical memory through hypervisor abstracted ion layer,
which can be shared between APPS and ADSP directly.
CRs-fixed: 2047379
Change-Id: I7dad5aebfd1db00cd32807dc1219818a7a4e62c5
Signed-off-by: Derek Chen <chenche@codeaurora.org>
RX intent no timeout value when waiting for response. This can result
in calling function to wait indefinitely.
Set max waiting time to 500 ms.
CRs-Fixed: 2127311
Change-Id: I30475ca49f107e62bed41d3d26287562574d988c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
If wlan driver probe returns error of defer, platform driver will
try to recover by calling probe again. The maximun probe count
is 2.
CRs-Fixed: 2124152
Change-Id: Ic973d0f1d76fc59ce5950397d42a9e778cacaa5a
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Current code do not remap SCM busy error codes and return
the same code to the client. This causes confusion as
client drivers check the return value against linux
error codes for other failure cases and also can't
access the internal SCM busy error code definitions.
Fix this by remapping SCM busy error codes to -EBUSY.
Change-Id: Ic3dcdf415b2edc85714fcb0c821ec302fcd967d3
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>