Commit Graph

862781 Commits

Author SHA1 Message Date
Jan Kara
8162923081 ext4: don't remount read-only with errors=continue on reboot
[ Upstream commit b08070eca9 ]

ext4_handle_error() with errors=continue mount option can accidentally
remount the filesystem read-only when the system is rebooting. Fix that.

Fixes: 1dc1097ff6 ("ext4: avoid panic during forced reboot")
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20201127113405.26867-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-06 14:44:59 +01:00
Eric Auger
706a63e840 vfio/pci: Move dummy_resources_list init in vfio_pci_probe()
[ Upstream commit 16b8fe4caf ]

In case an error occurs in vfio_pci_enable() before the call to
vfio_pci_probe_mmaps(), vfio_pci_disable() will  try to iterate
on an uninitialized list and cause a kernel panic.

Lets move to the initialization to vfio_pci_probe() to fix the
issue.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Fixes: 05f0c03fba ("vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive")
CC: Stable <stable@vger.kernel.org> # v4.7+
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-06 14:44:59 +01:00
Eric Biggers
5664f1cb08 ubifs: prevent creating duplicate encrypted filenames
commit 76786a0f08 upstream.

As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to
create a duplicate filename in an encrypted directory by creating a file
concurrently with adding the directory's encryption key.

Fix this bug on ubifs by rejecting no-key dentries in ubifs_create(),
ubifs_mkdir(), ubifs_mknod(), and ubifs_symlink().

Note that ubifs doesn't actually report the duplicate filenames from
readdir, but rather it seems to replace the original dentry with a new
one (which is still wrong, just a different effect from ext4).

On ubifs, this fixes xfstest generic/595 as well as the new xfstest I
wrote specifically for this bug.

Fixes: f4f61d2cc6 ("ubifs: Implement encrypted filenames")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201118075609.120337-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:44:59 +01:00
Eric Biggers
218cf245fc f2fs: prevent creating duplicate encrypted filenames
commit bfc2b7e851 upstream.

As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to
create a duplicate filename in an encrypted directory by creating a file
concurrently with adding the directory's encryption key.

Fix this bug on f2fs by rejecting no-key dentries in f2fs_add_link().

Note that the weird check for the current task in f2fs_do_add_link()
seems to make this bug difficult to reproduce on f2fs.

Fixes: 9ea97163c6 ("f2fs crypto: add filename encryption for f2fs_add_link")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201118075609.120337-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:44:58 +01:00
Eric Biggers
abd561e51a ext4: prevent creating duplicate encrypted filenames
commit 75d18cd186 upstream.

As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to
create a duplicate filename in an encrypted directory by creating a file
concurrently with adding the directory's encryption key.

Fix this bug on ext4 by rejecting no-key dentries in ext4_add_entry().

Note that the duplicate check in ext4_find_dest_de() sometimes prevented
this bug.  However in many cases it didn't, since ext4_find_dest_de()
doesn't examine every dentry.

Fixes: 4461471107 ("ext4 crypto: enable filename encryption")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201118075609.120337-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:44:58 +01:00
Eric Biggers
1227ffc9d7 fscrypt: add fscrypt_is_nokey_name()
commit 159e1de201 upstream.

It's possible to create a duplicate filename in an encrypted directory
by creating a file concurrently with adding the encryption key.

Specifically, sys_open(O_CREAT) (or sys_mkdir(), sys_mknod(), or
sys_symlink()) can lookup the target filename while the directory's
encryption key hasn't been added yet, resulting in a negative no-key
dentry.  The VFS then calls ->create() (or ->mkdir(), ->mknod(), or
->symlink()) because the dentry is negative.  Normally, ->create() would
return -ENOKEY due to the directory's key being unavailable.  However,
if the key was added between the dentry lookup and ->create(), then the
filesystem will go ahead and try to create the file.

If the target filename happens to already exist as a normal name (not a
no-key name), a duplicate filename may be added to the directory.

In order to fix this, we need to fix the filesystems to prevent
->create(), ->mkdir(), ->mknod(), and ->symlink() on no-key names.
(->rename() and ->link() need it too, but those are already handled
correctly by fscrypt_prepare_rename() and fscrypt_prepare_link().)

In preparation for this, add a helper function fscrypt_is_nokey_name()
that filesystems can use to do this check.  Use this helper function for
the existing checks that fs/crypto/ does for rename and link.

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201118075609.120337-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:44:58 +01:00
Kevin Vigor
f8bd479859 md/raid10: initialize r10_bio->read_slot before use.
commit 93decc5636 upstream.

