i3c: master: svc: fix cpu schedule in spin lock
authorClark Wang <xiaoning.wang@nxp.com>
Wed, 17 May 2023 03:30:29 +0000 (11:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:21:54 +0000 (16:21 +0200)
commit76efcb6cdaf94650fdb11a1dd851592de132fea0
treede18cff7ff8e1d2cf39e8fa3432d121415df0bfc
parentc0ed8b804934a9b8ecb245617b6988fd6482c422
i3c: master: svc: fix cpu schedule in spin lock

[ Upstream commit 33beadb3b1ab74e69db2c49d9663f3a93a273943 ]

pm_runtime_resume_and_get() may call sleep(). It cannot be used in
svc_i3c_master_start_xfer_locked(), because it is in a spin lock.

Move the pm runtime operations to svc_i3c_master_enqueue_xfer().

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230517033030.3068085-2-xiaoning.wang@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i3c/master/svc-i3c-master.c