Create the ipa_client interface for ethernet offloading.
Change-Id: I8120b0cca9e42a75153fb1468dc1b8bcbd43484c
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
The decs array allocated on the stack was smaller
than the following code required. Therefore the stack
memory after the array was overwritten.
Change-Id: Ife68f8eb98b775a88d3f3988f6f21d487a083cc4
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Make changes to delete NAPI TX object when pipe setup fails.
Change-Id: Ie7124fc9f996795b1a955166a9cae198f6a57f03
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
In case if modem crashes even before uC is loaded, there is
a possibility that we hold the proxy vote twice and the clock
will not be disabled. Make changes to avoid duplicate proxy vote.
Change-Id: Id62994c79eff6868e3a491aa53963ec127ea1213
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
As part of HOLB monitoring, uc will clear the HOLB discard if
it was set as part of HOLB monitoring or it can clear if
peripheral recovers just before receiving HOLB_DEL command.
Make change to set HOLB discard back if it was intended to be
configured from AP as part of disconnect scenarios.
Change-Id: I6659a62499150844c3b540fadb4ba8b9535f5e45
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
ADPLv3 targets do not require status to be enabled on ODL_DPL pipe.
Make changes to disable the status for targets with IPAv4.5 and above.
Change-Id: Ica07a25a01e742928d3ecb19a88b7ee2305235ae
Signedo-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Move mutex_unlock in ipa_mhi_connect function to unlock on the last
goto statement to prevent deadlock.
Change-Id: Ib524d726ac45000da65114b48f8650c8025e44b9
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
This change supports device assisted low power modes -M1/M2 states
in IPA. For M1/M2 states, GSI is continued to be in poll mode where
as for M3 state GSI is moved to doorbell mode.
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
return 0 instead of -ENXIO when rmnet_ctl disabled.
If we give error return to egress ioctl, ingress ioctl
is not even getting called anymore.
Change-Id: I948daa6ccb46a87b36eb3bc54c0f62d67546624c
When ssr happen in middle of egress ioctl, only tx pipe is setup
and the current state in teardown cannot handle it.
The fix is to add state for tx/rx setup separately.
Change-Id: I0eb4011ce91139acce3a619a8179d84066873953
The decs array allocated on the stack was smaller
than the following code required. Therefore the stack
memory after the array was overwritten.
Change-Id: Iedf2947489c657d7c5e05ab2c756f6a5da39d5e5
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Fix GSI 3.0 HAL to use GSI_IRQ_STTS parsing function
Change-Id: Ibdf5a4b995f999400ee9d2e71f742b3bec03df81
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
The IPA_STAT_DROP_CNT_MASK_n is deprecated in IPAv5.0.
Changing it to IPA_STAT_DROP_CNT_MASK_EE_n_REG_k.
Change-Id: I6435af7fdb2140f633696b7644aaa7af05e73acf
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Enable forceclear only supported for producer pipe so
avoid sending the force clear command to consumer pipes.
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Change-Id: I850f360f18c6598af6914c9cd2c89cacad1ac4c9
if there are packets coming from rndis client to device
IPA driver tries to gives those packets to network driver.
If at the same time USB disconnection is in progress, there
can be a possibility of race where callback is called with NULL
private data and it can result in a undefined behavior at client
driver. Make changes to add proper checks to handle the scenario
gracefully.
Change-Id: I7b3a5731ae21362dc67c53a2de464b17a223d4ba
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
When USB is disconnected USB driver deregisters callback
with IPA driver. If there are exception packets coming to USB
driver at the same time there is a possiblity of race condition
where callback is de-registered and IPA driver tries to access it.
Make changes to restrict the callback access when disconnect is
in progress.
Change-Id: I85d2876847bfd0b23f19b2b81e1aab68729b2e31
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
In case napi_schedule() called before the net_dev_init(),
which is called sometime in the subsys_initcall,
the napi_schedule() call will cause null pointer dereference.
This change sets dependency on passing the subsys_init for
the napi_schedule() calls.
Change-Id: I5688a845d98d8939e0d5df7efb8e1d293b19a37e
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Some init operations may cause race within initcall.
To avoid that race, those operations have to be postponed
till later initcall (fs_initcall for now).
This change introduces the ipa_late_init module, which (for now)
will take care of RMNET platform driver registration,
which would have caused race with core net_dev,
if was called in the subsys_initcall.
Change-Id: I9664c3ea67fc2e758979bbf744cabc476176b57d
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Various fixes to get the in-kernel tests running and pass
on Olympic.
Change-Id: I6850a35c488321fd216ef5ac8024d2c70a6c51d1
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
IPA FW is loaded via XBL to improve boot KPI enumeration
for MHI and USB use cases.Make changes to complete the IPA
initialization as early as possible without waiting for
user space trigger to load the fw.
Change-Id: I6fc6ab0a52784428363154b66237886e738048de
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Once the interrupt is enabled we could get an interrupt
immediately. To avoid a crash in this case, we have
to initialize the props structure in the gsi_ctx.
Change-Id: Ic595bc9d8ab5f3803ff6e1592358f426dcf51e0a
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
V6 CT table mmaping was failing due to improper state data being
passed to dma_mmap_coherent. With this change, the proper data are
now passed.
This change also prevent allocation of NAT table on SRAM when SRAM
is not initialized.
Change-Id: I974cb906dbc53ff512dbce6b7424d4d4be1ec1ed
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Load the IPA_CFG offset from the DTS and use it for reg_base
offset.
Change-Id: Ib04349b5f35e8b3b4f5cfdf8eee50eabd886484f
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Limit the number of immediate commands in a chain when submitting
filtering rules in order to prevent chain size from surpassing TLV
fifo size.
Change-Id: Iebdd76501d9965331715fc5d7ae050f9007f9361
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Add Hardware Abstraction Layer infrastructure to GSI
driver. This change includes registers HAL component
for GSI.
Change-Id: I87e7c22ed88117a74af4220b4c05c610bae498cc
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
IPA v5 introduced new packet status and frag status bitmaps.
Adding the support for the new bitmaps.
Change-Id: I6f112254d41aaebdbf49d474af33fe24a5551725
Signed-off-by: Ilia Lin <ilial@codeaurora.org>