In __make_request() a new r10bio is allocated and passed to
raid10_read_request(). The read_slot member of the bio is not
initialized, and the raid10_read_request() uses it to index an
array. This leads to occasional panics.

Fix by initializing the field to invalid value and checking for
valid value in raid10_read_request().

Cc: stable@vger.kernel.org
Signed-off-by: Kevin Vigor <kvigor@gmail.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-06 14:44:58 +01:00
Yao Xiao
e5235d6a08 net: rockchip_wlan: update cywdhd to "1.363.125.19 (r)"
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
Change-Id: I4be636719d780978486d8ad204472cfb1023ca99
2021-01-06 18:20:16 +08:00
Caesar Wang
9ccfa45cf3 arm64/configs: update rockchip_linux_defconfig
1/ enable sii902x
Add RGB/BT1120 to HDMI support, this is needed by
rk3568-evb2-lp4x-v10-bt1120-to-hdmi.

2/ enable CONFIG_SDIO_KEEPALIVE
This is needed by RK356X EVB to support Wi-Fi.

3/ add rockchip ebc dev driver.

4/ remove unused CONFIG_I2C_MUX.

5/ enable CONFIG_PCIE_DW_ROCKCHIP for PCIE devices.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I3076aefab88fa2b166a8af89e8681fa46a69e7f9
2021-01-06 18:15:37 +08:00
Daniel Vetter
97fd895541 UPSTREAM: dma-buf: Fix SET_NAME ioctl uapi
The uapi is the same on 32 and 64 bit, but the number isn't. Everyone
who botched this please re-read:

https://www.kernel.org/doc/html/v5.4-preprc-cpu/ioctl/botching-up-ioctls.html

Also, the type argument for the ioctl macros is for the type the void
__user *arg pointer points at, which in this case would be the
variable-sized char[] of a 0 terminated string. So this was botched in
more than just the usual ways.

Change-Id: Iaffffa806de8f6f10cd167881bb63fdabd6724a2
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Chenbo Feng <fengc@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: minchan@kernel.org
Cc: surenb@google.com
Cc: jenhaochen@google.com
Cc: Martin Liu <liumartin@google.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Tested-by: Martin Liu <liumartin@google.com>
Reviewed-by: Martin Liu <liumartin@google.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
  [sumits: updated some checkpatch fixes, corrected author email]
Link: https://patchwork.freedesktop.org/patch/msgid/20200407133002.3486387-1-daniel.vetter@ffwll.ch
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit a5bff92eaa)
2021-01-06 18:13:00 +08:00
Jianqun Xu
604baba3e7 android: ion: set sg address by sg_dma_address
Change-Id: I20b6d34a93aa3bc2b0044cfbc004e13ca60d2b2f
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 18:03:33 +08:00
Jianqun Xu
479227ac66 android: ion: add debug node for ion heap
Add debug node [system/cma]_stats for ion [system/cma]-heap

Change-Id: Ib8ea98f516586c9598e17efe310f7673421fa02a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 17:58:37 +08:00
Jianqun Xu
7e32ad8b9a android: ion: add exp_name for dma buffer
Add the exp_name for dma buffer with KBUILD_MODNAME, heap->name, current->tgid
and task_comm.

Such as ion_alloc-ion_system_heap-263-allocator@4.0-service

Module: ion_alloc
Heap  : ion_system_heap
tgid  : 263
task  : allocator@4.0-service

Change-Id: I4f11394ae2470dcd2b113b4cfd01d70be9c67c8d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 17:56:50 +08:00
Weiguo Hu
d9d3e43de1 net: wireless: rockchip_wlan: realtek wifi: p2p ioctl illegal parameter protect
References: CNVD-C-2020-309986, CNVD-C-2020-309987, CNVD-C-2020-309988

Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
Change-Id: I611e16f8155bac6431e0d786c29ef1425ff792d2
2021-01-06 17:08:25 +08:00
Jianqun Xu
6bb31db2cf mm/cma: show cma bitmap in hex format
Change-Id: I0f8b49202e3e173961f8f2697e0e3494a07afa1d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 16:59:56 +08:00
Weixin Zhou
12c78422e2 driver: input: touchscreen: Make sure that suspend/resume is called only once
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I198581c45baf31f62b9ffa6ba6d9ec15cf4c606d
2021-01-06 16:19:13 +08:00
Hu Kejun
e5c26944dd media: rockchip: isp: get stats only when meas done is on
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I52b167b0aa52a0e4e636334d3b874fa5616dc6da
2021-01-06 16:18:54 +08:00
Cai YiWei
56130b06e8 media: rockchip: isp: remove rx enable config
rx auto enable by csi op_mode

