As we don't do it in resume routine, so in order to be better
compatibale with devices, set it to low.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I0613e05f6d35ba7def7eedd902cfaff73d716952
Fix pin-assignment as per specification.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: Iad7e211e43ebc01607ae534b56666ec56da2f54b
(cherry picked from commit b3e060dc22)
Augmented Power Delivery Objects (A)PDO_s are used by USB-C
PD power adapters to advertize the voltages and currents
they support. There can be up to 7 PDO_s but before PPS
(programmable power supply) there were seldom more than 4
or 5. Recently Samsung released an optional PPS 45 Watt power
adapter (EP-TA485) that has 7 PDO_s. It is for the Galaxy 10+
tablet and charges it quicker than the adapter supplied at
purchase. The EP-TA485 causes an overzealous WARN_ON to soil
the log plus it miscalculates the number of bytes to read.
So this bug has been there for some time but goes
undetected for the majority of USB-C PD power adapters on
the market today that have 6 or less PDO_s. That may soon
change as more USB-C PD adapters with PPS come to market.
Tested on a EP-TA485 and an older Lenovo PN: SA10M13950
USB-C 65 Watt adapter (without PPS and has 4 PDO_s) plus
several other PD power adapters.
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191230033544.1809-1-dgilbert@interlog.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
(cherry picked from commit c215e48e97)
Change-Id: I51f7e53e6540cdc0ad543f7cbc80416204a1c816
Since the ARGB format was added without processing the address offset
during rotation, the address offset of mmu was calculated incorrectly.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6bddd21b50bf60cadf493e73cff10c18210c375c
Should use REG_19H instead of REG_DH.
Fixes: 2f06afaaa8 ("phy: rockchip: naneng-combphy: Force detect Rx for RK356X SoCs")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ifc9484e850955e6a36c30755a7ba1aee65070d0f
The interrupt status bit of the previous error data transmition will
affect the next operation and cause continuous SPI transmission failure.
Change-Id: Ib215d63d8572e3fc8d843652687e1ebfb7ff531e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
the wakeup interrupt handler which is guaranteed not to run while
@resume noirq() is being executed. the patch can help to avoid the
wakeup source try to access spi when the spi is in suspend mode.
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I3e6bc6e05dddeedea4c82de45a9e06b40e870876
Previously zero length transfers submitted to the Rokchip SPI driver would
time out in the SPI layer. This happens because the SPI peripheral does
not trigger a transfer completion interrupt for zero length transfers.
Fix that by completing zero length transfers immediately at start of
transfer.
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 5457773ef9)
Change-Id: I0c14eee10fbf0ffd2938d52b6d0c88910d8fd9d7
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
This reverts commit ba0401694b.
Replaced by commit d4fe42d646 ("arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed").
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9b0f39823bd2202bd58837262a54694c096aab84
https://source.android.com/security/bulletin/2021-12-01
CVE-2021-33909
CVE-2021-38204
CVE-2021-0961
* tag 'ASB-2021-12-05_4.19-stable': (1065 commits)
BACKPORT: arm64: vdso32: suppress error message for 'make mrproper'
Linux 4.19.219
tty: hvc: replace BUG_ON() with negative return value
xen/netfront: don't trust the backend response data blindly
xen/netfront: disentangle tx_skb_freelist
xen/netfront: don't read data from request on the ring page
xen/netfront: read response from backend only once
xen/blkfront: don't trust the backend response data blindly
xen/blkfront: don't take local copy of a request from the ring page
xen/blkfront: read response from backend only once
xen: sync include/xen/interface/io/ring.h with Xen's newest version
fuse: release pipe buf after last use
NFC: add NCI_UNREG flag to eliminate the race
hugetlbfs: flush TLBs correctly after huge_pmd_unshare
s390/mm: validate VMA in PGSTE manipulation functions
tracing: Check pid filtering when creating events
vhost/vsock: fix incorrect used length reported to the guest
net: hns3: fix VF RSS failed problem after PF enable multi-TCs
net/smc: Don't call clcsock shutdown twice when smc shutdown
MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48
...
Change-Id: Iaa72ffe6492c1a9a32cbd8769ae00c3f47ed198b
Conflicts:
arch/arm64/boot/dts/rockchip/rk3328.dtsi
drivers/media/i2c/imx258.c
drivers/soc/rockchip/Kconfig
drivers/usb/host/ehci.h
This patch try to reset DTOP_DIGEN_CLKE during hook power up
after finish configure digital registers, avoid to the incorrect
work status.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iaa7eb3ebf41d0a55ddf8005bcaeccae2c60656eb
use tid_name to singed buf user, so we can check buf usage, and recyle
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Iccf48bc30fbbf1ab44ac33babc9f00500b647623
ebc power on in advance
fix resume check not drop buf
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I1f34d4c5bd49a730967c997225f40dbed165bc92
commit 14831fad73 upstream.
When running the following command without arm-linux-gnueabi-gcc in
one's $PATH, the following warning is observed:
$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper
make[1]: arm-linux-gnueabi-gcc: No such file or directory
This is because KCONFIG is not run for mrproper, so CONFIG_CC_IS_CLANG
is not set, and we end up eagerly evaluating various variables that try
to invoke CC_COMPAT.
This is a similar problem to what was observed in
commit dc960bfeed ("h8300: suppress error messages for 'make clean'")
Reported-by: Lucas Henneman <henneman@google.com>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
[nd: adjusted context due to missing e35123d83e]
[nd: backported because Android backported compat vdso support to 4.19.y]
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211019223646.1146945-4-ndesaulniers@google.com
Signed-off-by: Will Deacon <will@kernel.org>
Bug: 202827173
Change-Id: Ic1ad9eb2871fd4f6c4f0e27df673df5cb4012df9
Some PC USB Hosts (e.g Dell laptop) fail to send
SetInterface(AltSet=0) to stop capture/playback
when PC enter suspend or play YouTube Video.
To be compatible with these PC, add this patch to
stop capture/playback prior to start again if the
stream_state is true.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iced57de39b6b88a7c987897dcb123cf8d7cf6473
Changes in 4.19.219
USB: serial: option: add Telit LE910S1 0x9200 composition
USB: serial: option: add Fibocom FM101-GL variants
usb: dwc2: hcd_queue: Fix use of floating point literal
usb: hub: Fix usb enumeration issue due to address0 race
usb: hub: Fix locking issues with address0_mutex
binder: fix test regression due to sender_euid change
ALSA: ctxfi: Fix out-of-range access
media: cec: copy sequence field for the reply
HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts
staging: rtl8192e: Fix use after free in _rtl92e_pci_disconnect()
fuse: fix page stealing
xen: don't continue xenstore initialization in case of errors
xen: detect uninitialized xenbus in xenbus_init
tracing: Fix pid filtering when triggers are attached
xtensa: use CONFIG_USE_OF instead of CONFIG_OF
proc/vmcore: fix clearing user buffer by properly using clear_user()
PCI: aardvark: Fix a leaked reference by adding missing of_node_put()
PCI: aardvark: Wait for endpoint to be ready before training link
PCI: aardvark: Train link immediately after enabling training
PCI: aardvark: Improve link training
PCI: aardvark: Issue PERST via GPIO
PCI: aardvark: Replace custom macros by standard linux/pci_regs.h macros
PCI: aardvark: Indicate error in 'val' when config read fails
PCI: aardvark: Don't touch PCIe registers if no card connected
PCI: aardvark: Fix compilation on s390
PCI: aardvark: Move PCIe reset card code to advk_pcie_train_link()
PCI: aardvark: Update comment about disabling link training
PCI: aardvark: Configure PCIe resources from 'ranges' DT property
PCI: aardvark: Fix PCIe Max Payload Size setting
PCI: aardvark: Fix link training
PCI: aardvark: Fix checking for link up via LTSSM state
pinctrl: armada-37xx: Correct mpp definitions
pinctrl: armada-37xx: add missing pin: PCIe1 Wakeup
pinctrl: armada-37xx: Correct PWM pins definitions
arm64: dts: marvell: armada-37xx: declare PCIe reset pin
arm64: dts: marvell: armada-37xx: Set pcie_reset_pin to gpio function
netfilter: ipvs: Fix reuse connection if RS weight is 0
ARM: dts: BCM5301X: Fix I2C controller interrupt
ARM: dts: BCM5301X: Add interrupt properties to GPIO node
ASoC: qdsp6: q6routing: Conditionally reset FrontEnd Mixer
ASoC: topology: Add missing rwsem around snd_ctl_remove() calls
net: ieee802154: handle iftypes as u32
firmware: arm_scmi: pm: Propagate return value to caller
NFSv42: Don't fail clone() unless the OP_CLONE operation failed
ARM: socfpga: Fix crash with CONFIG_FORTIRY_SOURCE
scsi: mpt3sas: Fix kernel panic during drive powercycle test
drm/vc4: fix error code in vc4_create_object()
ipv6: fix typos in __ip6_finish_output()
net/smc: Ensure the active closing peer first closes clcsock
PM: hibernate: use correct mode for swsusp_close()
tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited flows
MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48
net/smc: Don't call clcsock shutdown twice when smc shutdown
net: hns3: fix VF RSS failed problem after PF enable multi-TCs
vhost/vsock: fix incorrect used length reported to the guest
tracing: Check pid filtering when creating events
s390/mm: validate VMA in PGSTE manipulation functions
hugetlbfs: flush TLBs correctly after huge_pmd_unshare
NFC: add NCI_UNREG flag to eliminate the race
fuse: release pipe buf after last use
xen: sync include/xen/interface/io/ring.h with Xen's newest version
xen/blkfront: read response from backend only once
xen/blkfront: don't take local copy of a request from the ring page
xen/blkfront: don't trust the backend response data blindly
xen/netfront: read response from backend only once
xen/netfront: don't read data from request on the ring page
xen/netfront: disentangle tx_skb_freelist
xen/netfront: don't trust the backend response data blindly
tty: hvc: replace BUG_ON() with negative return value
Linux 4.19.219
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I08d2ac89cddf44071c644a999ca39fc5230b1b21
commit a884daa61a upstream.
Today netfront will trust the backend to send only sane response data.
In order to avoid privilege escalations or crashes in case of malicious
backends verify the data to be within expected limits. Especially make
sure that the response always references an outstanding request.
Note that only the tx queue needs special id handling, as for the rx
queue the id is equal to the index in the ring page.
Introduce a new indicator for the device whether it is broken and let
the device stop working when it is set. Set this indicator in case the
backend sets any weird data.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 21631d2d74 upstream.
The tx_skb_freelist elements are in a single linked list with the
request id used as link reference. The per element link field is in a
union with the skb pointer of an in use request.
Move the link reference out of the union in order to enable a later
reuse of it for requests which need a populated skb pointer.
Rename add_id_to_freelist() and get_id_from_freelist() to
add_id_to_list() and get_id_from_list() in order to prepare using
those for other lists as well. Define ~0 as value to indicate the end
of a list and place that value into the link for a request not being
on the list.
When freeing a skb zero the skb pointer in the request. Use a NULL
value of the skb pointer instead of skb_entry_is_link() for deciding
whether a request has a skb linked to it.
Remove skb_entry_set_link() and open code it instead as it is really
trivial now.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 162081ec33 upstream.
In order to avoid a malicious backend being able to influence the local
processing of a request build the request locally first and then copy
it to the ring page. Any reading from the request influencing the
processing in the frontend needs to be done on the local instance.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 8446066bf8 upstream.
In order to avoid problems in case the backend is modifying a response
on the ring page while the frontend has already seen it, just read the
response into a local buffer in one go and then operate on that buffer
only.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit b94e4b147f upstream.
Today blkfront will trust the backend to send only sane response data.
In order to avoid privilege escalations or crashes in case of malicious
backends verify the data to be within expected limits. Especially make
sure that the response always references an outstanding request.
Introduce a new state of the ring BLKIF_STATE_ERROR which will be
switched to in case an inconsistency is being detected. Recovering from
this state is possible only via removing and adding the virtual device
again (e.g. via a suspend/resume cycle).
Make all warning messages issued due to valid error responses rate
limited in order to avoid message floods being triggered by a malicious
backend.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Link: https://lore.kernel.org/r/20210730103854.12681-4-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>