When the CC state change IRQ fires on USB removal the debounce done
status may still be high, and the removal cleanup will not be called.
Use the UFP/DFP status bits to determine whether the CC lines are
present or not instead.
While at it cache the CC state so it doesn't have to be derived
everywhere it is needed. The status bits are already cached, so there
should be no functional difference.
Change-Id: Ifb89c78a032ae9d38fbc8c281518698941e131c2
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Upon receiving a PD message the state machine is queued to
act on it. However, if another message is received quickly
before usbpd_sm is scheduled, it will only process the first
message. Add a check if the RX queue is not empty in order
to drain the messages properly.
Change-Id: Ie9e079a51a5740024c9a1be5ba27b3edacf9b2df
Signed-off-by: Jack Pham <jackp@codeaurora.org>
There are two definitions of struct dss_vreg in mdss driver.
One is used during parsing regulators from device tree file,
the other is used when operating regulators. This introduces
different understanding of dss_vreg data in these two places.
Future plan is to have only one definition for these shared
data structure. Currently only make dss_vreg in sync to fix
this issue.
CRs-Fixed: 2054371
Change-Id: I4f16e1409c832432fa1df73b0ae030176b664e58
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Modify coresight device node in dts to comply with the
new implementation of coresight driver for msm8996.
Change-Id: I10b236208a1f9e76b4d27a623c024b1f9f6a50ca
Signed-off-by: Wei Li <weili@codeaurora.org>
Port of ioctl validation for zero length ioctl
from camera_v2.
Change-Id: I635522f331d1e18641196ee3101c64ccc285636a
CRs-fixed: 2025367
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
In function submit_create, if nr_cmds or nr_bos is assigned with
negative value, the allocated buffer may be small than intended.
Using this buffer will lead to buffer overflow issue.
Change-Id: I0b61cccffd836e2dd3c859446470af4b6451b9ed
Signed-off-by: Kasin Li <donglil@codeaurora.org>
Get_Source_Cap message is responded by sending source capability message
without running sender response timer after GoodCRC is received. As a
result if sender response is timed out driver is not issuing hard reset.
Fix the issue by moving policy engine state from PE_SRC_READY to
PE_SRC_SEND_CAPABILITIES which starts sender response timer and handles
timeout.
Change-Id: Id47a4c8f989db19d28ef9c8b2c069d0b7797e17f
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
If flow control functionality is not enabled in traffic controller
userspace modules, WARN_ONCE messages are triggered. Note that qdisc
will still be setup even if these debug messages are logged.
Remove these messages to reduce log spam.
CRs-Fixed: 2053221
Change-Id: I62a2fcb30d19579180b3df16f33953546f94511a
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
The char device /dev/sp_kernel is used for loading SP application and
creating new channel char device, therefore might be temporary busy.
Return EBUSY error to user system call open() so it can retry.
Change-Id: I230577fe6b03ac7afd7175f72f9a3fa80db5a524
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
This fix checks the validity of dci client's process descriptor
before issuing a signal to it when subsystem restart is performed.
This fix avoids accessing cleaned-up process descriptor's fields.
CRs-Fixed: 2047235
Change-Id: Ic26977dc22c68f0a7007dd963c9273bba2a5dbfe
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
Fix sparse tool error which mandates that functions used only
within the file to be declared as static to allow compiler
optimizations.
Change-Id: Iba14c50730bb7ce402e4b45bc9b2c8d1fec6f3eb
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
Current handling of wil->platform_ops.suspend can lead to
bad cases, as wil_status_suspending was cleared before
wil_status_resuming was set and bus request voting was restored
too late.
In addition, bus voting in suspend should be done only at the end
of he suspend flow.
Change-Id: I8856d393c1796a2bd8fd5e07b233a5d61efc80c0
Signed-off-by: Maya Erez <merez@codeaurora.org>
Move the bus request restore to be done prior to
sending wmi_resume to the device, as the device can restore
the data path upon receiving this command.
Change-Id: Ib2442fcfea055a855bb6be65f9013bb7ad754767
Signed-off-by: Maya Erez <merez@codeaurora.org>