Reap tasks that are killed by PreKillActionT.
Change-Id: I367e803848121d071d8143952eaa9b7195ae04d6
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This change ensures the IOS lines are in protocol default state before
starting the data transfer. This ensures the slave is properly powered
up and also protocol lines are in IDLE High state.
We can prevent any further try to send data which can be failed due to
lines not in proper state.
Change-Id: Ibd9a6109133dd776f86a841f8bde305d08d2c187
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Fix potential memory leak situation when receiving a message of type
HAB_PAYLOAD_TYPE_EXPORT_ACK. Add kfree() to free ack_recvd.
Change-Id: Iaa5cb10af694b20647f2f04f3c030bfa2ba59a3d
Signed-off-by: lixiang <lixiang@codeaurora.org>
Update "get_fifo_length_us" function to support the T_LRA_X_2/4/8
periods. So that the FIFO mode can work for all T_LRA periods.
Change-Id: I5d6b2c95eff66cddcec9388082c4d540493f2c86
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
For mass storage function driver ep_disable will be called in worker
thread context. Making sure controller is active and then calling
ep_disable and then putting controller back to lpm is very difficult
to achieve in mass storage driver. The reason is that fsg_disable
raises an exception which actaully waits for the completion
callback to come from gadget driver and if for some reason (like
command timeout error) if it doesn't, then do_set_iterface will
not be called which will do put_sync. This can prevent controller
from going to lpm.
To solve above problem, commit ad8d260c33 ("usb: dwc3: gadget: Check
controller status with endpoint enable/disable") moved pm_runtime_sync
operations from mass storage driver to gadget driver. But there is a
chance that pm_runtime get_sync and put sync operations in gadget
driver can be called in atomic context (taking spin_lock in function
driver and then calling) and lead to crash. Adding in_lpm check and
performing these operations only if controller is in lpm will ensure
that these operations will be done only for mass storage driver and
not be done in atomic context. For other function drivers where
ep_disable will be called in atomic context, there is no chance that
ep_disable will be called when controller is in lpm as bh_work or
resume work will be called and will ensure controller to be out of
LPM before ep_disable is called.
Change-Id: I37635fd75e44a67deadbd4796b757d85d604aed4
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
When in rndis composition, if device is disabled in device manager,
usb enters low power mode. Then if rndis interface is put down,
ep_disable is called leading to crash due to unclocked access as
clocks are turned off when usb enters lpm. Fix this by waking up
the controller, then performing ep_disable operation and then
putting controller back to lpm.
Change-Id: I45d29ef2e2678a3d6383d3fdd5550c8b8e156875
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
ADB function is mainly used for debugging, hence it is
not expected to allow USB LPM followed by system suspend
in device bus suspend. Driver also doesn't handle
usb_ep_dequeue failure in LPM when adbd is interrupted
by signal as buffer is left queued to the hardware after
usb_ep_dequeue failure and can cause memory corruption.
In addition to above comments, when controller is in lpm
there is a chance that ffs_ioctl can issue clear halt as
a part of which send_gadget_ep_cmd will be called where
registers are accessed with clock's turned off leading
to crash due to unclocked access. Hence do not allow usb
lpm with adb.
Change-Id: Ib89c80318dcdd0dbb35d122a2ab77fb61f83518e
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
If a channel gets stopped, while there are some outstanding requests/
transfers with IPA, then we simply ignore the completion from IPA.
But we must have already added the transfer-completion-event to the
flush list before submitting the transfer to IPA.
There is a possibility that we flush these stale events along with new
flush events (for new requests) when the channel gets re-started.
This un-intentional completion event can lead to out-of-sequence
events at the host.
So while stopping a channel, ensure all elements in the flush list
of that channel are discarded and the flush list is empty.
Change-Id: I04445b1f9f4d2d4fce0b8a96277517de14481ead
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Release spinlock before notifying client driver and acquire
spinlock once done because once host notifies client driver with
an event, client can schedule an recovery in same context before
returning and expects an new event which could cause an race
condition if spinlock is acquired.
Also use list_for_each_entry_safe() while travesing the list of
registered clients for notification.
Change-Id: I6ae55032acdb1a5b14f473eadacb7a009a8df753
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
Enablig CONFIG_PRINTK_CALLER, causes printk to add a caller "thread id"
or a caller "processor id" to the message.
Change-Id: Ifd0a2a151df71156d57344d819ce3d5583c60e53
Signed-off-by: satyanarayan kamasali <kamasali@codeaurora.org>
Ensure that the input parameters of qcom_wdt_register is checked before
proceeding as this could cause NULL pointer dereferences.
Change-Id: I29e7eee946fb9fe0ba7fe75b96acedff7deab4bd
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
There is a possibility for the calculation to overflow when size is large
enough to overflow when added to the size of payload. Ensure that this
overflow is caught early.
Change-Id: I876fbaa704ba51dc4a9e4eb4d3f7f0eaa749e06d
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
This change is for general scheduler improvements.
Change-Id: I78a13f15f7b95d7b6583222fbc68b828e651b802
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Changed “icnss_long1” to “icnss_smp2p” as it contain
only SMP2P logs. Created “icnss_soc_wake” IPC to separate
SOC_WAKE logs from “icnss”.
Change-Id: I073868e4954903fbb780bec44d8172bbf7e4393c
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
Retain the old copyright year which was dropped during propagation of
a recent change.
Fixes: dd473e6c28 ("haven: hh_rm_core: Change datatype of
num_fragments").
Change-Id: If8d66b096403ae1c54c072ef86a1bfbda828f50f
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
This change enables the framework needed to run the link layer
tests on sdxlemur.
Change-Id: I05975750d84cdbb6583bd314cce6912c8b1e9599
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Change done to support 32 clients for mac based filtering.
Change-Id: I69e652f2962dc94025dbb0b1936236214034c2d5
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Some qmi clients have low latency requirement. In high system load
there may be scheduling delay in work queue which can delay qmi packet
delivery to qmi clients.
Adding high priority flag while allocating qmi work queue.
Change-Id: I64ba90777d3337849113ae4163f997bb781fbd40
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Consider a case where DUT is in a low memory condition and
it is switching between host and none frequently. This can
lead the driver to fail the allocation of primary event ring
and go into error path where it will try to cleanup the event
ring. Since secondary event ring was not even initialized, while
fetching the entries to cleanup, it will lead to NULL pointer
dereference.
Avoid this by adding a NULL check for secondary event ring before
fetching the entries and bailing out early from cleanup function.
Change-Id: I21488d0e0a02347a392d890918c5c874b704795f
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
When charging with some fixed voltage USBPD adapters and when VBUS voltage
is moving from 9V to 5V, usbin-ov interrupt is triggered because of the
VBUS voltage is not settled before updating 5V VBUS allowance. To avoid
this, adding 40ms delay before updating 5V VBUS allowance.
Change-Id: I1a439210e7ceb46bf59f900f3c72e71715c590d3
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Add support to read ibat range factor from nvmem and use it to
scale ibat current for greater than default max supported
ibat range.
Change-Id: Iee83be8d6663920d4df0b792417820d222e3ff46
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
Add slatecom_interface header file in gen_headers to make it
accessible from userspace modules who uses Android.bp files
for compilation.
Change-Id: Ie298ec28983c16999d941ee8667e2dd7b5c3db22
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Integer overflow can occur for a large value of req_buff_size because
num_fragments is declared as u8. Declare it as int in order to prevent
this from occurring.
Change-Id: I9e3655af13134ec57d123317ebb7b287a7470a19
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
Update the fmax frequency to 200MHz for SDCC clock.
Change-Id: If77e30d586e3b33c35a7ccf3cd67eb98b6dac101
Signed-off-by: Taniya Das <tdas@codeaurora.org>