Suppose for a function driver the usb controller received EPCMDCMPLT
for end transfer from previous case, so as part of this the resources
for the endpoint will be released. In this process we will be clearing
the cancelled_request as part of which controller executes
gadget_giveback where the spinlock is released. Within that time if
ep_queue from the function driver is called, then the endpoint command
will fail due to no resources being present in for the endpoint, the
ep command will return -EINVAL due to no resources. This will lead
the controller to move the request to cancelled list and if the
DWC3_EP_END_TRANSFER_PENDING flag is set then it will go ahead and try
to cleanup the already cleared cancelled request.
Resulting the controller to double free the request.
This problem is only with Gen1 controllers as there the
DWC3_EP_END_TRANSFER_PENDING flag will not be set.
Fix this issue by introducing a check in ep_interrupt on EPCMDCMPLT.
If the DWC3_EP_END_TRANSFER_PENDING bit is set, then cleanup the
cancelled request. This will ensure that if it is a GEN1 controller,
cleanup cancelled request will be called from kick_transfer and if
GEN2 controller, then cleanup from ep_interrupt.
However, preventing cleaning up of cancelled list from EPCMDCMPLT has
one side effect as if from function driver ep_dequeue is called and
it does not giveback the request from there and rely on EPCMDCMPLT
to cleanup the cancelled list. Therefore the request will be moved
to cancelled list but won't be given back to function driver.
To fix this additionally have introduced the DWC3_EP_END_TRANSFER_PENDING
check in ep_dequeue as well so if it is not set then cleanup the cancelled
list from there.
Commit eec9afd56c ("usb: gadget: Give back request from ep_dequeue")
added the ep_dequeue check but missed the EPCMDCMPLT one, adding
that check to avoid any other corner case.
Change-Id: I575a38ba9dc9b3a6684d0973a49109f97e22f1b2
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
In ts signal mode, usermode maybe create a fences with old timestamp
after timestamp of the timeline goes forward. These fences should be
treated as signaled.
The signaled cb could compare fence ts and timeline ts and return status
to caller.
Change-Id: I727a093188b50f693a26c16361e2a295d550fcb0
Signed-off-by: Ya <yatang@codeaurora.org>
Signed-off-by: Kasin Li <donglil@codeaurora.org>
The MID_SEL register routes the interrupt to the configured MID.
On a multi-SOC system a PMIC interrupt may be assigned to
secondary SOC (on another MID). Make sure the interrupt gets
assigned to the right MID while registering for it.
Change-Id: I87cc890af051dbe8e1c81662800f1c39b50290da
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
The return value of the function cnss_bus_dev_to_plat_priv() has a
chance to NULL, So we have to check "plat_priv" if it is a null
pointer before it is dereferenced.
Change-Id: I8a5bbe5037d1f15113e58bb16b90f243ea8ef807
Signed-off-by: Ke Huang <keh@codeaurora.org>
Signed-off-by: Kuichu Ni <kuichun@codeaurora.org>
This reverts commit 26852d7d34dcb87a7d2fd5f3e1343db14e73c186.
The GPUCC registers are not ioremapped on some targets which can
cause continuous 'Out of bounds' warnings.
Change-Id: Iebe9b27b74966d937b2e62e9a937be1af5463303
Signed-off-by: Amit Kushwaha <kushwaha@codeaurora.org>
Fix bootanimation distortion for A702.
Change-Id: I1ca75e1725670ef65baccf3a4e6c731550b93dd7
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
Signed-off-by: Amit Kushwaha <kushwaha@codeaurora.org>
Changes to fix compilation failures for implicit
declaration of readq and writeq_relaxed for 32 bit
platform, warning for unused result and undefined
symbol for __aeabi_uldivmod.
Change-Id: I1382d3faae6e67945d37509046e60e9061bac871
Signed-off-by: Amit Kushwaha <kushwaha@codeaurora.org>
Enable STM_PROTO_BASIC to support to write log to /dev/coresight-stm.
Change-Id: Ibdc10fa0bfd399bec47a59ba7f05258e5918796f
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
Enable Bluetooth power driver for sdmsteppeauto target.
Change-Id: I24f69b0ae104f2333f01f9cf52804ae008370fa4
Signed-off-by: Yingjie Zhu <yingzhu@codeaurora.org>
In case of restore path there could be a chance that smp2p entry
duble freed or valid entry might be uninitialized. Also fix entry
deference after being freed by calling kfree().
Change-Id: I5dcb12e01972e19f3c0fa1fc1be3596abca984e9
Signed-off-by: Arun Prakash <app@codeaurora.org>
The bootloader adds IMEM entries for kernel load start and end
timestamps. Capture the same in the kernel as part of boot stats.
This allows to measure the Bootloader KPI values.
Change-Id: I2c1862d0f662a6d59aed7bb40e1d7d84ef686c14
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Enable MFD SPMI PMIC driver and several SPMI and PMIC drivers
which are needed to provide baseline support of PMIC peripherals.
Change-Id: I0d4150893a8fe0c2381c7c8328e07d77981fa907
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
Enable epss l3 interconenct driver so that consumers are
able to obtain their path handles properly.
Change-Id: Idf2b3a0710fed0eebf746af67739ba2c6dda918f
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
Enable the direwolf interconnect driver so that consumers are
able to obtain their path handles properly.
Change-Id: I692dbbbbbd2d4d9ab29c4b6ac1b810d23dd5e018
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
Add boot marker to measure the time taken for the kernel
boot.
Change-Id: I9705d919467137fdae2f97cfdefb16b519e6af3c
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Boot marker config name is changed from CONFIG_MSM_BOOT_TIME_MARKER
to CONFIG_QGKI_MSM_BOOT_TIME_MARKER. Update the same.
Change-Id: I2eaebf14821388cf28a064f9ec961e33c23d2577
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Prefix MSM_BOOT_TIME_MARKER with QGKI to differentiate
it as a vendor-specific config.
Change-Id: Icf369a4b217722d997706d30ffaceaf08b3e8ee1
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>