Ensure that the I2C->msg is synchronized with the idle state,
and the I2C->msg may still be used in the stop phase, need to
wait until the I2C transfer is completed, and then set I2C->msg
to be null.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I8a8e8c1e72f28cf4c95fe4efb559177056f483d1
If the start interrupt is not enabled, don't care about this
interrupt, clean it can slove the warning log:
"rk3x-i2c fead0000.i2c: unexpected irq in STOP: 0x10 may appear".
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I0ebb145ac7971b4c128c172e136bd1dda6e6192e
We found an issue under Android OTA scenario that many BIOs have to do
FEC where the data under dm-verity is 100% complete and no corruption.
Android OTA has many dm-block layers, from upper to lower:
dm-verity
dm-snapshot
dm-origin & dm-cow
dm-linear
ufs
DM tables have to change 2 times during Android OTA merging process.
When doing table change, the dm-snapshot will be suspended for a while.
During this interval, many readahead IOs are submitted to dm_verity
from filesystem. Then the kverity works are busy doing FEC process
which cost too much time to finish dm-verity IO. This causes needless
delay which feels like system is hung.
After adding debugging it was found that each readahead IO needed
around 10s to finish when this situation occurred. This is due to IO
amplification:
dm-snapshot suspend
erofs_readahead // 300+ io is submitted
dm_submit_bio (dm_verity)
dm_submit_bio (dm_snapshot)
bio return EIO
bio got nothing, it's empty
verity_end_io
verity_verify_io
forloop range(0, io->n_blocks) // each io->nblocks ~= 20
verity_fec_decode
fec_decode_rsb
fec_read_bufs
forloop range(0, v->fec->rsn) // v->fec->rsn = 253
new_read
submit_bio (dm_snapshot)
end loop
end loop
dm-snapshot resume
Readahead BIOs get nothing while dm-snapshot is suspended, so all of
them will cause verity's FEC.
Each readahead BIO needs to verify ~20 (io->nblocks) blocks.
Each block needs to do FEC, and every block needs to do 253
(v->fec->rsn) reads.
So during the suspend interval(~200ms), 300 readahead BIOs trigger
~1518000 (300*20*253) IOs to dm-snapshot.
As readahead IO is not required by userspace, and to fix this issue,
it is best to pass readahead errors to upper layer to handle it.
Cc: stable@vger.kernel.org
Fixes: a739ff3f54 ("dm verity: add support for forward error correction")
Bug: 316972624
Link: https://lore.kernel.org/dm-devel/b84fb49-bf63-3442-8c99-d565e134f2@redhat.com
Signed-off-by: Wu Bo <bo.wu@vivo.com>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Akilesh Kailash <akailash@google.com>
(cherry picked from commit 0193e3966ceeeef69e235975918b287ab093082b)
Change-Id: I73560e5660cebdc1997e1f9926cbb8888789eb46
commit 317eb9685095678f2c9f5a8189de698c5354316a upstream.
Otherwise set elements can be deactivated twice which will cause a crash.
Bug: 316310313
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Fixes: 3c4287f620 ("nf_tables: Add set type for arbitrary concatenation of ranges")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 189c2a8293)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I27fb6ee806642e23ca02700763a387341dd463e6
Upstream commit: 63e44bc520
Check the memory operand of INS/OUTS before emulating the instruction.
The #VC exception can get raised from user-space, but the memory operand
can be manipulated to access kernel memory before the emulation actually
begins and after the exception handler has run.
[ bp: Massage commit message. ]
Bug: 309733863
Fixes: 597cfe4821 ("x86/boot/compressed/64: Setup a GHCB-based VC Exception handler")
Reported-by: Tom Dohrmann <erbse.13@gmx.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6550cbe25de182f6c0176909a90b324cb375133f)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ie21d33ca750d1668244c9a954cb7ab6872066c2e
Upstream commit: b9cb9c4558
Check the IO permission bitmap (if present) before emulating IOIO #VC
exceptions for user-space. These permissions are checked by hardware
already before the #VC is raised, but due to the VC-handler decoding
race it needs to be checked again in software.
Bug: 309733863
Fixes: 25189d08e5 ("x86/sev-es: Add support for handling IOIO exceptions")
Reported-by: Tom Dohrmann <erbse.13@gmx.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Tom Dohrmann <erbse.13@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5bb9ba7dafbe18e027e335f74372ca65f07f7edd)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I559d1ee6aa0793f7bfd7b5e603cdaba2336d0562
commit d920abd1e7 upstream.
From Alon:
"Due to a logical bug in the NVMe-oF/TCP subsystem in the Linux kernel,
a malicious user can cause a UAF and a double free, which may lead to
RCE (may also lead to an LPE in case the attacker already has local
privileges)."
Hence, when a queue initialization fails after the ahash requests are
allocated, it is guaranteed that the queue removal async work will be
called, hence leave the deallocation to the queue removal.
Also, be extra careful not to continue processing the socket, so set
queue rcv_state to NVMET_TCP_RECV_ERR upon a socket error.
Bug: 310114968
Cc: stable@vger.kernel.org
Reported-by: Alon Zahavi <zahavi.alon@gmail.com>
Tested-by: Alon Zahavi <zahavi.alon@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e985d78bdcf37f7ef73666a43b0d2407715f00d3)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ifd7ec8294182a6bf6d8c261aeda5d989e909f7ff
Merge made by the 'ours' strategy.
* commit 'b9ceef773d7113416588d3d5ac8ed6f96e101dc8':
drm/rockchip: analogix_dp: add mode_valid func support
Change-Id: I499bd7fe7d7299123ca9123be4eb12e1e6f83fc1
The edp controller can not support display timings whose
front porch or back porch is 0.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I689f9f23154cffd7199e65767e2a977cd3404ea9
Usually we think rk3568 max resolution is 4096x2160, in face rk3568 can
also support 2160x4096.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I96358f481f9e26d1196e2118b3ce3b82c4a6ce82
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I578b7c54b96cfa89fd2f8cf346832e2b68a1d355
This patch do full hw params re-configuation instead of the reset one.
Fixes: 0c2c6c9430 ("drm/bridge: synopsys: Fix wrong FIFO reset on AUD_CONF0")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1e259797ce22cd9a3be7086e1f21bd02c440ac57
If the DRAM frequency conversion jitters during the transmission process,
it will cause the DMA to be unable to transport SPI FIFO data in a timely
manner, resulting in FIFO overflow/underflow.
Clear performance status for short cmd packet and Set the performance
status for data packet.
Change-Id: I65532ba309677a8d98c8277875a3bd358ca44e44
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
At following commit, we update connectors_changed flag for writeback
enable lead to other display dev do disable and enable:
c7e2a3387e ("drm/rockchip: vop2: No need for a full modested when the
only writeback connector changed")
And revert the drm framework update for GKI:
82a56746d9 ("Revert "drm: Not mark crtc state as connectors_changed
when a writeback connector attatch to a crtc"")
But when writeback disable, the DRM framework still thought crtc
connectors is changed and set connectors_changed to true, this will lead
other display dev do disable and enable, so we add this commit to fix
it.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie69d63ea19110251273eb8969fc40a4fceb5e309
This patch adds support to parse pvtpll config from devicetree, and
change config through sip smc interface.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5f23b9eb1d358a95b690ca214e35927e74451af1
The edp controller can not support display timings whose
front porch or back porch is 0.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I689f9f23154cffd7199e65767e2a977cd3404ea9
If using split mode with edp0 and edp1, the node of which
displays in the left area should have "split-mode" property
and config panel node, and the other does not.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I0533df43d5fd5d9ea3fd2fb94c9a8cdab1fd59e2
The enc did not stop working when the watch dog timeout was triggered,
and still check timeout and trigger watch dog irq. It will cause watch
dog interrupt storm.
Solution:
1. Mask watch dog irq when first watch dog irq trigger.
2. Set IRQF_ONESHOT to ensure the irq handling is completed.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I741fe9fd96486641b1ee5d337ecc144e29778157