Commit Graph

1127839 Commits

Author SHA1 Message Date
Hemant Kumar
5a1870bb6b mhi: host: Skip MHI reset if device is in RDDM
In RDDM EE, device can not process MHI reset
issued by host. In case of MHI power off, host
is issuing MHI reset and polls for it to get
cleared until it times out. Since this timeout
can not be avoided in case of RDDM, skip the
MHI reset in this scenarios.

Change-Id: Ide4311ba8705861179bfbfef650f00fa0f97c062
Signed-off-by: Hemant Kumar <quic_hemantk@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:46 -07:00
Lazarus Motha
8407d797f0 mhi: host: Notify MHI clients about fatal error
Currently fatal error notification is done from
fast resume path. This does not cover RDDM EE
change via BHI Intvec. As a result of the some
critical clients are unable to perform cleanup
and does not come up after recovery. In case
if RDDM EE change never comes notify clients
from mhi force reset context.

Change-Id: Iea1f1d86e9a28c08e8d58100715004f3b2abfd96
Signed-off-by: Hemant Kumar <quic_hemantk@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:43 -07:00
Bhaumik Bhatt
f74335f06b bus: mhi: host: Add optional runtime PM last busy update API
This optional runtime PM last busy update callback to the
controller is provided to keep the busy timestamps up to date
from MHI core driver such that it can reset the autosuspend
timer for runtime PM.

Change-Id: Ifc9abce860739b92d29fc257afd169d08a738379
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:39 -07:00
Bhaumik Bhatt
5653395337 Revert "bus: mhi: core: Fix MHI runtime_pm behavior"
This reverts commit 4547a749be.
This is done to ensure internal usecases with WLAN are not
impacted with high power usage. Runtime PM get also results in a
WoW exit and is also unnecessary as we already have the if
suspended check and the pending packets counter in place to take
care of rejecting suspends if they occur. The only major benefit
of this patch was to ensure controller is able to mark last busy
timestamp for runtime PM. If needed, support for it can be added
in a future patch to allow controller to update the timestamp.

Change-Id: I3e16ab3631468edd0fda3657adf0f5ae55f0be16
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:34 -07:00
Bhaumik Bhatt
09138d7384 bus: mhi: misc: DTR race condition updates
Data terminal ready driver should not be started until other
client drivers are probed so that they can get the necessary
notifications when updates are made available to them by the
device via incoming messages. Adjust flow of the driver and
ensure DTR driver starts after all other devices are created
by core driver.

Change-Id: I9e0bcb87a3b59a66fede0c82ded94a704d16c2a1
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:30 -07:00
Hemant Kumar
1c0cd2d26a bus: mhi: host: Take irqsave lock after TRE is generated
Take irqsave lock after TRE is generated to avoid deadlock due to
core getting interrupts enabled as local_bh_enable must not be
called with irqs disabled based on upstream patch.

Change-Id: Id0c34ccddbfa99700ec32319d141cecd3dfbe1f1
Signed-off-by: Hemant Kumar <quic_hemantk@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:26 -07:00
Bhaumik Bhatt
7b8b0f1c27 bus: mhi: core: Update debug print for TRE generation
Include channel number and update the TRE WP print to read the
IOVA properly in order to improve readability.

Change-Id: I80d9c7c2d8722efabb47ccf4b580bd65ab3c9728
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:23 -07:00
Vivek Pernamitta
e541397ebd bus: mhi: host: Release mhi_chan write lock on map_single fails
Release mhi_chan write lock before returning on map_single
callback failure.

Change-Id: Iab4bcc878ff5ed7d11c6e943f949ab39dc77b829
Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:19 -07:00
Bhaumik Bhatt
90fc13e213 bus: mhi: host: Allow configuration of bidrectional channels
Certain offload channels such as ones for satellite driver
usecases are required to be configured as bidrectional channels.
Allow it to ensure devices are created for them and the channels
are probed.

Added __attribute__((__fallthrough__)) statements to suppress
compiler error.