Change-Id: I0e4f807071ceceb1a9c53df5ede0a586febc442a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-06 16:16:23 +08:00
David Wu
1847729a77 arm64: dts: rockchip: rk3568: Add xpcs support
Change-Id: I431393b2346f5f7fd6b0d74f79e643df9a586479
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 15:24:40 +08:00
Alex Zhao
b59b1c0040 mmc: add a file to debugfs for changing host max clock at runtime
Usage is as follows:

rk3566_rgo:/ # cat /sys/kernel/debug/mmc1/max_clock
150000000

rk3566_rgo:/ # echo 200000000 > /sys/kernel/debug/mmc1/max_clock
rk3566_rgo:/ # cat /sys/kernel/debug/mmc1/max_clock
200000000
rk3566_rgo:/ # echo 200000000 >  /sys/kernel/debug/mmc1/clock

rk3566_rgo:/ # dmesg -c
[  285.884348] mmc_host mmc1: Bus speed (slot 0) = 198000000Hz (slot req 200000000Hz, actual 198000000HZ div = 0)

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I7ac9649b231c50b0c6c066407e28954e8c94510c
2021-01-06 15:18:42 +08:00
David Wu
6f8089df70 phy: rockchip: naneng-combphy: Add SGMII/QSGMII mode support
Change-Id: I56f30af84b8a2c2207a1c61afa1638736705d1f8
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 10:14:41 +08:00
David Wu
8768a53391 phy: rockchip: naneng-combphy: Sort rockchip_combphy_grfcfg struct member by register
Change-Id: I3c0593574a442c4de460ff3b0dde651a7fcae901
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 10:14:41 +08:00
Wyon Bi
7c35a5ac27 clk/rockchip/regmap: rk628: Add CLK_SET_RATE_PARENT flag to clk_hdmirx_aud
Change-Id: I368512b92f5c5068a4f1b9b3c03e82cd5702a05b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-01-05 19:40:02 +08:00
Elaine Zhang
b4f60fb98b arm64: dts: rockchip: rk3568-evb: add can nodes
add can0\1\2 node.
set disabled by default.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9493d640e9afcf1ae4db57e0ad2d680b8922cb92
2021-01-05 19:30:47 +08:00
Elaine Zhang
9823a37f80 net: can: rockchip: canfd: fix up the bus error
Fix up tdc calculation rules.
Enable auto retransmission mode.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ia909a71572be768be6639455129ef5c8885f4720
2021-01-05 19:28:21 +08:00
William Wu
ec7b288bbc usb: dwc3: core: disable device wakeup for rk356x usb host
RK356x SDK will power off logic and grf module in suspend.
So we don't need to enable device wakeup for rk356x usb host
to keep usb controller PD on. With this patch, it can call
rk356x combphy init by usb_phy_roothub_init during resume,
and fix the usb3.0 host function failure after resume.

Change-Id: I40f9a34b5f2aaeede833f9e46153f60b767ea3f0
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-01-05 19:05:18 +08:00
Wu Liangqing
7a81c1f7f5 arm64: dts: rockchip: rk3568-evb: adjust rknpu_reserved size
Change-Id: I4c691edd02041813f9364802cf92416b03dea4f0
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-01-05 18:51:32 +08:00
Will Deacon
25670eded8 ANDROID: usb: f_accessory: Don't drop NULL reference in acc_disconnect()
If get_acc_dev() fails to obtain a reference to the current device,
acc_disconnect() will attempt to put_acc_dev() with the resulting NULL
pointer, leading to a crash:

 | Unable to handle kernel NULL pointer dereference at virtual address 00000074
 | [...]
 | [<c0abb288>] (acc_disconnect) from [<c0a91a38>] (android_disconnect+0x1c/0x7c)
 | [<c0a91a38>] (android_disconnect) from [<c0a93958>] (usb_gadget_udc_reset+0x10/0x34)
 | [<c0a93958>] (usb_gadget_udc_reset) from [<c0a4a9c4>] (dwc3_gadget_reset_interrupt+0x88/0x4fc)
 | [<c0a4a9c4>] (dwc3_gadget_reset_interrupt) from [<c0a491f8>] (dwc3_process_event_buf+0x60/0x3e4)
 | [<c0a491f8>] (dwc3_process_event_buf) from [<c0a49180>] (dwc3_thread_interrupt+0x24/0x3c)
 | [<c0a49180>] (dwc3_thread_interrupt) from [<c02b3404>] (irq_thread_fn+0x1c/0x58)
 | [<c02b3404>] (irq_thread_fn) from [<c02b326c>] (irq_thread+0x1ec/0x2f4)
 | [<c02b326c>] (irq_thread) from [<c0260804>] (kthread+0x1a8/0x1ac)
 | [<c0260804>] (kthread) from [<c0200138>] (ret_from_fork+0x14/0x3c)

