Merge 5.4.192 into android11-5.4-lts
Changes in 5.4.192 floppy: disable FDRAWCMD by default hamradio: defer 6pack kfree after unregister_netdev hamradio: remove needs_free_netdev to avoid UAF lightnvm: disable the subsystem usb: mtu3: fix USB 3.0 dual-role-switch from device to host USB: quirks: add a Realtek card reader USB: quirks: add STRING quirk for VCOM device USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader USB: serial: option: add support for Cinterion MV32-WA/MV32-WB USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions xhci: stop polling roothubs after shutdown xhci: increase usb U3 -> U0 link resume timeout from 100ms to 500ms iio: dac: ad5592r: Fix the missing return value. iio: dac: ad5446: Fix read_raw not returning set value iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() usb: misc: fix improper handling of refcount in uss720_probe() usb: typec: ucsi: Fix role swapping usb: gadget: uvc: Fix crash when encoding data for usb request usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind() usb: dwc3: core: Fix tx/rx threshold settings usb: dwc3: gadget: Return proper request status serial: imx: fix overrun interrupts in DMA mode serial: 8250: Also set sticky MCR bits in console restoration serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device arch_topology: Do not set llc_sibling if llc_id is invalid hex2bin: make the function hex_to_bin constant-time hex2bin: fix access beyond string end video: fbdev: udlfb: properly check endpoint type arm64: dts: meson: remove CPU opps below 1GHz for G12B boards arm64: dts: meson: remove CPU opps below 1GHz for SM1 boards mtd: rawnand: fix ecc parameters for mt7622 USB: Fix xhci event ring dequeue pointer ERDP update issue ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe phy: samsung: exynos5250-sata: fix missing device put in probe error paths ARM: OMAP2+: Fix refcount leak in omap_gic_of_init phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe ARM: dts: Fix mmc order for omap3-gta04 ARM: dts: am3517-evm: Fix misc pinmuxing ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35 ipvs: correctly print the memory size of ip_vs_conn_tab mtd: rawnand: Fix return value check of wait_for_completion_timeout bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook tcp: md5: incorrect tcp_header_len for incoming connections tcp: ensure to use the most recently sent skb when filling the rate sample sctp: check asoc strreset_chunk in sctp_generate_reconf_event ARM: dts: imx6ull-colibri: fix vqmmc regulator arm64: dts: imx8mn-ddr4-evk: Describe the 32.768 kHz PMIC clock pinctrl: pistachio: fix use of irq_of_parse_and_map() cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe net: hns3: add validity check for message data length net/smc: sync err code when tcp connection was refused ip_gre: Make o_seqno start from 0 in native mode tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create() clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource() net: bcmgenet: hide status block before TX timestamping net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK drm/amd/display: Fix memory leak in dcn21_clock_source_create tls: Skip tls_append_frag on zero copy size bnx2x: fix napi API usage sequence ixgbe: ensure IPsec VF<->PF compatibility tcp: fix F-RTO may not work correctly when receiving DSACK ASoC: wm8731: Disable the regulator when probing fails ip6_gre: Avoid updating tunnel->tun_hlen in __gre6_xmit() x86: __memcpy_flushcache: fix wrong alignment if size > 2^32 cifs: destage any unwritten data to the server before calling copychunk_write drivers: net: hippi: Fix deadlock in rr_close() net: ethernet: stmmac: fix write to sgmii_adapter_base x86/cpu: Load microcode during restore_processor_state() tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2 tty: n_gsm: fix malformed counter for out of frame data netfilter: nft_socket: only do sk lookups when indev is available tty: n_gsm: fix insufficient txframe size tty: n_gsm: fix missing explicit ldisc flush tty: n_gsm: fix wrong command retry handling tty: n_gsm: fix wrong command frame length field encoding tty: n_gsm: fix incorrect UA handling hugetlbfs: get unmapped area below TASK_UNMAPPED_BASE for hugetlbfs mm, hugetlb: allow for "high" userspace addresses Linux 5.4.192 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I151e1623022f3629b0cec0685db3ea08c62ab95d
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 191
|
||||
SUBLEVEL = 192
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
||||
@@ -160,6 +160,8 @@
|
||||
|
||||
/* HS USB Host PHY on PORT 1 */
|
||||
hsusb1_phy: hsusb1_phy {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_rst_pins>;
|
||||
compatible = "usb-nop-xceiv";
|
||||
reset-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; /* gpio_57 */
|
||||
#phy-cells = <0>;
|
||||
@@ -167,7 +169,9 @@
|
||||
};
|
||||
|
||||
&davinci_emac {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <ðernet_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
@@ -192,6 +196,8 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins>;
|
||||
clock-frequency = <400000>;
|
||||
/* User DIP swithes [1:8] / User LEDS [1:2] */
|
||||
tca6416: gpio@21 {
|
||||
@@ -204,6 +210,8 @@
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c3_pins>;
|
||||
clock-frequency = <400000>;
|
||||
};
|
||||
|
||||
@@ -222,6 +230,8 @@
|
||||
};
|
||||
|
||||
&usbhshost {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_pins>;
|
||||
port1-mode = "ehci-phy";
|
||||
};
|
||||
|
||||
@@ -230,8 +240,35 @@
|
||||
};
|
||||
|
||||
&omap3_pmx_core {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_rst_pins>;
|
||||
|
||||
ethernet_pins: pinmux_ethernet_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21fe, PIN_INPUT | MUX_MODE0) /* rmii_mdio_data */
|
||||
OMAP3_CORE1_IOPAD(0x2200, MUX_MODE0) /* rmii_mdio_clk */
|
||||
OMAP3_CORE1_IOPAD(0x2202, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_rxd0 */
|
||||
OMAP3_CORE1_IOPAD(0x2204, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_rxd1 */
|
||||
OMAP3_CORE1_IOPAD(0x2206, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_crs_dv */
|
||||
OMAP3_CORE1_IOPAD(0x2208, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_rxer */
|
||||
OMAP3_CORE1_IOPAD(0x220a, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_txd0 */
|
||||
OMAP3_CORE1_IOPAD(0x220c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_txd1 */
|
||||
OMAP3_CORE1_IOPAD(0x220e, PIN_OUTPUT_PULLDOWN |MUX_MODE0) /* rmii_txen */
|
||||
OMAP3_CORE1_IOPAD(0x2210, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_50mhz_clk */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c2_pins: pinmux_i2c2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
|
||||
OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c3_pins: pinmux_i2c3_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
|
||||
OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
|
||||
>;
|
||||
};
|
||||
|
||||
leds_pins: pinmux_leds_pins {
|
||||
pinctrl-single,pins = <
|
||||
@@ -299,8 +336,6 @@
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_pins>;
|
||||
|
||||
hsusb1_pins: pinmux_hsusb1_pins {
|
||||
pinctrl-single,pins = <
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
clock-frequency = <400000>;
|
||||
|
||||
s35390a: s35390a@30 {
|
||||
@@ -179,6 +181,13 @@
|
||||
|
||||
&omap3_pmx_core {
|
||||
|
||||
i2c1_pins: pinmux_i2c1_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
|
||||
OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
|
||||
>;
|
||||
};
|
||||
|
||||
wl12xx_buffer_pins: pinmux_wl12xx_buffer_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x2156, PIN_OUTPUT | MUX_MODE4) /* mmc1_dat7.gpio_129 */
|
||||
|
||||
@@ -217,6 +217,12 @@
|
||||
wm8731: wm8731@1b {
|
||||
compatible = "wm8731";
|
||||
reg = <0x1b>;
|
||||
|
||||
/* PCK0 at 12MHz */
|
||||
clocks = <&pmc PMC_TYPE_SYSTEM 8>;
|
||||
clock-names = "mclk";
|
||||
assigned-clocks = <&pmc PMC_TYPE_SYSTEM 8>;
|
||||
assigned-clock-rates = <12000000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -314,6 +314,8 @@
|
||||
codec: sgtl5000@a {
|
||||
compatible = "fsl,sgtl5000";
|
||||
reg = <0x0a>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sgtl5000>;
|
||||
clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
VDDA-supply = <®_module_3v3_audio>;
|
||||
VDDIO-supply = <®_module_3v3>;
|
||||
@@ -543,8 +545,6 @@
|
||||
MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0
|
||||
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
|
||||
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
|
||||
/* SGTL5000 sys_mclk */
|
||||
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -810,6 +810,12 @@
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_sgtl5000: sgtl5000grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_spdif: spdifgrp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
reg_sd1_vmmc: regulator-sd1-vmmc {
|
||||
compatible = "regulator-gpio";
|
||||
gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_snvs_reg_sd>;
|
||||
regulator-always-on;
|
||||
|
||||
@@ -11,3 +11,18 @@
|
||||
model = "LogicPD Zoom OMAP35xx SOM-LV Development Kit";
|
||||
compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3";
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3430_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3430_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3430_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3430_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3430_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,3 +11,18 @@
|
||||
model = "LogicPD Zoom DM3730 SOM-LV Development Kit";
|
||||
compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3";
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -265,21 +265,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
aliases {
|
||||
display0 = &lcd;
|
||||
display1 = &tv0;
|
||||
/delete-property/ mmc2;
|
||||
/delete-property/ mmc3;
|
||||
};
|
||||
|
||||
ldo_3v3: fixedregulator {
|
||||
|
||||
@@ -314,10 +314,12 @@ void __init omap_gic_of_init(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
|
||||
gic_dist_base_addr = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!gic_dist_base_addr);
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer");
|
||||
twd_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!twd_base);
|
||||
|
||||
skip_errata_init:
|
||||
|
||||
@@ -11,26 +11,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <761000>;
|
||||
@@ -71,26 +51,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <731000>;
|
||||
|
||||
@@ -11,26 +11,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <731000>;
|
||||
@@ -71,26 +51,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <771000>;
|
||||
|
||||
@@ -55,26 +55,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <730000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <730000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <730000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <666666666>;
|
||||
opp-microvolt = <750000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <770000>;
|
||||
|
||||
@@ -213,6 +213,10 @@
|
||||
interrupts = <3 GPIO_ACTIVE_LOW>;
|
||||
rohm,reset-snvs-powered;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clocks = <&osc_32k 0>;
|
||||
clock-output-names = "clk-32k-out";
|
||||
|
||||
regulators {
|
||||
buck1_reg: BUCK1 {
|
||||
regulator-name = "BUCK1";
|
||||
|
||||
@@ -133,11 +133,13 @@ extern void load_ucode_ap(void);
|
||||
void reload_early_microcode(void);
|
||||
extern bool get_builtin_firmware(struct cpio_data *cd, const char *name);
|
||||
extern bool initrd_gone;
|
||||
void microcode_bsp_resume(void);
|
||||
#else
|
||||
static inline int __init microcode_init(void) { return 0; };
|
||||
static inline void __init load_ucode_bsp(void) { }
|
||||
static inline void load_ucode_ap(void) { }
|
||||
static inline void reload_early_microcode(void) { }
|
||||
static inline void microcode_bsp_resume(void) { }
|
||||
static inline bool
|
||||
get_builtin_firmware(struct cpio_data *cd, const char *name) { return false; }
|
||||
#endif
|
||||
|
||||
@@ -772,9 +772,9 @@ static struct subsys_interface mc_cpu_interface = {
|
||||
};
|
||||
|
||||
/**
|
||||
* mc_bp_resume - Update boot CPU microcode during resume.
|
||||
* microcode_bsp_resume - Update boot CPU microcode during resume.
|
||||
*/
|
||||
static void mc_bp_resume(void)
|
||||
void microcode_bsp_resume(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
|
||||
@@ -786,7 +786,7 @@ static void mc_bp_resume(void)
|
||||
}
|
||||
|
||||
static struct syscore_ops mc_syscore_ops = {
|
||||
.resume = mc_bp_resume,
|
||||
.resume = microcode_bsp_resume,
|
||||
};
|
||||
|
||||
static int mc_cpu_starting(unsigned int cpu)
|
||||
|
||||
@@ -142,7 +142,7 @@ void __memcpy_flushcache(void *_dst, const void *_src, size_t size)
|
||||
|
||||
/* cache copy and flush to align dest */
|
||||
if (!IS_ALIGNED(dest, 8)) {
|
||||
unsigned len = min_t(unsigned, size, ALIGN(dest, 8) - dest);
|
||||
size_t len = min_t(size_t, size, ALIGN(dest, 8) - dest);
|
||||
|
||||
memcpy((void *) dest, (void *) source, len);
|
||||
clean_cache_range((void *) dest, len);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/microcode.h>
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
__visible unsigned long saved_context_ebx;
|
||||
@@ -263,6 +264,13 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
|
||||
x86_platform.restore_sched_clock_state();
|
||||
mtrr_bp_restore();
|
||||
perf_restore_debug_store();
|
||||
|
||||
microcode_bsp_resume();
|
||||
|
||||
/*
|
||||
* This needs to happen after the microcode has been updated upon resume
|
||||
* because some of the MSRs are "emulated" in microcode.
|
||||
*/
|
||||
msr_restore_context(ctxt);
|
||||
}
|
||||
|
||||
|
||||
@@ -485,7 +485,7 @@ void update_siblings_masks(unsigned int cpuid)
|
||||
for_each_online_cpu(cpu) {
|
||||
cpu_topo = &cpu_topology[cpu];
|
||||
|
||||
if (cpuid_topo->llc_id == cpu_topo->llc_id) {
|
||||
if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) {
|
||||
cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling);
|
||||
cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,22 @@ config BLK_DEV_FD
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called floppy.
|
||||
|
||||
config BLK_DEV_FD_RAWCMD
|
||||
bool "Support for raw floppy disk commands (DEPRECATED)"
|
||||
depends on BLK_DEV_FD
|
||||
help
|
||||
If you want to use actual physical floppies and expect to do
|
||||
special low-level hardware accesses to them (access and use
|
||||
non-standard formats, for example), then enable this.
|
||||
|
||||
Note that the code enabled by this option is rarely used and
|
||||
might be unstable or insecure, and distros should not enable it.
|
||||
|
||||
Note: FDRAWCMD is deprecated and will be removed from the kernel
|
||||
in the near future.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config AMIGA_FLOPPY
|
||||
tristate "Amiga floppy support"
|
||||
depends on AMIGA
|
||||
|
||||
@@ -3012,6 +3012,8 @@ static const char *drive_name(int type, int drive)
|
||||
return "(null)";
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_FD_RAWCMD
|
||||
|
||||
/* raw commands */
|
||||
static void raw_cmd_done(int flag)
|
||||
{
|
||||
@@ -3223,6 +3225,35 @@ static int raw_cmd_ioctl(int cmd, void __user *param)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int floppy_raw_cmd_ioctl(int type, int drive, int cmd,
|
||||
void __user *param)
|
||||
{
|
||||
int ret;
|
||||
|
||||
pr_warn_once("Note: FDRAWCMD is deprecated and will be removed from the kernel in the near future.\n");
|
||||
|
||||
if (type)
|
||||
return -EINVAL;
|
||||
if (lock_fdc(drive))
|
||||
return -EINTR;
|
||||
set_floppy(drive);
|
||||
ret = raw_cmd_ioctl(cmd, param);
|
||||
if (ret == -EINTR)
|
||||
return -EINTR;
|
||||
process_fd_request();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else /* CONFIG_BLK_DEV_FD_RAWCMD */
|
||||
|
||||
static int floppy_raw_cmd_ioctl(int type, int drive, int cmd,
|
||||
void __user *param)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int invalidate_drive(struct block_device *bdev)
|
||||
{
|
||||
/* invalidate the buffer track to force a reread */
|
||||
@@ -3410,7 +3441,6 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int
|
||||
{
|
||||
int drive = (long)bdev->bd_disk->private_data;
|
||||
int type = ITYPE(UDRS->fd_device);
|
||||
int i;
|
||||
int ret;
|
||||
int size;
|
||||
union inparam {
|
||||
@@ -3561,16 +3591,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int
|
||||
outparam = UDRWE;
|
||||
break;
|
||||
case FDRAWCMD:
|
||||
if (type)
|
||||
return -EINVAL;
|
||||
if (lock_fdc(drive))
|
||||
return -EINTR;
|
||||
set_floppy(drive);
|
||||
i = raw_cmd_ioctl(cmd, (void __user *)param);
|
||||
if (i == -EINTR)
|
||||
return -EINTR;
|
||||
process_fd_request();
|
||||
return i;
|
||||
return floppy_raw_cmd_ioctl(type, drive, cmd, (void __user *)param);
|
||||
case FDTWADDLE:
|
||||
if (lock_fdc(drive))
|
||||
return -EINTR;
|
||||
|
||||
@@ -224,6 +224,8 @@ static struct sunxi_rsb_device *sunxi_rsb_device_create(struct sunxi_rsb *rsb,
|
||||
|
||||
dev_dbg(&rdev->dev, "device %s registered\n", dev_name(&rdev->dev));
|
||||
|
||||
return rdev;
|
||||
|
||||
err_device_add:
|
||||
put_device(&rdev->dev);
|
||||
|
||||
|
||||
@@ -109,6 +109,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&data->lock);
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!r)
|
||||
return -EINVAL;
|
||||
/* one clock/reset pair per word */
|
||||
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
|
||||
data->membase = devm_ioremap_resource(&pdev->dev, r);
|
||||
|
||||
@@ -98,8 +98,10 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = sun50i_cpufreq_get_efuse(&speed);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
kfree(opp_tables);
|
||||
return ret;
|
||||
}
|
||||
|
||||
snprintf(name, MAX_NAME_LEN, "speed%d", speed);
|
||||
|
||||
|
||||
@@ -1140,6 +1140,7 @@ static struct clock_source *dcn21_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ static int ad5446_read_raw(struct iio_dev *indio_dev,
|
||||
|
||||
switch (m) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
*val = st->cached_val;
|
||||
*val = st->cached_val >> chan->scan_type.shift;
|
||||
return IIO_VAL_INT;
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
*val = st->vref_mv;
|
||||
|
||||
@@ -530,7 +530,7 @@ static int ad5592r_alloc_channels(struct ad5592r_state *st)
|
||||
if (!ret)
|
||||
st->channel_modes[reg] = tmp;
|
||||
|
||||
fwnode_property_read_u32(child, "adi,off-state", &tmp);
|
||||
ret = fwnode_property_read_u32(child, "adi,off-state", &tmp);
|
||||
if (!ret)
|
||||
st->channel_offstate[reg] = tmp;
|
||||
}
|
||||
|
||||
@@ -391,6 +391,7 @@ static int ak8975_power_on(const struct ak8975_data *data)
|
||||
if (ret) {
|
||||
dev_warn(&data->client->dev,
|
||||
"Failed to enable specified Vid supply\n");
|
||||
regulator_disable(data->vdd);
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
menuconfig NVM
|
||||
bool "Open-Channel SSD target support"
|
||||
depends on BLOCK
|
||||
depends on BLOCK && BROKEN
|
||||
help
|
||||
Say Y here to get to enable Open-channel SSDs.
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
struct mtk_ecc_caps {
|
||||
u32 err_mask;
|
||||
u32 err_shift;
|
||||
const u8 *ecc_strength;
|
||||
const u32 *ecc_regs;
|
||||
u8 num_ecc_strength;
|
||||
@@ -76,7 +77,7 @@ static const u8 ecc_strength_mt2712[] = {
|
||||
};
|
||||
|
||||
static const u8 ecc_strength_mt7622[] = {
|
||||
4, 6, 8, 10, 12, 14, 16
|
||||
4, 6, 8, 10, 12
|
||||
};
|
||||
|
||||
enum mtk_ecc_regs {
|
||||
@@ -221,7 +222,7 @@ void mtk_ecc_get_stats(struct mtk_ecc *ecc, struct mtk_ecc_stats *stats,
|
||||
for (i = 0; i < sectors; i++) {
|
||||
offset = (i >> 2) << 2;
|
||||
err = readl(ecc->regs + ECC_DECENUM0 + offset);
|
||||
err = err >> ((i % 4) * 8);
|
||||
err = err >> ((i % 4) * ecc->caps->err_shift);
|
||||
err &= ecc->caps->err_mask;
|
||||
if (err == ecc->caps->err_mask) {
|
||||
/* uncorrectable errors */
|
||||
@@ -449,6 +450,7 @@ EXPORT_SYMBOL(mtk_ecc_get_parity_bits);
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = {
|
||||
.err_mask = 0x3f,
|
||||
.err_shift = 8,
|
||||
.ecc_strength = ecc_strength_mt2701,
|
||||
.ecc_regs = mt2701_ecc_regs,
|
||||
.num_ecc_strength = 20,
|
||||
@@ -459,6 +461,7 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = {
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
|
||||
.err_mask = 0x7f,
|
||||
.err_shift = 8,
|
||||
.ecc_strength = ecc_strength_mt2712,
|
||||
.ecc_regs = mt2712_ecc_regs,
|
||||
.num_ecc_strength = 23,
|
||||
@@ -468,10 +471,11 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
|
||||
};
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt7622 = {
|
||||
.err_mask = 0x3f,
|
||||
.err_mask = 0x1f,
|
||||
.err_shift = 5,
|
||||
.ecc_strength = ecc_strength_mt7622,
|
||||
.ecc_regs = mt7622_ecc_regs,
|
||||
.num_ecc_strength = 7,
|
||||
.num_ecc_strength = 5,
|
||||
.ecc_mode_shift = 4,
|
||||
.parity_bits = 13,
|
||||
.pg_irq_sel = 0,
|
||||
|
||||
@@ -384,7 +384,8 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,
|
||||
dma_addr_t dma_addr;
|
||||
dma_cookie_t cookie;
|
||||
uint32_t reg;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
unsigned long time_left;
|
||||
|
||||
if (dir == DMA_FROM_DEVICE) {
|
||||
chan = flctl->chan_fifo0_rx;
|
||||
@@ -425,13 +426,14 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret =
|
||||
time_left =
|
||||
wait_for_completion_timeout(&flctl->dma_complete,
|
||||
msecs_to_jiffies(3000));
|
||||
|
||||
if (ret <= 0) {
|
||||
if (time_left == 0) {
|
||||
dmaengine_terminate_all(chan);
|
||||
dev_err(&flctl->pdev->dev, "wait_for_completion_timeout\n");
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
out:
|
||||
@@ -441,7 +443,7 @@ out:
|
||||
|
||||
dma_unmap_single(chan->device->dev, dma_addr, len, dir);
|
||||
|
||||
/* ret > 0 is success */
|
||||
/* ret == 0 is success */
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -465,7 +467,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)
|
||||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_rx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE) > 0)
|
||||
!flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE))
|
||||
goto convert; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
@@ -524,7 +526,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,
|
||||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_tx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE) > 0)
|
||||
!flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE))
|
||||
return; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
|
||||
@@ -1607,9 +1607,6 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port,
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_RMII:
|
||||
miicfg |= GSWIP_MII_CFG_MODE_RMIIM;
|
||||
|
||||
/* Configure the RMII clock as output: */
|
||||
miicfg |= GSWIP_MII_CFG_RMII_CLK;
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
|
||||
@@ -14267,10 +14267,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
|
||||
|
||||
/* Stop Tx */
|
||||
bnx2x_tx_disable(bp);
|
||||
/* Delete all NAPI objects */
|
||||
bnx2x_del_all_napi(bp);
|
||||
if (CNIC_LOADED(bp))
|
||||
bnx2x_del_all_napi_cnic(bp);
|
||||
netdev_reset_tc(bp->dev);
|
||||
|
||||
del_timer_sync(&bp->timer);
|
||||
@@ -14375,6 +14371,11 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)
|
||||
bnx2x_drain_tx_queues(bp);
|
||||
bnx2x_send_unload_req(bp, UNLOAD_RECOVERY);
|
||||
bnx2x_netif_stop(bp, 1);
|
||||
bnx2x_del_all_napi(bp);
|
||||
|
||||
if (CNIC_LOADED(bp))
|
||||
bnx2x_del_all_napi_cnic(bp);
|
||||
|
||||
bnx2x_free_irq(bp);
|
||||
|
||||
/* Report UNLOAD_DONE to MCP */
|
||||
|
||||
@@ -1547,6 +1547,11 @@ static struct sk_buff *bcmgenet_put_tx_csum(struct net_device *dev,
|
||||
return skb;
|
||||
}
|
||||
|
||||
static void bcmgenet_hide_tsb(struct sk_buff *skb)
|
||||
{
|
||||
__skb_pull(skb, sizeof(struct status_64));
|
||||
}
|
||||
|
||||
static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct bcmgenet_priv *priv = netdev_priv(dev);
|
||||
@@ -1655,6 +1660,8 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
}
|
||||
|
||||
GENET_CB(skb)->last_cb = tx_cb_ptr;
|
||||
|
||||
bcmgenet_hide_tsb(skb);
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
/* Decrement total BD count and advance our write pointer */
|
||||
|
||||
@@ -64,6 +64,13 @@ static int hclge_send_mbx_msg(struct hclge_vport *vport, u8 *msg, u16 msg_len,
|
||||
enum hclge_cmd_status status;
|
||||
struct hclge_desc desc;
|
||||
|
||||
if (msg_len > HCLGE_MBX_MAX_MSG_SIZE) {
|
||||
dev_err(&hdev->pdev->dev,
|
||||
"msg data length(=%u) exceeds maximum(=%u)\n",
|
||||
msg_len, HCLGE_MBX_MAX_MSG_SIZE);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
resp_pf_to_vf = (struct hclge_mbx_pf_to_vf_cmd *)desc.data;
|
||||
|
||||
hclge_cmd_setup_basic_desc(&desc, HCLGEVF_OPC_MBX_PF_TO_VF, false);
|
||||
|
||||
@@ -903,7 +903,8 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
|
||||
/* Tx IPsec offload doesn't seem to work on this
|
||||
* device, so block these requests for now.
|
||||
*/
|
||||
if (!(sam->flags & XFRM_OFFLOAD_INBOUND)) {
|
||||
sam->flags = sam->flags & ~XFRM_OFFLOAD_IPV6;
|
||||
if (sam->flags != XFRM_OFFLOAD_INBOUND) {
|
||||
err = -EOPNOTSUPP;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@@ -65,8 +65,9 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)
|
||||
struct phy_device *phy_dev = ndev->phydev;
|
||||
u32 val;
|
||||
|
||||
writew(SGMII_ADAPTER_DISABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
if (sgmii_adapter_base)
|
||||
writew(SGMII_ADAPTER_DISABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
|
||||
if (splitter_base) {
|
||||
val = readl(splitter_base + EMAC_SPLITTER_CTRL_REG);
|
||||
@@ -88,10 +89,11 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)
|
||||
writel(val, splitter_base + EMAC_SPLITTER_CTRL_REG);
|
||||
}
|
||||
|
||||
writew(SGMII_ADAPTER_ENABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
if (phy_dev)
|
||||
if (phy_dev && sgmii_adapter_base) {
|
||||
writew(SGMII_ADAPTER_ENABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
tse_pcs_fix_mac_speed(&dwmac->pcs, phy_dev, speed);
|
||||
}
|
||||
}
|
||||
|
||||
static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev)
|
||||
|
||||
@@ -311,7 +311,6 @@ static void sp_setup(struct net_device *dev)
|
||||
{
|
||||
/* Finish setting up the DEVICE info. */
|
||||
dev->netdev_ops = &sp_netdev_ops;
|
||||
dev->needs_free_netdev = true;
|
||||
dev->mtu = SIXP_MTU;
|
||||
dev->hard_header_len = AX25_MAX_HEADER_LEN;
|
||||
dev->header_ops = &ax25_header_ops;
|
||||
@@ -679,9 +678,11 @@ static void sixpack_close(struct tty_struct *tty)
|
||||
del_timer_sync(&sp->tx_t);
|
||||
del_timer_sync(&sp->resync_t);
|
||||
|
||||
/* Free all 6pack frame buffers. */
|
||||
/* Free all 6pack frame buffers after unreg. */
|
||||
kfree(sp->rbuff);
|
||||
kfree(sp->xbuff);
|
||||
|
||||
free_netdev(sp->dev);
|
||||
}
|
||||
|
||||
/* Perform I/O control on an active 6pack channel. */
|
||||
|
||||
@@ -1346,7 +1346,9 @@ static int rr_close(struct net_device *dev)
|
||||
|
||||
rrpriv->fw_running = 0;
|
||||
|
||||
spin_unlock_irqrestore(&rrpriv->lock, flags);
|
||||
del_timer_sync(&rrpriv->timer);
|
||||
spin_lock_irqsave(&rrpriv->lock, flags);
|
||||
|
||||
writel(0, ®s->TxPi);
|
||||
writel(0, ®s->IpRxPi);
|
||||
|
||||
@@ -628,7 +628,8 @@ idle:
|
||||
cleanup:
|
||||
if (error < 0)
|
||||
phy_mdm6600_device_power_off(ddata);
|
||||
|
||||
pm_runtime_disable(ddata->dev);
|
||||
pm_runtime_dont_use_autosuspend(ddata->dev);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +190,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
|
||||
sata_phy->client = of_find_i2c_device_by_node(node);
|
||||
of_node_put(node);
|
||||
if (!sata_phy->client)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
@@ -198,20 +199,21 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
|
||||
sata_phy->phyclk = devm_clk_get(dev, "sata_phyctrl");
|
||||
if (IS_ERR(sata_phy->phyclk)) {
|
||||
dev_err(dev, "failed to get clk for PHY\n");
|
||||
return PTR_ERR(sata_phy->phyclk);
|
||||
ret = PTR_ERR(sata_phy->phyclk);
|
||||
goto put_dev;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(sata_phy->phyclk);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to enable source clk\n");
|
||||
return ret;
|
||||
goto put_dev;
|
||||
}
|
||||
|
||||
sata_phy->phy = devm_phy_create(dev, NULL, &exynos_sata_phy_ops);
|
||||
if (IS_ERR(sata_phy->phy)) {
|
||||
clk_disable_unprepare(sata_phy->phyclk);
|
||||
dev_err(dev, "failed to create PHY\n");
|
||||
return PTR_ERR(sata_phy->phy);
|
||||
ret = PTR_ERR(sata_phy->phy);
|
||||
goto clk_disable;
|
||||
}
|
||||
|
||||
phy_set_drvdata(sata_phy->phy, sata_phy);
|
||||
@@ -219,11 +221,18 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
|
||||
phy_provider = devm_of_phy_provider_register(dev,
|
||||
of_phy_simple_xlate);
|
||||
if (IS_ERR(phy_provider)) {
|
||||
clk_disable_unprepare(sata_phy->phyclk);
|
||||
return PTR_ERR(phy_provider);
|
||||
ret = PTR_ERR(phy_provider);
|
||||
goto clk_disable;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
clk_disable:
|
||||
clk_disable_unprepare(sata_phy->phyclk);
|
||||
put_dev:
|
||||
put_device(&sata_phy->client->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct of_device_id exynos_sata_phy_of_match[] = {
|
||||
|
||||
@@ -641,7 +641,7 @@ static int serdes_am654_probe(struct platform_device *pdev)
|
||||
|
||||
clk_err:
|
||||
of_clk_del_provider(node);
|
||||
|
||||
pm_runtime_disable(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
|
||||
return 0;
|
||||
|
||||
err1:
|
||||
clk_disable(phy->wkupclk);
|
||||
clk_disable_unprepare(phy->wkupclk);
|
||||
|
||||
err0:
|
||||
return ret;
|
||||
|
||||
@@ -1370,10 +1370,10 @@ static int pistachio_gpio_register(struct pistachio_pinctrl *pctl)
|
||||
}
|
||||
|
||||
irq = irq_of_parse_and_map(child, 0);
|
||||
if (irq < 0) {
|
||||
dev_err(pctl->dev, "No IRQ for bank %u: %d\n", i, irq);
|
||||
if (!irq) {
|
||||
dev_err(pctl->dev, "No IRQ for bank %u\n", i);
|
||||
of_node_put(child);
|
||||
ret = irq;
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,8 @@ module_param(debug, int, 0600);
|
||||
*/
|
||||
#define MAX_MRU 1500
|
||||
#define MAX_MTU 1500
|
||||
/* SOF, ADDR, CTRL, LEN1, LEN2, ..., FCS, EOF */
|
||||
#define PROT_OVERHEAD 7
|
||||
#define GSM_NET_TX_TIMEOUT (HZ*10)
|
||||
|
||||
/**
|
||||
@@ -823,7 +825,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
|
||||
break;
|
||||
case 2: /* Unstructed with modem bits.
|
||||
Always one byte as we never send inline break data */
|
||||
*dp++ = gsm_encode_modem(dlci);
|
||||
*dp++ = (gsm_encode_modem(dlci) << 1) | EA;
|
||||
break;
|
||||
}
|
||||
WARN_ON(kfifo_out_locked(dlci->fifo, dp , len, &dlci->lock) != len);
|
||||
@@ -1300,11 +1302,12 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
|
||||
|
||||
static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
|
||||
{
|
||||
struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1, gsm->ftype);
|
||||
struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 2, gsm->ftype);
|
||||
if (msg == NULL)
|
||||
return;
|
||||
msg->data[0] = (ctrl->cmd << 1) | 2 | EA; /* command */
|
||||
memcpy(msg->data + 1, ctrl->data, ctrl->len);
|
||||
msg->data[0] = (ctrl->cmd << 1) | CR | EA; /* command */
|
||||
msg->data[1] = (ctrl->len << 1) | EA;
|
||||
memcpy(msg->data + 2, ctrl->data, ctrl->len);
|
||||
gsm_data_queue(gsm->dlci[0], msg);
|
||||
}
|
||||
|
||||
@@ -1327,7 +1330,6 @@ static void gsm_control_retransmit(struct timer_list *t)
|
||||
spin_lock_irqsave(&gsm->control_lock, flags);
|
||||
ctrl = gsm->pending_cmd;
|
||||
if (ctrl) {
|
||||
gsm->cretries--;
|
||||
if (gsm->cretries == 0) {
|
||||
gsm->pending_cmd = NULL;
|
||||
ctrl->error = -ETIMEDOUT;
|
||||
@@ -1336,6 +1338,7 @@ static void gsm_control_retransmit(struct timer_list *t)
|
||||
wake_up(&gsm->event);
|
||||
return;
|
||||
}
|
||||
gsm->cretries--;
|
||||
gsm_control_transmit(gsm, ctrl);
|
||||
mod_timer(&gsm->t2_timer, jiffies + gsm->t2 * HZ / 100);
|
||||
}
|
||||
@@ -1376,7 +1379,7 @@ retry:
|
||||
|
||||
/* If DLCI0 is in ADM mode skip retries, it won't respond */
|
||||
if (gsm->dlci[0]->mode == DLCI_MODE_ADM)
|
||||
gsm->cretries = 1;
|
||||
gsm->cretries = 0;
|
||||
else
|
||||
gsm->cretries = gsm->n2;
|
||||
|
||||
@@ -1810,7 +1813,6 @@ static void gsm_queue(struct gsm_mux *gsm)
|
||||
gsm_response(gsm, address, UA);
|
||||
gsm_dlci_close(dlci);
|
||||
break;
|
||||
case UA:
|
||||
case UA|PF:
|
||||
if (cr == 0 || dlci == NULL)
|
||||
break;
|
||||
@@ -1961,7 +1963,8 @@ static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
}
|
||||
/* Any partial frame was a runt so go back to start */
|
||||
if (gsm->state != GSM_START) {
|
||||
gsm->malformed++;
|
||||
if (gsm->state != GSM_SEARCH)
|
||||
gsm->malformed++;
|
||||
gsm->state = GSM_START;
|
||||
}
|
||||
/* A SOF in GSM_START means we are still reading idling or
|
||||
@@ -2098,6 +2101,7 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)
|
||||
gsm_dlci_release(gsm->dlci[i]);
|
||||
mutex_unlock(&gsm->mutex);
|
||||
/* Now wipe the queues */
|
||||
tty_ldisc_flush(gsm->tty);
|
||||
list_for_each_entry_safe(txq, ntxq, &gsm->tx_list, list)
|
||||
kfree(txq);
|
||||
INIT_LIST_HEAD(&gsm->tx_list);
|
||||
@@ -2208,7 +2212,7 @@ static struct gsm_mux *gsm_alloc_mux(void)
|
||||
kfree(gsm);
|
||||
return NULL;
|
||||
}
|
||||
gsm->txframe = kmalloc(2 * MAX_MRU + 2, GFP_KERNEL);
|
||||
gsm->txframe = kmalloc(2 * (MAX_MTU + PROT_OVERHEAD - 1), GFP_KERNEL);
|
||||
if (gsm->txframe == NULL) {
|
||||
kfree(gsm->buf);
|
||||
kfree(gsm);
|
||||
@@ -2264,7 +2268,7 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
|
||||
/* Check the MRU/MTU range looks sane */
|
||||
if (c->mru > MAX_MRU || c->mtu > MAX_MTU || c->mru < 8 || c->mtu < 8)
|
||||
return -EINVAL;
|
||||
if (c->n2 < 3)
|
||||
if (c->n2 > 255)
|
||||
return -EINVAL;
|
||||
if (c->encapsulation > 1) /* Basic, advanced, no I */
|
||||
return -EINVAL;
|
||||
@@ -2879,19 +2883,17 @@ static struct tty_ldisc_ops tty_ldisc_packet = {
|
||||
|
||||
static int gsmtty_modem_update(struct gsm_dlci *dlci, u8 brk)
|
||||
{
|
||||
u8 modembits[5];
|
||||
u8 modembits[3];
|
||||
struct gsm_control *ctrl;
|
||||
int len = 2;
|
||||
|
||||
if (brk)
|
||||
modembits[0] = (dlci->addr << 2) | 2 | EA; /* DLCI, Valid, EA */
|
||||
modembits[1] = (gsm_encode_modem(dlci) << 1) | EA;
|
||||
if (brk) {
|
||||
modembits[2] = (brk << 4) | 2 | EA; /* Length, Break, EA */
|
||||
len++;
|
||||
|
||||
modembits[0] = len << 1 | EA; /* Data bytes */
|
||||
modembits[1] = dlci->addr << 2 | 3; /* DLCI, EA, 1 */
|
||||
modembits[2] = gsm_encode_modem(dlci) << 1 | EA;
|
||||
if (brk)
|
||||
modembits[3] = brk << 4 | 2 | EA; /* Valid, EA */
|
||||
ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len + 1);
|
||||
}
|
||||
ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len);
|
||||
if (ctrl == NULL)
|
||||
return -ENOMEM;
|
||||
return gsm_control_wait(dlci->gsm, ctrl);
|
||||
|
||||
@@ -2907,7 +2907,7 @@ enum pci_board_num_t {
|
||||
pbn_panacom2,
|
||||
pbn_panacom4,
|
||||
pbn_plx_romulus,
|
||||
pbn_endrun_2_4000000,
|
||||
pbn_endrun_2_3906250,
|
||||
pbn_oxsemi,
|
||||
pbn_oxsemi_1_4000000,
|
||||
pbn_oxsemi_2_4000000,
|
||||
@@ -3434,10 +3434,10 @@ static struct pciserial_board pci_boards[] = {
|
||||
* signal now many ports are available
|
||||
* 2 port 952 Uart support
|
||||
*/
|
||||
[pbn_endrun_2_4000000] = {
|
||||
[pbn_endrun_2_3906250] = {
|
||||
.flags = FL_BASE0,
|
||||
.num_ports = 2,
|
||||
.base_baud = 4000000,
|
||||
.base_baud = 3906250,
|
||||
.uart_offset = 0x200,
|
||||
.first_offset = 0x1000,
|
||||
},
|
||||
@@ -4345,7 +4345,7 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
*/
|
||||
{ PCI_VENDOR_ID_ENDRUN, PCI_DEVICE_ID_ENDRUN_1588,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
pbn_endrun_2_4000000 },
|
||||
pbn_endrun_2_3906250 },
|
||||
/*
|
||||
* Quatech cards. These actually have configurable clocks but for
|
||||
* now we just use the default.
|
||||
|
||||
@@ -3184,7 +3184,7 @@ static void serial8250_console_restore(struct uart_8250_port *up)
|
||||
|
||||
serial8250_set_divisor(port, baud, quot, frac);
|
||||
serial_port_out(port, UART_LCR, up->lcr);
|
||||
serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS);
|
||||
serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1401,7 +1401,7 @@ static int imx_uart_startup(struct uart_port *port)
|
||||
imx_uart_writel(sport, ucr1, UCR1);
|
||||
|
||||
ucr4 = imx_uart_readl(sport, UCR4) & ~UCR4_OREN;
|
||||
if (!sport->dma_is_enabled)
|
||||
if (!dma_is_inited)
|
||||
ucr4 |= UCR4_OREN;
|
||||
imx_uart_writel(sport, ucr4, UCR4);
|
||||
|
||||
|
||||
@@ -404,6 +404,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
{ USB_DEVICE(0x0b05, 0x17e0), .driver_info =
|
||||
USB_QUIRK_IGNORE_REMOTE_WAKEUP },
|
||||
|
||||
/* Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)*/
|
||||
{ USB_DEVICE(0x0bda, 0x0151), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
|
||||
|
||||
/* Realtek hub in Dell WD19 (Type-C) */
|
||||
{ USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
|
||||
{ USB_DEVICE(0x0bda, 0x5487), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
@@ -508,6 +511,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* DJI CineSSD */
|
||||
{ USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* VCOM device */
|
||||
{ USB_DEVICE(0x4296, 0x7570), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
|
||||
|
||||
/* INTEL VALUE SSD */
|
||||
{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
|
||||
@@ -1223,10 +1223,10 @@ static void dwc3_get_properties(struct dwc3 *dwc)
|
||||
u8 lpm_nyet_threshold;
|
||||
u8 tx_de_emphasis;
|
||||
u8 hird_threshold;
|
||||
u8 rx_thr_num_pkt_prd;
|
||||
u8 rx_max_burst_prd;
|
||||
u8 tx_thr_num_pkt_prd;
|
||||
u8 tx_max_burst_prd;
|
||||
u8 rx_thr_num_pkt_prd = 0;
|
||||
u8 rx_max_burst_prd = 0;
|
||||
u8 tx_thr_num_pkt_prd = 0;
|
||||
u8 tx_max_burst_prd = 0;
|
||||
|
||||
/* default to highest possible threshold */
|
||||
lpm_nyet_threshold = 0xf;
|
||||
|
||||
@@ -2728,6 +2728,7 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep,
|
||||
const struct dwc3_event_depevt *event,
|
||||
struct dwc3_request *req, int status)
|
||||
{
|
||||
int request_status;
|
||||
int ret;
|
||||
|
||||
if (req->request.num_mapped_sgs)
|
||||
@@ -2757,7 +2758,35 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep,
|
||||
req->needs_extra_trb = false;
|
||||
}
|
||||
|
||||
dwc3_gadget_giveback(dep, req, status);
|
||||
/*
|
||||
* The event status only reflects the status of the TRB with IOC set.
|
||||
* For the requests that don't set interrupt on completion, the driver
|
||||
* needs to check and return the status of the completed TRBs associated
|
||||
* with the request. Use the status of the last TRB of the request.
|
||||
*/
|
||||
if (req->request.no_interrupt) {
|
||||
struct dwc3_trb *trb;
|
||||
|
||||
trb = dwc3_ep_prev_trb(dep, dep->trb_dequeue);
|
||||
switch (DWC3_TRB_SIZE_TRBSTS(trb->size)) {
|
||||
case DWC3_TRBSTS_MISSED_ISOC:
|
||||
/* Isoc endpoint only */
|
||||
request_status = -EXDEV;
|
||||
break;
|
||||
case DWC3_TRB_STS_XFER_IN_PROG:
|
||||
/* Applicable when End Transfer with ForceRM=0 */
|
||||
case DWC3_TRBSTS_SETUP_PENDING:
|
||||
/* Control endpoint only */
|
||||
case DWC3_TRBSTS_OK:
|
||||
default:
|
||||
request_status = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
request_status = status;
|
||||
}
|
||||
|
||||
dwc3_gadget_giveback(dep, req, request_status);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
|
||||
@@ -1527,6 +1527,8 @@ static void configfs_composite_unbind(struct usb_gadget *gadget)
|
||||
usb_ep_autoconfig_reset(cdev->gadget);
|
||||
spin_lock_irqsave(&gi->spinlock, flags);
|
||||
cdev->gadget = NULL;
|
||||
cdev->deactivations = 0;
|
||||
gadget->deactivated = false;
|
||||
set_gadget_data(gadget, NULL);
|
||||
spin_unlock_irqrestore(&gi->spinlock, flags);
|
||||
}
|
||||
|
||||
@@ -242,6 +242,8 @@ void uvcg_queue_cancel(struct uvc_video_queue *queue, int disconnect)
|
||||
buf->state = UVC_BUF_STATE_ERROR;
|
||||
vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_ERROR);
|
||||
}
|
||||
queue->buf_used = 0;
|
||||
|
||||
/* This must be protected by the irqlock spinlock to avoid race
|
||||
* conditions between uvc_queue_buffer and the disconnection event that
|
||||
* could result in an interruptible wait in uvc_dequeue_buffer. Do not
|
||||
|
||||
@@ -1343,7 +1343,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
||||
}
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
if (!wait_for_completion_timeout(&bus_state->u3exit_done[wIndex],
|
||||
msecs_to_jiffies(100)))
|
||||
msecs_to_jiffies(500)))
|
||||
xhci_dbg(xhci, "missing U0 port change event for port %d\n",
|
||||
wIndex);
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
|
||||
@@ -2932,6 +2932,8 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
|
||||
if (event_loop++ < TRBS_PER_SEGMENT / 2)
|
||||
continue;
|
||||
xhci_update_erst_dequeue(xhci, event_ring_deq);
|
||||
event_ring_deq = xhci->event_ring->dequeue;
|
||||
|
||||
event_loop = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -779,6 +779,17 @@ void xhci_shutdown(struct usb_hcd *hcd)
|
||||
if (xhci->quirks & XHCI_SPURIOUS_REBOOT)
|
||||
usb_disable_xhci_ports(to_pci_dev(hcd->self.sysdev));
|
||||
|
||||
/* Don't poll the roothubs after shutdown. */
|
||||
xhci_dbg(xhci, "%s: stopping usb%d port polling.\n",
|
||||
__func__, hcd->self.busnum);
|
||||
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
|
||||
del_timer_sync(&hcd->rh_timer);
|
||||
|
||||
if (xhci->shared_hcd) {
|
||||
clear_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
|
||||
del_timer_sync(&xhci->shared_hcd->rh_timer);
|
||||
}
|
||||
|
||||
spin_lock_irq(&xhci->lock);
|
||||
xhci_halt(xhci);
|
||||
/* Workaround for spurious wakeups at shutdown with HSW */
|
||||
|
||||
@@ -71,6 +71,7 @@ static void destroy_priv(struct kref *kref)
|
||||
|
||||
dev_dbg(&priv->usbdev->dev, "destroying priv datastructure\n");
|
||||
usb_put_dev(priv->usbdev);
|
||||
priv->usbdev = NULL;
|
||||
kfree(priv);
|
||||
}
|
||||
|
||||
@@ -736,7 +737,6 @@ static int uss720_probe(struct usb_interface *intf,
|
||||
parport_announce_port(pp);
|
||||
|
||||
usb_set_intfdata(intf, pp);
|
||||
usb_put_dev(usbdev);
|
||||
return 0;
|
||||
|
||||
probe_abort:
|
||||
@@ -754,7 +754,6 @@ static void uss720_disconnect(struct usb_interface *intf)
|
||||
usb_set_intfdata(intf, NULL);
|
||||
if (pp) {
|
||||
priv = pp->private_data;
|
||||
priv->usbdev = NULL;
|
||||
priv->pp = NULL;
|
||||
dev_dbg(&intf->dev, "parport_remove_port\n");
|
||||
parport_remove_port(pp);
|
||||
|
||||
@@ -41,10 +41,8 @@ static char *mailbox_state_string(enum mtu3_vbus_id_state state)
|
||||
|
||||
static void toggle_opstate(struct ssusb_mtk *ssusb)
|
||||
{
|
||||
if (!ssusb->otg_switch.is_u3_drd) {
|
||||
mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION);
|
||||
mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN);
|
||||
}
|
||||
mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION);
|
||||
mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN);
|
||||
}
|
||||
|
||||
/* only port0 supports dual-role mode */
|
||||
|
||||
@@ -195,6 +195,8 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */
|
||||
{ USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */
|
||||
{ USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */
|
||||
{ USB_DEVICE(0x17A8, 0x0101) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Int Ant) */
|
||||
{ USB_DEVICE(0x17A8, 0x0102) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Ext Ant) */
|
||||
{ USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
|
||||
{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
|
||||
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
|
||||
|
||||
@@ -432,6 +432,8 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define CINTERION_PRODUCT_CLS8 0x00b0
|
||||
#define CINTERION_PRODUCT_MV31_MBIM 0x00b3
|
||||
#define CINTERION_PRODUCT_MV31_RMNET 0x00b7
|
||||
#define CINTERION_PRODUCT_MV32_WA 0x00f1
|
||||
#define CINTERION_PRODUCT_MV32_WB 0x00f2
|
||||
|
||||
/* Olivetti products */
|
||||
#define OLIVETTI_VENDOR_ID 0x0b3c
|
||||
@@ -1217,6 +1219,10 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */
|
||||
.driver_info = NCTRL(2) | RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1057, 0xff), /* Telit FN980 */
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1058, 0xff), /* Telit FN980 (PCIe) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1060, 0xff), /* Telit LN920 (rmnet) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1061, 0xff), /* Telit LN920 (MBIM) */
|
||||
@@ -1233,6 +1239,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = NCTRL(2) | RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990 (PCIe) */
|
||||
.driver_info = RSVD(0) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
|
||||
@@ -1969,6 +1977,10 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = RSVD(3)},
|
||||
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff),
|
||||
.driver_info = RSVD(0)},
|
||||
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA, 0xff),
|
||||
.driver_info = RSVD(3)},
|
||||
{ USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB, 0xff),
|
||||
.driver_info = RSVD(3)},
|
||||
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100),
|
||||
.driver_info = RSVD(4) },
|
||||
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
|
||||
|
||||
@@ -599,9 +599,8 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command,
|
||||
switch (command) {
|
||||
case WHITEHEAT_GET_DTR_RTS:
|
||||
info = usb_get_serial_port_data(port);
|
||||
memcpy(&info->mcr, command_info->result_buffer,
|
||||
sizeof(struct whiteheat_dr_info));
|
||||
break;
|
||||
info->mcr = command_info->result_buffer[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
exit:
|
||||
|
||||
@@ -744,14 +744,18 @@ static int ucsi_dr_swap(struct typec_port *port, enum typec_data_role role)
|
||||
if (ret < 0)
|
||||
goto out_unlock;
|
||||
|
||||
mutex_unlock(&con->lock);
|
||||
|
||||
if (!wait_for_completion_timeout(&con->complete,
|
||||
msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS)))
|
||||
ret = -ETIMEDOUT;
|
||||
msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS)))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&con->lock);
|
||||
|
||||
return ret < 0 ? ret : 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ucsi_pr_swap(struct typec_port *port, enum typec_role role)
|
||||
@@ -775,11 +779,13 @@ static int ucsi_pr_swap(struct typec_port *port, enum typec_role role)
|
||||
if (ret < 0)
|
||||
goto out_unlock;
|
||||
|
||||
mutex_unlock(&con->lock);
|
||||
|
||||
if (!wait_for_completion_timeout(&con->complete,
|
||||
msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS))) {
|
||||
ret = -ETIMEDOUT;
|
||||
goto out_unlock;
|
||||
}
|
||||
msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS)))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
mutex_lock(&con->lock);
|
||||
|
||||
/* Something has gone wrong while swapping the role */
|
||||
if (con->status.pwr_op_mode != UCSI_CONSTAT_PWR_OPMODE_PD) {
|
||||
|
||||
@@ -1650,8 +1650,9 @@ static int dlfb_usb_probe(struct usb_interface *intf,
|
||||
const struct device_attribute *attr;
|
||||
struct dlfb_data *dlfb;
|
||||
struct fb_info *info;
|
||||
int retval = -ENOMEM;
|
||||
int retval;
|
||||
struct usb_device *usbdev = interface_to_usbdev(intf);
|
||||
struct usb_endpoint_descriptor *out;
|
||||
|
||||
/* usb initialization */
|
||||
dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL);
|
||||
@@ -1665,6 +1666,12 @@ static int dlfb_usb_probe(struct usb_interface *intf,
|
||||
dlfb->udev = usb_get_dev(usbdev);
|
||||
usb_set_intfdata(intf, dlfb);
|
||||
|
||||
retval = usb_find_common_endpoints(intf->cur_altsetting, NULL, &out, NULL, NULL);
|
||||
if (retval) {
|
||||
dev_err(&intf->dev, "Device should have at lease 1 bulk endpoint!\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
dev_dbg(&intf->dev, "console enable=%d\n", console);
|
||||
dev_dbg(&intf->dev, "fb_defio enable=%d\n", fb_defio);
|
||||
dev_dbg(&intf->dev, "shadow enable=%d\n", shadow);
|
||||
@@ -1674,6 +1681,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,
|
||||
if (!dlfb_parse_vendor_descriptor(dlfb, intf)) {
|
||||
dev_err(&intf->dev,
|
||||
"firmware not recognized, incompatible device?\n");
|
||||
retval = -ENODEV;
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -1687,8 +1695,10 @@ static int dlfb_usb_probe(struct usb_interface *intf,
|
||||
|
||||
/* allocates framebuffer driver structure, not framebuffer memory */
|
||||
info = framebuffer_alloc(0, &dlfb->udev->dev);
|
||||
if (!info)
|
||||
if (!info) {
|
||||
retval = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
dlfb->info = info;
|
||||
info->par = dlfb;
|
||||
|
||||
@@ -1643,9 +1643,17 @@ smb2_copychunk_range(const unsigned int xid,
|
||||
int chunks_copied = 0;
|
||||
bool chunk_sizes_updated = false;
|
||||
ssize_t bytes_written, total_bytes_written = 0;
|
||||
struct inode *inode;
|
||||
|
||||
pcchunk = kmalloc(sizeof(struct copychunk_ioctl), GFP_KERNEL);
|
||||
|
||||
/*
|
||||
* We need to flush all unwritten data before we can send the
|
||||
* copychunk ioctl to the server.
|
||||
*/
|
||||
inode = d_inode(trgtfile->dentry);
|
||||
filemap_write_and_wait(inode->i_mapping);
|
||||
|
||||
if (pcchunk == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <linux/uio.h>
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/sched/mm.h>
|
||||
|
||||
static const struct super_operations hugetlbfs_ops;
|
||||
static const struct address_space_operations hugetlbfs_aops;
|
||||
@@ -200,6 +201,54 @@ out:
|
||||
*/
|
||||
|
||||
#ifndef HAVE_ARCH_HUGETLB_UNMAPPED_AREA
|
||||
static unsigned long
|
||||
hugetlb_get_unmapped_area_bottomup(struct file *file, unsigned long addr,
|
||||
unsigned long len, unsigned long pgoff, unsigned long flags)
|
||||
{
|
||||
struct hstate *h = hstate_file(file);
|
||||
struct vm_unmapped_area_info info;
|
||||
|
||||
info.flags = 0;
|
||||
info.length = len;
|
||||
info.low_limit = current->mm->mmap_base;
|
||||
info.high_limit = arch_get_mmap_end(addr);
|
||||
info.align_mask = PAGE_MASK & ~huge_page_mask(h);
|
||||
info.align_offset = 0;
|
||||
return vm_unmapped_area(&info);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
hugetlb_get_unmapped_area_topdown(struct file *file, unsigned long addr,
|
||||
unsigned long len, unsigned long pgoff, unsigned long flags)
|
||||
{
|
||||
struct hstate *h = hstate_file(file);
|
||||
struct vm_unmapped_area_info info;
|
||||
|
||||
info.flags = VM_UNMAPPED_AREA_TOPDOWN;
|
||||
info.length = len;
|
||||
info.low_limit = max(PAGE_SIZE, mmap_min_addr);
|
||||
info.high_limit = arch_get_mmap_base(addr, current->mm->mmap_base);
|
||||
info.align_mask = PAGE_MASK & ~huge_page_mask(h);
|
||||
info.align_offset = 0;
|
||||
addr = vm_unmapped_area(&info);
|
||||
|
||||
/*
|
||||
* A failed mmap() very likely causes application failure,
|
||||
* so fall back to the bottom-up function here. This scenario
|
||||
* can happen with large stack limits and large mmap()
|
||||
* allocations.
|
||||
*/
|
||||
if (unlikely(offset_in_page(addr))) {
|
||||
VM_BUG_ON(addr != -ENOMEM);
|
||||
info.flags = 0;
|
||||
info.low_limit = current->mm->mmap_base;
|
||||
info.high_limit = arch_get_mmap_end(addr);
|
||||
addr = vm_unmapped_area(&info);
|
||||
}
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
unsigned long len, unsigned long pgoff, unsigned long flags)
|
||||
@@ -207,7 +256,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
struct mm_struct *mm = current->mm;
|
||||
struct vm_area_struct *vma;
|
||||
struct hstate *h = hstate_file(file);
|
||||
struct vm_unmapped_area_info info;
|
||||
const unsigned long mmap_end = arch_get_mmap_end(addr);
|
||||
|
||||
if (len & ~huge_page_mask(h))
|
||||
return -EINVAL;
|
||||
@@ -223,18 +272,21 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
if (addr) {
|
||||
addr = ALIGN(addr, huge_page_size(h));
|
||||
vma = find_vma(mm, addr);
|
||||
if (TASK_SIZE - len >= addr &&
|
||||
if (mmap_end - len >= addr &&
|
||||
(!vma || addr + len <= vm_start_gap(vma)))
|
||||
return addr;
|
||||
}
|
||||
|
||||
info.flags = 0;
|
||||
info.length = len;
|
||||
info.low_limit = TASK_UNMAPPED_BASE;
|
||||
info.high_limit = TASK_SIZE;
|
||||
info.align_mask = PAGE_MASK & ~huge_page_mask(h);
|
||||
info.align_offset = 0;
|
||||
return vm_unmapped_area(&info);
|
||||
/*
|
||||
* Use mm->get_unmapped_area value as a hint to use topdown routine.
|
||||
* If architectures have special needs, they should define their own
|
||||
* version of hugetlb_get_unmapped_area.
|
||||
*/
|
||||
if (mm->get_unmapped_area == arch_get_unmapped_area_topdown)
|
||||
return hugetlb_get_unmapped_area_topdown(file, addr, len,
|
||||
pgoff, flags);
|
||||
return hugetlb_get_unmapped_area_bottomup(file, addr, len,
|
||||
pgoff, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -627,7 +627,7 @@ static inline char *hex_byte_pack_upper(char *buf, u8 byte)
|
||||
return buf;
|
||||
}
|
||||
|
||||
extern int hex_to_bin(char ch);
|
||||
extern int hex_to_bin(unsigned char ch);
|
||||
extern int __must_check hex2bin(u8 *dst, const char *src, size_t count);
|
||||
extern char *bin2hex(char *dst, const void *src, size_t count);
|
||||
|
||||
|
||||
@@ -133,6 +133,14 @@ static inline void mm_update_next_owner(struct mm_struct *mm)
|
||||
#endif /* CONFIG_MEMCG */
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#ifndef arch_get_mmap_end
|
||||
#define arch_get_mmap_end(addr) (TASK_SIZE)
|
||||
#endif
|
||||
|
||||
#ifndef arch_get_mmap_base
|
||||
#define arch_get_mmap_base(addr, base) (base)
|
||||
#endif
|
||||
|
||||
extern void arch_pick_mmap_layout(struct mm_struct *mm,
|
||||
struct rlimit *rlim_stack);
|
||||
extern unsigned long
|
||||
|
||||
@@ -603,6 +603,7 @@ void tcp_synack_rtt_meas(struct sock *sk, struct request_sock *req);
|
||||
void tcp_reset(struct sock *sk);
|
||||
void tcp_skb_mark_lost_uncond_verify(struct tcp_sock *tp, struct sk_buff *skb);
|
||||
void tcp_fin(struct sock *sk);
|
||||
void tcp_check_space(struct sock *sk);
|
||||
|
||||
/* tcp_timer.c */
|
||||
void tcp_init_xmit_timers(struct sock *);
|
||||
@@ -1030,6 +1031,7 @@ struct rate_sample {
|
||||
int losses; /* number of packets marked lost upon ACK */
|
||||
u32 acked_sacked; /* number of packets newly (S)ACKed upon ACK */
|
||||
u32 prior_in_flight; /* in flight before this ACK */
|
||||
u32 last_end_seq; /* end_seq of most recently ACKed packet */
|
||||
bool is_app_limited; /* is sample from packet with bubble in pipe? */
|
||||
bool is_retrans; /* is sample from retransmission? */
|
||||
bool is_ack_delayed; /* is this (likely) a delayed ACK? */
|
||||
@@ -1139,6 +1141,11 @@ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
|
||||
bool is_sack_reneg, struct rate_sample *rs);
|
||||
void tcp_rate_check_app_limited(struct sock *sk);
|
||||
|
||||
static inline bool tcp_skb_sent_after(u64 t1, u64 t2, u32 seq1, u32 seq2)
|
||||
{
|
||||
return t1 > t2 || (t1 == t2 && after(seq1, seq2));
|
||||
}
|
||||
|
||||
/* These functions determine how the current flow behaves in respect of SACK
|
||||
* handling. SACK is negotiated with the peer, and therefore it can vary
|
||||
* between different flows.
|
||||
|
||||
@@ -21,15 +21,33 @@ EXPORT_SYMBOL(hex_asc_upper);
|
||||
*
|
||||
* hex_to_bin() converts one hex digit to its actual value or -1 in case of bad
|
||||
* input.
|
||||
*
|
||||
* This function is used to load cryptographic keys, so it is coded in such a
|
||||
* way that there are no conditions or memory accesses that depend on data.
|
||||
*
|
||||
* Explanation of the logic:
|
||||
* (ch - '9' - 1) is negative if ch <= '9'
|
||||
* ('0' - 1 - ch) is negative if ch >= '0'
|
||||
* we "and" these two values, so the result is negative if ch is in the range
|
||||
* '0' ... '9'
|
||||
* we are only interested in the sign, so we do a shift ">> 8"; note that right
|
||||
* shift of a negative value is implementation-defined, so we cast the
|
||||
* value to (unsigned) before the shift --- we have 0xffffff if ch is in
|
||||
* the range '0' ... '9', 0 otherwise
|
||||
* we "and" this value with (ch - '0' + 1) --- we have a value 1 ... 10 if ch is
|
||||
* in the range '0' ... '9', 0 otherwise
|
||||
* we add this value to -1 --- we have a value 0 ... 9 if ch is in the range '0'
|
||||
* ... '9', -1 otherwise
|
||||
* the next line is similar to the previous one, but we need to decode both
|
||||
* uppercase and lowercase letters, so we use (ch & 0xdf), which converts
|
||||
* lowercase to uppercase
|
||||
*/
|
||||
int hex_to_bin(char ch)
|
||||
int hex_to_bin(unsigned char ch)
|
||||
{
|
||||
if ((ch >= '0') && (ch <= '9'))
|
||||
return ch - '0';
|
||||
ch = tolower(ch);
|
||||
if ((ch >= 'a') && (ch <= 'f'))
|
||||
return ch - 'a' + 10;
|
||||
return -1;
|
||||
unsigned char cu = ch & 0xdf;
|
||||
return -1 +
|
||||
((ch - '0' + 1) & (unsigned)((ch - '9' - 1) & ('0' - 1 - ch)) >> 8) +
|
||||
((cu - 'A' + 11) & (unsigned)((cu - 'F' - 1) & ('A' - 1 - cu)) >> 8);
|
||||
}
|
||||
EXPORT_SYMBOL(hex_to_bin);
|
||||
|
||||
@@ -44,10 +62,13 @@ EXPORT_SYMBOL(hex_to_bin);
|
||||
int hex2bin(u8 *dst, const char *src, size_t count)
|
||||
{
|
||||
while (count--) {
|
||||
int hi = hex_to_bin(*src++);
|
||||
int lo = hex_to_bin(*src++);
|
||||
int hi, lo;
|
||||
|
||||
if ((hi < 0) || (lo < 0))
|
||||
hi = hex_to_bin(*src++);
|
||||
if (unlikely(hi < 0))
|
||||
return -EINVAL;
|
||||
lo = hex_to_bin(*src++);
|
||||
if (unlikely(lo < 0))
|
||||
return -EINVAL;
|
||||
|
||||
*dst++ = (hi << 4) | lo;
|
||||
|
||||
@@ -2086,14 +2086,6 @@ found_highest:
|
||||
}
|
||||
|
||||
|
||||
#ifndef arch_get_mmap_end
|
||||
#define arch_get_mmap_end(addr) (TASK_SIZE)
|
||||
#endif
|
||||
|
||||
#ifndef arch_get_mmap_base
|
||||
#define arch_get_mmap_base(addr, base) (base)
|
||||
#endif
|
||||
|
||||
/* Get an address range which is currently unmapped.
|
||||
* For shmat() with addr=0.
|
||||
*
|
||||
|
||||
@@ -158,10 +158,8 @@ static int bpf_output(struct net *net, struct sock *sk, struct sk_buff *skb)
|
||||
return dst->lwtstate->orig_output(net, sk, skb);
|
||||
}
|
||||
|
||||
static int xmit_check_hhlen(struct sk_buff *skb)
|
||||
static int xmit_check_hhlen(struct sk_buff *skb, int hh_len)
|
||||
{
|
||||
int hh_len = skb_dst(skb)->dev->hard_header_len;
|
||||
|
||||
if (skb_headroom(skb) < hh_len) {
|
||||
int nhead = HH_DATA_ALIGN(hh_len - skb_headroom(skb));
|
||||
|
||||
@@ -273,6 +271,7 @@ static int bpf_xmit(struct sk_buff *skb)
|
||||
|
||||
bpf = bpf_lwt_lwtunnel(dst->lwtstate);
|
||||
if (bpf->xmit.prog) {
|
||||
int hh_len = dst->dev->hard_header_len;
|
||||
__be16 proto = skb->protocol;
|
||||
int ret;
|
||||
|
||||
@@ -290,7 +289,7 @@ static int bpf_xmit(struct sk_buff *skb)
|
||||
/* If the header was expanded, headroom might be too
|
||||
* small for L2 header to come, expand as needed.
|
||||
*/
|
||||
ret = xmit_check_hhlen(skb);
|
||||
ret = xmit_check_hhlen(skb, hh_len);
|
||||
if (unlikely(ret))
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -432,14 +432,12 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
__be16 proto)
|
||||
{
|
||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
|
||||
if (tunnel->parms.o_flags & TUNNEL_SEQ)
|
||||
tunnel->o_seqno++;
|
||||
__be16 flags = tunnel->parms.o_flags;
|
||||
|
||||
/* Push GRE header. */
|
||||
gre_build_header(skb, tunnel->tun_hlen,
|
||||
tunnel->parms.o_flags, proto, tunnel->parms.o_key,
|
||||
htonl(tunnel->o_seqno));
|
||||
flags, proto, tunnel->parms.o_key,
|
||||
(flags & TUNNEL_SEQ) ? htonl(tunnel->o_seqno++) : 0);
|
||||
|
||||
ip_tunnel_xmit(skb, dev, tnl_params, tnl_params->protocol);
|
||||
}
|
||||
|
||||
@@ -3718,7 +3718,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
|
||||
tcp_process_tlp_ack(sk, ack, flag);
|
||||
|
||||
if (tcp_ack_is_dubious(sk, flag)) {
|
||||
if (!(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP))) {
|
||||
if (!(flag & (FLAG_SND_UNA_ADVANCED |
|
||||
FLAG_NOT_DUP | FLAG_DSACKING_ACK))) {
|
||||
num_dupack = 1;
|
||||
/* Consider if pure acks were aggregated in tcp_add_backlog() */
|
||||
if (!(flag & FLAG_DATA))
|
||||
@@ -5232,7 +5233,17 @@ static void tcp_new_space(struct sock *sk)
|
||||
sk->sk_write_space(sk);
|
||||
}
|
||||
|
||||
static void tcp_check_space(struct sock *sk)
|
||||
/* Caller made space either from:
|
||||
* 1) Freeing skbs in rtx queues (after tp->snd_una has advanced)
|
||||
* 2) Sent skbs from output queue (and thus advancing tp->snd_nxt)
|
||||
*
|
||||
* We might be able to generate EPOLLOUT to the application if:
|
||||
* 1) Space consumed in output/rtx queues is below sk->sk_sndbuf/2
|
||||
* 2) notsent amount (tp->write_seq - tp->snd_nxt) became
|
||||
* small enough that tcp_stream_memory_free() decides it
|
||||
* is time to generate EPOLLOUT.
|
||||
*/
|
||||
void tcp_check_space(struct sock *sk)
|
||||
{
|
||||
if (sock_flag(sk, SOCK_QUEUE_SHRUNK)) {
|
||||
sock_reset_flag(sk, SOCK_QUEUE_SHRUNK);
|
||||
|
||||
@@ -538,7 +538,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
|
||||
newtp->tsoffset = treq->ts_off;
|
||||
#ifdef CONFIG_TCP_MD5SIG
|
||||
newtp->md5sig_info = NULL; /*XXX*/
|
||||
if (newtp->af_specific->md5_lookup(sk, newsk))
|
||||
if (treq->af_specific->req_md5_lookup(sk, req_to_sk(req)))
|
||||
newtp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED;
|
||||
#endif
|
||||
if (skb->len >= TCP_MSS_DEFAULT + newtp->tcp_header_len)
|
||||
|
||||
@@ -81,6 +81,7 @@ static void tcp_event_new_data_sent(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPORIGDATASENT,
|
||||
tcp_skb_pcount(skb));
|
||||
tcp_check_space(sk);
|
||||
}
|
||||
|
||||
/* SND.NXT, if window was not shrunk or the amount of shrunk was less than one
|
||||
|
||||
@@ -73,26 +73,31 @@ void tcp_rate_skb_sent(struct sock *sk, struct sk_buff *skb)
|
||||
*
|
||||
* If an ACK (s)acks multiple skbs (e.g., stretched-acks), this function is
|
||||
* called multiple times. We favor the information from the most recently
|
||||
* sent skb, i.e., the skb with the highest prior_delivered count.
|
||||
* sent skb, i.e., the skb with the most recently sent time and the highest
|
||||
* sequence.
|
||||
*/
|
||||
void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
|
||||
struct rate_sample *rs)
|
||||
{
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
struct tcp_skb_cb *scb = TCP_SKB_CB(skb);
|
||||
u64 tx_tstamp;
|
||||
|
||||
if (!scb->tx.delivered_mstamp)
|
||||
return;
|
||||
|
||||
tx_tstamp = tcp_skb_timestamp_us(skb);
|
||||
if (!rs->prior_delivered ||
|
||||
after(scb->tx.delivered, rs->prior_delivered)) {
|
||||
tcp_skb_sent_after(tx_tstamp, tp->first_tx_mstamp,
|
||||
scb->end_seq, rs->last_end_seq)) {
|
||||
rs->prior_delivered = scb->tx.delivered;
|
||||
rs->prior_mstamp = scb->tx.delivered_mstamp;
|
||||
rs->is_app_limited = scb->tx.is_app_limited;
|
||||
rs->is_retrans = scb->sacked & TCPCB_RETRANS;
|
||||
rs->last_end_seq = scb->end_seq;
|
||||
|
||||
/* Record send time of most recently ACKed packet: */
|
||||
tp->first_tx_mstamp = tcp_skb_timestamp_us(skb);
|
||||
tp->first_tx_mstamp = tx_tstamp;
|
||||
/* Find the duration of the "send phase" of this window: */
|
||||
rs->interval_us = tcp_stamp_us_delta(tp->first_tx_mstamp,
|
||||
scb->tx.first_tx_mstamp);
|
||||
|
||||
@@ -730,6 +730,7 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
|
||||
struct ip_tunnel_info *tun_info;
|
||||
const struct ip_tunnel_key *key;
|
||||
__be16 flags;
|
||||
int tun_hlen;
|
||||
|
||||
tun_info = skb_tunnel_info(skb);
|
||||
if (unlikely(!tun_info ||
|
||||
@@ -748,9 +749,9 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
|
||||
dsfield = key->tos;
|
||||
flags = key->tun_flags &
|
||||
(TUNNEL_CSUM | TUNNEL_KEY | TUNNEL_SEQ);
|
||||
tunnel->tun_hlen = gre_calc_hlen(flags);
|
||||
tun_hlen = gre_calc_hlen(flags);
|
||||
|
||||
gre_build_header(skb, tunnel->tun_hlen,
|
||||
gre_build_header(skb, tun_hlen,
|
||||
flags, protocol,
|
||||
tunnel_id_to_key32(tun_info->key.tun_id),
|
||||
(flags & TUNNEL_SEQ) ? htonl(tunnel->o_seqno++)
|
||||
|
||||
@@ -1421,7 +1421,7 @@ int __init ip_vs_conn_init(void)
|
||||
pr_info("Connection hash table configured "
|
||||
"(size=%d, memory=%ldKbytes)\n",
|
||||
ip_vs_conn_tab_size,
|
||||
(long)(ip_vs_conn_tab_size*sizeof(struct list_head))/1024);
|
||||
(long)(ip_vs_conn_tab_size*sizeof(*ip_vs_conn_tab))/1024);
|
||||
IP_VS_DBG(0, "Each connection entry needs %zd bytes at least\n",
|
||||
sizeof(struct ip_vs_conn));
|
||||
|
||||
|
||||
@@ -14,6 +14,32 @@ struct nft_socket {
|
||||
};
|
||||
};
|
||||
|
||||
static struct sock *nft_socket_do_lookup(const struct nft_pktinfo *pkt)
|
||||
{
|
||||
const struct net_device *indev = nft_in(pkt);
|
||||
const struct sk_buff *skb = pkt->skb;
|
||||
struct sock *sk = NULL;
|
||||
|
||||
if (!indev)
|
||||
return NULL;
|
||||
|
||||
switch (nft_pf(pkt)) {
|
||||
case NFPROTO_IPV4:
|
||||
sk = nf_sk_lookup_slow_v4(nft_net(pkt), skb, indev);
|
||||
break;
|
||||
#if IS_ENABLED(CONFIG_NF_TABLES_IPV6)
|
||||
case NFPROTO_IPV6:
|
||||
sk = nf_sk_lookup_slow_v6(nft_net(pkt), skb, indev);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
break;
|
||||
}
|
||||
|
||||
return sk;
|
||||
}
|
||||
|
||||
static void nft_socket_eval(const struct nft_expr *expr,
|
||||
struct nft_regs *regs,
|
||||
const struct nft_pktinfo *pkt)
|
||||
@@ -27,20 +53,7 @@ static void nft_socket_eval(const struct nft_expr *expr,
|
||||
sk = NULL;
|
||||
|
||||
if (!sk)
|
||||
switch(nft_pf(pkt)) {
|
||||
case NFPROTO_IPV4:
|
||||
sk = nf_sk_lookup_slow_v4(nft_net(pkt), skb, nft_in(pkt));
|
||||
break;
|
||||
#if IS_ENABLED(CONFIG_NF_TABLES_IPV6)
|
||||
case NFPROTO_IPV6:
|
||||
sk = nf_sk_lookup_slow_v6(nft_net(pkt), skb, nft_in(pkt));
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
regs->verdict.code = NFT_BREAK;
|
||||
return;
|
||||
}
|
||||
sk = nft_socket_do_lookup(pkt);
|
||||
|
||||
if (!sk) {
|
||||
regs->verdict.code = NFT_BREAK;
|
||||
@@ -123,6 +136,16 @@ static int nft_socket_dump(struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nft_socket_validate(const struct nft_ctx *ctx,
|
||||
const struct nft_expr *expr,
|
||||
const struct nft_data **data)
|
||||
{
|
||||
return nft_chain_validate_hooks(ctx->chain,
|
||||
(1 << NF_INET_PRE_ROUTING) |
|
||||
(1 << NF_INET_LOCAL_IN) |
|
||||
(1 << NF_INET_LOCAL_OUT));
|
||||
}
|
||||
|
||||
static struct nft_expr_type nft_socket_type;
|
||||
static const struct nft_expr_ops nft_socket_ops = {
|
||||
.type = &nft_socket_type,
|
||||
@@ -130,6 +153,7 @@ static const struct nft_expr_ops nft_socket_ops = {
|
||||
.eval = nft_socket_eval,
|
||||
.init = nft_socket_init,
|
||||
.dump = nft_socket_dump,
|
||||
.validate = nft_socket_validate,
|
||||
};
|
||||
|
||||
static struct nft_expr_type nft_socket_type __read_mostly = {
|
||||
|
||||
@@ -458,6 +458,10 @@ void sctp_generate_reconf_event(struct timer_list *t)
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
/* This happens when the response arrives after the timer is triggered. */
|
||||
if (!asoc->strreset_chunk)
|
||||
goto out_unlock;
|
||||
|
||||
error = sctp_do_sm(net, SCTP_EVENT_T_TIMEOUT,
|
||||
SCTP_ST_TIMEOUT(SCTP_EVENT_TIMEOUT_RECONF),
|
||||
asoc->state, asoc->ep, asoc,
|
||||
|
||||
@@ -816,6 +816,8 @@ static void smc_connect_work(struct work_struct *work)
|
||||
smc->sk.sk_state = SMC_CLOSED;
|
||||
if (rc == -EPIPE || rc == -EAGAIN)
|
||||
smc->sk.sk_err = EPIPE;
|
||||
else if (rc == -ECONNREFUSED)
|
||||
smc->sk.sk_err = ECONNREFUSED;
|
||||
else if (signal_pending(current))
|
||||
smc->sk.sk_err = -sock_intr_errno(timeo);
|
||||
sock_put(&smc->sk); /* passive closing */
|
||||
|
||||
@@ -470,11 +470,13 @@ handle_error:
|
||||
copy = min_t(size_t, size, (pfrag->size - pfrag->offset));
|
||||
copy = min_t(size_t, copy, (max_open_record_len - record->len));
|
||||
|
||||
rc = tls_device_copy_data(page_address(pfrag->page) +
|
||||
pfrag->offset, copy, msg_iter);
|
||||
if (rc)
|
||||
goto handle_error;
|
||||
tls_append_frag(record, pfrag, copy);
|
||||
if (copy) {
|
||||
rc = tls_device_copy_data(page_address(pfrag->page) +
|
||||
pfrag->offset, copy, msg_iter);
|
||||
if (rc)
|
||||
goto handle_error;
|
||||
tls_append_frag(record, pfrag, copy);
|
||||
}
|
||||
|
||||
size -= copy;
|
||||
if (!size) {
|
||||
|
||||
@@ -601,7 +601,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731)
|
||||
ret = wm8731_reset(wm8731->regmap);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Failed to issue reset: %d\n", ret);
|
||||
goto err_regulator_enable;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Clear POWEROFF, keep everything else disabled */
|
||||
@@ -618,10 +618,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731)
|
||||
|
||||
regcache_mark_dirty(wm8731->regmap);
|
||||
|
||||
err_regulator_enable:
|
||||
/* Regulators will be enabled by bias management */
|
||||
regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -765,21 +762,27 @@ static int wm8731_i2c_probe(struct i2c_client *i2c,
|
||||
ret = PTR_ERR(wm8731->regmap);
|
||||
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
goto err_regulator_enable;
|
||||
}
|
||||
|
||||
ret = wm8731_hw_init(&i2c->dev, wm8731);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
goto err_regulator_enable;
|
||||
|
||||
ret = devm_snd_soc_register_component(&i2c->dev,
|
||||
&soc_component_dev_wm8731, &wm8731_dai, 1);
|
||||
if (ret != 0) {
|
||||
dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
|
||||
return ret;
|
||||
goto err_regulator_enable;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_regulator_enable:
|
||||
/* Regulators will be enabled by bias management */
|
||||
regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wm8731_i2c_remove(struct i2c_client *client)
|
||||
|
||||
Reference in New Issue
Block a user