Change-Id: I782e3e933765099e8ee9eb1670cce321a3dffd8b
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:10 -07:00
Bhaumik Bhatt
48799e0f4d bus: mhi: host: Add update transfer state APIs
Add update transfer state APIs and do not check for channel state
in the channel context as device can update it once MHI master
reset has taken place. Instead, rely on local channel and PM
states prior to sending any channel update commands.

Change-Id: Ib3416323e0f1b01ff37c9bd176e72daa4dea9d8d
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:02 -07:00
Bhaumik Bhatt
ba41ac151c bus: mhi: host: Add spinlock to protect WP access when queueing TREs
Protect WP accesses such that multiple threads queueing buffers
for incoming data do not race and access the same WP twice.
Ensure read and write locks for the channel are not taken in
succession by dropping the read lock from parse_xfer_event() such
that a callback given to client can potentially queue buffers and
acquire the write lock in that process. Any queueing of buffers
should be done without channel read lock acquired as it can
result in multiple locks and a soft lockup.

Change-Id: Iaa5849da70acd6ece06469312186edc194c7f050
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:57 -07:00
Bhaumik Bhatt
4cdf3aac4d bus: mhi: host: Enable support for miscellaneous MHI features
Add a new MHI_BUS_MISC Kconfig entry and support to build
miscellaneous MHI features in Makefile if enabled. It can be
enabled only if necessary for certain controllers and is tied to
module init/exit and MHI registration.

Change-Id: I36429eed9e786681150aceb494bcd06cf3d09ca9
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:52 -07:00
Bhaumik Bhatt
20a444391a bus: mhi: core: Fix race between channel preparation and M0 event
There is a race condition where mhi_prepare_channel() updates the
read and write pointers as the base address and in parallel, if
an M0 transition occurs, the tasklet goes ahead and rings
doorbells for all channels with a delta in TRE rings assuming
they are already enabled. This causes a null pointer access. Fix
it by adding a channel enabled check before ringing channel
doorbells.

Change-Id: Idd1f39627a509590e892bf5c853761d351d3d823
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:48 -07:00
Bhaumik Bhatt
38dced66d3 bus: mhi: host: Add RDDM check in mhi_pm_resume()
If a device crash occurs when in suspended state, the interrupt
handler cannot access registers to act on it. Once controller is
done with PCIe resume and calls mhi_pm_resume(), MHI host can
check for the RDDM entry and handle it as needed.

Change-Id: I6127b75b51c3ef932e601391daebd0657e1a04eb
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:44 -07:00
Vivek Pernamitta
d0737d448d bus: mhi: host: Provide an API to perform host reset request
Adding new API to perform host reset request to device
to collect device side dumps.
Use mhi_soc_reset() API in place of register write
Currently, a direct register write is used when ramdump collection
in panic path occurs. Replace that with new mhi_soc_reset() API
such that a controller defined reset() function is exercised if
one is present and the regular SOC reset is done if it is not.

Change-Id: Ibd15b231072a9b811ced0031387d605184806e9a
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:30 -07:00
Bhaumik Bhatt
d933db57d7 bus: mhi: host: Skip power down if RDDM is supported and power up fails
Skip power down if RDDM is supported and power up fails as the
CNSS handling requires it.

Change-Id: I88a2f9e0ea29dd04f76a3a6facb421ac61789bce
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:11 -07:00
Hemant Kumar
f82f2340d8 bus: mhi: core: Add support to offload device wake DB write
Wake doorbell register write operation is done with spin
lock held. This adds implicit CPU memory barrier after the
write which goes over the link. In case the endpoint is in
L1SS sleep (retention), it takes around 2.5 ms for link to
comeback and respond to this write operation. Due to memory
barrier CPU would stall for 2.5ms and this starves any other
task waiting to run on same core. Fix this issue by offloading
device wake doorbell write to a high priority work queue.
This offloading is enabled only for device supporting legacy
M state mode.

Change-Id: I4447cf1afa4bc2c95991e003196ecd1e45926c66
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:04 -07:00
Bhaumik Bhatt
e85735437f bus: mhi: core: Use mhi_soc_reset() API in place of register write
Currently, a direct register write is used when ramdump collection
in panic path occurs. Replace that with new mhi_soc_reset() API
such that a controller defined reset() function is exercised if
one is present and the regular SOC reset is done if it is not.

