Separate SPS power management workqueue from the global IPA power
management workqueue to avoid a potential deadlock where a TAG process
waits for the TAG to return in the context of IPA workqueue and
SPS power management work waits for this TAG process to end.
Change-Id: I30e2de25bbba030d6962cf8cbccf8431d8ed6af6
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Nadine Toledano <nadinet@codeaurora.org>
Prevent event counter from getting incremented twice and breaking
the modulo operation.
Change-Id: I472115a3d65a84904482455d00cee9de6d31043b
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Calculation of throughput should not consider overhead bytes
as a result of tags. Only actual data should be used
to calculate the I2C throughput values.
Change-Id: I605a5284a3deef1ade4a70f064ac7af3b7b3edf6
Signed-off-by: Ankit Gupta <ankgupta@codeaurora.org>
When a BAM2BAM end-point is configured via IPA core
driver, the ENDP_STATUS register needs to be initialized
to 0.
Change-Id: Ide1490da3cd0190c1f8f3da2f60c4d570336fbe1
CRs-fixed: 775498
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinsten <sivanr@codeaurora.org>
According to experiments, 20msecs timeout is insufficient
for TAG process. This change increases the timeout in
a SSR scenario to 150msec.
Change-Id: Ie5300d0fef5a3d5e4f772fe9ca70a1212c79ad46
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinsten <sivanr@codeaurora.org>
This reverts commit 536e005616
To resolve boot-up crash on 8992 due to RPM dependency.
Change-Id: I789b616be70abe2a728f91a1495f9410918d17c5
Signed-off-by: Harshal Trivedi <htrivedi@codeaurora.org>
Driver maintains pipes_suspended and pipes_resumed counter to
match the bam pipe suspend and resume. Bam pipes are suspended
one by one but condition to check if all the bam pipes are
suspend and resumed is incorrectly assuming that pipes are
suspended in pairs. As a result pipe_suspended and pipes_resumed
values are set less than the actual number of pipes suspended
and resumed. At the time of resume all suspended pipes are not
reset because wrong value of pipe_suspended is set. This is causing
data stall. Hence remove multiplication of 2 while checking for
number of pipes suspended and resumed.
CRs-Fixed: 773747
Change-Id: I9746e9c9f7596c5e4737c50a07dc63dd60738ba6
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This change is needed to prevent deadlock due to watchdog handler
running while the TX queue is already locked by the suspend handler.
Change-Id: I8f8afc50719e352972489bd9c7819600a7e2fead
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
Clear the unnecessary characters such as newline to allow user
to configure play_mode for other inputs.
CRs-fixed: 773098
Change-Id: I68e460164af0d7de348cca2ccb4a45aa30081c4b
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
This change ignores a case where TAG process times out during
SSR clean-up procedure to avoid crashing the target.
Change-Id: I2cd1aabedd8e0f911d5b145349845e9e5701c7c9
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinsten <sivanr@codeaurora.org>
Add the ability to switch NoC masters to be in limiter and regulator mode
for the adhoc bus driver. These modes offer differing degrees of
throttling the io traffic from NoC master ports if needed.
Change-Id: If2f868430ebccff1a11aad7d90fa5b352ea2c876
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Removes support for IPA 1.0, which is an old IPA version. The old version
had HW bugs that required special handling in SW and can now be removed.
Additionally, there is no commercial product which uses IPA 1.0.
Change-Id: I7bbd3d2c0b58aab84ec26638f87cbbc2ce781d17
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
When AP suspend is triggered, IPA driver checks whether there are active
clients of IPA. In case there are active clients, postpone the AP suspend
operation for a later time.
Change-Id: Ib00d07c3fa93492aa532bff5b23d93ca557de2ca
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
When AP suspend is triggered, there is a need to immediately release the
WWAN0_PROD entity, which enables clock gating IPA HW.
Change-Id: I13df22b5abf48e5de6349d309abb0810c6dc9c7f
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
Change IPA_UC_MAILBOX register offset to match the correct register
base offset.
Change-Id: I651294eb5bb17f15eb862436710a2a978cf853d1
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
Add trace events to the ad-hoc bus driver to assist in
client agg vote, clocks, QOS debugging and rules applied.
Change-Id: I46ae10bd550117dea2f3c2934e8335c8c0b0e1bd
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
In certain SOCs, multiple PMICs are present to power up the system.
During the system reset, it may not be enough to configure the main
PMIC's PON block based on the power off type. In some cases, there
is a requirement to configure the secondary PMIC's PON block also.
Add support for that.
While at it, fix the error return path so that the driver can probe
properly even when the optional properties are not defined in the
device tree.
CRs-Fixed: 768664
Change-Id: I9741adb76595a3671f766b32ac2d5b16dbdf79ab
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Some bus masters require an additional QoS clock to be enabled in addition
to the bus clock itself when changing their QoS mode to limiter or
regulator. This clock is enabled once and disabled when voting to turn off
the bus clock itself.
Change-Id: I485567b1e1f584ea711c130d3dd0eea3eca49355
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Clients that use the newer APIs have a different data structure containing
the client handle. Make sure to use the correct client handle when
setting up debugfs entries for clients that register early, not doing so
would cause a crash at bootup.
Change-Id: I21994613ecbafff07b68e1cd4c0db748cbc1ca3a
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
For IPA2.5 and on, the apps IPv4 & IPv6 filetring tables are moved
to DDR, so the corresponding partitions are removed from SRAM.
The space released from these partitions is added to modem memory
partition, since Q6 requires more memory in SRAM for filtering rules.
Change-Id: Ia6823379edffa8f71929d95d24d829e6af979780
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Factor out the logging and debugfs from the i2c driver
to a separate source file to improve modularity.
Change-Id: I813c0360358ee185d42d675e156c62ffbaf00e8c
Signed-off-by: Ankit Gupta <ankgupta@codeaurora.org>
A race condition exists in MHI_UCI whereby a client could receive
a buffer, inconsistent with the return code from MHI.
Change-Id: I4a932ea608ce967c1588f092c60d03747bad2064
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Enable ftrace events in MHI for the tracing of power
state transitions.
Change-Id: I74373b7429c6d7316c4a66db141cc09e2a4418dd
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
When a packet arrives to a suspended endpoint in IPA,
IPA generates a SUSPEND interrupt. IPA driver handles it by
requesting the corresponding CONSUMER resource from IPA RM for
1 second and then releases it. In case this resource is requested
by another resource in IPA RM and released, the resource will be
released only after the 1 second timeout expires.
This change improves this by releasing the resource immediately
without the need to wait for 1 second timeout.
Change-Id: I033d9c3c7d332b3271a4d7e27ef1c5364a847b5c
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
This change creates a general interface for communicating with the uC,
similarly to the way commands are being sent to the IPA
(via send_cmd function).
Change-Id: I3cf221c8c90de43ea21069d886b2df11363054a0
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
In offline charging mode, modem is not loaded so the proxy
IPA clock vote added by IPA driver on behalf of modem is
never released and this prolongs the charge time. This commit
releases the proxy vote after rmnet_ipa driver init completes
and acquires the proxy vote before modem is loaded. These apply
ONLY when not in modem SSR.
Change-Id: I4fe7e32400402046aea9ce1663d1601ec3effb8c
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
The free pool resources were not being released during
modem SSR triggered ingress pipe teardown. This commit
fixes that leak.
Change-Id: I0743823bea1c7aa49bb9455c4d3415693642825c
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
The adhoc bus scaling driver uses the number of qos ports
to determine if the path is interleaved or not. On some
targets there are interleaved paths that don't have multiple
qos ports. This will cause the aggregation to be incorrect.
This patch adds support for these types of paths.
Change-Id: Ib86d4313bc444b879561472a2f266c3e7be2fb10
Signed-off-by: Dan Sneddon <dsneddon@codeaurora.org>
This change fixes a QMI client handle leak found in IPA.
The issue is caused due to the fact that during the clean-up,
rmnet_ipa unregisters from QMI events, causing QMI_SERVER_EXIT
to not be called, and handle clean-up to not be invoked.
The change invokes the handle clean-up explicitly.
CRs-fixed: 767260
Change-Id: I4c2047d08d9c9608ab80dd2673983794832f9ad5
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinsten <sivanr@codeaurora.org>
When rmnet_ipa is temporarily unable to send packets
it stops the Tx queue. Upon resuming, rmnet_ipa calls
netif_start_queue. This function only updates the status
of the queue but doesn't start it actually (until the next
packet to be sent is received into that queue). This causes
the previous packet to be stuck at the queue.
Instead, netif_wake_queue is used to trigger the queue to
invoke the xmit function immediately.
Note that netif_wake_queue is called from a workqueue context
and not from RM context.
CRs-fixed: 765957
Change-Id: I4afc3b59b0d617b56984f03d7ca08235757dc5c9
Signed-off-by: Sivan Reinsten <sivanr@codeaurora.org>
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
In case of IPA RM resource is granted before pipe is connected,
un-suspend the pipe on IPA on pipe connection to enable data-path.
Change-Id: Id8ca46f981efea44b430c6edd41efd25c9916f8a
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
If usb_bam_disconnect_ipa_prod() is called with a USB consumer, it
first does usb_bam_resume_core() which calls pm_runtime_resume()
to ensure USB is not in low power mode. However, this can race
with a pending idle request, and could potentially cancel the
suspend from happening.
Fix this by setting the pending_lpm flag in disconnect_ipa_prod().
This will allow the usb_bam_suspend_core() that gets called at the
end of usb_bam_disconnect_ipa() to actually go through and suspend
the USB controller. While at it, replace pm_runtime_suspend() with
pm_runtime_idle() since that allows the controller to perform any
pre-suspend handling if needed. Finally, move the call to
resume_core() to the beginning of usb_bam_disconnect_ipa() in
order to balance with the call to suspend_core() at the end.
Change-Id: I9f651338eaf092aa22215faaf8f7894937f1f944
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Currently the driver queries the rate of the bus clock using clk_get_rate()
and calls clk_set_rate()/clk_prepare_enable() only if the rate returned
is 0. However the clk_get_rate() API will return a non-zero value even if
the clock being queried has been disabled.
To adjust for this change the call flow to call clk_set_rate() only if
the rate returned is 0 from clk_get_rate(), but make the call to enable
and disable the clocks unconditionally.
Change-Id: I50c71c5e27dfbaa0c8cef4267d70a9565ef635b3
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
For IPA2.5 and on, uC requires 512 bytes for the uC info partition
in SRAM. The uC partition was moved to the beginning of SRAM and
its size was increased to 512 bytes.
Apss header partition is not used, so it's removed from SRAM.
Change-Id: I8d166ce5d1715413fc1b901da7e3b7ca15b8a2af
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Fix IPA stall when do SAP on/off during high
data transfer rate. Change the IPA-pipe reset
sequence.
Change-Id: I4754e15f41d87ba22e860ef9bdcb91b17d781d08
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Introduce a new module to allow clients to set a floor vote on bus clocks
either using an API or via sysfs interface. Clients are still always
recommended to use standard bus scaling APIs , these new APIs are a debug
feature and a meant for debugging system performance issues.
Change-Id: I7688e391413c23d9024a7b525f60c90f317d0847
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Add new APIs to the bus scaling driver. The new APIs make it
easier for clients to setup paths for bus scaling. The driver APIs
will return a pointer to a client handle in case of success and NULL or
error in cases of failure. For now the existing APIs will remain as is
eventually all clients will start switching over to the new APIs.
Change-Id: I22656dddf13802128ee5c4faab9f83f9c6f8e683
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
This change fixes an issue in which APPS DL WAN pipe was not
torn down and potentialy packets were sent to the network stack
after SSR happened and rmnet_ipa has been removed.
CRs-fixed: 750682
Change-Id: I8d737f07529021db26bf6c7567fc1d1608e051a7
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
The fix solves an issue in which not all error conditions were
checked when QMI_IPA_INIT_MODEM_DRIVER_REQ_V01 fails, and the
logic continues with the initialization/handshake process.
CRs-fixed: 760440
Change-Id: I1035cd10fe5b539c389ddfae80cc60ff2877278a
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Hardware enables auto braking. Add an interface to
disable the braking.
Change-Id: I1b52593bc208d7347b8c6c4ac69d6430730c1cdb
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
After the haptics is stopped it might take few cycles to
activate braking. Update the wait time to 5 cycles of
play rate to optimize the wait time.
Change-Id: I1a29cebcd41f541493e79224bf71f4546a9e2541
CRs-fixed: 760524
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
During modem-encryption enable scenario, we saw
RILD in the Android framework always initializes
the modem SSR in the first time reboot and we
saw modem crashed because apps-side didn't
clean internal QMI-flag well and continue the last
time's bootup sequence which causes modem crash.
The fix is to move the flag reset to the
qmi_service_init.
Change-Id: I5dba3cb8f44cddf180d5210543ea2ad8399645a3
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Introduce mdm9640 as the official name for msmzirc.
Update msm-tsens and clock-a7 bindings to make checkpatch happy along with
renaming.
Change-Id: I364cc0feab4cf4a1bac03dc08eec0214e09f40f7
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Inside the QMI callback function, if we need to send
QMI indication, we should use "qmi_send_ind_from_cb"
instead of "qmi_send_ind" to avoid double mutex_lock
which causes the deadlock issue.
Change-Id: I31252fa2ff7b6aaf8bdeb918929ed4d1d83590e5
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Adding support for configuring UL checksum offload on the
AP->IPA pipe for embedded data path.
This is needed in order for the IPA HW to compute TCP/UDP
checksum on packets in the embedded UL data path.
CRs-fixed: 731693
Change-Id: Iade7e06a613d993f0b4e652d794a9e0727032c30
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
commit a666b6ffbc9b6705a3ced704f52c3fe9ea8bf959 upstream.
Without this patch, dell-wmi is trying to access elements of dynamically
allocated array without checking the array size. This can lead to memory
corruption or a kernel panic. This patch adds the missing checks for
array size.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
For using hdr_proc_ctx feature to support ethernet
bridge, ipa-apps needs to provide the hdr_proc_ctx_tbl
memory offset_start and offset_end info to q6 modem.
Change-Id: I320d0033006e70ef4e2b3ceb029986461cbe821b
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
For supporting ethernet bridge on LE targets to send QMI
msg to modem, we need to add following QMI header/message
in A7 which gives hdr_proc_ctx_tbl_info to ipa-Q6
Change-Id: Ifde8dd608ffc533c6e1b064ccd6ba35cdddee304
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Adding Node level bus aggregation properties. If util factor or vrail is
not defined as part of node then take fab level util factor or vrial in
consideration while doing bus aggregation.
This will be helpful in cases where different kind of masters are
connected to same NOC.
Change-Id: I0549a2ba98de1d6a98a91d6bf8b265652a5d334a
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Signed-off-by: Dan Sneddon <dsneddon@codeaurora.org>
Add the support for BAM client drivers to disable a pipe of a BAM.
Change-Id: I1ae7feff755a9db8cc074fe8f986fefcb15dad0b
Signed-off-by: Yan He <yanhe@codeaurora.org>
This fix removes the workqueue which is used to initiate
rmmet_ipa SSR clean-up when Modem SSR occurs. Instead, the
procedure is invoked directly, to avoid scheduling-related
potential issues due to the usage of workqueues.
Change-Id: Ic704ff29a1330035fb5265c6667dc89198ad7ecc
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
msm_bam_device_lpm_ok() specifically has to check if the QDSS
pipe is still active or not. However, if the QDSS function
has not been activated, the call to usb_bam_get_qdss_idx()
will always spit a log error message. This check is to handle
the QDSS disconnection-in-progress case to avoid prematurely
going into LPM; however there is already another mechanism in
place for the connection-in-progress case, so use that instead.
Have the QDSS driver call msm_bam_set_qdss_usb_active() to set
and clear the flag as needed.
While at it, downgrade some print messages from KERN_ERR to
KERN_INFO and remove a redundant one to reduce logspam.
Change-Id: I641f0857538a37dca85d5d45f9077009201e9caa
Signed-off-by: Jack Pham <jackp@codeaurora.org>
For recent Q6-ipa changes, the static UL filter
rules are exceeding to the cache of ipa-Apps has
, the solution is to entend the cache up to 35
and also do the check in case memory-corruption
happening.
Change-Id: I486169c573daef1f7821b959696bf5870bcf62b1
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Acquire read lock before acquiring global variables, this
prevents any race conditions.
Change-Id: I84d372cecec7b0c2e8c5addf2e98637551fd10ee
Acked-by: Baranidharan Muthukumaran <bmuthuku@qti.qualcomm.com>
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
commit 183fd8fcd7f8afb7ac5ec68f83194872f9fecc84 upstream.
The acpi-video backlight interface on the Acer KAV80 is broken, and worse
it causes the entire machine to slow down significantly after a suspend/resume.
Blacklist it, and use the acer-wmi backlight interface instead. Note that
the KAV80 is somewhat unique in that it is the only Acer model where we
fall back to acer-wmi after blacklisting, rather then using the native
(e.g. intel) backlight driver. This is done because there is no native
backlight interface on this model.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1128309
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Evaluate every rule for a given node when a bus transaction happens and
apply the first matched rule allowing for multiple rules to be applicable
but apply the most restrictive.
Change-Id: I25018ac4260916fd5c42d8a73b886b13a0d2b3a0
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
For supporting MHI (new driver) on LE targets to send QMI
msg to modem, we need to add following QMI header/message
in A7 which already existed/supported by modem. Then Apps
can communicate with modem with those configurations.
Change-Id: I6320bab02e68ff0cd0d6e3952cca78f4ee2a4b34
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Return error when input value is invalid.
Change-Id: I17ff43dc09e5f693fc2712dc7a2f602ed710ec7b
Acked-by: Baranidharan Muthukumaran <bmuthuku@qti.qualcomm.com>
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
As part of the update bandwidth call, try to program the QoS registers
and enabling the QoS clocks only if the bus master is in limiter or
regulator mode. This will save on bus transaction times as enabling QoS
clocks can be an expensive operation if they're RPM controlled.
CRs-fixed: 720868
Change-Id: I76fe97792a944fb2e48729d9b00ca21d12d372e9
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Vectors are currently hard-coded in the driver. This
commit adds support to read the information from the
device tree.
Change-Id: Ic2e2176e0aabfeebf60db4b5cdf4ae3de0e5cc64
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
Change RX pool size for ODU consumer pipes to take into
account the overall BAM descriptor size to avoid having a pool
larger than pool size.
Change-Id: I205c277470c8dd243f133b232586d43817859d03
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
The pending TRE iterator is not properly initialized
and checked against, leading to an incorrect number of
TREs getting processed.
CRs-Fixed: 748475
Change-Id: Ie8609edd1a89d8dc14bf781612357d7dc524f83a
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Reorder operations on MHI TRE to prevent a race condition
of publishing the TRE to the device before the TRE is fully
populated.
CRs-Fixed: 726655
Change-Id: Ide208c77c93f0e68eee0c6c304eaebc451028341
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
The doorbell value for the event ring must be sampled within
spinlock context or the value could be stale when written.
CRs-Fixed: 746401
Change-Id: I4eb5095f34b890e02fee48c22206afcbfd70a454
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
The global filter rule should not be matched however
some malformed packets coming with "FF" in next-header
field of IPv6 hdr which happenly matched and lead to
modem crash. The fix is to make stonger non-match
global filter rules to not match any malformed pkts.
Change-Id: I79a54c999655f4df6e483c1e495eeae294d28d45
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
A timing window exists where M3 state transition is pending and
the doorbell does not get written out. The M3 process is then
cancelled, and no M0 event takes place to flush the doorbell out.
Remove setting the pending M3 flag until the transition is no
longer cancelable.
CRs-Fixed: 733632
Change-Id: I3b4dfe23d0ea4af69d2810a171c61dc60a6c2f8d
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
On processing context header table reset, a dandling pointer was
used after freeing the memory.
Change-Id: If2907bc0dbaf8ef2b688cd4358de9050210dcc0c
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
Rate limit the error message logged when RX packets are
enqueued faster than the kernel can process them. This is
to avoid watchdog bite.
Change-Id: Icad1d5c0b52620aca1291a7b104d50f6d519be1c
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
Enabled event ring context updates regardless of MHI
power state.
Change-Id: I910d056d53f7c940caea48546c206d4603e8a4b9
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
After a channel reset, any pending acks on that channel
will not be received from the device.
In this case they must be cleared in the channel reset
command handling.
CRs-Fixed: 733172
Change-Id: I5b7c525f7f532ed107caa020cde33ec1955ae618
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
A delayed work is used to re-attempt RX buffer replenish when
desc FIFO goes empty. This commit ensures IPA is clocked during
the recovery procedure.
Change-Id: Ia04e5160a9a65aa5c86eb4f83815a61f4fa43344
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
This change will reduce chances of RX buffer allocation
failures.
Change-Id: I1d96924c8dd5386f07931a842aaa51e71037a9b8
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
Move debug statements to after the buffer sanity checks to avoid NULL
pointer derefernces.
Change-Id: I40f12c6b40fb6829f4f372cd20c68f9536f2e2ad
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Reset the pending packets counter in UCI when a client releases
the character device node.
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Change-Id: Ic3d83873ae207e76acbb9f60683b43cb30ff7c5b
This is to prevent IPA power-collapse until Modem has
loaded the IPA uC on a warm-boot (After Modem SSR occured).
Additionally, in case SSR has occured and the uC hasn't
been loaded yet, AP needs to assert in order to prevent the IPA
from entering an unrecoverable state (As the Modem relies on AP
to reset the pipes properly).
CRs-fixed: 726901
Change-Id: Ibb79cef4a16fdc9e18ede854a14e65f4f248761d
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
On ipa connect endpoint should be unsuspended according to the resource
state. use the resume_on_connect flag for unsuspend EP on connect while
its resource is granted.
Change-Id: I9fc87ad6d470dbf4ac088a32c51f4355dc00c42e
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
Check that the bio vec count > 0 before using bi_io_vec[] array.
Change-Id: I0fa6c527d82c6cfa6b340af0c3a9ef3eb23e5356
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
On querying routing table handle if routing table
does not exit then just return error. Don’t add
empty routing table.
Change-Id: I1648529290825090fdfac06a00bd312192c4dd3e
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Spare register is not accessible from IPA driver.
Change-Id: Icea18d54c3ca01c90ffef735b429af3a78963cff
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
usb_bam_connect_ipa() and usb_bam_disconnect_ipa_prod() APIs are
performing IPA handshake based on number of pipes enable for USB
cable connect and USB cable disconnect case. Due to DPL feature
which is having only USB consumer pipe for IPA communication,
it is required to consider this case to make decision about when
to perform IPA handshake, otherwise there is USB IPA BAM stall
seen.
CRs-Fixed: 724784
Change-Id: Idd8b1c140b8eb0a32c1f1cbed8bdaa618fa262e3
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change is needed to ensure uc response is not wiped out
prior to polling for the same.
Change-Id: I69acb78b9c9dd33e511539670b6e3b7d28c1c97a
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
Resolve issue regarding BHI image load process.
Interface will no longer be published to userspace
before local initialization is complete.
Register masks and retry mechanism are also cleaned up.
Change-Id: I05d87d4be5e9c05c6beb2b7b0c0234757b93097d
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Rules engine needs to get the max of the requested IB or the aggregated
AB at the node, without this check we may incorrectly apply throttling
rules.
Change-Id: Ib22fe16a056f6648aa10f069992ad5c41452cbca
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Set the DMA_BIT_MASK for the buspm device explicitly else
dma_alloc fails on ARM targets.
Change-Id: I5602db8e18089e115a4efbf058004a659ad1c6e2
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Currently WAN driver client is hard-coding this value which is
HW version dependent causing AP and modem to go out of sync.
Change-Id: I09a988a0c35ade72a96617281f963bdb0feb6dec
Acked-by: Sunil Kumar Paidimarri <hisunil@qti.qualcomm.com>
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
Add the msmzirc device in the list of supported PCI devices
by the MHI driver to enable to PCIe framework to probe MHI
in the event of discovering this device on the bus.
CRs-Fixed: 736039
Change-Id: I66eb5f67885d60c579c33c47ce696d66c6c428b5
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Before APPS is voting for IPA clocks to be disabled,
it first needs to make sure IPA uC is idle.
After APPS is voting for IPA clocks to be enabled,
uC is notified to start processing.
Change-Id: Ied9374a12d1ca2a1afe0c1aa30e6150089064101
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
Print header L2 type as part of printing header
table in debugfs.
Change-Id: I38ce867310356eb126a1438bf148acb39c1fe35f
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Ravit Katzav <rkatzav@codeaurora.org>
This change adds a procedure to remove the QMAP headers for each
interface when SSR occurs. The procedure is being invoked as part
of the remove hook of the rmnet_ipa platform driver.
Change-Id: I35112db0122071302a45e31c4afe9d1ee2e51308
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>