From 96dd55548e2a35b441e1ca30d5979ad30938f643 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Wed, 8 Sep 2021 20:13:00 +0200 Subject: [PATCH] Add patches which were deleted by mistake. Also add upstream patch for sunxi --- ...dd-board-rk3328-roc-pc-as-station-m1.patch | 508 ++++++++++++++++++ .../archive/sunxi-5.14/patch-5.14.1-2.patch | 336 ++++++++++++ 2 files changed, 844 insertions(+) create mode 100644 patch/kernel/archive/rockchip64-5.14/add-board-rk3328-roc-pc-as-station-m1.patch create mode 100644 patch/kernel/archive/sunxi-5.14/patch-5.14.1-2.patch diff --git a/patch/kernel/archive/rockchip64-5.14/add-board-rk3328-roc-pc-as-station-m1.patch b/patch/kernel/archive/rockchip64-5.14/add-board-rk3328-roc-pc-as-station-m1.patch new file mode 100644 index 0000000000..f083bcd7ca --- /dev/null +++ b/patch/kernel/archive/rockchip64-5.14/add-board-rk3328-roc-pc-as-station-m1.patch @@ -0,0 +1,508 @@ +--- a/arch/arm64/boot/dts/rockchip/Makefile 2020-11-06 08:35:18.329413886 +0200 ++++ b/arch/arm64/boot/dts/rockchip/Makefile 2020-11-06 08:35:28.753407689 +0200 +@@ -9,6 +9,7 @@ + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-pc.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb +--- /dev/null 2020-12-23 11:47:50.044000030 +0200 ++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts 2020-12-30 16:15:50.808198411 +0200 +@@ -0,0 +1,495 @@ ++/* ++ * SPDX-License-Identifier: (GPL-2.0+ or MIT) ++ * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd ++ */ ++ ++/dts-v1/; ++#include "rk3328.dtsi" ++#include ++ ++/ { ++ model = "Firefly roc-rk3328-pc"; ++ compatible = "firefly,roc-rk3328-pc", "rockchip,rk3328"; ++ ++ aliases { ++ mmc0 = &sdmmc; ++ mmc1 = &emmc; /* MMC boot device */ ++ }; ++ ++ gmac_clkin: external-gmac-clock { ++ compatible = "fixed-clock"; ++ clock-frequency = <125000000>; ++ clock-output-names = "gmac_clkin"; ++ #clock-cells = <0>; ++ }; ++ ++ sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,mclk-fs = <256>; ++ simple-audio-card,name = "rockchip,rk3328"; ++ simple-audio-card,cpu { ++ sound-dai = <&i2s1>; ++ }; ++ simple-audio-card,codec { ++ sound-dai = <&codec>; ++ }; ++ }; ++ ++ hdmi-sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,mclk-fs = <128>; ++ simple-audio-card,name = "rockchip,hdmi"; ++ simple-audio-card,cpu { ++ sound-dai = <&i2s0>; ++ }; ++ simple-audio-card,codec { ++ sound-dai = <&hdmi>; ++ }; ++ }; ++ ++ vcc_host_5v: vcc-host-5v-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb30_host_drv>; ++ regulator-name = "vcc_host_5v"; ++ regulator-always-on; ++ regulator-boot-on; ++ vin-supply = <&vcc_sys>; ++ }; ++ ++ vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_phy"; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vcc_phy: vcc-phy-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb20_host_drv>; ++ regulator-name = "vcc_host1_5v"; ++ regulator-always-on; ++ regulator-boot-on; ++ vin-supply = <&vcc_sys>; ++ }; ++ ++ vcc_sd: sdmmc-regulator { ++ compatible = "regulator-fixed"; ++ gpio = <&gpio0 30 GPIO_ACTIVE_LOW>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdmmc0m1_pin>; ++ regulator-name = "vcc_sd"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&vcc_io>; ++ }; ++ ++ vcc_sys: vcc-sys { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_sys"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ }; ++ ++ xin32k: xin32k { ++ compatible = "fixed-clock"; ++ clock-frequency = <32768>; ++ clock-output-names = "xin32k"; ++ #clock-cells = <0>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ power_led: led-0 { ++ label = "firefly:blue:power"; ++ linux,default-trigger = "heartbeat"; ++ gpios = <&rk805 1 GPIO_ACTIVE_LOW>; ++ default-state = "on"; ++ mode = <0x23>; ++ }; ++ ++ user_led: led-1 { ++ label = "firefly:yellow:user"; ++ linux,default-trigger = "mmc1"; ++ gpios = <&rk805 0 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ mode = <0x05>; ++ }; ++ }; ++}; ++ ++&io_domains { ++ status = "okay"; ++ ++ vccio1-supply = <&vcc_io>; ++ vccio2-supply = <&vcc_18emmc>; ++ vccio3-supply = <&vcc_io>; ++ vccio4-supply = <&vcc_io>; ++ vccio5-supply = <&vcc_io>; ++ vccio6-supply = <&vcc_io>; ++ pmuio-supply = <&vcc_io>; ++}; ++ ++&cpu0 { ++ cpu-supply = <&vdd_arm>; ++}; ++ ++&gpu { ++ status = "okay"; ++ mali-supply = <&vdd_logic>; ++}; ++ ++&gmac2phy { ++ phy-supply = <&vcc_phy>; ++ clock_in_out = "output"; ++ assigned-clocks = <&cru SCLK_MAC2PHY_SRC>; ++ assigned-clock-rate = <50000000>; ++ assigned-clocks = <&cru SCLK_MAC2PHY>; ++ assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>; ++ status = "disabled"; ++}; ++ ++&gmac2io { ++ phy-supply = <&vcc_io>; ++ phy-mode = "rgmii"; ++ clock_in_out = "input"; ++ snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; ++ snps,reset-active-low; ++ snps,reset-delays-us = <0 10000 50000>; ++ assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; ++ assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmiim1_pins>; ++ snps,aal; ++ snps,rxpbl = <0x4>; ++ snps,txpbl = <0x4>; ++ tx_delay = <0x24>; ++ rx_delay = <0x18>; ++ status = "okay"; ++}; ++ ++&display_subsystem { ++ status = "okay"; ++}; ++ ++&hdmi { ++ #sound-dai-cells = <0>; ++ ddc-i2c-scl-high-time-ns = <9625>; ++ ddc-i2c-scl-low-time-ns = <10000>; ++ status = "okay"; ++}; ++ ++&hdmiphy { ++ status = "okay"; ++}; ++ ++&hdmi_sound { ++ status = "okay"; ++}; ++ ++/*&h265e { ++ status = "okay"; ++}; ++ ++&rkvdec { ++ status = "okay"; ++}; ++ ++&vepu { ++ status = "okay"; ++};*/ ++ ++&vop { ++ status = "okay"; ++}; ++ ++&vop_mmu { ++ status = "okay"; ++}; ++ ++/*&vpu_service { ++ status = "okay"; ++};*/ ++ ++&i2s0 { ++ #sound-dai-cells = <0>; ++ rockchip,bclk-fs = <128>; ++ status = "okay"; ++}; ++ ++&i2s1 { ++ #sound-dai-cells = <0>; ++ status = "okay"; ++}; ++ ++&codec { ++ #sound-dai-cells = <0>; ++ status = "okay"; ++}; ++ ++&emmc { ++ bus-width = <8>; ++ cap-mmc-highspeed; ++ mmc-hs200-1_8v; ++ supports-emmc; ++ disable-wp; ++ non-removable; ++ num-slots = <1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; ++ status = "okay"; ++}; ++ ++&sdmmc { ++ bus-width = <4>; ++ cap-mmc-highspeed; ++ cap-sd-highspeed; ++ disable-wp; ++ max-frequency = <150000000>; ++ num-slots = <1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; ++ supports-sd; ++ status = "okay"; ++ vmmc-supply = <&vcc_sd>; ++}; ++ ++&i2c1 { ++ status = "okay"; ++ ++ rk805: rk805@18 { ++ compatible = "rockchip,rk805"; ++ status = "okay"; ++ reg = <0x18>; ++ interrupt-parent = <&gpio2>; ++ interrupts = <24 IRQ_TYPE_LEVEL_LOW>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pmic_int_l>; ++ rockchip,system-power-controller; ++ wakeup-source; ++ gpio-controller; ++ #gpio-cells = <2>; ++ #clock-cells = <1>; ++ clock-output-names = "xin32k", "rk805-clkout2"; ++ ++ vcc1-supply = <&vcc_sys>; ++ vcc2-supply = <&vcc_sys>; ++ vcc3-supply = <&vcc_sys>; ++ vcc4-supply = <&vcc_sys>; ++ vcc5-supply = <&vcc_io>; ++ vcc6-supply = <&vcc_io>; ++ ++ rtc { ++ status = "okay"; ++ }; ++ ++ pwrkey { ++ status = "okay"; ++ }; ++ ++ gpio { ++ status = "okay"; ++ }; ++ ++ regulators { ++ compatible = "rk805-regulator"; ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ vdd_logic: DCDC_REG1 { ++ regulator-name = "vdd_logic"; ++ regulator-min-microvolt = <712500>; ++ regulator-max-microvolt = <1450000>; ++ regulator-ramp-delay = <12500>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1000000>; ++ }; ++ }; ++ ++ vdd_arm: DCDC_REG2 { ++ regulator-name = "vdd_arm"; ++ regulator-min-microvolt = <712500>; ++ regulator-max-microvolt = <1450000>; ++ regulator-ramp-delay = <12500>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <950000>; ++ }; ++ }; ++ ++ vcc_ddr: DCDC_REG3 { ++ regulator-name = "vcc_ddr"; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ }; ++ }; ++ ++ vcc_io: DCDC_REG4 { ++ regulator-name = "vcc_io"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <3300000>; ++ }; ++ }; ++ ++ vdd_18: LDO_REG1 { ++ regulator-name = "vdd_18"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ vcc_18emmc: LDO_REG2 { ++ regulator-name = "vcc_18emmc"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ vdd_11: LDO_REG3 { ++ regulator-name = "vdd_11"; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1100000>; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&pinctrl { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&clk_32k_out>; ++ ++ clk_32k { ++ clk_32k_out: clk-32k-out { ++ rockchip,pins = ++ <1 RK_PD4 1 &pcfg_pull_none>; ++ }; ++ }; ++ ++ pmic { ++ pmic_int_l: pmic-int-l { ++ rockchip,pins = ++ <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; /* gpio2_a6 */ ++ }; ++ }; ++ ++ sdio-pwrseq { ++ wifi_enable_h: wifi-enable-h { ++ rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>, ++ <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none_4ma>, ++ <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>, ++ <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ usb2 { ++ usb20_host_drv: usb20-host-drv { ++ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ usb3 { ++ usb30_host_drv: usb30-host-drv { ++ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++}; ++ ++&u2phy { ++ status = "okay"; ++}; ++ ++&u2phy_host { ++ status = "okay"; ++}; ++ ++&u2phy_otg { ++ status = "okay"; ++}; ++ ++&u3phy { ++ status = "okay"; ++}; ++ ++&u3phy_utmi { ++ status = "okay"; ++}; ++ ++&u3phy_pipe { ++ status = "okay"; ++}; ++ ++&uart2 { ++ status = "okay"; ++}; ++ ++&usb20_otg { ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ ++&usb_host0_ehci { ++ status = "okay"; ++}; ++ ++&usb_host0_ohci { ++ status = "okay"; ++}; ++ ++&usbdrd3 { ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ ++&wdt { ++ status = "okay"; ++}; ++ ++&saradc { ++ status = "okay"; ++ vref-supply = <&vdd_18>; ++}; ++ ++&tsadc { ++ status = "okay"; ++ rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ ++ rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ ++}; diff --git a/patch/kernel/archive/sunxi-5.14/patch-5.14.1-2.patch b/patch/kernel/archive/sunxi-5.14/patch-5.14.1-2.patch new file mode 100644 index 0000000000..be5d674cf1 --- /dev/null +++ b/patch/kernel/archive/sunxi-5.14/patch-5.14.1-2.patch @@ -0,0 +1,336 @@ +diff --git a/Makefile b/Makefile +index 83d1f7c1fd304..9a2b00ecc6af4 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 5 + PATCHLEVEL = 14 +-SUBLEVEL = 1 ++SUBLEVEL = 2 + EXTRAVERSION = + NAME = Opossums on Parade + +diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig +index 3878880469d10..b843902ad9fd7 100644 +--- a/arch/xtensa/Kconfig ++++ b/arch/xtensa/Kconfig +@@ -30,7 +30,7 @@ config XTENSA + select HAVE_DMA_CONTIGUOUS + select HAVE_EXIT_THREAD + select HAVE_FUNCTION_TRACER +- select HAVE_FUTEX_CMPXCHG if !MMU ++ select HAVE_FUTEX_CMPXCHG if !MMU && FUTEX + select HAVE_HW_BREAKPOINT if PERF_EVENTS + select HAVE_IRQ_TIME_ACCOUNTING + select HAVE_PCI +diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c +index 06130dc431a04..b234958f883a4 100644 +--- a/drivers/hid/usbhid/hid-core.c ++++ b/drivers/hid/usbhid/hid-core.c +@@ -377,27 +377,27 @@ static int hid_submit_ctrl(struct hid_device *hid) + len = hid_report_len(report); + if (dir == USB_DIR_OUT) { + usbhid->urbctrl->pipe = usb_sndctrlpipe(hid_to_usb_dev(hid), 0); +- usbhid->urbctrl->transfer_buffer_length = len; + if (raw_report) { + memcpy(usbhid->ctrlbuf, raw_report, len); + kfree(raw_report); + usbhid->ctrl[usbhid->ctrltail].raw_report = NULL; + } + } else { +- int maxpacket, padlen; ++ int maxpacket; + + usbhid->urbctrl->pipe = usb_rcvctrlpipe(hid_to_usb_dev(hid), 0); + maxpacket = usb_maxpacket(hid_to_usb_dev(hid), + usbhid->urbctrl->pipe, 0); + if (maxpacket > 0) { +- padlen = DIV_ROUND_UP(len, maxpacket); +- padlen *= maxpacket; +- if (padlen > usbhid->bufsize) +- padlen = usbhid->bufsize; ++ len += (len == 0); /* Don't allow 0-length reports */ ++ len = DIV_ROUND_UP(len, maxpacket); ++ len *= maxpacket; ++ if (len > usbhid->bufsize) ++ len = usbhid->bufsize; + } else +- padlen = 0; +- usbhid->urbctrl->transfer_buffer_length = padlen; ++ len = 0; + } ++ usbhid->urbctrl->transfer_buffer_length = len; + usbhid->urbctrl->dev = hid_to_usb_dev(hid); + + usbhid->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE | dir; +diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c +index a45d464427c4c..0e231e576dc3d 100644 +--- a/drivers/media/usb/stkwebcam/stk-webcam.c ++++ b/drivers/media/usb/stkwebcam/stk-webcam.c +@@ -1346,7 +1346,7 @@ static int stk_camera_probe(struct usb_interface *interface, + if (!dev->isoc_ep) { + pr_err("Could not find isoc-in endpoint\n"); + err = -ENODEV; +- goto error; ++ goto error_put; + } + dev->vsettings.palette = V4L2_PIX_FMT_RGB565; + dev->vsettings.mode = MODE_VGA; +@@ -1359,10 +1359,12 @@ static int stk_camera_probe(struct usb_interface *interface, + + err = stk_register_video_device(dev); + if (err) +- goto error; ++ goto error_put; + + return 0; + ++error_put: ++ usb_put_intf(interface); + error: + v4l2_ctrl_handler_free(hdl); + v4l2_device_unregister(&dev->v4l2_dev); +diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c +index 3c80bfbf3bec9..d48bed5782a5c 100644 +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -1164,10 +1164,8 @@ static int cp210x_set_chars(struct usb_serial_port *port, + + kfree(dmabuf); + +- if (result < 0) { +- dev_err(&port->dev, "failed to set special chars: %d\n", result); ++ if (result < 0) + return result; +- } + + return 0; + } +@@ -1192,6 +1190,7 @@ static void cp210x_set_flow_control(struct tty_struct *tty, + struct cp210x_flow_ctl flow_ctl; + u32 flow_repl; + u32 ctl_hs; ++ bool crtscts; + int ret; + + /* +@@ -1219,8 +1218,10 @@ static void cp210x_set_flow_control(struct tty_struct *tty, + chars.bXoffChar = STOP_CHAR(tty); + + ret = cp210x_set_chars(port, &chars); +- if (ret) +- return; ++ if (ret) { ++ dev_err(&port->dev, "failed to set special chars: %d\n", ++ ret); ++ } + } + + mutex_lock(&port_priv->mutex); +@@ -1249,14 +1250,14 @@ static void cp210x_set_flow_control(struct tty_struct *tty, + flow_repl |= CP210X_SERIAL_RTS_FLOW_CTL; + else + flow_repl |= CP210X_SERIAL_RTS_INACTIVE; +- port_priv->crtscts = true; ++ crtscts = true; + } else { + ctl_hs &= ~CP210X_SERIAL_CTS_HANDSHAKE; + if (port_priv->rts) + flow_repl |= CP210X_SERIAL_RTS_ACTIVE; + else + flow_repl |= CP210X_SERIAL_RTS_INACTIVE; +- port_priv->crtscts = false; ++ crtscts = false; + } + + if (I_IXOFF(tty)) { +@@ -1279,8 +1280,12 @@ static void cp210x_set_flow_control(struct tty_struct *tty, + flow_ctl.ulControlHandshake = cpu_to_le32(ctl_hs); + flow_ctl.ulFlowReplace = cpu_to_le32(flow_repl); + +- cp210x_write_reg_block(port, CP210X_SET_FLOW, &flow_ctl, ++ ret = cp210x_write_reg_block(port, CP210X_SET_FLOW, &flow_ctl, + sizeof(flow_ctl)); ++ if (ret) ++ goto out_unlock; ++ ++ port_priv->crtscts = crtscts; + out_unlock: + mutex_unlock(&port_priv->mutex); + } +diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c +index 930b3d50a3308..f45ca7ddf78ea 100644 +--- a/drivers/usb/serial/pl2303.c ++++ b/drivers/usb/serial/pl2303.c +@@ -433,6 +433,7 @@ static int pl2303_detect_type(struct usb_serial *serial) + switch (bcdDevice) { + case 0x100: + case 0x305: ++ case 0x405: + /* + * Assume it's an HXN-type if the device doesn't + * support the old read request value. +diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c +index 70cb64db33f73..24e994e75f5ca 100644 +--- a/fs/ext4/inline.c ++++ b/fs/ext4/inline.c +@@ -750,6 +750,12 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, + ext4_write_lock_xattr(inode, &no_expand); + BUG_ON(!ext4_has_inline_data(inode)); + ++ /* ++ * ei->i_inline_off may have changed since ext4_write_begin() ++ * called ext4_try_to_write_inline_data() ++ */ ++ (void) ext4_find_inline_data_nolock(inode); ++ + kaddr = kmap_atomic(page); + ext4_write_inline_data(inode, &iloc, kaddr, pos, len); + kunmap_atomic(kaddr); +diff --git a/fs/ext4/super.c b/fs/ext4/super.c +index dfa09a277b56f..970013c93d3ea 100644 +--- a/fs/ext4/super.c ++++ b/fs/ext4/super.c +@@ -5032,6 +5032,14 @@ no_journal: + err = percpu_counter_init(&sbi->s_freeinodes_counter, freei, + GFP_KERNEL); + } ++ /* ++ * Update the checksum after updating free space/inode ++ * counters. Otherwise the superblock can have an incorrect ++ * checksum in the buffer cache until it is written out and ++ * e2fsprogs programs trying to open a file system immediately ++ * after it is mounted can fail. ++ */ ++ ext4_superblock_csum_set(sb); + if (!err) + err = percpu_counter_init(&sbi->s_dirs_counter, + ext4_count_dirs(sb), GFP_KERNEL); +diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c +index 7d5883432085a..a144a3f68e9eb 100644 +--- a/sound/core/pcm_lib.c ++++ b/sound/core/pcm_lib.c +@@ -1746,7 +1746,7 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream, + channels = params_channels(params); + frame_size = snd_pcm_format_size(format, channels); + if (frame_size > 0) +- params->fifo_size /= (unsigned)frame_size; ++ params->fifo_size /= frame_size; + } + return 0; + } +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 7ad689f991e7e..70516527ebce3 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -8438,6 +8438,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), + SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), + SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), +@@ -9521,6 +9522,16 @@ static int patch_alc269(struct hda_codec *codec) + + snd_hda_pick_fixup(codec, alc269_fixup_models, + alc269_fixup_tbl, alc269_fixups); ++ /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and ++ * the quirk breaks the latter (bko#214101). ++ * Clear the wrong entry. ++ */ ++ if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && ++ codec->core.vendor_id == 0x10ec0294) { ++ codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); ++ codec->fixup_id = HDA_FIXUP_ID_NOT_SET; ++ } ++ + snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); + snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); + snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, +diff --git a/sound/usb/card.h b/sound/usb/card.h +index 6c0a052a28f99..5b19901f305a3 100644 +--- a/sound/usb/card.h ++++ b/sound/usb/card.h +@@ -94,6 +94,7 @@ struct snd_usb_endpoint { + struct list_head ready_playback_urbs; /* playback URB FIFO for implicit fb */ + + unsigned int nurbs; /* # urbs */ ++ unsigned int nominal_queue_size; /* total buffer sizes in URBs */ + unsigned long active_mask; /* bitmask of active urbs */ + unsigned long unlink_mask; /* bitmask of unlinked urbs */ + char *syncbuf; /* sync buffer for all sync URBs */ +@@ -187,6 +188,7 @@ struct snd_usb_substream { + } dsd_dop; + + bool trigger_tstamp_pending_update; /* trigger timestamp being updated from initial estimate */ ++ bool early_playback_start; /* early start needed for playback? */ + struct media_ctl *media_ctl; + }; + +diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c +index 4f856771216b4..bf26c04cf4716 100644 +--- a/sound/usb/endpoint.c ++++ b/sound/usb/endpoint.c +@@ -1126,6 +1126,10 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep) + INIT_LIST_HEAD(&u->ready_list); + } + ++ /* total buffer bytes of all URBs plus the next queue; ++ * referred in pcm.c ++ */ ++ ep->nominal_queue_size = maxsize * urb_packs * (ep->nurbs + 1); + return 0; + + out_of_memory: +@@ -1287,6 +1291,11 @@ int snd_usb_endpoint_configure(struct snd_usb_audio *chip, + * to be set up before parameter setups + */ + iface_first = ep->cur_audiofmt->protocol == UAC_VERSION_1; ++ /* Workaround for Sony WALKMAN NW-A45 DAC; ++ * it requires the interface setup at first like UAC1 ++ */ ++ if (chip->usb_id == USB_ID(0x054c, 0x0b8c)) ++ iface_first = true; + if (iface_first) { + err = endpoint_set_interface(chip, ep, true); + if (err < 0) +diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c +index 4e5031a680647..f5cbf61ac366e 100644 +--- a/sound/usb/pcm.c ++++ b/sound/usb/pcm.c +@@ -614,6 +614,14 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) + subs->period_elapsed_pending = 0; + runtime->delay = 0; + ++ /* check whether early start is needed for playback stream */ ++ subs->early_playback_start = ++ subs->direction == SNDRV_PCM_STREAM_PLAYBACK && ++ subs->data_endpoint->nominal_queue_size >= subs->buffer_bytes; ++ ++ if (subs->early_playback_start) ++ ret = start_endpoints(subs); ++ + unlock: + snd_usb_unlock_shutdown(chip); + return ret; +@@ -1394,7 +1402,7 @@ static void prepare_playback_urb(struct snd_usb_substream *subs, + subs->trigger_tstamp_pending_update = false; + } + +- if (period_elapsed && !subs->running) { ++ if (period_elapsed && !subs->running && !subs->early_playback_start) { + subs->period_elapsed_pending = 1; + period_elapsed = 0; + } +@@ -1448,7 +1456,8 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea + prepare_playback_urb, + retire_playback_urb, + subs); +- if (cmd == SNDRV_PCM_TRIGGER_START) { ++ if (!subs->early_playback_start && ++ cmd == SNDRV_PCM_TRIGGER_START) { + err = start_endpoints(subs); + if (err < 0) { + snd_usb_endpoint_set_callback(subs->data_endpoint,