Change-Id: I6590598b63211ef8c12fa666e2ce0f690ddaf1c9
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:22:02 -07:00
Bhaumik Bhatt
d5d939f536 bus: mhi: host: Panic if suspend ack times out
If suspend ack does not arrive on time, MHI host currently bails
out silently. Panic if this happens such that issues can be pin-
pointed to root causes.

Change-Id: Ic2201aafc2a55d572311ec9ee8a8b9c8a60a1da4
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 19:05:14 -07:00
Hemant Kumar
9204f9fa1e bus: mhi: host: Disable preemption while processing data events
If data processing of an event is scheduled out because core
is busy handling multiple irqs, this can starves the processing
of MHI M0 state change event on another core. Fix this issue by
disabling irq on the core processing data events.

Change-Id: I4d784d2c343d4a9c50741f3e72df4c373993ae79
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 18:56:34 -07:00
Bhaumik Bhatt
2a3dece5e1 bus: mhi: host: Address pending BW requests for legacy mode
It cannot be guaranteed that certain legacy mode controllers stay
in M0 while a BW request is being processed. Ensure that those
pending BW requests are addressed when M0 entry occurs after a BW
request is processed but not responded to.

Change-Id: I15ebc4e61e59ceeb5e8740b60bb95606945b0b3c
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 18:46:25 -07:00
Bhaumik Bhatt
b5c5f9c659 bus: mhi: host: Panic or exit on certain use cases
Add missing checks in the MHI core driver to panic on certain use
cases such as a bad or malformed TRE or unexpected states and
exit from out of order command completions.

Change-Id: I873ed04c4fce57b1ec42175666ffadd496ad3fdf
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 18:35:28 -07:00
Bhaumik Bhatt
bf693df5a0 bus: mhi: host: Log data and control events for debug
Certain log messages will help improve the debug experience when
attempting to solve issues related to tracking data or control
packets in MHI. Add logs to improve this aspect.

Change-Id: Ic8608d68e37436b23e7c2364cb9e38db22c3844f
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:30:44 -07:00
Bhaumik Bhatt
4056a947ac bus: mhi: host: Fix DTR MHI dev pointer and circular dependency
There is a typo and a wrong struct type was used for the DTR
driver features. Update it and use the correct mhi_device type in
place of the dtr_device pointer. Also fix a circular dependency on
DTR and MHI misc by using the traditional status callback route to
notify the DTR client driver.

