Fail the start command if we fails to allocate buffer for event
requests.
Change-Id: I05e9acb093f53f1675a4f711182730ab420e0e5a
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
We are setting event buffer size with the requested size and then
allocating the buffer for event requests (ereqs). But if the memory
allocation for ereq buffer fails, the event-buffer-size variable
is not getting set to zero.
Due to this, if a client calls open channel multiple times,
our logic proceeded without really allocating the buffer for ereqs.
And while processing completion events, we are observing null pointer
dereference issues.
Change-Id: I10bee8428d178ef5a7f0fe5fcd93fcce8dcbe27d
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
Change a variable type in QMI encode logic to avoid
buffer overflow scenario.
Change-Id: I11b10cce0e9ab5b02738b2ba13e637df979e9310
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
kgsl_ioctl_gpu_aux_command creates a separate drawobj for each command
in numcmds sent from userspace. All drawbojs created will have same
timestamp. We can not queue more than one drawobj with same timestamp.
Each new drawobj must have timestamp greater than previously queued
drawobjs. This results in failure of kgsl_ioctl_gpu_aux_command.
Add proper check and return early when numcmds is invalid.
Change-Id: I06413c16b0a21abcffb121b2e332752eb71e6be0
Signed-off-by: Pranav Patel <pranavp@codeaurora.org>
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
When runtime suspend occurs xhci_suspend is called and now all the
clocks are turned off. Now if pm_suspend happens xhci_suspend is again
called which leads to unclocked access of registers in function
xhci_disable_hub_port_wake. Fix this by considering second
call of xhci_suspend due to pm_suspend as no-op.
Change-Id: Ic053636ac1d6c54150b40e5477b5eb373fcdbeb3
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
Enable the default available cpufreq governor used to scale
cpu frequency based on the load for sdxnightjar perf config.
Change-Id: I93aeb27350562fe1c488c22d5ac24b80b4a9fdf4
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Driver core invokes runtime PM idle after the device is probed. When the
runtime idle callback returns 0, platform bus proceed to runtime suspend.
If this races with state machine work which marks the runtime state as
active and enables runtime PM, there is a possibility that the runtime
PM thinks device is suspended. Because the runtime PM suspend patch
returns simply because in_lpm is true. Now, state machine work calls
dwc3_msm_resume() which sets WAIT_FOR_LPM flag hoping that it would be
cleared while runtime suspend happens via pm_runtime_put_sync(). Though
the device is in resume state, runtime PM core thinks it is suspended
due to the race mentioned above. The fact that WAIT_FOR_LPM is set,
state machine for ever stuck in DRD_STATE_IDLE waiting for this flag to
be cleared.
Fix this by calling dwc3_msm_resume before setting device as active so
that the corresponding pm_runtime_put_sync operation happens correctly.
Change-Id: I3ee58ca01d2afdf169b1f52816d7d4d448cbf8e6
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
If getting close-loop TLRA failed in driver probe, such as if there
is no valid value in SDAM register for CAL_TLRA_CL_STS because of the
bootloader had not run the frequency calibration successfully. Use
open-loop TLRA to program the hardware so the vibrator can still be
functional but just lose some efficiency because of unadjusted
frequency.
Change-Id: I8b8dd0906aa6b3fa882e2044cdbe579c746714a3
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Reallocate memory using vmalloc() for custom FIFO data if the memory
allocation using kcalloc() is failed. This may happen if the vibrator
HAL is passing down a vibration effect with a very big chunk of FIFO
data and system is running out of memory.
Change-Id: I3612208df42e46a44ca0fd43ec9b4c6ca862620e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
When usb bypass start, etr_buf may be null. If etr disable hw is
called at the same time. Use sysfs_buf in tmc_sg_get_rwp_offset to
avoid this issue.
Change-Id: Id1e45269d08f61413d385de7aa46df4cc3d8c44d
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
Update the IFPC power up reglist to include all the CP Protect
registers.
Change-Id: I1b43420c466b8a228892afac8ecf05b11b5a80e6
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Update the register protection configurations as per the latest
recommendation.
Change-Id: I70365268e8e4c7ee4ff28538f22e970822e4edf0
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
This reverts commit 767358cd96.
Revert as this change causing cx pc failure.
Change-Id: Ic2ee49b4420132dd7b118cd06689a875ff578928
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
Improve the naming and types of variables in eval_need,
reduce computation and adjust the tracepoint to reflect
the new names of variables.
Change-Id: Ifc19bc802bbc8382577b0e4ed4b4c9be77ffe99e
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
Improve core_ctl tracing such that the necessary flags for
debugging eval_need are present in the trace, and so that
all returns go through the same tracepoint, unlocking, and
return functionality.
Change-Id: I61d5ab86ba7650bea77e4416b0ffa9a07869bbf3
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
This change is for general scheduler improvement.
Change-Id: I42edf6c6df05f0bf72e4c57ee701916860773428
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
This change is for general scheduler improvement.
Change-Id: I17cca453e5a4e6bbf4d0b55440d9f776dc2583cb
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
Check if necessary to do exit and next_boost enter
oprations instead of doing it regardlessly.
Core control boost refcounts has been wrong if doing
current sched_boost exit and next_boost enter by mistake.
Change-Id: Ie40ebf0be0e1b99291d07d160ebef5964d44ba16
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
Send pme from panic/reboot handler if the device is in D3hot to
bring device state back to D0. This helps PBL to take retrain
the link gracefully as PBL didn't have ability to bring the device
our of D3hot state. Also send MHI to syserr, so that MHI host
wont timeout on M0ack.
Change-Id: I3de45cab30caa332bd00abe8b1ed1487d7889d5f
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
Removing unwanted string format specifier in a log API to avoid
potential kernel panic.
Change-Id: Iceb2ae7a0d08946685bdd922c7e52800ed3c65a5
Signed-off-by: Sai Chaitanya Kaveti <skaveti@codeaurora.org>
Consider a scenario when a device which supports auto suspend is
connected to DUT and auto suspend happened. Now, as the device is
disconnected to DUT. Resume_work is called due to extcon notification
of disconnect and then again suspend is expected to schedule. As
a part of disconnect, power event irq and DP_HS_PHY_IRQ also got
triggered and now since usb is in lpm, resume work got scheduled
twice. This resume work flushed sm_work which is stuck because
disable_irq call is waiting for pwr_irq call which called resume_work
to complete. This is clearly a circular dependency because
resume work will flush sm_work which is waiting for pwr_irq_thread
to be complete because disable_irq in msm_suspend waits for
pwr_irq_handler to complete.
Solve this by replacing disable_irq api with disable_irq_nosync
so that it doesn't block control suspend.
Below are the sequence of events.
usb is auto suspended with device connected to DUT.
Now device is disconnected from DUT and hence resume
hanppens first and then suspend.
dwc3_resume_work is called due to extcon as a part of
disconnect then suspend will be scheduled.
When dwc3 is still in lpm, i.e dwc3_resume_work did
not take effect yet.
Now power event irq is fired because of which resume
work runs.
This resume work flushes sm work. Which is currently
executing msm_suspend where disable_irq is waiting
for power_irq call to finish which is waiting for
sm_work to finish.
Change-Id: Ibf6e73663d4acaf997291e7eff6577adeaad6e8a
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
The API - cnss_pci_set_max_link_speed sets max pcie link speed based
RC number, and affect other endpoints for PCIe switch platform. So,
don't set max link speed if dtsi configuration - "default_gen_speed"
is invalid.
Change-Id: I2b9263fb6c0b45dcb19cdc112fb04767648016f4
Signed-off-by: Wu Gao <wugao@codeaurora.org>
This patch adds format specifier corresponding to arguments
passed to print debug logs.
Change-Id: Iff586dd827037cca3419e1c3c9822d2637ef94aa
Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
Usecase:
1) WLAN ON triggered first and then immediately BT
ON triggered.
2) As WLAN ON triggered first, before pulling WL_EN to high
it will wait for 100ms as BT_EN is low.
3) WLAN timed out first and pulls WL_EN to high and
in mean time BT_EN is checking WL_EN status to pull BT_EN to high.
Expected behavior: BT_EN must pull high before sending version command.
Observed behavior: BT_EN is not pulled high as WL_EN state changes
from low to high. While BT_EN checking the WL_EN state.
Fix: Check BT_EN status and pull it to high if it not set to high
Change-Id: I13e209ac4e1523d377f252aa5c0d243abeb86af4
Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
This change halts cancel command operation if IOS lines not in
good state for i2c due to Power or slave side issue. Perform cancel
once IO lines comes to good state. Till that i2c transfer will not
be servied.
This is a workaround fix if the abort is failing after cancel and
never recovers.
Change-Id: Icca5904d0d3df7432b948343ef9396cb25d93cd0
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>