Follow the pattern used elsewhere, and return early if we fail to obtain
a reference.

Bug: 173789633
Reported-by: YongQin Liu <yongqin.liu@linaro.org>
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I37a2bff5bc1b6b8269788d08191181763bf0e896
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:39:39 +00:00
Will Deacon
429fec28c8 ANDROID: usb: f_accessory: Avoid bitfields for shared variables
Using bitfields for shared variables is a "bad idea", as they require
a non-atomic read-modify-write to be generated by the compiler, which can
cause updates to unrelated bits in the same word to disappear.

Ensure the 'online' and 'disconnected' members of 'struct acc_dev' are
placed in separate variables by declaring them each as 'int'.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ia6031d82a764e83b2cc3502fbe5fb273511da752
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:39:38 +00:00
Will Deacon
ff729a0610 ANDROID: usb: f_accessory: Cancel any pending work before teardown
Tearing down and freeing the 'acc_dev' structure when there is
potentially asynchronous work queued involving its member fields is
likely to lead to use-after-free issues.

Cancel any pending work before freeing the structure.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I68a91274aea18034637b738d558d043ac74fadf4
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:39:38 +00:00
David Wu
1fc7cbfe9e ethernet: stmicro: stmmac: Add SGMII/QSGMII support for RK3568
Change-Id: Iab9dd6ee61a35bf89fd3a0721f5d398de501a7ec
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-05 18:30:12 +08:00
Will Deacon
cd4f430770 ANDROID: usb: f_accessory: Don't corrupt global state on double registration
If acc_setup() is called when there is already an allocated instance,
misc_register() will fail but the error path leaves a dangling pointer
to freed memory in the global 'acc_dev' state.

Fix this by ensuring that the refcount is zero before we start, and then
using a cmpxchg() from NULL to serialise any concurrent initialisers.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I2c26289dcce7dbc493964516c49b05d04aaa6839
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:26 +00:00
Will Deacon
4df1d2ffe1 ANDROID: usb: f_accessory: Fix teardown ordering in acc_release()
acc_release() attempts to synchronise with acc_open() using an atomic
'open_excl' member in 'struct acc_dev'. Unfortunately, acc_release()
prematurely resets this atomic variable to zero, meaning there is a
potential race on 'dev->disconnected':

acc_open()				acc_release()
						atomic_xchg(open_excl), 0)
	atomic_xchg(open_excl, 1)
	dev->disconnected = 0;			dev->disconnected = 1;

Fix the race by ensuring that the 'disconnected' field is written
before clearing 'open_excl' in acc_release().

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ib9a21f2305f6d70de3e760da62dbfdd66889200a
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:26 +00:00
Will Deacon
86c87779ed ANDROID: usb: f_accessory: Add refcounting to global 'acc_dev'
Add refcounting to track the lifetime of the global 'acc_dev' structure,
as the underlying function directories can be removed while references
still exist to the dev node.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I248408e890d01167706c329146d63b64a6456df6
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:26 +00:00
Will Deacon
1077960495 ANDROID: usb: f_accessory: Wrap '_acc_dev' in get()/put() accessors
The '_acc_dev' global variable is a fancy use-after-free factory. Wrap
it in some get()/put() functions in preparation for introducing some
refcounting.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I4c839627648c209341a81efa0c001c8d71b878d4
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:26 +00:00
Will Deacon
1edd545631 ANDROID: usb: f_accessory: Remove useless assignment
acc_alloc_inst() assigns to a local 'dev' variable, but then never uses
it. Remove the redundant assignment, and the local variable along with
it.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ide9c2e89fb12b846eb8739b302d1b742fc7eb6b5
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:26 +00:00
Will Deacon
6be064d42c ANDROID: usb: f_accessory: Remove useless non-debug prints
Remove some useless print statements, as they can trivially be used to
spam the console and don't report anything meaningful.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I28052010fc3ec033a2c99efeb3f6c919d54d75c2
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:26 +00:00
Will Deacon
dbf07d7235 ANDROID: usb: f_accessory: Remove stale comments
Neither acc_gadget_bind() nor acc_gadget_register_driver() exist, so
remove the stale comments that refer to them.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: If396ba3bcac3ca59c48e5a5faa0a8520534ed625
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:26 +00:00
Vijayavardhan Vennapusa
720da4ffe7 ANDROID: USB: f_accessory: Check dev pointer before decoding ctrl request
In case of poweroff charging mode, accessory function instance
is not created and due to this, _acc_dev will be NULL. If target
is connected to Accessory dock in poweroff charging mode, there
is a chance dev pointer is accessed, which is NULL. Hence add a
check before processing control request and return error if it is
NULL.