Changes for misc.c,mhi_misc.h are already present in commit f1f4164c4f
("bus: mhi: host: Add snapshot of MHI bus misc driver"), and
for mhi_dtr.c in commit 0ff9eadd9c ("bus: mhi: devices:
Add snapshot of MHI devices driver").

Change-Id: I877d0ed009bbde30605bbd306deaf53588f1611f
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:30:13 -07:00
Bhaumik Bhatt
b7f5b28137 bus: mhi: host: Enable use of time synchronization misc feature
Allow the miscellaneous driver to use the time synchronization
feature by providing core support.

Change-Id: I63cad0be5f303f07dc785862d48dc64d2ca0c33b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:29:53 -07:00
Bhaumik Bhatt
9446d19cc3 bus: mhi: Add support for MHI DTR signaling driver
DTR signaling client driver needs certain entries in the MHI
device structure and an mhi_callback entry. Add those to support
DTR signaling.

Change-Id: Id74395348200e84bc9af0b251799c06eeb738193
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:28:41 -07:00
Bhaumik Bhatt
141a2b8fb2 bus: mhi: host: Add support for subsystem failure reason
Add support for controllers to enable retrieval of the subsystem
failure reason if an error from device is reported.

Change-Id: I27d88ceaeeb512fc578b78bcf85e7ba7cb27a4ff
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:28:17 -07:00
Bhaumik Bhatt
bd9e89fec7 bus: mhi: host: Add UL and DL event ring IDs to MHI device
Offload channels where the client drivers manage their own
context information need event ring information in the MHI
device structure that is currently not exposed to them. Add
those to enable these drivers to function properly.

Change-Id: Icc80344518591ca74c75ab932ac15eca9a77d0ad
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:27:52 -07:00
Bhaumik Bhatt
d11c150a81 bus: mhi: host: Use parent device to request firmware
Parent device must be used to request firmware from the file-
system otherwise the request does not go through. Make these
necessary changes to allow boot-up for all MHI controllers.

Change-Id: Ia78398c5d2d472a2f6f7e3e652f62b75927bd379
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:27:27 -07:00
Bhaumik Bhatt
37cdc4bc4f bus: mhi: host: Introduce and use fast suspend counter
MHI fast suspend state change counter can be used to track the
number of times device enters the state. Introduce and use it for
accurate tracking of MHI low power states.

Change-Id: Ibaa0428d5ba13b7776a0c9af58a357f59bb9eda5
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:26:28 -07:00
Bhaumik Bhatt
6375f3b44a bus: mhi: host: Add session ID to MHI controller
Session ID to be used during BHI transfers to recognize a
particular session are currently not being stored in the MHI
controller structure. Store them to allow for tracking and other
future usage.

Change-Id: I45a55f39226be3a21ff1e3317a899da1a63f3439
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:25:31 -07:00
Hemant Kumar
04d4e7ae5c bus: mhi: host: Add support for processing of sleepable events
Processing of some events requires the use of a sleeping function.
In order to handle those events, work is queued using high priority
workqueue. Sleepable events also require use of a dedicated event
ring.

Replaced 'TO_MHI_STATE_STR' with 'mhi_state_str' to aid in
compilation.

Change-Id: I3c42bc5b33b179de79911f8ec21b9a351116a112
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:25:04 -07:00
Hemant Kumar
93258369b2 bus: mhi: host: Move MHI_MAX_MTU to external header file
Currently this macro is defined in internal MHI header as
a TRE length mask. Moving it to external header allows MHI
client drivers to set this upper bound for the transmit
buffer size.

Change-Id: I24c7bce37cb8f103c1436201d825bec4a36eb122
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:24:23 -07:00
Bhaumik Bhatt
6ff1554291 bus: mhi: core: Enable bandwidth scaling usage
Enable bandwidth scaling usage for MHI core driver.

Change-Id: I31492bd87162c0347f9f8f8acc1a0316a84af572
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:22:32 -07:00
Bhaumik Bhatt
85269c6e88 bus: mhi: core: Add support to pre allocate image buffers
This allows controller to keep the memory allocated for bhi
vector table for rddm and fbc images. Memory remains allocated
after controller powers down and is freed when the controller
unregisters with MHI. Add a controller flag to make the
decision for memory allocation.

Change-Id: I974e44d3b927da1003e232455067c50fdf6fb42b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-06 17:02:07 -07:00
Hemant Kumar
975ca1a62c bus: mhi: host: Add helper API to ring event ring doorbells
SW event ring elements are added and doorbells are rung during
ready state transition from host. HW event ring elements are
added and doorbells are rung in mission mode transition. All
event ring doorbells are rung in M0 state change transition.
Move this common code to a helper API mhi_setup_event_rings().
Pass a boolean for adding event ring elements. When this flag
is false, only ring doorbells for all event rings and do not
populate the event rings.

Change-Id: Ib201007179c2cb772decb2456d3510602ea63fd6
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-05 16:37:13 -07:00
Hemant Kumar
955a4b15ab bus: mhi: host: Add support for event ring processing priorities
Default processing priority for an event ring is set to schedule
a regular priority tasklet. In order to distinguish going forward
and provide support for scheduling a high priority tasklet or any
further requirements that may come up, introduce support for
different event ring priorities.

Change-Id: I53325bc141269832444ba28a4941c050ceebe394
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-05 16:31:26 -07:00
Bhaumik Bhatt
c5dd45c17a bus: mhi: host: Add fallback image support
In case firmware request fails to find firmware at the default
location, re-try once with a fallback location. This is done by
adding fallback firmware image location in controller structure
and firmware request is sent again using fallback location.
Send a status call back to controller when re-try is done to
notify them as some features may not be available.

Change-Id: I6c832c121e7bfaf798c06d0341541a2677653fd0
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-05 15:51:19 -07:00
Bhaumik Bhatt
d3dd2a1713 bus: mhi: host: Prevent warnings on clearing channel context twice
Do not allow clearing the channel context twice from
mhi_driver_remove(), if already done before disable transition is
initiated. This prevents kernel warnings such as "trying to free
invalid coherent area" from occurring.

Change-Id: I85dec0557a287c9207b56d2b2243d53b6a40ff1c
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-05 11:40:37 -07:00
qctecmdr
21f3a2eb36 Merge "soc: qcom: eud: Force conversion to u32" 2022-10-04 09:40:43 -07:00
qctecmdr
05f194128d Merge "generic_vm_defconfig: Remove CONFIG_ANDROID" 2022-10-04 09:40:40 -07:00
qctecmdr
35d0622658 Merge "soc: qcom: pdr: Add service path to error logs" 2022-10-03 22:16:19 -07:00
Gokul krishna Krishnakumar
154bbef675 soc: qcom: pdr: Add service path to error logs
When lookup fails, print the service path along with the
service name since the service name might not be unique.

Change-Id: I614d6c0a8d6cb8a83b47795315811fbf47bb6e48
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2022-10-03 11:29:35 -07:00
Chris Lew
cc60f7fdd8 net: qrtr: Add socket mode optimization
A remote endpoint should not need to know when a client socket is freed
if the socket never established commnication with the endpoint. Add a
mode to keep track of which endpoints a socket communicates with.

There are three modes a socket can be in:
	INIT   - Socket has not sent anything or only local messages,
		 only send client close to local services.

	SINGLE - Socket has sent messages to a single ept, send event
		 to this single ept.

	MULTI  - Socket has sent messages to multiple epts, broadcast
		 release of this socket.

Server state changes should be broadcast throughout the system. Change
the ipc state of a port when it sends a NEW SERVER control packet. This
ensures the DEL CLIENT control packet is propagated correctly for
servers.

Change-Id: I416742cff598bf7aa9da2baa2e86a53b18367870
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-03 09:57:24 -07:00
Chris Lew
a0f46809c5 net: qrtr: Do not send packets before hello negotiation
There is a race where broadcast packets can be sent to a node that has
not sent the hello message to the remote processor. This breaks the
protocol expectation. Add a status variable to track when the hello
packet has been sent.

An alternative solution attempted was to remove the nodes from the
broadcast list until the hello packet is sent. This is not a valid
solution because hello messages are broadcasted if the ns is restarted
or started late. There needs to be a status variable separate from the
broadcast list.

Change-Id: I2a55e587f324e64e2bde4ea634de66008f190de1
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-03 09:57:02 -07:00
qctecmdr
16b799c886 Merge "dwc3-msm-core: Add NULL check with dwc3_msm_override_pm_ops() API" 2022-10-02 09:14:21 -07:00
qctecmdr
1befe958e4 Merge "dwc3-msm-core: Add NULL check against USB GSI event buffer" 2022-10-02 09:14:20 -07:00
qctecmdr
8678efeb9b Merge "dwc3-msm-core: Add NULL check with return value from memremap() API" 2022-10-02 07:05:29 -07:00
qctecmdr
d036b442ae Merge "dwc3-msm-core: Use refcount to handle USB DP concurrency case" 2022-10-01 06:50:29 -07:00
Mayank Rana
727bbb3139 dwc3-msm-core: Add NULL check with dwc3_msm_override_pm_ops() API
dwc3 msm core driver shall start USB host or device mode with dwc3
controller driver. This shall fail specifically USB host mode due
to any error with xhci controller initialization. In this case HCD
would be unbinded causing NULL pointer deference when trying to
override its PM ops with dwc3_msm_override_pm_ops() API. To avoid
NULL pointer dereference add NULL check with dwc3_msm_override_pm_ops()
API.

Change-Id: Ia96e945d58b1bf1d5434b004ac3d3090b24c6208
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
2022-09-30 18:12:45 -07:00