QMI timeout value is to be sent to the icnss2 module
during initialization using module_param.
Change-Id: Ibb6038ccdcac5b59b4f72597588312b4b064da0e
Signed-off-by: Vijay Patil <vijaylil@codeaurora.org>
For qca6490, read dts first to get default gen speed, if valid
setting existing, then use it, else use gen2.
Change-Id: I6cb507746d677da114408e78076c3cc21073a829
CRs-Fixed: 3003876
Signed-off-by: Jianmin Zhu <jianminz@codeaurora.org>
Use the mmap_sem lock from passed 'mm' rather than the 'current' as it
is required because of the patchset[1]. The commit f4fa8d937e ("mm:
madvise: fix vma user-after-free") changed the 'mmap_sem' to use from
'current' instead of 'mm' context. Revert it.
Link: [1] https://patchwork.kernel.org/project/linux-mm/patch/20200302193630.68771-2-minchan@kernel.org/.
Change-Id: Ifc9deb2a5f0775c2bc97c85db3584f61fa3a43ae
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Enabling global irq after link enumeration causes link
failure with IPQ host. Global irq is enabled before
enumeration for ipq host alone.
Change-Id: I20fa69c05bd3bc97fddea35e9e30833bca04c54b
Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org>
We need to perform icc bus vote when enable endpoint and bus unvote when
disable endpoint. However, icc_path is released during endpoint disable
(by ep_pcie_clk_deinit()). This change fixes icc bus vote and adds icc bus
unvote accordingly.
Change-Id: Iaa4c6e4df5923a325f038dba689ef17bc746bab4
Signed-off-by: Can Guo <cang@codeaurora.org>
sdx targets rely on oom killer to kill the processes as there is
no lmk. so, disable panic_on_oom on sdxnightjar.
Change-Id: I67f055ec9e7412495360cdc5f1aa2350a4e3fab9
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Make sure there is enough room in the memory descriptor to store the
entire profiling buffer object.
Change-Id: I1e1c73097bb2bba9645b0a3c66fdbbc71d8ba8fa
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
Send WPSS restart level type as enable or disable PHY processor
SSR to FW using QMI.
Change-Id: I28879cf13e5874c49b2c346c076082f7f8a59fe1
Signed-off-by: Vijay Patil <vijaylil@codeaurora.org>
During IB parse, vmalloc is called which can sleep and
should not be called from atomic context. Since IBs are not
dumped during atomic snapshot, there is no need to parse it.
Change-Id: I116d095958d99a8caeafb24dc45684ead01c961d
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
Update the maximum apcs_cpu_pll frequencies based on the latest
lucid_5lpe HW recommendations.
Change-Id: I3e88cbae6c60bde9648ec2b454765c27ff07bee4
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
The CPU PLLs latch interface is custom and not entirely reliable. So
instead use the standard lucid_5lpe ops and bypass the latch interface.
Change-Id: I0bc46e329ed5e135f26a08a4f09dd1872013ed7a
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
Some PLL instances don't have a fully functional latch interface and
it's not strictly required in all circumstances. So add support for
bypassing it.
Change-Id: I60c319c0f50c8eca159afa32ee3cbd83bb1af510
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
Reap tasks that are killed by PreKillActionT.
Change-Id: I367e803848121d071d8143952eaa9b7195ae04d6
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Avoid printing error when ENODEV is returned from glink callback
and use dev_err_ratelimited so that throttling will not happen
due to excessive logging.
Change-Id: I9369046c2f907ecd38416c8927764c7a8b7c1ca4
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
This change ensures the IOS lines are in protocol default state before
starting the data transfer. This ensures the slave is properly powered
up and also protocol lines are in IDLE High state.
We can prevent any further try to send data which can be failed due to
lines not in proper state.
Change-Id: Ibd9a6109133dd776f86a841f8bde305d08d2c187
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
With the commit <37ea867103f2>("msm: ep-pcie: Use threaded irq for
PERST de-assertion handling"), PCIe driver notifies the PM_RST_DEAST
event in threadedIRQ context. Process this event in the same
context so that we can finish link initialization and training as
quickly as possible.
Change-Id: If920fd9b653d6ae82cea599effb2d912a9b08174
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
When the host de-asserts the PERST, ep-pcie driver needs to bring-up
the link as quickly as possible (within 150ms). Otherwise, the host
may fail to detect the link.
In our current design, we are doing the link initialization and
link training in a kworker thread context. In some scenarios
this context is incurring context switches and scheduling delays
which is resulting in issues like the host fails to detect the link.
To fix this, perform the link initialization and training in the
highest possible priority (threaedIRQ). With this change, PCIe driver
notifies clients in threadedIRQ context and the clients (Eg MHI)
supposed to invoke the link training in the same context.
Change-Id: I04de4a1dfb3a145b947a2824c6961da70215944b
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Fix potential memory leak situation when receiving a message of type
HAB_PAYLOAD_TYPE_EXPORT_ACK. Add kfree() to free ack_recvd.
Change-Id: Iaa5cb10af694b20647f2f04f3c030bfa2ba59a3d
Signed-off-by: lixiang <lixiang@codeaurora.org>
Update "get_fifo_length_us" function to support the T_LRA_X_2/4/8
periods. So that the FIFO mode can work for all T_LRA periods.
Change-Id: I5d6b2c95eff66cddcec9388082c4d540493f2c86
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
For mass storage function driver ep_disable will be called in worker
thread context. Making sure controller is active and then calling
ep_disable and then putting controller back to lpm is very difficult
to achieve in mass storage driver. The reason is that fsg_disable
raises an exception which actaully waits for the completion
callback to come from gadget driver and if for some reason (like
command timeout error) if it doesn't, then do_set_iterface will
not be called which will do put_sync. This can prevent controller
from going to lpm.
To solve above problem, commit ad8d260c33 ("usb: dwc3: gadget: Check
controller status with endpoint enable/disable") moved pm_runtime_sync
operations from mass storage driver to gadget driver. But there is a
chance that pm_runtime get_sync and put sync operations in gadget
driver can be called in atomic context (taking spin_lock in function
driver and then calling) and lead to crash. Adding in_lpm check and
performing these operations only if controller is in lpm will ensure
that these operations will be done only for mass storage driver and
not be done in atomic context. For other function drivers where
ep_disable will be called in atomic context, there is no chance that
ep_disable will be called when controller is in lpm as bh_work or
resume work will be called and will ensure controller to be out of
LPM before ep_disable is called.
Change-Id: I37635fd75e44a67deadbd4796b757d85d604aed4
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
When in rndis composition, if device is disabled in device manager,
usb enters low power mode. Then if rndis interface is put down,
ep_disable is called leading to crash due to unclocked access as
clocks are turned off when usb enters lpm. Fix this by waking up
the controller, then performing ep_disable operation and then
putting controller back to lpm.
Change-Id: I45d29ef2e2678a3d6383d3fdd5550c8b8e156875
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
ADB function is mainly used for debugging, hence it is
not expected to allow USB LPM followed by system suspend
in device bus suspend. Driver also doesn't handle
usb_ep_dequeue failure in LPM when adbd is interrupted
by signal as buffer is left queued to the hardware after
usb_ep_dequeue failure and can cause memory corruption.
In addition to above comments, when controller is in lpm
there is a chance that ffs_ioctl can issue clear halt as
a part of which send_gadget_ep_cmd will be called where
registers are accessed with clock's turned off leading
to crash due to unclocked access. Hence do not allow usb
lpm with adb.
Change-Id: Ib89c80318dcdd0dbb35d122a2ab77fb61f83518e
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
If a channel gets stopped, while there are some outstanding requests/
transfers with IPA, then we simply ignore the completion from IPA.
But we must have already added the transfer-completion-event to the
flush list before submitting the transfer to IPA.
There is a possibility that we flush these stale events along with new
flush events (for new requests) when the channel gets re-started.
This un-intentional completion event can lead to out-of-sequence
events at the host.
So while stopping a channel, ensure all elements in the flush list
of that channel are discarded and the flush list is empty.
Change-Id: I04445b1f9f4d2d4fce0b8a96277517de14481ead
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Add code to dump PCIE SOC scratch registers along with mhi reg
dumps to enhance debug info.
Change-Id: I65fc8324a8cccac6f5ffe73f6fc9513a561ee32e
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>