Bug: 141002587
Change-Id: I4f1deb9d764b8c0bd1d7837cbc43a2933167f568
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:25 +00:00
Macpaul Lin
0e3db17d01 ANDROID: usb: gadget: f_accessory: fix CTS test stuck
f_accessory: fix CTS test stuck since CTS 9.0.
 - Refine acc_read() process.

The data length that user (test program) wants to read is different
from they really requested. This will cause the test flow stuck on the
2nd or the 3rd transfers in accessory test.
(By connecting 2 phones with CtsVerifier.apk and
CtsVerifierUSBCompanion.apk installed.)

Bug: 174729307

Change-Id: I5367c8075ed37534e8bed94b60cc79135ae5aebc
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-05 10:12:25 +00:00
David Wu
883ad9f863 ethernet: stmicro: dwmac-rk: Add null pointer check for gmac ops
Change-Id: Ic00540c0f018ba5115ebc3dad62b007024f6a6ad
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-05 18:04:43 +08:00
Alex Zhao
a6107c8add Revert "arm64: dts: rockchip: change the wifi power-on method for rk356x evb"
This reverts commit e37604f00f.

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I90a96482445710b6089acd5b6ad19264462b35f7
2021-01-05 17:53:47 +08:00
Algea Cao
67be194d10 drm: rockchip: dw-hdmi: Fix display err between kernel logo and bootanimation
If the hdmi color format is set to DRM_HDMI_OUTPUT_YCBCR_HQ or
DRM_HDMI_OUTPUT_YCBCR_LQ when the system boot, The actual color
formats is YUV444/YUV422/YUV420. This leads to misjudgment that
the color format has changed, hdmi will be reset. That cause
display err between kernel logo and bootanimation.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5d4784ecb64df82ab40723fddb6aef94cb493c5e
2021-01-05 17:34:56 +08:00
Liang Chen
88169e6e3b MALI: bifrost: Fix wrong voltage for devfreq
(kbdev->current_freqs[i] > freqs[i]) will be always false becasue kbdev->current_freqs[i]
has been updated to freqs[i], so we need save current_freqs[i] to old_freqs[i].

Change-Id: I3f8a06d474a359cf292460878c53592c4ce1472b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-01-05 14:52:16 +08:00
Ren Jianing
0035a1a225 arm64: dts: rockchip: add maximum-speed at DWC3 host for rk3568-evb6
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I7f70a40e633b2ec1549334954fefdc5ef11e3b4e
2021-01-05 14:36:44 +08:00
Vicent Chi
05f884ba7a media: i2c: add tp2855 driver
Change-Id: I0df90801fc5ca04ec92f10071915c5706f642f44
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
2021-01-05 14:23:46 +08:00
Xiao Ya peng
f87a80b733 arm64: configs: rockchip_linux_defconfig: enable spi nand flash and ubifs.
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
Change-Id: Ifab48fa09836244da7a300bcd00f901ca51c7faa
2021-01-05 10:21:47 +08:00
Sugar Zhang
93773ea1ee ASoC: rockchip: pdm: Add support for path map
This patch adds property 'rockchip,path-map' for path mapping.

e.g.

"rockchip,path-map = <3 2 1 0>" means the mapping as follows:

  path0 <-- sdi3
  path1 <-- sdi2
  path2 <-- sdi1
  path3 <-- sdi0

Change-Id: Ief7ef83cbcf8c57ee9dc07e49d70ea7e5da9e5cc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-05 09:18:17 +08:00
Sugar Zhang
3a294df494 dt-bindings: sound: pdm: Document property 'rockchip,path-map'
This is an optional property to describe data path mapping.

Change-Id: I99fb91a5d1be2e3ec9c7edac206760f589949df5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-05 09:16:33 +08:00
Sandy Huang
f33ddff87a drm/rockchip: vop2: move write_back close time point
Change-Id: Ia9cd0f2c479bb25488a43835a721c32f7a314f36
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-01-04 19:08:33 +08:00