06 Sep, 2019
1 commit
-
commit 3b4929f65b0d8249f19a50245cd88ed1a2f78cff upstream.
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48An skb can hold 17 fragments, and each fragment can hold 32KB
on x86, or 64KB on PowerPC.This means that the 16bit witdh of TCP_SKB_CB(skb)->tcp_gso_segs
can overflow.Note that tcp_sendmsg() builds skbs with less than 64KB
of payload, so this problem needs SACK to be enabled.
SACK blocks allow TCP to coalesce multiple skbs in the retransmit
queue, thus filling the 17 fragments to maximal capacity.CVE-2019-11477 -- u16 overflow of TCP_SKB_CB(skb)->tcp_gso_segs
Fixes: 832d11c5cd07 ("tcp: Try to restore large SKBs while SACK processing")
Signed-off-by: Eric Dumazet
Reported-by: Jonathan Looney
Acked-by: Neal Cardwell
Reviewed-by: Tyler Hicks
Cc: Yuchung Cheng
Cc: Bruce Curtis
Cc: Jonathan Lemon
Signed-off-by: David S. Miller
Signed-off-by: Greg Kroah-Hartman
(cherry picked from commit c09be31461ed140976c60a87364415454a2c3d42)
05 Sep, 2019
1 commit
-
Patch moves some decoding functions from driver/usb/dwc3/debug.h driver
to driver/usb/common/debug.c file. These moved functions include:
dwc3_decode_get_status
dwc3_decode_set_clear_feature
dwc3_decode_set_address
dwc3_decode_get_set_descriptor
dwc3_decode_get_configuration
dwc3_decode_set_configuration
dwc3_decode_get_intf
dwc3_decode_set_intf
dwc3_decode_synch_frame
dwc3_decode_set_sel
dwc3_decode_set_isoch_delay
dwc3_decode_ctrlThese functions are used also in inroduced cdns3 driver.
All functions prefixes were changed from dwc3 to usb.
Also, function's parameters has been extended according to the name
of fields in standard SETUP packet.
Additionally, patch adds usb_decode_ctrl function to
include/linux/usb/ch9.h file.Signed-off-by: Pawel Laszczak
(cherry picked from commit 046b47df488c6956b9a4420e684274cc0ca0fb70)
Signed-off-by: Leonard Crestez
Reviewed-by: Peter Chen
06 Aug, 2019
1 commit
-
On some imx host, if USB PHY is active when bus suspended, host may
have problem on taking over resume signal of remote wakeup from usb
device, resolve this by making PHY enter low power mode right after
bus suspended.Acked-by: Peter Chen
Signed-off-by: Li Jun
25 Jul, 2019
1 commit
-
Macros 'inline' and '__gnu_inline' used to be defined in compiler-gcc.h,
which was (and is) included entirely in (__KERNEL__ && !__ASSEMBLY__).
Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually
exclusive") had those macros exposed to userspace, unintentionally.Then commit a3f8a30f3f00 ("Compiler Attributes: use feature checks
instead of version checks") moved '__gnu_inline' back into
(__KERNEL__ && !__ASSEMBLY__) and 'inline' was left behind. Since 'inline'
depends on '__gnu_inline', compiling error showing "unknown type name
‘__gnu_inline’" will pop up, if userspace somehow includes
.Other macros like __must_check, notrace, etc. are in a similar situation.
So just move all these macros back into (__KERNEL__ && !__ASSEMBLY__).Note:
1. This patch only affects what userspace sees.
2. __must_check (when !CONFIG_ENABLE_MUST_CHECK) and noinline_for_stack
were once defined in __KERNEL__ only, but we believe that they can
be put into !__ASSEMBLY__ too.Acked-by: Nick Desaulniers
Signed-off-by: Xiaozhou Liu
Signed-off-by: Miguel Ojeda
30 Apr, 2019
1 commit
-
We allocate skb according to "fd on" or "fd off" before, this may not
reasonable. Such as, transfer normal frame when fd mode is on. Allcoating
skb based on "EDL" bit from mailbox ctrl field is more reasonable.Signed-off-by: Joakim Zhang
26 Apr, 2019
2 commits
-
This reverts commit 7da862fdfe2cff02361098e2dbabc93c4e92b8a1.
-
This reverts commit cf2ea7c7b563842ce6dfa3fc8c8fafdbdc5ef7c8.
25 Apr, 2019
1 commit
-
prep/unprep functions were not added in new spi_nor_resume function.
Signed-off-by: Han Xu
19 Apr, 2019
1 commit
-
This reverts commit ccbf06406704c52d5146c9f28cbc8907429b92ce.
As we will use fwnode API to get typec properties, those APIs to be
reverted are not required, this will also fix below build warnings:drivers/usb/typec/class.c: In function ‘typec_register_port’:
drivers/usb/typec/class.c:1591:2: warning: enumeration value
‘TYPEC_PORT_TYPE_UNKNOWN’ not handled
in switch [-Wswitch]
switch (cap->type) {
^~~~~~Reported-by: Fugang Duan
Acked-by: Peter Chen
Signed-off-by: Li Jun
18 Apr, 2019
31 commits
-
Add brcmfmac platform device pinctrl state support. That is useful
for dynamically configurate pin group for different wlan chips.Reviewed-by: Richard Zhu
Signed-off-by: Fugang Duan
(cherry picked from commit 88f2834cd5b8cb8864af68d265b5bdee3000c4bf) -
Add regulator_desc_list_voltage_linear_range which can be used
by drivers for getting the voltages before regulator is registered.
This may be useful for drivers which need to fetch the voltage
selectors at device-tree parsing callback.Signed-off-by: Matti Vaittinen
Acked-by: Mark Brown
Tested-by: Angus Ainslie
Reviewed-by: Angus Ainslie
Signed-off-by: Mark Brown
(cherry picked from commit 6a47b4da551a762217215aeeda22e46469c5868a) -
All the fields in struct bd718xx_pmic are not really necessary.
Remove struct bd718xx_pmic to simplify the code.Signed-off-by: Axel Lin
Reviewed-by: Matti Vaittinen
Signed-off-by: Mark Brown
(cherry picked from commit bcb047ebf28453da56f0265aeeb9edc52b797ea7) -
Few regulators in BD71837 and BD71847 can output voltages from
different voltage ranges. Register interface is arranged so that
used range is selected by toggling bits which are not next to actual
voltage selection bits. Then the voltage inside selected range is
determined by voltage selection bits (as usual). Support BD71837
and BD71847 selectible range voltages using new pickable ranges
helpers.Signed-off-by: Matti Vaittinen
Signed-off-by: Mark Brown
(cherry picked from commit a4bfc2c28a21f4d5274d813b20fd015a9dc9bcfa) -
Rename parts of code that support both BD71837 and BD71847 to BD718XX.
Signed-off-by: Matti Vaittinen
Acked-by: Lee Jones
Signed-off-by: Mark Brown
(cherry picked from commit dd2be639f4a918b335818bf22a937956e552b957) -
For example ROHM BD71837 and ROHM BD71847 Power management ICs have
regulators which provide multiple linear ranges. Ranges can be
selected by individual non contagious bit in vsel register. Add
regmap helper functions for selecting ranges.Signed-off-by: Matti Vaittinen
Signed-off-by: Mark Brown
(cherry picked from commit 18e4b55fbd2069cee51ef9660b35c65ec13bee6d) -
BD71847 is reduced version of BD71837. DVS bucks 3 and 4 are
removed as is LDO7. Voltage ranges of some regulators are
expanded.Add initial support for BD71847 with BD71837 driver.
Signed-off-by: Matti Vaittinen
Acked-by: Lee Jones
Signed-off-by: Mark Brown
(cherry picked from commit 494edd266b945f36908184433dd36eda1719cdb0) -
For syncing with unstreaming kernel on UART driver from 4.19 changed
to rom script for uart rx path, and the compatiblity of legacy kernel
using ram script, add both uart rom and ram script support, so add
rom script address.ram script:
uart_2_mcu_fix_addr
uartsh_2_mcu_fix_addr /* through spba bus */
rom script:
uart_2_mcu_addr
uartsh_2_mcu_addr /* through spba bus */Signed-off-by: Robin Gong
-
According to ANSI-CTA-861-G specification:
* EOTF is 8 bit, not 16;
* metadata type is 8 bit, not 16;
* There's no "Minimum Content Light Level"This patch will change the HDR metadata structures to reflect that. Also, this
will fix problems seen on some TVs that were rejecting HDR metadata because
it's size was too big (more than 26 bytes).Signed-off-by: Laurentiu Palcu
CC: Sandor Yu -
Enable Dynamic Range and Mastering Infoframe for HDR
content, which is defined in CEA 861.3 spec.The metadata will be computed based on blending
policy in userspace compositors and passed as a connector
property blob to driver. The same will be sent as infoframe
to panel which support HDR.Signed-off-by: Uma Shankar
-
Add busfreq driver support on i.MX8MQ. The busfreq driver is
mainly used for dynamic DDR frequency change for power saving
feature. When there is no peripheral or DMA device has direct
access to DDR memory, we can lower the DDR frequency to save
power. Currently, we support frequency setpoint for LPDDR4:(1): 3200mts, the DDRC core clock is sourced from 800MHz
dram_pll, the DDRC apb clock is 200MHz.(2): 400mts, the DDRC core clock is source from sys1_pll_400m,
the DDRC apb clock is is sourced from sys1_pll_40m.(3): 100mts, the DDRC core clock is sourced from sys1_pll_100m,
the DDRC apb clock is sourced from sys1_pll_40m.In our busfreq driver, we have three mode supported:
* high bus mode 3200mts;
* audio bus mode 400mts;
* low bus mode 100mts;The actual DDR frequency is done in ARM trusted firmware by calling
the SMCC SiP service call.Signed-off-by: Bai Ping
Reviewed-by: Anson Huang(cherry picked from commit 60a2002f752404b5fc30b374bc71a3975902eb7a)
Use CONFIG_HAVE_IMX_BUSFREQ instead of just CONFIG_ARCH_FSL_IMX8MQ
Signed-off-by: Leonard Crestez -
Add header file for the i.MX8mq IOMUXC GPR register offsets definitions.
Also, include definition for the GPR_MIPI_MUX_SEL from GPR13, needed by
MIPI-DSI driver.Signed-off-by: Robert Chiras
-
Currently, the Northwest Logic MIPI-DSI controller host specific code
resides under drm/bridge, but is not a real drm_bridge. It creates a
drm_bridge and adds itself to the drm_encoder that handles this file,
but this is wrong, since it does not implement the drm_bridge_funcs.The correct way to implement a drm_bridge is to add the drm_bridge and
let other components (another bridge or a drm_encoder) to attach to this
bridge.
Since we are doing this, a new compatible strings can be used for this
driver: "nwl,mipi-dsi".Since this was used by nwl_dsi-imx.c, update that driver to use this
bridge correctly.This is needed in order to add support for MIPI-DSI on 8MQ. The IMX_NWL
driver will either add a DSI encoder to DRM, or a DSI bridge.
The encoder will be used by imx-drm-core driver, while the bridge
will be used by MXSFB driver (which creates a simple display pipe).Signed-off-by: Robert Chiras
-
Implement the DPHY from MIPI-DSI found on i.MX8 platforms (QM, QXP and MQ)
as a phy driver.Signed-off-by: Robert Chiras
-
Implement a CLK_SET_PARENT_NOCACHE flag in clk core for imx8 clk
implementation where the parent needs to be restore after PM domain is
up.Reviewed-by: Anson Huang
Signed-off-by: Dong Aisheng
Signed-off-by: Ranjani Vaidyanathan
(cherry picked from commit 87e997822c050fc7dc027a863c92f1f0b4816515)
[Leonard: split clk core part]
Signed-off-by: Leonard Crestez -
The flexcan driver allocates canfd-skb no matter whether use CAN FD
mode or not, it's unreasonable due to it will affect the parse of the
remote request frame.To fix the issue, allocating can-skb with "alloc_can_skb()" in normal
mode and canfd-skb with "alloc_canfd_skb()" in fd mode.Reviewed-by: Dong Aisheng
Signed-off-by: Joakim Zhang
Signed-off-by: Arulpandiyan Vadivel -
Since the DP pullup can be finished at glue layer, we can delete
it at common code, but we still need to keep DP pulldown operation
since the DP may have already pulled up before.Reviewed-by: Jun Li
Signed-off-by: Peter Chen
Signed-off-by: Vipul Kumar -
Some platforms may want to use USB PHY charger detection function
when VBUS is there, add one flag for it. The user can enable it
at firmware.Reviewed-by: Jun Li
Signed-off-by: Peter Chen
Signed-off-by: Vipul Kumar -
Adds a kernel internal TEE client interface to be used by other drivers.
Signed-off-by: Jens Wiklander
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 860c46087c99c24073cc722b12c0017bb0ce0a79)Vipul: while rebase on v4.19, apply manually
Signed-off-by: Vipul Kumar -
This change allows userland to create a tee_shm object that refers
to a dmabuf reference.Userland provides a dmabuf file descriptor as buffer reference.
The created tee_shm object exported as a brand new dmabuf reference
used to provide a clean fd to userland. Userland shall closed this new
fd to release the tee_shm object resources. The initial dmabuf resources
are tracked independently through original dmabuf file descriptor.Once the buffer is registered and until it is released, TEE driver
keeps a refcount on the registered dmabuf structure.This change only support dmabuf references that relates to physically
contiguous memory buffers.New tee_shm flag to identify tee_shm objects built from a registered
dmabuf: TEE_SHM_EXT_DMA_BUF. Such tee_shm structures are flagged both
TEE_SHM_DMA_BUF and TEE_SHM_EXT_DMA_BUF.Signed-off-by: Etienne Carriere
Reviewed-by: Jens Wiklander
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 41e21e5c405530590dc2dd10b2a8dbe64589840f)(Vipul: Fixed merge conflicts)
Conflicts:
drivers/tee/tee_core.c
drivers/tee/tee_shm.c
include/linux/tee_drv.h
Signed-off-by: Vipul Kumar -
add the pcie related macros definitions into gpr.
Signed-off-by: Richard Zhu
(cherry picked from commit b4a5b2e53b2e743824d0af7428f7d9d406bec8bd)
Signed-off-by: Vipul Kumar -
Add imx6sx pcie related gpr bits definitions.
Signed-off-by: Richard Zhu
(cherry picked from commit 991fb25d62e3e2f550f98732f5bc00eeb98f78e3)
Signed-off-by: Vipul Kumar -
Add fb name check function pwm_backlight_check_fb_name(),
pwm driver can banding to fb with fb name when driver working
in device tree architecture.Signed-off-by: Sandor Yu
Signed-off-by: Vipul Kumar -
This patch add max_snk_mv/ma/mw to fix the below
compilation error.drivers/usb/typec/tcpci.c:707:15: error: ‘struct tcpc_config’ has no member named ‘max_snk_mv’
&tcfg->max_snk_mv) ||
^~
drivers/usb/typec/tcpci.c:709:13: error: ‘struct tcpc_config’ has no member named ‘max_snk_ma’
&tcfg->max_snk_ma) ||
^~Signed-off-by: Vipul Kumar
-
Add interface to get typec port type and default power role from
dt. To validate a correct setting is specified, add TYPEC_PORT_TYPE_UNKNOWN
and TYPEC_ROLE_UNKNOWN for typec_port_type and typec_role enum.Reviewed-by: Peter Chen
Signed-off-by: Li JunDuring 4.14 rebase renamed to typec_port_types_dt to avoid conflict with
sysfs values.Signed-off-by: Leonard Crestez
Rebase it on v4.19
Signed-off-by: Vipul Kumar -
According to the polarity of cc line, we need to do USB3 signal mux
selection if it's controlled by software.Reviewed-by: Peter Chen
Signed-off-by: Li Jun
Signed-off-by: Vipul Kumar -
This patch is to update several PD timings for PD compliance, all
those timing definitions should be configurable via user config,
this can be improved later, for now I just update its values in PD
spec defined range.Reviewed-by: Peter Chen
Signed-off-by: Li Jun
Signed-off-by: Vipul Kumar -
Per PD spec, the sender response should be in a small range 24~30ms, so
correct the PD_T_SENDER_RESPONSE to be 25.Reviewed-by: Peter Chen
Signed-off-by: Li Jun
Signed-off-by: Vipul Kumar -
BIST(Built In Self-Test – Power Delivery testing mechanism for
the PHY Layer), see PD 3.0 spec 5.9 Built in Self-Test (BIST), is
added to support BIST message handling in PD compliance test.Reviewed-by: Peter Chen
Signed-off-by: Li Jun
Signed-off-by: Vipul Kumar -
Power source detected the attachment of sink, will firstly check
the vbus level to make sure power sink isn't sourcing vbus(< 600mv)
before going forward, otherwise it will terminate the session and
go to SRC_UNATTACHED state, this is required by PD compliance.Reviewed-by: Peter Chen
Signed-off-by: Li Jun
Signed-off-by: Vipul Kumar -
We should only enable drp auto toggling when unattached, so add one
more parameter; when attached, we set the cc line state according to
the other end cc status.Reviewed-by: Peter Chen
Signed-off-by: Li Jun
Signed-off-by: Vipul Kumar