Platforms using Synopsys SS phy are enabling pwr_evt_irq for
wakeup events in host mode as a part of dwc3_msm_suspend, but
before all the resources have been relinquished. So it is
possible that an IRQ is fired before dwc->in_lpm could be set to
1. Because of this, the pwr_event_handler will try to read
STAT_REG without issuing resume_work leading to unclocked access.
Fix this by enabling pwr_evt_irq only after in_lpm flag is set to
1, hence ensuring resume when the irq is fired.
Change-Id: I9772f427ecd10c2922c998cf0d57734362413051
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Set the channel attribute for QRTR channels (MHI_CLIENT_IPCR_OUT
and MHI_CLIENT_IPCR_IN) so that QRTR client gets the uevent
broadcast when the channel state changes. Change the naming
for the structure to mhi_chan_attr_table since kernel clients are
also configured using the same structure.
Change-Id: I40232a09c27d7410d772055448d0354fb0c359b1
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
Add support to enable access for tlmm spare registers
for blair.
Change-Id: I250c0fd796ca80e019c6d5732394817c7527cc1c
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
Add support to read and write SPARE registers in TLMM block.
Change-Id: I6426b86510256983b509c5f48c2ab02f80b48ef8
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
ns service was notifying only local node ID services after
a pci disconnect and reconnect. Fix it to iterate over all
nodes and announce services of all nodes.
Change-Id: I4f91a71ad847b815318a7de47134f6b9c57dff53
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
The default Node ID 1 has conflict, as node ID 1 is being used
in IPQ-RC too. Hence fix the Node ID to be 2, (similar to sdx55).
Change-Id: I887b6523119531158e33d706b3b9fca2281d9bf5
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
Handle -EEXIST error case while register state callback
with mhi device. If channel is open during registration
no callback will issue instead mhi stack return -EEXIST
to notify the client. Further state change notification
will be informed via registered callback.
commit net: qrtr: mhi_dev: Handle mhi register error case
(f1eeca90b18b7).
Change-Id: Icf60de35d23393a0808ef90058c1108e950d02b9
Signed-off-by: Arun Prakash <app@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
Registering only for endpoint RX channel to complete enumeration and
starting to open both RX/TX channels leads to race condition on TX channel.
Since the host does TX followed by RX init.
Wait for endpoint TX channel init to synchronise with host.
commit qrtr: mhi-dev: Wait for RX channel to be enumerated
(5593a67ad0546).
Change-Id: Ied002a89b51f71fa30cb7557f7dce27cfe1fd202
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
After MHI device receives a reset command the internal
state machine suspends all activity on the channel and
processes the device reset. Clients are notified on
the channel close. Existing close function checks if
there are pending data to be read but since the device
is in the process of cleaning the transfer buffers
and the channels are suspended this check is not required.
commit msm: mhi_dev: Update release function in MHI
(6772e50d7b8fc).
Change-Id: Iafc5249762b1468ee2cca4ac141522ce0356d403
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
mhi_dev_read_channel returns the number of bytes read. Do not post a
packet to qrtr if the length returned is 0. This prevents an issue
where qrtr receives duplicates packets from the mhi_dev transport.
commit net: qrtr: mhi_dev: Only post valid data
(b4451ceb04138).
Change-Id: Ib1a31665730293baa9af61a9ae61bd8bdf6cab6f
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
qrtr_mhi_dev_event_cb will be called only once if there is
more than one packet at that time. Hence, call mhi_dev_read_channel
in a loop until it returns zero.
commit net: qrtr: Loop on mhi_dev_read_channel until it returns 0
(1a79f2584ef87).
Change-Id: I2f171cb45e66c1c439fcc7d0027c22d0edb4fb19
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
MHI's IN channel is QRTR's OUT channel and vice-versa.
commit net: qrtr: Change the in and out channels
(5c9c165066de0).
Change-Id: If16790e629263cfa2787a08326c079b58f42617b
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
Add a transport that uses the mhi device APIs. The mhi device APIs are
used to transfer data from a device to the host over MHI. The modem
will generally be configured as a device and this transport is intended
to be used on the modem controller co-processor.
commit net: qrtr: Add support for a mhi device transport
(89754e5ed45dd).
Change-Id: Ie9276fe6c0846581192aff881e59baa5fecf1ca4
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
Poll for ipa_dma_disable prior to entering mhi suspend, until it returns
success. this is to prevent IPA disable failure in case on
pending transfers.
Change-Id: I38143284447b86ce34c47e100e6fe0c23cf28f0b
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
Print subsystem notify event string for wpss & modem instead of
event code. Print proper file type in log while downloading BDF
and REGDB file. Log the error immediately if request_firmware
API get fail.
Change-Id: I32a07895faf2bce640e0bfe89e348c36b02c5150
Signed-off-by: Vijay Patil <vijaylil@codeaurora.org>
The "trivial conversion" in commit cccaa5e33525 ("init: use do_mount()
instead of ksys_mount()") was totally broken, since it didn't handle the
case of a NULL mount data pointer and while I had "tested" it (and
presumably Dominik had too) that was hidden by me having options.
Change-Id: I2b1db7b68e0e398ce803da40b37595c286c97d9c
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Reported-by: Ondřej Jirman <megi@xff.cz>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Reported-and-tested-by: Borislav Petkov <bp@suse.de>
Tested-by: Chris Clayton <chris2553@googlemail.com>
Tested-by: Eric Biggers <ebiggers@kernel.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 7de7de7ca0ae0fc70515ee3154af33af75edae2c
Git-repo: https://github.com/torvalds/linux.git
[pragalla@codeaurora.org:fix merge conflicts and port changes to 5.4 kernel]
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
In prepare_namespace(), do_mount() can be used instead of ksys_mount()
as the first and third argument are const strings in the kernel, the
second and fourth argument are passed through anyway, and the fifth
argument is NULL.
In do_mount_root(), ksys_mount() is called with the first and third
argument being already kernelspace strings, which do not need to be
copied over from userspace to kernelspace (again). The second and
fourth arguments are passed through to do_mount() anyway. The fifth
argument, while already residing in kernelspace, needs to be put into
a page of its own. Then, do_mount() can be used instead of
ksys_mount().
Once this is done, there are no in-kernel users to ksys_mount() left,
which can therefore be removed.
Change-Id: Ie21248b26e4a98796e092e20c9b8cb8126dc5eee
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Patch-mainline: linux-kernel@vger.kernel.org @ 12/12/2019, 14:57
[pragalla@codeaurora.org:fix merge conflicts and port changes to 5.4 kernel]
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
The CH completion commands are sent in async fashion, whereas the ch
cmd ack event is send in a sync fashion. This can lead to the host
receiving completions post the reset ch ack. These ch completion
events post ch reset would be treated as OOS events.
Making changes to send cmd ack events in async fashion to maintain the
ordering that is being sent to the host.
Change-Id: Ib2d568ea1d69486f3d1ebf4e7b209bba3315eba5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
Diag client uses asynchronous writes for data transfer.
Adding write_iter API in mhi to support the same.
Change-Id: If14ebdd4aa848046abd15ea93d939691c6962fcd
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
This change overrides the GSI mode flag, as generally for any TVM
usecase we enable la-vm flag. So that should be sufficient to manage
the TVM enabled SE instance.
This way any requirement of the GSI mode should not be conflicting or
impacting TVM or non GSI usecases.
Change-Id: I8c8ab8edb3866139ac07d1af55ddf294807b027b
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Configure QoS settings during probe for all nodes instead of
each node individually upon first client request.
Change-Id: I66e8776c8c27ca55382bca78e963ca8db1055637
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
By default pinctrl driver is disabling wakeup capability for gpios
for which interrupt is not registered. This could cause wakeup from
L1SS sleep not working. Hence fix it by enabling/disabling wakeup
capability for clkreq gpio as part of DRV suspend/resume handling.
Change-Id: If8fcb0a3a638c560bfe1f614aa00b7fd872c6b98
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Currently, header test puts videodev2.h into exclude list,
which avoid its inclusion while performing header test.
There are few camera headers which includes videodev2.h
and fails to compile during header test on some
host machine. Ideally, the headers files which includes
videodev2.h should get excluded from header test as they
eventually becomes incompatible due to videodev2.h .
This patch add camera headers to exclude list.
Change-Id: Ia8b7dc8ec635d568a026b948854448c77aae7770
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Currently, we are partially freeing private once last file is
closed but closing last file doesn't necessarily means that
all refcount on private is also put. This results in having a
partially initialized private struct which is not yet freed
and also can't be re-used. As a result if an application is
just opening and closing kgsl device in a loop we will end up
allocating and initializing a new private every time. This also
allows application to mis-use this and create more than allowed
limit of 200 contexts as they can use newly created private to
create new context every time.
To fix this, keep private intact until last refcount is put.
This ensures we can re-use same private if same pid is doing
kgsl open and close repeatedly and also ensures that an app
can't breach 200 context limit.
Change-Id: Ia1d1071275c7691a3d50bc15477b71387c5806d6
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Remove IPA offload config as IOSSv1 glue driver has also been
removed for Realtek.
Change-Id: I3007c300a27cac1eda114109a6f085efb4b4abb3
Signed-off-by: Akshaya Damodaran <adamodar@codeaurora.org>
Changed logic to find Lower Band Limit from Search Up from current
channel with Wrap enable to tuning to Lower Band Limit + chan space
and Search Down with Wrap disable.
Change-Id: I79a686238d96db5dd5df9436b346b465435ae4f5
Signed-off-by: Prateek Raj Singh <pratsing@codeaurora.org>