Adding a function to check for dangling pointer using IPA IDR structure
to avoid use after free error.
Change-Id: I0bd3d733bf10403366abc643f89c3e5c5e6228e9
Acked-by: Suhas Mallesh <smallesh@qti.qualcomm.com>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Change the if condition to be inclusive to allow remove_offload
ioctl to send the rmv_offload_request through qmi on the last
connection.
Change-Id: I6eec7799fd1a76ab168bc588b3e9c74dbfd215fd
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Remove code check-in not belonging to IPA driver.
Change-Id: I6f79d72d054c7c3b9d5448ae83150d5afaedacff
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
The less said about "~12UL" the better. Oh dear.
We get away with it due to calling constraints that mean IOVAs are
implicitly at least page-aligned to begin with, but still; oh dear.
Change-Id: I8e4ed0ccc1aae76988449895e6f7a9944d429af6
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Git-commit: 353b325047
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Instead of using a symlink to point to the MSM ION header,
place it directly in the include/uapi/linux path.
Change-Id: Id2a91adb4bdfc2c03e8eb535882734603ccd0f94
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
The system secure heap relies on the existence of the system
heap. Thus, if the system heap is not available, do not create,
the system secure heap.
Change-Id: I7a99e0fda45ae02ed6e5c8a797d29e917e84f182
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
KW tool detect the potential NULL access and buffer
index overflow issue.
The change is to add the proper handle for NULL response
and prevent buffer index overflow.
Change-Id: I0bb1b45ba6e5b0abe6c3539d451f74e19028737c
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
This fix enables HOLB drop timeout for MHIP TX channels which will
cause IPA to drop the packets if the packet is not processed within
the timeout. This will help relieve the back pressure on MHIP Producer
channels.
Change-Id: I607ebb460c970ccbcce2f0e364ff22e0222ded03
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
There is a possibility to access coal registers when the clock
is off which results in unknown behavior. Make changes to ensure
clock is on when accessing coal registers.
Change-Id: Ia13841c5543798cb47ed6953a5c714e7426cb180
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
During device reboot when IPA is going for shutdown,
the allocation for memory request fails. Add change in
IPA to not sleep while memory allocation.
Change-Id: I0bdbf0f622770566ad1135c76f6edc2790285420
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
While freeing the buffers in the transfer ring, the ref_count of the
pages that were allocated from the sys->repl->cache have to be
decremented explicitly to ensure there is no memory leak.
Change-Id: Ie853bf15f084f503e8818d46c72671dbb9ddad7b
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
db_timer expires after wq has been flushed in ipa3_teardown_sys_pipe.
This causes the wq to be scheduled after pipe teardown.
Add workqueue_flushed flag which set after the wq is flushed during
teardown. This flag is checked against in the wq function to ensure
it is not executed once the wq has been flushed.
Change-Id: I176a3a6dbf25985a41decf008ad045647081b871
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Enable USB-DPL ep on MHI configuration
which was missed.
Change-Id: I881696d0fb383e7644670e7c2940022433069a8c
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Update the bonus ways for the MMUHWT entry of the SCT table
as per the new configuration.
Change-Id: I144290b7b0c1e5781842d1034d5084566a180df6
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
Add enum for QMI_ERR_DISABLED_V01 for clients to use in the kernel.
Previously, this error enum was not used by any client but the service
registry service has updated to use this enum.
Change-Id: I955b3d6f1acf2e5cfb2627323f6b0662810834ae
Signed-off-by: Chris Lew <clew@codeaurora.org>
When default wan consumer pipe polling mode was changed, not updating
the polling mode for coalescing pipe. As both the pipes are sharing
a common event ring because of that observing warning logs, it was
leading to watchdog bite. Add changes to update the polling mode
for coalescing channel when wan default pipe polling mode changed.
Change-Id: I8630c9866cb7925d21ff7fd9dc68fcb03a98cbc5
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Certain GPIOs are reserved for secure world and cannot be accessed by HLOS.
Supply "reserved_gpios" to msm_pinctrl to mark these pins as invalid.
Change-Id: I896b1cc02221873341cb79db63fd61db155f5590
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
of_parse_phandle() is used to deduce if a memory region is
associated with a particular device. The call to of_parse_phandle()
internally increments the reference count to the memory region's
of_node, and thus, the caller should reverse that action by
decrementing it via a call to of_node_put().
Change-Id: I390b48bef9295258ae950738c0dde99d4604e263
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Fix the issue on ssr where some of the pages get unmapped
twice by mistake.
Change-Id: I9191fde3d908086b6a6755d1217d6776a0e5d23a
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
When an interrupt is to be serviced, the convention is to mask the
interrupt at the chip and unmask after servicing the interrupt. Enabling
and disabling the interrupt at the PDC irqchip causes an interrupt storm
due to the way dual edge interrupts are handled in hardware.
Skip configuring the PDC when the IRQ is masked and unmasked, instead
use the irq_enable/irq_disable callbacks to toggle the IRQ_ENABLE
register at the PDC. The PDC's IRQ_ENABLE register is only used during
the monitoring mode when the system is asleep and is not needed for
active mode detection.
Change-Id: I0ca5d3b8f791792043dfc9be127457cf54f80aed
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
On certain QTI chipsets some GPIOs are direct-connect interrupts to the
GIC to be used as regular interrupt lines. When the GPIOs are not used
for interrupt generation the interrupt line is disabled. But disabling
the interrupt at GIC does not prevent the interrupt to be reported as
pending at GIC_ISPEND. Later, when drivers call enable_irq() on the
interrupt, an unwanted interrupt occurs.
Introduce get and set methods for irqchip's parent to clear it's pending
irq state. This then can be invoked by the GPIO interrupt controller on
the parents in it hierarchy to clear the interrupt before enabling the
interrupt.
Change-Id: Ie8559657bd8da926cc741514809ffe9adbd73a80
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
[updated commit text and minor code fixes]
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
When 4G ssr happens, imp will unregister the mhi. And if the devote
request from Q6 we would need to ignore it. The current handling is
to just ignore this QMI request but if Q6 shutdown is not happen on
time there would be a QMI assert happen on Q6 side. The fix here is
to still response to QMI with error imcompatiable.
Change-Id: I51637181a428a96fcd4385bcb1573acbff808813
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Fix the missing handling to cleanup the recycling page on ssr,
add a new cleanup_cb of gsi_reset_channel for page.
Change-Id: Ied16ffe935ac3e5aecdb45389913b1ff94f284b9
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Add a CSR device list in CSR driver to support multiple CSR devices. CSR
device structure is initialized in probe and added to the list. Add CSR
device structure as parameter of CSR function. Change the caller of CSR
functions to align with this change.
Change-Id: I15e979a517204ac37dbcc5defd78a0214f44ade8
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Update the ABI signature for aarch64 based on v5.3.
Change-Id: I90ea5525c0533db27090b45e25025cffa493b3dd
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>