Merge 5.10.114 into android12-5.10-lts
Changes in 5.10.114 floppy: disable FDRAWCMD by default 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: Enable runtime PM on second Alderlake controller 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() iio: imu: inv_icm42600: Fix I2C init possible nack usb: misc: fix improper handling of refcount in uss720_probe() usb: typec: ucsi: Fix reuse of completion structure 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: Try usb-role-switch first in dwc3_drd_init usb: dwc3: core: Fix tx/rx threshold settings usb: dwc3: core: Only handle soft-reset in DCTL usb: dwc3: gadget: Return proper request status usb: cdns3: Fix issue for clear halt endpoint usb: phy: generic: Get the vbus supply 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 pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config hex2bin: make the function hex_to_bin constant-time hex2bin: fix access beyond string end riscv: patch_text: Fixup last cpu should be master x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests iocost: don't reset the inuse weight of under-weighted debtors 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 iio:imu:bmi160: disable regulator in error path 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 bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek ARM: dts: at91: sama5d4_xplained: fix pinctrl phandle name 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 pinctrl: mediatek: moore: Fix build error mtd: rawnand: Fix return value check of wait_for_completion_timeout mtd: fix 'part' field data corruption in mtd_info pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode net: dsa: Add missing of_node_put() in dsa_port_link_register_of netfilter: nft_set_rbtree: overlap detection with element re-addition after deletion bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook pinctrl: rockchip: fix RK3308 pinmux bits tcp: md5: incorrect tcp_header_len for incoming connections pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested tcp: ensure to use the most recently sent skb when filling the rate sample wireguard: device: check for metadata_dst with skb_valid_dst() 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: modify the return code of hclge_get_ring_chain_from_mbx net: hns3: add validity check for message data length net: hns3: add return value for mailbox handling in PF net/smc: sync err code when tcp connection was refused ip_gre: Make o_seqno start from 0 in native mode ip6_gre: Make o_seqno start from 0 in native mode ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT tcp: make sure treq->af_specific is initialized 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: phy: marvell10g: fix return value on error net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK drm/amdkfd: Fix GWS queue count 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 net: fec: add missing of_node_put() in fec_enet_init_stop_mode() ixgbe: ensure IPsec VF<->PF compatibility ibmvnic: fix miscellaneous checks Revert "ibmvnic: Add ethtool private flag for driver-defined queue limits" tcp: fix F-RTO may not work correctly when receiving DSACK ASoC: Intel: soc-acpi: correct device endpoints for max98373 ASoC: wm8731: Disable the regulator when probing fails ext4: fix bug_on in start_this_handle during umount filesystem 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() powerpc/perf: Fix 32bit compile zonefs: Fix management of open zones zonefs: Clear inode information flags on inode creation kasan: prevent cpu_quarantine corruption when CPU offline and cache shrink occur at same time drm/i915: Fix SEL_FETCH_PLANE_*(PIPE_B+) register addresses net: ethernet: stmmac: fix write to sgmii_adapter_base thermal: int340x: Fix attr.show callback prototype x86/cpu: Load microcode during restore_processor_state() perf symbol: Pass is_kallsyms to symbols__fixup_end() perf symbol: Update symbols__fixup_end() tty: n_gsm: fix restart handling via CLD command tty: n_gsm: fix decoupled mux resource tty: n_gsm: fix mux cleanup after unregister tty device 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 wrong DLCI release order 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 reset fifo race condition tty: n_gsm: fix incorrect UA handling tty: n_gsm: fix software flow control handling perf symbol: Remove arch__symbols__fixup_end() Linux 5.10.114 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I5bae5ef7c58046213b62c82599707f569a955337
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 113
|
||||
SUBLEVEL = 114
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
@@ -161,6 +161,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>;
|
||||
@@ -168,7 +170,9 @@
|
||||
};
|
||||
|
||||
&davinci_emac {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <ðernet_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
@@ -193,6 +197,8 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins>;
|
||||
clock-frequency = <400000>;
|
||||
/* User DIP swithes [1:8] / User LEDS [1:2] */
|
||||
tca6416: gpio@21 {
|
||||
@@ -205,6 +211,8 @@
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c3_pins>;
|
||||
clock-frequency = <400000>;
|
||||
};
|
||||
|
||||
@@ -223,6 +231,8 @@
|
||||
};
|
||||
|
||||
&usbhshost {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_pins>;
|
||||
port1-mode = "ehci-phy";
|
||||
};
|
||||
|
||||
@@ -231,8 +241,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 = <
|
||||
@@ -300,8 +337,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 */
|
||||
|
@@ -91,7 +91,7 @@
|
||||
|
||||
spi1: spi@fc018000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_spi0_cs>;
|
||||
pinctrl-0 = <&pinctrl_spi1_cs>;
|
||||
cs-gpios = <&pioB 21 0>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -149,7 +149,7 @@
|
||||
atmel,pins =
|
||||
<AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
|
||||
};
|
||||
pinctrl_spi0_cs: spi0_cs_default {
|
||||
pinctrl_spi1_cs: spi1_cs_default {
|
||||
atmel,pins =
|
||||
<AT91_PIOB 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
@@ -219,6 +219,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>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -286,6 +286,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>;
|
||||
@@ -516,8 +518,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,omap3430", "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 {
|
||||
|
@@ -20,7 +20,6 @@ menuconfig ARCH_EXYNOS
|
||||
select EXYNOS_PMU
|
||||
select EXYNOS_SROM
|
||||
select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS
|
||||
select GPIOLIB
|
||||
select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
|
@@ -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>;
|
||||
@@ -76,26 +56,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>;
|
||||
|
@@ -95,26 +95,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>;
|
||||
|
@@ -59,6 +59,10 @@
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_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";
|
||||
|
@@ -5,11 +5,11 @@ ifdef CONFIG_COMPAT
|
||||
obj-$(CONFIG_PERF_EVENTS) += callchain_32.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_PPC_PERF_CTRS) += core-book3s.o bhrb.o
|
||||
obj-$(CONFIG_PPC_PERF_CTRS) += core-book3s.o
|
||||
obj64-$(CONFIG_PPC_PERF_CTRS) += ppc970-pmu.o power5-pmu.o \
|
||||
power5+-pmu.o power6-pmu.o power7-pmu.o \
|
||||
isa207-common.o power8-pmu.o power9-pmu.o \
|
||||
generic-compat-pmu.o power10-pmu.o
|
||||
generic-compat-pmu.o power10-pmu.o bhrb.o
|
||||
obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o
|
||||
|
||||
obj-$(CONFIG_PPC_POWERNV) += imc-pmu.o
|
||||
|
@@ -100,7 +100,7 @@ static int patch_text_cb(void *data)
|
||||
struct patch_insn *patch = data;
|
||||
int ret = 0;
|
||||
|
||||
if (atomic_inc_return(&patch->cpu_count) == 1) {
|
||||
if (atomic_inc_return(&patch->cpu_count) == num_online_cpus()) {
|
||||
ret =
|
||||
patch_text_nosync(patch->addr, &patch->insn,
|
||||
GET_INSN_LENGTH(patch->insn));
|
||||
|
@@ -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
|
||||
|
@@ -775,9 +775,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;
|
||||
@@ -789,7 +789,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)
|
||||
|
@@ -121,7 +121,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);
|
||||
|
@@ -476,7 +476,6 @@ static __init void xen_setup_pci_msi(void)
|
||||
xen_msi_ops.setup_msi_irqs = xen_setup_msi_irqs;
|
||||
}
|
||||
xen_msi_ops.teardown_msi_irqs = xen_pv_teardown_msi_irqs;
|
||||
pci_msi_ignore_mask = 1;
|
||||
} else if (xen_hvm_domain()) {
|
||||
xen_msi_ops.setup_msi_irqs = xen_hvm_setup_msi_irqs;
|
||||
xen_msi_ops.teardown_msi_irqs = xen_teardown_msi_irqs;
|
||||
@@ -490,6 +489,11 @@ static __init void xen_setup_pci_msi(void)
|
||||
* in allocating the native domain and never use it.
|
||||
*/
|
||||
x86_init.irqs.create_pci_msi_domain = xen_create_pci_msi_domain;
|
||||
/*
|
||||
* With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely
|
||||
* controlled by the hypervisor.
|
||||
*/
|
||||
pci_msi_ignore_mask = 1;
|
||||
}
|
||||
|
||||
#else /* CONFIG_PCI_MSI */
|
||||
|
@@ -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;
|
||||
@@ -265,11 +266,18 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
|
||||
x86_platform.restore_sched_clock_state();
|
||||
mtrr_bp_restore();
|
||||
perf_restore_debug_store();
|
||||
msr_restore_context(ctxt);
|
||||
|
||||
c = &cpu_data(smp_processor_id());
|
||||
if (cpu_has(c, X86_FEATURE_MSR_IA32_FEAT_CTL))
|
||||
init_ia32_feat_ctl(c);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/* Needed by apm.c */
|
||||
|
@@ -2257,7 +2257,17 @@ static void ioc_timer_fn(struct timer_list *timer)
|
||||
iocg->hweight_donating = hwa;
|
||||
iocg->hweight_after_donation = new_hwi;
|
||||
list_add(&iocg->surplus_list, &surpluses);
|
||||
} else {
|
||||
} else if (!iocg->abs_vdebt) {
|
||||
/*
|
||||
* @iocg doesn't have enough to donate. Reset
|
||||
* its inuse to active.
|
||||
*
|
||||
* Don't reset debtors as their inuse's are
|
||||
* owned by debt handling. This shouldn't affect
|
||||
* donation calculuation in any meaningful way
|
||||
* as @iocg doesn't have a meaningful amount of
|
||||
* share anyway.
|
||||
*/
|
||||
TRACE_IOCG_PATH(inuse_shortage, iocg, &now,
|
||||
iocg->inuse, iocg->active,
|
||||
iocg->hweight_inuse, new_hwi);
|
||||
|
@@ -526,7 +526,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
|
||||
|
@@ -3069,6 +3069,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)
|
||||
{
|
||||
@@ -3273,6 +3275,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 */
|
||||
@@ -3461,7 +3492,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(drive_state[drive].fd_device);
|
||||
int i;
|
||||
int ret;
|
||||
int size;
|
||||
union inparam {
|
||||
@@ -3612,16 +3642,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int
|
||||
outparam = &write_errors[drive];
|
||||
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);
|
||||
|
||||
|
@@ -3130,13 +3130,27 @@ static int sysc_check_disabled_devices(struct sysc *ddata)
|
||||
*/
|
||||
static int sysc_check_active_timer(struct sysc *ddata)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (ddata->cap->type != TI_SYSC_OMAP2_TIMER &&
|
||||
ddata->cap->type != TI_SYSC_OMAP4_TIMER)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Quirk for omap3 beagleboard revision A to B4 to use gpt12.
|
||||
* Revision C and later are fixed with commit 23885389dbbb ("ARM:
|
||||
* dts: Fix timer regression for beagleboard revision c"). This all
|
||||
* can be dropped if we stop supporting old beagleboard revisions
|
||||
* A to B4 at some point.
|
||||
*/
|
||||
if (sysc_soc->soc == SOC_3430)
|
||||
error = -ENXIO;
|
||||
else
|
||||
error = -EBUSY;
|
||||
|
||||
if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
|
||||
(ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
|
||||
return -ENXIO;
|
||||
return error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -138,19 +138,33 @@ void program_sh_mem_settings(struct device_queue_manager *dqm,
|
||||
}
|
||||
|
||||
static void increment_queue_count(struct device_queue_manager *dqm,
|
||||
enum kfd_queue_type type)
|
||||
struct qcm_process_device *qpd,
|
||||
struct queue *q)
|
||||
{
|
||||
dqm->active_queue_count++;
|
||||
if (type == KFD_QUEUE_TYPE_COMPUTE || type == KFD_QUEUE_TYPE_DIQ)
|
||||
if (q->properties.type == KFD_QUEUE_TYPE_COMPUTE ||
|
||||
q->properties.type == KFD_QUEUE_TYPE_DIQ)
|
||||
dqm->active_cp_queue_count++;
|
||||
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count++;
|
||||
qpd->mapped_gws_queue = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void decrement_queue_count(struct device_queue_manager *dqm,
|
||||
enum kfd_queue_type type)
|
||||
struct qcm_process_device *qpd,
|
||||
struct queue *q)
|
||||
{
|
||||
dqm->active_queue_count--;
|
||||
if (type == KFD_QUEUE_TYPE_COMPUTE || type == KFD_QUEUE_TYPE_DIQ)
|
||||
if (q->properties.type == KFD_QUEUE_TYPE_COMPUTE ||
|
||||
q->properties.type == KFD_QUEUE_TYPE_DIQ)
|
||||
dqm->active_cp_queue_count--;
|
||||
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
|
||||
static int allocate_doorbell(struct qcm_process_device *qpd, struct queue *q)
|
||||
@@ -377,7 +391,7 @@ add_queue_to_list:
|
||||
list_add(&q->list, &qpd->queues_list);
|
||||
qpd->queue_count++;
|
||||
if (q->properties.is_active)
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
increment_queue_count(dqm, qpd, q);
|
||||
|
||||
/*
|
||||
* Unconditionally increment this counter, regardless of the queue's
|
||||
@@ -502,13 +516,8 @@ static int destroy_queue_nocpsch_locked(struct device_queue_manager *dqm,
|
||||
deallocate_vmid(dqm, qpd, q);
|
||||
}
|
||||
qpd->queue_count--;
|
||||
if (q->properties.is_active) {
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
if (q->properties.is_active)
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -598,12 +607,11 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q)
|
||||
* dqm->active_queue_count to determine whether a new runlist must be
|
||||
* uploaded.
|
||||
*/
|
||||
if (q->properties.is_active && !prev_active)
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
else if (!q->properties.is_active && prev_active)
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
|
||||
if (q->gws && !q->properties.is_gws) {
|
||||
if (q->properties.is_active && !prev_active) {
|
||||
increment_queue_count(dqm, &pdd->qpd, q);
|
||||
} else if (!q->properties.is_active && prev_active) {
|
||||
decrement_queue_count(dqm, &pdd->qpd, q);
|
||||
} else if (q->gws && !q->properties.is_gws) {
|
||||
if (q->properties.is_active) {
|
||||
dqm->gws_queue_count++;
|
||||
pdd->qpd.mapped_gws_queue = true;
|
||||
@@ -665,11 +673,7 @@ static int evict_process_queues_nocpsch(struct device_queue_manager *dqm,
|
||||
mqd_mgr = dqm->mqd_mgrs[get_mqd_type_from_queue_type(
|
||||
q->properties.type)];
|
||||
q->properties.is_active = false;
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
|
||||
if (WARN_ONCE(!dqm->sched_running, "Evict when stopped\n"))
|
||||
continue;
|
||||
@@ -713,7 +717,7 @@ static int evict_process_queues_cpsch(struct device_queue_manager *dqm,
|
||||
continue;
|
||||
|
||||
q->properties.is_active = false;
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
}
|
||||
pdd->last_evict_timestamp = get_jiffies_64();
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
@@ -784,11 +788,7 @@ static int restore_process_queues_nocpsch(struct device_queue_manager *dqm,
|
||||
mqd_mgr = dqm->mqd_mgrs[get_mqd_type_from_queue_type(
|
||||
q->properties.type)];
|
||||
q->properties.is_active = true;
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count++;
|
||||
qpd->mapped_gws_queue = true;
|
||||
}
|
||||
increment_queue_count(dqm, qpd, q);
|
||||
|
||||
if (WARN_ONCE(!dqm->sched_running, "Restore when stopped\n"))
|
||||
continue;
|
||||
@@ -846,7 +846,7 @@ static int restore_process_queues_cpsch(struct device_queue_manager *dqm,
|
||||
continue;
|
||||
|
||||
q->properties.is_active = true;
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
increment_queue_count(dqm, &pdd->qpd, q);
|
||||
}
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
@@ -1247,7 +1247,7 @@ static int create_kernel_queue_cpsch(struct device_queue_manager *dqm,
|
||||
dqm->total_queue_count);
|
||||
|
||||
list_add(&kq->list, &qpd->priv_queue_list);
|
||||
increment_queue_count(dqm, kq->queue->properties.type);
|
||||
increment_queue_count(dqm, qpd, kq->queue);
|
||||
qpd->is_debug = true;
|
||||
execute_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
dqm_unlock(dqm);
|
||||
@@ -1261,7 +1261,7 @@ static void destroy_kernel_queue_cpsch(struct device_queue_manager *dqm,
|
||||
{
|
||||
dqm_lock(dqm);
|
||||
list_del(&kq->list);
|
||||
decrement_queue_count(dqm, kq->queue->properties.type);
|
||||
decrement_queue_count(dqm, qpd, kq->queue);
|
||||
qpd->is_debug = false;
|
||||
execute_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0);
|
||||
/*
|
||||
@@ -1328,7 +1328,7 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,
|
||||
qpd->queue_count++;
|
||||
|
||||
if (q->properties.is_active) {
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
increment_queue_count(dqm, qpd, q);
|
||||
|
||||
execute_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
@@ -1513,15 +1513,11 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
|
||||
list_del(&q->list);
|
||||
qpd->queue_count--;
|
||||
if (q->properties.is_active) {
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
if (retval == -ETIME)
|
||||
qpd->reset_wavefronts = true;
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1732,7 +1728,7 @@ static int process_termination_cpsch(struct device_queue_manager *dqm,
|
||||
/* Clean all kernel queues */
|
||||
list_for_each_entry_safe(kq, kq_next, &qpd->priv_queue_list, list) {
|
||||
list_del(&kq->list);
|
||||
decrement_queue_count(dqm, kq->queue->properties.type);
|
||||
decrement_queue_count(dqm, qpd, kq->queue);
|
||||
qpd->is_debug = false;
|
||||
dqm->total_queue_count--;
|
||||
filter = KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES;
|
||||
@@ -1745,13 +1741,8 @@ static int process_termination_cpsch(struct device_queue_manager *dqm,
|
||||
else if (q->properties.type == KFD_QUEUE_TYPE_SDMA_XGMI)
|
||||
deallocate_sdma_queue(dqm, q);
|
||||
|
||||
if (q->properties.is_active) {
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
if (q->properties.is_active)
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
|
||||
dqm->total_queue_count--;
|
||||
}
|
||||
|
@@ -1267,6 +1267,7 @@ static struct clock_source *dcn21_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -7202,7 +7202,7 @@ enum {
|
||||
#define _SEL_FETCH_PLANE_BASE_6_A 0x70940
|
||||
#define _SEL_FETCH_PLANE_BASE_7_A 0x70960
|
||||
#define _SEL_FETCH_PLANE_BASE_CUR_A 0x70880
|
||||
#define _SEL_FETCH_PLANE_BASE_1_B 0x70990
|
||||
#define _SEL_FETCH_PLANE_BASE_1_B 0x71890
|
||||
|
||||
#define _SEL_FETCH_PLANE_BASE_A(plane) _PICK(plane, \
|
||||
_SEL_FETCH_PLANE_BASE_1_A, \
|
||||
|
@@ -178,7 +178,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;
|
||||
|
@@ -523,7 +523,7 @@ static int ad5592r_alloc_channels(struct iio_dev *iio_dev)
|
||||
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;
|
||||
}
|
||||
|
@@ -731,7 +731,7 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
|
||||
|
||||
ret = regmap_write(data->regmap, BMI160_REG_CMD, BMI160_CMD_SOFTRESET);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
|
||||
usleep_range(BMI160_SOFTRESET_USLEEP, BMI160_SOFTRESET_USLEEP + 1);
|
||||
|
||||
@@ -742,29 +742,37 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
|
||||
if (use_spi) {
|
||||
ret = regmap_read(data->regmap, BMI160_REG_DUMMY, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
}
|
||||
|
||||
ret = regmap_read(data->regmap, BMI160_REG_CHIP_ID, &val);
|
||||
if (ret) {
|
||||
dev_err(dev, "Error reading chip id\n");
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
}
|
||||
if (val != BMI160_CHIP_ID_VAL) {
|
||||
dev_err(dev, "Wrong chip id, got %x expected %x\n",
|
||||
val, BMI160_CHIP_ID_VAL);
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto disable_regulator;
|
||||
}
|
||||
|
||||
ret = bmi160_set_mode(data, BMI160_ACCEL, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
|
||||
ret = bmi160_set_mode(data, BMI160_GYRO, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_accel;
|
||||
|
||||
return 0;
|
||||
|
||||
disable_accel:
|
||||
bmi160_set_mode(data, BMI160_ACCEL, false);
|
||||
|
||||
disable_regulator:
|
||||
regulator_bulk_disable(ARRAY_SIZE(data->supplies), data->supplies);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int bmi160_data_rdy_trigger_set_state(struct iio_trigger *trig,
|
||||
|
@@ -18,12 +18,15 @@ static int inv_icm42600_i2c_bus_setup(struct inv_icm42600_state *st)
|
||||
unsigned int mask, val;
|
||||
int ret;
|
||||
|
||||
/* setup interface registers */
|
||||
ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6,
|
||||
INV_ICM42600_INTF_CONFIG6_MASK,
|
||||
INV_ICM42600_INTF_CONFIG6_I3C_EN);
|
||||
if (ret)
|
||||
return ret;
|
||||
/*
|
||||
* setup interface registers
|
||||
* This register write to REG_INTF_CONFIG6 enables a spike filter that
|
||||
* is impacting the line and can prevent the I2C ACK to be seen by the
|
||||
* controller. So we don't test the return value.
|
||||
*/
|
||||
regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6,
|
||||
INV_ICM42600_INTF_CONFIG6_MASK,
|
||||
INV_ICM42600_INTF_CONFIG6_I3C_EN);
|
||||
|
||||
ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG4,
|
||||
INV_ICM42600_INTF_CONFIG4_I3C_BUS_ONLY, 0);
|
||||
|
@@ -389,6 +389,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.
|
||||
|
||||
|
@@ -163,25 +163,39 @@ static const struct regmap_access_table rpcif_volatile_table = {
|
||||
|
||||
|
||||
/*
|
||||
* Custom accessor functions to ensure SMRDR0 and SMWDR0 are always accessed
|
||||
* with proper width. Requires SMENR_SPIDE to be correctly set before!
|
||||
* Custom accessor functions to ensure SM[RW]DR[01] are always accessed with
|
||||
* proper width. Requires rpcif.xfer_size to be correctly set before!
|
||||
*/
|
||||
static int rpcif_reg_read(void *context, unsigned int reg, unsigned int *val)
|
||||
{
|
||||
struct rpcif *rpc = context;
|
||||
|
||||
if (reg == RPCIF_SMRDR0 || reg == RPCIF_SMWDR0) {
|
||||
u32 spide = readl(rpc->base + RPCIF_SMENR) & RPCIF_SMENR_SPIDE(0xF);
|
||||
|
||||
if (spide == 0x8) {
|
||||
switch (reg) {
|
||||
case RPCIF_SMRDR0:
|
||||
case RPCIF_SMWDR0:
|
||||
switch (rpc->xfer_size) {
|
||||
case 1:
|
||||
*val = readb(rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide == 0xC) {
|
||||
|
||||
case 2:
|
||||
*val = readw(rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide != 0xF) {
|
||||
|
||||
case 4:
|
||||
case 8:
|
||||
*val = readl(rpc->base + reg);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -EILSEQ;
|
||||
}
|
||||
|
||||
case RPCIF_SMRDR1:
|
||||
case RPCIF_SMWDR1:
|
||||
if (rpc->xfer_size != 8)
|
||||
return -EILSEQ;
|
||||
break;
|
||||
}
|
||||
|
||||
*val = readl(rpc->base + reg);
|
||||
@@ -193,18 +207,34 @@ static int rpcif_reg_write(void *context, unsigned int reg, unsigned int val)
|
||||
{
|
||||
struct rpcif *rpc = context;
|
||||
|
||||
if (reg == RPCIF_SMRDR0 || reg == RPCIF_SMWDR0) {
|
||||
u32 spide = readl(rpc->base + RPCIF_SMENR) & RPCIF_SMENR_SPIDE(0xF);
|
||||
|
||||
if (spide == 0x8) {
|
||||
switch (reg) {
|
||||
case RPCIF_SMWDR0:
|
||||
switch (rpc->xfer_size) {
|
||||
case 1:
|
||||
writeb(val, rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide == 0xC) {
|
||||
|
||||
case 2:
|
||||
writew(val, rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide != 0xF) {
|
||||
|
||||
case 4:
|
||||
case 8:
|
||||
writel(val, rpc->base + reg);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -EILSEQ;
|
||||
}
|
||||
|
||||
case RPCIF_SMWDR1:
|
||||
if (rpc->xfer_size != 8)
|
||||
return -EILSEQ;
|
||||
break;
|
||||
|
||||
case RPCIF_SMRDR0:
|
||||
case RPCIF_SMRDR1:
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
writel(val, rpc->base + reg);
|
||||
@@ -455,6 +485,7 @@ int rpcif_manual_xfer(struct rpcif *rpc)
|
||||
|
||||
smenr |= RPCIF_SMENR_SPIDE(rpcif_bits_set(rpc, nbytes));
|
||||
regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
|
||||
rpc->xfer_size = nbytes;
|
||||
|
||||
memcpy(data, rpc->buffer + pos, nbytes);
|
||||
if (nbytes == 8) {
|
||||
@@ -519,6 +550,7 @@ int rpcif_manual_xfer(struct rpcif *rpc)
|
||||
regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
|
||||
regmap_write(rpc->regmap, RPCIF_SMCR,
|
||||
rpc->smcr | RPCIF_SMCR_SPIE);
|
||||
rpc->xfer_size = nbytes;
|
||||
ret = wait_msg_xfer_end(rpc);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
|
@@ -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 */
|
||||
|
@@ -1629,9 +1629,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:
|
||||
|
@@ -14213,10 +14213,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);
|
||||
@@ -14321,6 +14317,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 */
|
||||
|
@@ -1987,6 +1987,11 @@ static struct sk_buff *bcmgenet_add_tsb(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);
|
||||
@@ -2093,6 +2098,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 */
|
||||
|
@@ -3529,7 +3529,7 @@ static int fec_enet_init_stop_mode(struct fec_enet_private *fep,
|
||||
ARRAY_SIZE(out_val));
|
||||
if (ret) {
|
||||
dev_dbg(&fep->pdev->dev, "no stop mode property\n");
|
||||
return ret;
|
||||
goto out;
|
||||
}
|
||||
|
||||
fep->stop_gpr.gpr = syscon_node_to_regmap(gpr_np);
|
||||
|
@@ -91,6 +91,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);
|
||||
@@ -173,7 +180,7 @@ static int hclge_get_ring_chain_from_mbx(
|
||||
ring_num = req->msg.ring_num;
|
||||
|
||||
if (ring_num > HCLGE_MBX_MAX_RING_CHAIN_PARAM_NUM)
|
||||
return -ENOMEM;
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < ring_num; i++) {
|
||||
if (req->msg.param[i].tqp_index >= vport->nic.kinfo.rss_size) {
|
||||
@@ -577,9 +584,9 @@ static int hclge_set_vf_mtu(struct hclge_vport *vport,
|
||||
return hclge_set_vport_mtu(vport, mtu);
|
||||
}
|
||||
|
||||
static void hclge_get_queue_id_in_pf(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
static int hclge_get_queue_id_in_pf(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
{
|
||||
struct hnae3_handle *handle = &vport->nic;
|
||||
struct hclge_dev *hdev = vport->back;
|
||||
@@ -589,17 +596,18 @@ static void hclge_get_queue_id_in_pf(struct hclge_vport *vport,
|
||||
if (queue_id >= handle->kinfo.num_tqps) {
|
||||
dev_err(&hdev->pdev->dev, "Invalid queue id(%u) from VF %u\n",
|
||||
queue_id, mbx_req->mbx_src_vfid);
|
||||
return;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
qid_in_pf = hclge_covert_handle_qid_global(&vport->nic, queue_id);
|
||||
memcpy(resp_msg->data, &qid_in_pf, sizeof(qid_in_pf));
|
||||
resp_msg->len = sizeof(qid_in_pf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hclge_get_rss_key(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
static int hclge_get_rss_key(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
{
|
||||
#define HCLGE_RSS_MBX_RESP_LEN 8
|
||||
struct hclge_dev *hdev = vport->back;
|
||||
@@ -615,13 +623,14 @@ static void hclge_get_rss_key(struct hclge_vport *vport,
|
||||
dev_warn(&hdev->pdev->dev,
|
||||
"failed to get the rss hash key, the index(%u) invalid !\n",
|
||||
index);
|
||||
return;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
memcpy(resp_msg->data,
|
||||
&hdev->vport[0].rss_hash_key[index * HCLGE_RSS_MBX_RESP_LEN],
|
||||
HCLGE_RSS_MBX_RESP_LEN);
|
||||
resp_msg->len = HCLGE_RSS_MBX_RESP_LEN;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hclge_link_fail_parse(struct hclge_dev *hdev, u8 link_fail_code)
|
||||
@@ -800,10 +809,10 @@ void hclge_mbx_handler(struct hclge_dev *hdev)
|
||||
"VF fail(%d) to set mtu\n", ret);
|
||||
break;
|
||||
case HCLGE_MBX_GET_QID_IN_PF:
|
||||
hclge_get_queue_id_in_pf(vport, req, &resp_msg);
|
||||
ret = hclge_get_queue_id_in_pf(vport, req, &resp_msg);
|
||||
break;
|
||||
case HCLGE_MBX_GET_RSS_KEY:
|
||||
hclge_get_rss_key(vport, req, &resp_msg);
|
||||
ret = hclge_get_rss_key(vport, req, &resp_msg);
|
||||
break;
|
||||
case HCLGE_MBX_GET_LINK_MODE:
|
||||
hclge_get_link_mode(vport, req);
|
||||
|
@@ -117,7 +117,7 @@ struct ibmvnic_stat {
|
||||
|
||||
#define IBMVNIC_STAT_OFF(stat) (offsetof(struct ibmvnic_adapter, stats) + \
|
||||
offsetof(struct ibmvnic_statistics, stat))
|
||||
#define IBMVNIC_GET_STAT(a, off) (*((u64 *)(((unsigned long)(a)) + off)))
|
||||
#define IBMVNIC_GET_STAT(a, off) (*((u64 *)(((unsigned long)(a)) + (off))))
|
||||
|
||||
static const struct ibmvnic_stat ibmvnic_stats[] = {
|
||||
{"rx_packets", IBMVNIC_STAT_OFF(rx_packets)},
|
||||
@@ -2063,14 +2063,14 @@ static int do_reset(struct ibmvnic_adapter *adapter,
|
||||
rc = reset_tx_pools(adapter);
|
||||
if (rc) {
|
||||
netdev_dbg(adapter->netdev, "reset tx pools failed (%d)\n",
|
||||
rc);
|
||||
rc);
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = reset_rx_pools(adapter);
|
||||
if (rc) {
|
||||
netdev_dbg(adapter->netdev, "reset rx pools failed (%d)\n",
|
||||
rc);
|
||||
rc);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
@@ -2331,7 +2331,8 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
|
||||
|
||||
if (adapter->state == VNIC_PROBING) {
|
||||
netdev_warn(netdev, "Adapter reset during probe\n");
|
||||
ret = adapter->init_done_rc = EAGAIN;
|
||||
adapter->init_done_rc = EAGAIN;
|
||||
ret = EAGAIN;
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -2665,13 +2666,8 @@ static void ibmvnic_get_ringparam(struct net_device *netdev,
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
if (adapter->priv_flags & IBMVNIC_USE_SERVER_MAXES) {
|
||||
ring->rx_max_pending = adapter->max_rx_add_entries_per_subcrq;
|
||||
ring->tx_max_pending = adapter->max_tx_entries_per_subcrq;
|
||||
} else {
|
||||
ring->rx_max_pending = IBMVNIC_MAX_QUEUE_SZ;
|
||||
ring->tx_max_pending = IBMVNIC_MAX_QUEUE_SZ;
|
||||
}
|
||||
ring->rx_max_pending = adapter->max_rx_add_entries_per_subcrq;
|
||||
ring->tx_max_pending = adapter->max_tx_entries_per_subcrq;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = adapter->req_rx_add_entries_per_subcrq;
|
||||
@@ -2684,23 +2680,21 @@ static int ibmvnic_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
int ret;
|
||||
|
||||
ret = 0;
|
||||
if (ring->rx_pending > adapter->max_rx_add_entries_per_subcrq ||
|
||||
ring->tx_pending > adapter->max_tx_entries_per_subcrq) {
|
||||
netdev_err(netdev, "Invalid request.\n");
|
||||
netdev_err(netdev, "Max tx buffers = %llu\n",
|
||||
adapter->max_rx_add_entries_per_subcrq);
|
||||
netdev_err(netdev, "Max rx buffers = %llu\n",
|
||||
adapter->max_tx_entries_per_subcrq);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
adapter->desired.rx_entries = ring->rx_pending;
|
||||
adapter->desired.tx_entries = ring->tx_pending;
|
||||
|
||||
ret = wait_for_reset(adapter);
|
||||
|
||||
if (!ret &&
|
||||
(adapter->req_rx_add_entries_per_subcrq != ring->rx_pending ||
|
||||
adapter->req_tx_entries_per_subcrq != ring->tx_pending))
|
||||
netdev_info(netdev,
|
||||
"Could not match full ringsize request. Requested: RX %d, TX %d; Allowed: RX %llu, TX %llu\n",
|
||||
ring->rx_pending, ring->tx_pending,
|
||||
adapter->req_rx_add_entries_per_subcrq,
|
||||
adapter->req_tx_entries_per_subcrq);
|
||||
return ret;
|
||||
return wait_for_reset(adapter);
|
||||
}
|
||||
|
||||
static void ibmvnic_get_channels(struct net_device *netdev,
|
||||
@@ -2708,14 +2702,8 @@ static void ibmvnic_get_channels(struct net_device *netdev,
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
if (adapter->priv_flags & IBMVNIC_USE_SERVER_MAXES) {
|
||||
channels->max_rx = adapter->max_rx_queues;
|
||||
channels->max_tx = adapter->max_tx_queues;
|
||||
} else {
|
||||
channels->max_rx = IBMVNIC_MAX_QUEUES;
|
||||
channels->max_tx = IBMVNIC_MAX_QUEUES;
|
||||
}
|
||||
|
||||
channels->max_rx = adapter->max_rx_queues;
|
||||
channels->max_tx = adapter->max_tx_queues;
|
||||
channels->max_other = 0;
|
||||
channels->max_combined = 0;
|
||||
channels->rx_count = adapter->req_rx_queues;
|
||||
@@ -2728,23 +2716,11 @@ static int ibmvnic_set_channels(struct net_device *netdev,
|
||||
struct ethtool_channels *channels)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
int ret;
|
||||
|
||||
ret = 0;
|
||||
adapter->desired.rx_queues = channels->rx_count;
|
||||
adapter->desired.tx_queues = channels->tx_count;
|
||||
|
||||
ret = wait_for_reset(adapter);
|
||||
|
||||
if (!ret &&
|
||||
(adapter->req_rx_queues != channels->rx_count ||
|
||||
adapter->req_tx_queues != channels->tx_count))
|
||||
netdev_info(netdev,
|
||||
"Could not match full channels request. Requested: RX %d, TX %d; Allowed: RX %llu, TX %llu\n",
|
||||
channels->rx_count, channels->tx_count,
|
||||
adapter->req_rx_queues, adapter->req_tx_queues);
|
||||
return ret;
|
||||
|
||||
return wait_for_reset(adapter);
|
||||
}
|
||||
|
||||
static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
||||
@@ -2752,43 +2728,32 @@ static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(dev);
|
||||
int i;
|
||||
|
||||
switch (stringset) {
|
||||
case ETH_SS_STATS:
|
||||
for (i = 0; i < ARRAY_SIZE(ibmvnic_stats);
|
||||
i++, data += ETH_GSTRING_LEN)
|
||||
memcpy(data, ibmvnic_stats[i].name, ETH_GSTRING_LEN);
|
||||
|
||||
for (i = 0; i < adapter->req_tx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN,
|
||||
"tx%d_dropped_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
|
||||
for (i = 0; i < adapter->req_rx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_interrupts", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
break;
|
||||
|
||||
case ETH_SS_PRIV_FLAGS:
|
||||
for (i = 0; i < ARRAY_SIZE(ibmvnic_priv_flags); i++)
|
||||
strcpy(data + i * ETH_GSTRING_LEN,
|
||||
ibmvnic_priv_flags[i]);
|
||||
break;
|
||||
default:
|
||||
if (stringset != ETH_SS_STATS)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++, data += ETH_GSTRING_LEN)
|
||||
memcpy(data, ibmvnic_stats[i].name, ETH_GSTRING_LEN);
|
||||
|
||||
for (i = 0; i < adapter->req_tx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_dropped_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
|
||||
for (i = 0; i < adapter->req_rx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_interrupts", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2801,8 +2766,6 @@ static int ibmvnic_get_sset_count(struct net_device *dev, int sset)
|
||||
return ARRAY_SIZE(ibmvnic_stats) +
|
||||
adapter->req_tx_queues * NUM_TX_STATS +
|
||||
adapter->req_rx_queues * NUM_RX_STATS;
|
||||
case ETH_SS_PRIV_FLAGS:
|
||||
return ARRAY_SIZE(ibmvnic_priv_flags);
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -2833,8 +2796,8 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev,
|
||||
return;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++)
|
||||
data[i] = be64_to_cpu(IBMVNIC_GET_STAT(adapter,
|
||||
ibmvnic_stats[i].offset));
|
||||
data[i] = be64_to_cpu(IBMVNIC_GET_STAT
|
||||
(adapter, ibmvnic_stats[i].offset));
|
||||
|
||||
for (j = 0; j < adapter->req_tx_queues; j++) {
|
||||
data[i] = adapter->tx_stats_buffers[j].packets;
|
||||
@@ -2855,25 +2818,6 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
static u32 ibmvnic_get_priv_flags(struct net_device *netdev)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
return adapter->priv_flags;
|
||||
}
|
||||
|
||||
static int ibmvnic_set_priv_flags(struct net_device *netdev, u32 flags)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
bool which_maxes = !!(flags & IBMVNIC_USE_SERVER_MAXES);
|
||||
|
||||
if (which_maxes)
|
||||
adapter->priv_flags |= IBMVNIC_USE_SERVER_MAXES;
|
||||
else
|
||||
adapter->priv_flags &= ~IBMVNIC_USE_SERVER_MAXES;
|
||||
|
||||
return 0;
|
||||
}
|
||||
static const struct ethtool_ops ibmvnic_ethtool_ops = {
|
||||
.get_drvinfo = ibmvnic_get_drvinfo,
|
||||
.get_msglevel = ibmvnic_get_msglevel,
|
||||
@@ -2887,8 +2831,6 @@ static const struct ethtool_ops ibmvnic_ethtool_ops = {
|
||||
.get_sset_count = ibmvnic_get_sset_count,
|
||||
.get_ethtool_stats = ibmvnic_get_ethtool_stats,
|
||||
.get_link_ksettings = ibmvnic_get_link_ksettings,
|
||||
.get_priv_flags = ibmvnic_get_priv_flags,
|
||||
.set_priv_flags = ibmvnic_set_priv_flags,
|
||||
};
|
||||
|
||||
/* Routines for managing CRQs/sCRQs */
|
||||
@@ -3119,7 +3061,7 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter,
|
||||
/* H_EOI would fail with rc = H_FUNCTION when running
|
||||
* in XIVE mode which is expected, but not an error.
|
||||
*/
|
||||
if (rc && (rc != H_FUNCTION))
|
||||
if (rc && rc != H_FUNCTION)
|
||||
dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n",
|
||||
val, rc);
|
||||
}
|
||||
|
@@ -41,11 +41,6 @@
|
||||
|
||||
#define IBMVNIC_RESET_DELAY 100
|
||||
|
||||
static const char ibmvnic_priv_flags[][ETH_GSTRING_LEN] = {
|
||||
#define IBMVNIC_USE_SERVER_MAXES 0x1
|
||||
"use-server-maxes"
|
||||
};
|
||||
|
||||
struct ibmvnic_login_buffer {
|
||||
__be32 len;
|
||||
__be32 version;
|
||||
@@ -974,7 +969,6 @@ struct ibmvnic_adapter {
|
||||
struct ibmvnic_control_ip_offload_buffer ip_offload_ctrl;
|
||||
dma_addr_t ip_offload_ctrl_tok;
|
||||
u32 msg_enable;
|
||||
u32 priv_flags;
|
||||
|
||||
/* Vital Product Data (VPD) */
|
||||
struct ibmvnic_vpd *vpd;
|
||||
|
@@ -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)
|
||||
|
@@ -1353,7 +1353,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);
|
||||
|
@@ -650,7 +650,7 @@ static int mv3310_read_status_copper(struct phy_device *phydev)
|
||||
|
||||
cssr1 = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_CSSR1);
|
||||
if (cssr1 < 0)
|
||||
return val;
|
||||
return cssr1;
|
||||
|
||||
/* If the link settings are not resolved, mark the link down */
|
||||
if (!(cssr1 & MV_PCS_CSSR1_RESOLVED)) {
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/icmp.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <net/dst_metadata.h>
|
||||
#include <net/icmp.h>
|
||||
#include <net/rtnetlink.h>
|
||||
#include <net/ip_tunnels.h>
|
||||
@@ -152,7 +153,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
goto err_peer;
|
||||
}
|
||||
|
||||
mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
|
||||
mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
|
||||
|
||||
__skb_queue_head_init(&packets);
|
||||
if (!skb_is_gso(skb)) {
|
||||
|
@@ -629,7 +629,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[] = {
|
||||
|
@@ -838,7 +838,7 @@ static int serdes_am654_probe(struct platform_device *pdev)
|
||||
|
||||
clk_err:
|
||||
of_clk_del_provider(node);
|
||||
|
||||
pm_runtime_disable(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -215,7 +215,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;
|
||||
|
@@ -30,6 +30,7 @@ config PINCTRL_MTK_MOORE
|
||||
select GENERIC_PINMUX_FUNCTIONS
|
||||
select GPIOLIB
|
||||
select OF_GPIO
|
||||
select EINT_MTK
|
||||
select PINCTRL_MTK_V2
|
||||
|
||||
config PINCTRL_MTK_PARIS
|
||||
|
@@ -1374,10 +1374,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;
|
||||
}
|
||||
|
||||
|
@@ -663,95 +663,110 @@ static struct rockchip_mux_recalced_data rk3128_mux_recalced_data[] = {
|
||||
|
||||
static struct rockchip_mux_recalced_data rk3308_mux_recalced_data[] = {
|
||||
{
|
||||
/* gpio1b6_sel */
|
||||
.num = 1,
|
||||
.pin = 14,
|
||||
.reg = 0x28,
|
||||
.bit = 12,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1b7_sel */
|
||||
.num = 1,
|
||||
.pin = 15,
|
||||
.reg = 0x2c,
|
||||
.bit = 0,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio1c2_sel */
|
||||
.num = 1,
|
||||
.pin = 18,
|
||||
.reg = 0x30,
|
||||
.bit = 4,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c3_sel */
|
||||
.num = 1,
|
||||
.pin = 19,
|
||||
.reg = 0x30,
|
||||
.bit = 8,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c4_sel */
|
||||
.num = 1,
|
||||
.pin = 20,
|
||||
.reg = 0x30,
|
||||
.bit = 12,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c5_sel */
|
||||
.num = 1,
|
||||
.pin = 21,
|
||||
.reg = 0x34,
|
||||
.bit = 0,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c6_sel */
|
||||
.num = 1,
|
||||
.pin = 22,
|
||||
.reg = 0x34,
|
||||
.bit = 4,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c7_sel */
|
||||
.num = 1,
|
||||
.pin = 23,
|
||||
.reg = 0x34,
|
||||
.bit = 8,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio3b4_sel */
|
||||
.num = 3,
|
||||
.pin = 12,
|
||||
.reg = 0x68,
|
||||
.bit = 8,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio3b5_sel */
|
||||
.num = 3,
|
||||
.pin = 13,
|
||||
.reg = 0x68,
|
||||
.bit = 12,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio2a2_sel */
|
||||
.num = 2,
|
||||
.pin = 2,
|
||||
.reg = 0x608,
|
||||
.bit = 0,
|
||||
.mask = 0x7
|
||||
.reg = 0x40,
|
||||
.bit = 4,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio2a3_sel */
|
||||
.num = 2,
|
||||
.pin = 3,
|
||||
.reg = 0x608,
|
||||
.bit = 4,
|
||||
.mask = 0x7
|
||||
.reg = 0x40,
|
||||
.bit = 6,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio2c0_sel */
|
||||
.num = 2,
|
||||
.pin = 16,
|
||||
.reg = 0x610,
|
||||
.bit = 8,
|
||||
.mask = 0x7
|
||||
.reg = 0x50,
|
||||
.bit = 0,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio3b2_sel */
|
||||
.num = 3,
|
||||
.pin = 10,
|
||||
.reg = 0x610,
|
||||
.bit = 0,
|
||||
.mask = 0x7
|
||||
.reg = 0x68,
|
||||
.bit = 4,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio3b3_sel */
|
||||
.num = 3,
|
||||
.pin = 11,
|
||||
.reg = 0x610,
|
||||
.bit = 4,
|
||||
.mask = 0x7
|
||||
.reg = 0x68,
|
||||
.bit = 6,
|
||||
.mask = 0x3
|
||||
},
|
||||
};
|
||||
|
||||
|
@@ -4,14 +4,13 @@
|
||||
#
|
||||
config PINCTRL_SAMSUNG
|
||||
bool
|
||||
depends on OF_GPIO
|
||||
select GPIOLIB
|
||||
select PINMUX
|
||||
select PINCONF
|
||||
|
||||
config PINCTRL_EXYNOS
|
||||
bool "Pinctrl common driver part for Samsung Exynos SoCs"
|
||||
depends on OF_GPIO
|
||||
depends on ARCH_EXYNOS || ARCH_S5PV210 || COMPILE_TEST
|
||||
depends on ARCH_EXYNOS || ARCH_S5PV210 || (COMPILE_TEST && OF)
|
||||
select PINCTRL_SAMSUNG
|
||||
select PINCTRL_EXYNOS_ARM if ARM && (ARCH_EXYNOS || ARCH_S5PV210)
|
||||
select PINCTRL_EXYNOS_ARM64 if ARM64 && ARCH_EXYNOS
|
||||
@@ -26,12 +25,10 @@ config PINCTRL_EXYNOS_ARM64
|
||||
|
||||
config PINCTRL_S3C24XX
|
||||
bool "Samsung S3C24XX SoC pinctrl driver"
|
||||
depends on OF_GPIO
|
||||
depends on ARCH_S3C24XX || COMPILE_TEST
|
||||
depends on ARCH_S3C24XX || (COMPILE_TEST && OF)
|
||||
select PINCTRL_SAMSUNG
|
||||
|
||||
config PINCTRL_S3C64XX
|
||||
bool "Samsung S3C64XX SoC pinctrl driver"
|
||||
depends on OF_GPIO
|
||||
depends on ARCH_S3C64XX || COMPILE_TEST
|
||||
depends on ARCH_S3C64XX || (COMPILE_TEST && OF)
|
||||
select PINCTRL_SAMSUNG
|
||||
|
@@ -225,6 +225,13 @@ static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset)
|
||||
pinctrl_gpio_free(chip->base + offset);
|
||||
}
|
||||
|
||||
static int stm32_gpio_get_noclk(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
|
||||
return !!(readl_relaxed(bank->base + STM32_GPIO_IDR) & BIT(offset));
|
||||
}
|
||||
|
||||
static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
@@ -232,7 +239,7 @@ static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
|
||||
clk_enable(bank->clk);
|
||||
|
||||
ret = !!(readl_relaxed(bank->base + STM32_GPIO_IDR) & BIT(offset));
|
||||
ret = stm32_gpio_get_noclk(chip, offset);
|
||||
|
||||
clk_disable(bank->clk);
|
||||
|
||||
@@ -311,8 +318,12 @@ static void stm32_gpio_irq_trigger(struct irq_data *d)
|
||||
struct stm32_gpio_bank *bank = d->domain->host_data;
|
||||
int level;
|
||||
|
||||
/* Do not access the GPIO if this is not LEVEL triggered IRQ. */
|
||||
if (!(bank->irq_type[d->hwirq] & IRQ_TYPE_LEVEL_MASK))
|
||||
return;
|
||||
|
||||
/* If level interrupt type then retrig */
|
||||
level = stm32_gpio_get(&bank->gpio_chip, d->hwirq);
|
||||
level = stm32_gpio_get_noclk(&bank->gpio_chip, d->hwirq);
|
||||
if ((level == 0 && bank->irq_type[d->hwirq] == IRQ_TYPE_LEVEL_LOW) ||
|
||||
(level == 1 && bank->irq_type[d->hwirq] == IRQ_TYPE_LEVEL_HIGH))
|
||||
irq_chip_retrigger_hierarchy(d);
|
||||
@@ -354,6 +365,7 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = irq_data->domain->host_data;
|
||||
struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
ret = stm32_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq);
|
||||
@@ -367,6 +379,10 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data)
|
||||
return ret;
|
||||
}
|
||||
|
||||
flags = irqd_get_trigger_type(irq_data);
|
||||
if (flags & IRQ_TYPE_LEVEL_MASK)
|
||||
clk_enable(bank->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -374,6 +390,9 @@ static void stm32_gpio_irq_release_resources(struct irq_data *irq_data)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = irq_data->domain->host_data;
|
||||
|
||||
if (bank->irq_type[irq_data->hwirq] & IRQ_TYPE_LEVEL_MASK)
|
||||
clk_disable(bank->clk);
|
||||
|
||||
gpiochip_unlock_as_irq(&bank->gpio_chip, irq_data->hwirq);
|
||||
}
|
||||
|
||||
|
@@ -67,7 +67,7 @@ static int evaluate_odvp(struct int3400_thermal_priv *priv);
|
||||
struct odvp_attr {
|
||||
int odvp;
|
||||
struct int3400_thermal_priv *priv;
|
||||
struct kobj_attribute attr;
|
||||
struct device_attribute attr;
|
||||
};
|
||||
|
||||
static ssize_t data_vault_read(struct file *file, struct kobject *kobj,
|
||||
@@ -269,7 +269,7 @@ static int int3400_thermal_run_osc(acpi_handle handle,
|
||||
return result;
|
||||
}
|
||||
|
||||
static ssize_t odvp_show(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
static ssize_t odvp_show(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct odvp_attr *odvp_attr;
|
||||
|
@@ -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)
|
||||
|
||||
/**
|
||||
@@ -230,6 +232,7 @@ struct gsm_mux {
|
||||
int initiator; /* Did we initiate connection */
|
||||
bool dead; /* Has the mux been shut down */
|
||||
struct gsm_dlci *dlci[NUM_DLCI];
|
||||
int old_c_iflag; /* termios c_iflag value before attach */
|
||||
bool constipated; /* Asked by remote to shut up */
|
||||
|
||||
spinlock_t tx_lock;
|
||||
@@ -818,7 +821,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);
|
||||
@@ -1295,11 +1298,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);
|
||||
}
|
||||
|
||||
@@ -1322,7 +1326,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;
|
||||
@@ -1331,6 +1334,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);
|
||||
}
|
||||
@@ -1371,7 +1375,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;
|
||||
|
||||
@@ -1419,13 +1423,17 @@ static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
|
||||
|
||||
static void gsm_dlci_close(struct gsm_dlci *dlci)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
del_timer(&dlci->t1);
|
||||
if (debug & 8)
|
||||
pr_debug("DLCI %d goes closed.\n", dlci->addr);
|
||||
dlci->state = DLCI_CLOSED;
|
||||
if (dlci->addr != 0) {
|
||||
tty_port_tty_hangup(&dlci->port, false);
|
||||
spin_lock_irqsave(&dlci->lock, flags);
|
||||
kfifo_reset(&dlci->fifo);
|
||||
spin_unlock_irqrestore(&dlci->lock, flags);
|
||||
/* Ensure that gsmtty_open() can return. */
|
||||
tty_port_set_initialized(&dlci->port, 0);
|
||||
wake_up_interruptible(&dlci->port.open_wait);
|
||||
@@ -1810,7 +1818,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;
|
||||
@@ -1954,6 +1961,16 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
|
||||
static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
{
|
||||
/* handle XON/XOFF */
|
||||
if ((c & ISO_IEC_646_MASK) == XON) {
|
||||
gsm->constipated = true;
|
||||
return;
|
||||
} else if ((c & ISO_IEC_646_MASK) == XOFF) {
|
||||
gsm->constipated = false;
|
||||
/* Kick the link in case it is idling */
|
||||
gsm_data_kick(gsm, NULL);
|
||||
return;
|
||||
}
|
||||
if (c == GSM1_SOF) {
|
||||
/* EOF is only valid in frame if we have got to the data state
|
||||
and received at least one byte (the FCS) */
|
||||
@@ -1968,7 +1985,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
|
||||
@@ -2040,74 +2058,43 @@ static void gsm_error(struct gsm_mux *gsm,
|
||||
gsm->io_error++;
|
||||
}
|
||||
|
||||
static int gsm_disconnect(struct gsm_mux *gsm)
|
||||
{
|
||||
struct gsm_dlci *dlci = gsm->dlci[0];
|
||||
struct gsm_control *gc;
|
||||
|
||||
if (!dlci)
|
||||
return 0;
|
||||
|
||||
/* In theory disconnecting DLCI 0 is sufficient but for some
|
||||
modems this is apparently not the case. */
|
||||
gc = gsm_control_send(gsm, CMD_CLD, NULL, 0);
|
||||
if (gc)
|
||||
gsm_control_wait(gsm, gc);
|
||||
|
||||
del_timer_sync(&gsm->t2_timer);
|
||||
/* Now we are sure T2 has stopped */
|
||||
|
||||
gsm_dlci_begin_close(dlci);
|
||||
wait_event_interruptible(gsm->event,
|
||||
dlci->state == DLCI_CLOSED);
|
||||
|
||||
if (signal_pending(current))
|
||||
return -EINTR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* gsm_cleanup_mux - generic GSM protocol cleanup
|
||||
* @gsm: our mux
|
||||
* @disc: disconnect link?
|
||||
*
|
||||
* Clean up the bits of the mux which are the same for all framing
|
||||
* protocols. Remove the mux from the mux table, stop all the timers
|
||||
* and then shut down each device hanging up the channels as we go.
|
||||
*/
|
||||
|
||||
static void gsm_cleanup_mux(struct gsm_mux *gsm)
|
||||
static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc)
|
||||
{
|
||||
int i;
|
||||
struct gsm_dlci *dlci = gsm->dlci[0];
|
||||
struct gsm_msg *txq, *ntxq;
|
||||
|
||||
gsm->dead = true;
|
||||
|
||||
spin_lock(&gsm_mux_lock);
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (gsm_mux[i] == gsm) {
|
||||
gsm_mux[i] = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock(&gsm_mux_lock);
|
||||
/* open failed before registering => nothing to do */
|
||||
if (i == MAX_MUX)
|
||||
return;
|
||||
|
||||
del_timer_sync(&gsm->t2_timer);
|
||||
/* Now we are sure T2 has stopped */
|
||||
if (dlci)
|
||||
dlci->dead = true;
|
||||
|
||||
/* Free up any link layer users */
|
||||
mutex_lock(&gsm->mutex);
|
||||
for (i = 0; i < NUM_DLCI; i++)
|
||||
|
||||
if (dlci) {
|
||||
if (disc && dlci->state != DLCI_CLOSED) {
|
||||
gsm_dlci_begin_close(dlci);
|
||||
wait_event(gsm->event, dlci->state == DLCI_CLOSED);
|
||||
}
|
||||
dlci->dead = true;
|
||||
}
|
||||
|
||||
/* Finish outstanding timers, making sure they are done */
|
||||
del_timer_sync(&gsm->t2_timer);
|
||||
|
||||
/* Free up any link layer users and finally the control channel */
|
||||
for (i = NUM_DLCI - 1; i >= 0; i--)
|
||||
if (gsm->dlci[i])
|
||||
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);
|
||||
@@ -2125,7 +2112,6 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)
|
||||
static int gsm_activate_mux(struct gsm_mux *gsm)
|
||||
{
|
||||
struct gsm_dlci *dlci;
|
||||
int i = 0;
|
||||
|
||||
timer_setup(&gsm->t2_timer, gsm_control_retransmit, 0);
|
||||
init_waitqueue_head(&gsm->event);
|
||||
@@ -2137,18 +2123,6 @@ static int gsm_activate_mux(struct gsm_mux *gsm)
|
||||
else
|
||||
gsm->receive = gsm1_receive;
|
||||
|
||||
spin_lock(&gsm_mux_lock);
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (gsm_mux[i] == NULL) {
|
||||
gsm->num = i;
|
||||
gsm_mux[i] = gsm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock(&gsm_mux_lock);
|
||||
if (i == MAX_MUX)
|
||||
return -EBUSY;
|
||||
|
||||
dlci = gsm_dlci_alloc(gsm, 0);
|
||||
if (dlci == NULL)
|
||||
return -ENOMEM;
|
||||
@@ -2164,6 +2138,15 @@ static int gsm_activate_mux(struct gsm_mux *gsm)
|
||||
*/
|
||||
static void gsm_free_mux(struct gsm_mux *gsm)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (gsm == gsm_mux[i]) {
|
||||
gsm_mux[i] = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
mutex_destroy(&gsm->mutex);
|
||||
kfree(gsm->txframe);
|
||||
kfree(gsm->buf);
|
||||
kfree(gsm);
|
||||
@@ -2183,12 +2166,20 @@ static void gsm_free_muxr(struct kref *ref)
|
||||
|
||||
static inline void mux_get(struct gsm_mux *gsm)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&gsm_mux_lock, flags);
|
||||
kref_get(&gsm->ref);
|
||||
spin_unlock_irqrestore(&gsm_mux_lock, flags);
|
||||
}
|
||||
|
||||
static inline void mux_put(struct gsm_mux *gsm)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&gsm_mux_lock, flags);
|
||||
kref_put(&gsm->ref, gsm_free_muxr);
|
||||
spin_unlock_irqrestore(&gsm_mux_lock, flags);
|
||||
}
|
||||
|
||||
static inline unsigned int mux_num_to_base(struct gsm_mux *gsm)
|
||||
@@ -2209,6 +2200,7 @@ static inline unsigned int mux_line_to_num(unsigned int line)
|
||||
|
||||
static struct gsm_mux *gsm_alloc_mux(void)
|
||||
{
|
||||
int i;
|
||||
struct gsm_mux *gsm = kzalloc(sizeof(struct gsm_mux), GFP_KERNEL);
|
||||
if (gsm == NULL)
|
||||
return NULL;
|
||||
@@ -2217,7 +2209,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);
|
||||
@@ -2238,6 +2230,26 @@ static struct gsm_mux *gsm_alloc_mux(void)
|
||||
gsm->mtu = 64;
|
||||
gsm->dead = true; /* Avoid early tty opens */
|
||||
|
||||
/* Store the instance to the mux array or abort if no space is
|
||||
* available.
|
||||
*/
|
||||
spin_lock(&gsm_mux_lock);
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (!gsm_mux[i]) {
|
||||
gsm_mux[i] = gsm;
|
||||
gsm->num = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock(&gsm_mux_lock);
|
||||
if (i == MAX_MUX) {
|
||||
mutex_destroy(&gsm->mutex);
|
||||
kfree(gsm->txframe);
|
||||
kfree(gsm->buf);
|
||||
kfree(gsm);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return gsm;
|
||||
}
|
||||
|
||||
@@ -2273,7 +2285,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;
|
||||
@@ -2304,19 +2316,11 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
|
||||
|
||||
/*
|
||||
* Close down what is needed, restart and initiate the new
|
||||
* configuration
|
||||
* configuration. On the first time there is no DLCI[0]
|
||||
* and closing or cleaning up is not necessary.
|
||||
*/
|
||||
|
||||
if (need_close || need_restart) {
|
||||
int ret;
|
||||
|
||||
ret = gsm_disconnect(gsm);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
if (need_restart)
|
||||
gsm_cleanup_mux(gsm);
|
||||
if (need_close || need_restart)
|
||||
gsm_cleanup_mux(gsm, true);
|
||||
|
||||
gsm->initiator = c->initiator;
|
||||
gsm->mru = c->mru;
|
||||
@@ -2385,6 +2389,9 @@ static int gsmld_attach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
|
||||
int ret, i;
|
||||
|
||||
gsm->tty = tty_kref_get(tty);
|
||||
/* Turn off tty XON/XOFF handling to handle it explicitly. */
|
||||
gsm->old_c_iflag = tty->termios.c_iflag;
|
||||
tty->termios.c_iflag &= (IXON | IXOFF);
|
||||
ret = gsm_activate_mux(gsm);
|
||||
if (ret != 0)
|
||||
tty_kref_put(gsm->tty);
|
||||
@@ -2425,7 +2432,8 @@ static void gsmld_detach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
|
||||
WARN_ON(tty != gsm->tty);
|
||||
for (i = 1; i < NUM_DLCI; i++)
|
||||
tty_unregister_device(gsm_tty_driver, base + i);
|
||||
gsm_cleanup_mux(gsm);
|
||||
/* Restore tty XON/XOFF handling. */
|
||||
gsm->tty->termios.c_iflag = gsm->old_c_iflag;
|
||||
tty_kref_put(gsm->tty);
|
||||
gsm->tty = NULL;
|
||||
}
|
||||
@@ -2493,6 +2501,12 @@ static void gsmld_close(struct tty_struct *tty)
|
||||
{
|
||||
struct gsm_mux *gsm = tty->disc_data;
|
||||
|
||||
/* The ldisc locks and closes the port before calling our close. This
|
||||
* means we have no way to do a proper disconnect. We will not bother
|
||||
* to do one.
|
||||
*/
|
||||
gsm_cleanup_mux(gsm, false);
|
||||
|
||||
gsmld_detach_gsm(tty, gsm);
|
||||
|
||||
gsmld_flush_buffer(tty);
|
||||
@@ -2531,7 +2545,7 @@ static int gsmld_open(struct tty_struct *tty)
|
||||
|
||||
ret = gsmld_attach_gsm(tty, gsm);
|
||||
if (ret != 0) {
|
||||
gsm_cleanup_mux(gsm);
|
||||
gsm_cleanup_mux(gsm, false);
|
||||
mux_put(gsm);
|
||||
}
|
||||
return ret;
|
||||
@@ -2888,19 +2902,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);
|
||||
@@ -3085,13 +3097,17 @@ static int gsmtty_chars_in_buffer(struct tty_struct *tty)
|
||||
static void gsmtty_flush_buffer(struct tty_struct *tty)
|
||||
{
|
||||
struct gsm_dlci *dlci = tty->driver_data;
|
||||
unsigned long flags;
|
||||
|
||||
if (dlci->state == DLCI_CLOSED)
|
||||
return;
|
||||
/* Caution needed: If we implement reliable transport classes
|
||||
then the data being transmitted can't simply be junked once
|
||||
it has first hit the stack. Until then we can just blow it
|
||||
away */
|
||||
spin_lock_irqsave(&dlci->lock, flags);
|
||||
kfifo_reset(&dlci->fifo);
|
||||
spin_unlock_irqrestore(&dlci->lock, flags);
|
||||
/* Need to unhook this DLCI from the transmit queue logic */
|
||||
}
|
||||
|
||||
|
@@ -2940,7 +2940,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,
|
||||
@@ -3468,10 +3468,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,
|
||||
},
|
||||
@@ -4386,7 +4386,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.
|
||||
|
@@ -3311,7 +3311,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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -1470,7 +1470,7 @@ static int imx_uart_startup(struct uart_port *port)
|
||||
imx_uart_writel(sport, ucr1, UCR1);
|
||||
|
||||
ucr4 = imx_uart_readl(sport, UCR4) & ~(UCR4_OREN | UCR4_INVR);
|
||||
if (!sport->dma_is_enabled)
|
||||
if (!dma_is_inited)
|
||||
ucr4 |= UCR4_OREN;
|
||||
if (sport->inverted_rx)
|
||||
ucr4 |= UCR4_INVR;
|
||||
|
@@ -2697,6 +2697,7 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep)
|
||||
struct usb_request *request;
|
||||
struct cdns3_request *priv_req;
|
||||
struct cdns3_trb *trb = NULL;
|
||||
struct cdns3_trb trb_tmp;
|
||||
int ret;
|
||||
int val;
|
||||
|
||||
@@ -2706,8 +2707,10 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep)
|
||||
if (request) {
|
||||
priv_req = to_cdns3_request(request);
|
||||
trb = priv_req->trb;
|
||||
if (trb)
|
||||
if (trb) {
|
||||
trb_tmp = *trb;
|
||||
trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE);
|
||||
}
|
||||
}
|
||||
|
||||
writel(EP_CMD_CSTALL | EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
|
||||
@@ -2722,7 +2725,7 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep)
|
||||
|
||||
if (request) {
|
||||
if (trb)
|
||||
trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE);
|
||||
*trb = trb_tmp;
|
||||
|
||||
cdns3_rearm_transfer(priv_ep, 1);
|
||||
}
|
||||
|
@@ -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 },
|
||||
|
||||
|
@@ -273,7 +273,8 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
|
||||
|
||||
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
||||
reg |= DWC3_DCTL_CSFTRST;
|
||||
dwc3_writel(dwc->regs, DWC3_DCTL, reg);
|
||||
reg &= ~DWC3_DCTL_RUN_STOP;
|
||||
dwc3_gadget_dctl_write_safe(dwc, reg);
|
||||
|
||||
/*
|
||||
* For DWC_usb31 controller 1.90a and later, the DCTL.CSFRST bit
|
||||
@@ -1266,10 +1267,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;
|
||||
u8 tx_fifo_resize_max_num;
|
||||
const char *usb_psy_name;
|
||||
int ret;
|
||||
|
@@ -575,16 +575,15 @@ int dwc3_drd_init(struct dwc3 *dwc)
|
||||
{
|
||||
int ret, irq;
|
||||
|
||||
if (ROLE_SWITCH &&
|
||||
device_property_read_bool(dwc->dev, "usb-role-switch"))
|
||||
return dwc3_setup_role_switch(dwc);
|
||||
|
||||
dwc->edev = dwc3_get_extcon(dwc);
|
||||
if (IS_ERR(dwc->edev))
|
||||
return PTR_ERR(dwc->edev);
|
||||
|
||||
if (ROLE_SWITCH &&
|
||||
device_property_read_bool(dwc->dev, "usb-role-switch")) {
|
||||
ret = dwc3_setup_role_switch(dwc);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
} else if (dwc->edev) {
|
||||
if (dwc->edev) {
|
||||
dwc->edev_nb.notifier_call = dwc3_drd_notifier;
|
||||
ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST,
|
||||
&dwc->edev_nb);
|
||||
|
@@ -3247,6 +3247,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)
|
||||
@@ -3267,7 +3268,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;
|
||||
|
@@ -1353,7 +1353,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-%d\n",
|
||||
hcd->self.busnum, wIndex + 1);
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
|
@@ -59,6 +59,7 @@
|
||||
#define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI 0x9a13
|
||||
#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138
|
||||
#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI 0x461e
|
||||
#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed
|
||||
|
||||
#define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9
|
||||
#define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba
|
||||
@@ -261,7 +262,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI ||
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI))
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI ||
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI))
|
||||
xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
|
||||
|
@@ -3158,6 +3158,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;
|
||||
}
|
||||
|
||||
|
@@ -778,6 +778,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 */
|
||||
|
@@ -268,6 +268,13 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop)
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
|
||||
if (PTR_ERR(nop->vbus_draw) == -ENODEV)
|
||||
nop->vbus_draw = NULL;
|
||||
if (IS_ERR(nop->vbus_draw))
|
||||
return dev_err_probe(dev, PTR_ERR(nop->vbus_draw),
|
||||
"could not get vbus regulator\n");
|
||||
|
||||
nop->dev = dev;
|
||||
nop->phy.dev = nop->dev;
|
||||
nop->phy.label = "nop-xceiv";
|
||||
|
@@ -198,6 +198,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:
|
||||
|
@@ -955,6 +955,8 @@ static int ucsi_dr_swap(struct typec_port *port, enum typec_data_role role)
|
||||
role == TYPEC_HOST))
|
||||
goto out_unlock;
|
||||
|
||||
reinit_completion(&con->complete);
|
||||
|
||||
command = UCSI_SET_UOR | UCSI_CONNECTOR_NUMBER(con->num);
|
||||
command |= UCSI_SET_UOR_ROLE(role);
|
||||
command |= UCSI_SET_UOR_ACCEPT_ROLE_SWAPS;
|
||||
@@ -962,14 +964,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)
|
||||
@@ -991,6 +997,8 @@ static int ucsi_pr_swap(struct typec_port *port, enum typec_role role)
|
||||
if (cur_role == role)
|
||||
goto out_unlock;
|
||||
|
||||
reinit_completion(&con->complete);
|
||||
|
||||
command = UCSI_SET_PDR | UCSI_CONNECTOR_NUMBER(con->num);
|
||||
command |= UCSI_SET_PDR_ROLE(role);
|
||||
command |= UCSI_SET_PDR_ACCEPT_ROLE_SWAPS;
|
||||
@@ -998,11 +1006,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 (UCSI_CONSTAT_PWR_OPMODE(con->status.flags) !=
|
||||
|
@@ -1649,8 +1649,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);
|
||||
@@ -1664,6 +1665,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);
|
||||
@@ -1673,6 +1680,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;
|
||||
}
|
||||
|
||||
@@ -1686,8 +1694,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;
|
||||
|
@@ -1744,9 +1744,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;
|
||||
|
||||
|
@@ -1176,18 +1176,23 @@ static void ext4_put_super(struct super_block *sb)
|
||||
int aborted = 0;
|
||||
int i, err;
|
||||
|
||||
ext4_unregister_li_request(sb);
|
||||
ext4_quota_off_umount(sb);
|
||||
|
||||
destroy_workqueue(sbi->rsv_conversion_wq);
|
||||
|
||||
/*
|
||||
* Unregister sysfs before destroying jbd2 journal.
|
||||
* Since we could still access attr_journal_task attribute via sysfs
|
||||
* path which could have sbi->s_journal->j_task as NULL
|
||||
* Unregister sysfs before flush sbi->s_error_work.
|
||||
* Since user may read /proc/fs/ext4/xx/mb_groups during umount, If
|
||||
* read metadata verify failed then will queue error work.
|
||||
* flush_stashed_error_work will call start_this_handle may trigger
|
||||
* BUG_ON.
|
||||
*/
|
||||
ext4_unregister_sysfs(sb);
|
||||
|
||||
ext4_unregister_li_request(sb);
|
||||
ext4_quota_off_umount(sb);
|
||||
|
||||
destroy_workqueue(sbi->rsv_conversion_wq);
|
||||
|
||||
if (sbi->s_journal) {
|
||||
aborted = is_journal_aborted(sbi->s_journal);
|
||||
err = jbd2_journal_destroy(sbi->s_journal);
|
||||
|
@@ -32,6 +32,17 @@ static inline int zonefs_zone_mgmt(struct inode *inode,
|
||||
|
||||
lockdep_assert_held(&zi->i_truncate_mutex);
|
||||
|
||||
/*
|
||||
* With ZNS drives, closing an explicitly open zone that has not been
|
||||
* written will change the zone state to "closed", that is, the zone
|
||||
* will remain active. Since this can then cause failure of explicit
|
||||
* open operation on other zones if the drive active zone resources
|
||||
* are exceeded, make sure that the zone does not remain active by
|
||||
* resetting it.
|
||||
*/
|
||||
if (op == REQ_OP_ZONE_CLOSE && !zi->i_wpoffset)
|
||||
op = REQ_OP_ZONE_RESET;
|
||||
|
||||
ret = blkdev_zone_mgmt(inode->i_sb->s_bdev, op, zi->i_zsector,
|
||||
zi->i_zone_size >> SECTOR_SHIFT, GFP_NOFS);
|
||||
if (ret) {
|
||||
@@ -1152,6 +1163,7 @@ static struct inode *zonefs_alloc_inode(struct super_block *sb)
|
||||
mutex_init(&zi->i_truncate_mutex);
|
||||
init_rwsem(&zi->i_mmap_sem);
|
||||
zi->i_wr_refcnt = 0;
|
||||
zi->i_flags = 0;
|
||||
|
||||
return &zi->i_vnode;
|
||||
}
|
||||
@@ -1306,12 +1318,13 @@ static void zonefs_init_dir_inode(struct inode *parent, struct inode *inode,
|
||||
inc_nlink(parent);
|
||||
}
|
||||
|
||||
static void zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone,
|
||||
enum zonefs_ztype type)
|
||||
static int zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone,
|
||||
enum zonefs_ztype type)
|
||||
{
|
||||
struct super_block *sb = inode->i_sb;
|
||||
struct zonefs_sb_info *sbi = ZONEFS_SB(sb);
|
||||
struct zonefs_inode_info *zi = ZONEFS_I(inode);
|
||||
int ret = 0;
|
||||
|
||||
inode->i_ino = zone->start >> sbi->s_zone_sectors_shift;
|
||||
inode->i_mode = S_IFREG | sbi->s_perm;
|
||||
@@ -1336,6 +1349,22 @@ static void zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone,
|
||||
sb->s_maxbytes = max(zi->i_max_size, sb->s_maxbytes);
|
||||
sbi->s_blocks += zi->i_max_size >> sb->s_blocksize_bits;
|
||||
sbi->s_used_blocks += zi->i_wpoffset >> sb->s_blocksize_bits;
|
||||
|
||||
/*
|
||||
* For sequential zones, make sure that any open zone is closed first
|
||||
* to ensure that the initial number of open zones is 0, in sync with
|
||||
* the open zone accounting done when the mount option
|
||||
* ZONEFS_MNTOPT_EXPLICIT_OPEN is used.
|
||||
*/
|
||||
if (type == ZONEFS_ZTYPE_SEQ &&
|
||||
(zone->cond == BLK_ZONE_COND_IMP_OPEN ||
|
||||
zone->cond == BLK_ZONE_COND_EXP_OPEN)) {
|
||||
mutex_lock(&zi->i_truncate_mutex);
|
||||
ret = zonefs_zone_mgmt(inode, REQ_OP_ZONE_CLOSE);
|
||||
mutex_unlock(&zi->i_truncate_mutex);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct dentry *zonefs_create_inode(struct dentry *parent,
|
||||
@@ -1345,6 +1374,7 @@ static struct dentry *zonefs_create_inode(struct dentry *parent,
|
||||
struct inode *dir = d_inode(parent);
|
||||
struct dentry *dentry;
|
||||
struct inode *inode;
|
||||
int ret;
|
||||
|
||||
dentry = d_alloc_name(parent, name);
|
||||
if (!dentry)
|
||||
@@ -1355,10 +1385,16 @@ static struct dentry *zonefs_create_inode(struct dentry *parent,
|
||||
goto dput;
|
||||
|
||||
inode->i_ctime = inode->i_mtime = inode->i_atime = dir->i_ctime;
|
||||
if (zone)
|
||||
zonefs_init_file_inode(inode, zone, type);
|
||||
else
|
||||
if (zone) {
|
||||
ret = zonefs_init_file_inode(inode, zone, type);
|
||||
if (ret) {
|
||||
iput(inode);
|
||||
goto dput;
|
||||
}
|
||||
} else {
|
||||
zonefs_init_dir_inode(dir, inode, type);
|
||||
}
|
||||
|
||||
d_add(dentry, inode);
|
||||
dir->i_size++;
|
||||
|
||||
|
@@ -635,7 +635,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);
|
||||
|
||||
|
@@ -388,10 +388,8 @@ struct mtd_info {
|
||||
/* List of partitions attached to this MTD device */
|
||||
struct list_head partitions;
|
||||
|
||||
union {
|
||||
struct mtd_part part;
|
||||
struct mtd_master master;
|
||||
};
|
||||
struct mtd_part part;
|
||||
struct mtd_master master;
|
||||
};
|
||||
|
||||
static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
|
||||
|
@@ -65,6 +65,7 @@ struct rpcif {
|
||||
size_t size;
|
||||
enum rpcif_data_dir dir;
|
||||
u8 bus_size;
|
||||
u8 xfer_size;
|
||||
void *buffer;
|
||||
u32 xferlen;
|
||||
u32 smcr;
|
||||
|
@@ -57,7 +57,7 @@ struct ip6_tnl {
|
||||
|
||||
/* These fields used only by GRE */
|
||||
__u32 i_seqno; /* The last seen seqno */
|
||||
__u32 o_seqno; /* The last output seqno */
|
||||
atomic_t o_seqno; /* The last output seqno */
|
||||
int hlen; /* tun_hlen + encap_hlen */
|
||||
int tun_hlen; /* Precalculated header length */
|
||||
int encap_hlen; /* Encap header length (FOU,GUE) */
|
||||
|
@@ -113,7 +113,7 @@ struct ip_tunnel {
|
||||
|
||||
/* These four fields used only by GRE */
|
||||
u32 i_seqno; /* The last seen seqno */
|
||||
u32 o_seqno; /* The last output seqno */
|
||||
atomic_t o_seqno; /* The last output seqno */
|
||||
int tun_hlen; /* Precalculated header length */
|
||||
|
||||
/* These four fields used only by ERSPAN */
|
||||
|
@@ -471,6 +471,7 @@ int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th,
|
||||
u32 cookie);
|
||||
struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb);
|
||||
struct request_sock *cookie_tcp_reqsk_alloc(const struct request_sock_ops *ops,
|
||||
const struct tcp_request_sock_ops *af_ops,
|
||||
struct sock *sk, struct sk_buff *skb);
|
||||
#ifdef CONFIG_SYN_COOKIES
|
||||
|
||||
@@ -609,6 +610,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 *);
|
||||
@@ -1052,6 +1054,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? */
|
||||
@@ -1162,6 +1165,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.
|
||||
|
@@ -22,15 +22,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);
|
||||
|
||||
@@ -45,10 +63,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;
|
||||
|
@@ -304,6 +304,13 @@ static void per_cpu_remove_cache(void *arg)
|
||||
struct qlist_head *q;
|
||||
|
||||
q = this_cpu_ptr(&cpu_quarantine);
|
||||
/*
|
||||
* Ensure the ordering between the writing to q->offline and
|
||||
* per_cpu_remove_cache. Prevent cpu_quarantine from being corrupted
|
||||
* by interrupt.
|
||||
*/
|
||||
if (READ_ONCE(q->offline))
|
||||
return;
|
||||
qlist_move_cache(q, &to_free, cache);
|
||||
qlist_free_all(&to_free, cache);
|
||||
}
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -721,8 +721,10 @@ int dsa_port_link_register_of(struct dsa_port *dp)
|
||||
if (ds->ops->phylink_mac_link_down)
|
||||
ds->ops->phylink_mac_link_down(ds, port,
|
||||
MLO_AN_FIXED, PHY_INTERFACE_MODE_NA);
|
||||
of_node_put(phy_np);
|
||||
return dsa_port_phylink_register(dp);
|
||||
}
|
||||
of_node_put(phy_np);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user