Linux 4.19.242
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.242 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 + arch/arm/boot/dts/imx6ull-colibri.dtsi | 2 arch/arm/boot/dts/logicpd-som-lv-35xx-devkit.dts | 15 ++ arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts | 15 ++ arch/arm/boot/dts/logicpd-som-lv.dtsi | 15 -- arch/arm/boot/dts/omap3-gta04.dtsi | 2 arch/arm/mach-omap2/omap4-common.c | 2 arch/mips/include/asm/timex.h | 8 - arch/mips/kernel/time.c | 11 -- arch/parisc/kernel/processor.c | 3 arch/x86/include/asm/microcode.h | 2 arch/x86/kernel/cpu/microcode/core.c | 6 - arch/x86/kvm/cpuid.c | 5 arch/x86/lib/usercopy_64.c | 2 arch/x86/power/cpu.c | 8 + drivers/bus/sunxi-rsb.c | 2 drivers/clk/sunxi/clk-sun9i-mmc.c | 2 drivers/firewire/core-card.c | 3 drivers/firewire/core-cdev.c | 4 drivers/firewire/core-topology.c | 9 - drivers/firewire/core-transaction.c | 30 ++--- drivers/firewire/sbp2.c | 13 +- drivers/gpio/gpiolib-of.c | 2 drivers/gpu/drm/vgem/vgem_drv.c | 9 + drivers/hwmon/adt7470.c | 4 drivers/iio/dac/ad5446.c | 2 drivers/iio/dac/ad5592r-base.c | 2 drivers/iio/magnetometer/ak8975.c | 1 drivers/md/dm.c | 19 ++- drivers/mmc/host/rtsx_pci_sdmmc.c | 31 +++-- drivers/mtd/nand/raw/mtk_ecc.c | 12 +- drivers/mtd/nand/raw/sh_flctl.c | 14 +- drivers/net/can/grcan.c | 8 + drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 9 - drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 + drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 7 + drivers/net/ethernet/smsc/smsc911x.c | 2 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ++ drivers/net/hippi/rrunner.c | 2 drivers/nfc/nfcmrvl/main.c | 2 drivers/pci/controller/pci-aardvark.c | 16 +- drivers/phy/samsung/phy-exynos5250-sata.c | 21 ++- drivers/pinctrl/pinctrl-pistachio.c | 6 - drivers/tty/n_gsm.c | 40 +++---- drivers/tty/serial/8250/8250_pci.c | 8 - drivers/tty/serial/8250/8250_port.c | 2 drivers/tty/serial/imx.c | 2 drivers/usb/core/quirks.c | 6 + drivers/usb/dwc3/core.c | 8 - drivers/usb/dwc3/gadget.c | 31 +++++ drivers/usb/gadget/configfs.c | 2 drivers/usb/gadget/function/uvc_queue.c | 2 drivers/usb/host/xhci-ring.c | 2 drivers/usb/host/xhci.c | 11 ++ drivers/usb/misc/uss720.c | 3 drivers/usb/mtu3/mtu3_dr.c | 6 - drivers/usb/serial/cp210x.c | 2 drivers/usb/serial/option.c | 12 ++ drivers/usb/serial/whiteheat.c | 5 fs/btrfs/tree-log.c | 14 ++ fs/cifs/smb2ops.c | 8 + include/linux/kernel.h | 2 include/net/tcp.h | 6 + kernel/irq/internals.h | 2 kernel/irq/irqdesc.c | 2 kernel/irq/manage.c | 39 +++++-- lib/hexdump.c | 41 +++++-- mm/page_io.c | 55 ---------- net/ipv4/igmp.c | 9 + net/ipv4/ip_gre.c | 8 - net/ipv4/syncookies.c | 1 net/ipv4/tcp_input.c | 12 ++ net/ipv4/tcp_ipv4.c | 2 net/ipv4/tcp_minisocks.c | 2 net/ipv4/tcp_output.c | 1 net/ipv6/ip6_gre.c | 5 net/ipv6/syncookies.c | 1 net/ipv6/tcp_ipv6.c | 2 net/netfilter/ipvs/ip_vs_conn.c | 2 net/netfilter/nft_socket.c | 52 ++++++--- net/nfc/core.c | 29 ++--- net/nfc/netlink.c | 4 net/sctp/sm_sideeffect.c | 4 net/sunrpc/xprtsock.c | 3 sound/firewire/fireworks/fireworks_hwdep.c | 1 sound/soc/codecs/wm8731.c | 19 ++- sound/soc/codecs/wm8958-dsp2.c | 8 - sound/soc/soc-generic-dmaengine-pcm.c | 6 - tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh | 3 91 files changed, 540 insertions(+), 308 deletions(-)
Adam Ford (1):
ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35
Andrei Lalaev (1):
gpiolib: of: fix bounds check for 'gpio-reserved-ranges'
Armin Wolf (1):
hwmon: (adt7470) Fix warning on module removal
Borislav Petkov (1):
x86/cpu: Load microcode during restore_processor_state()
Bruno Thomsen (1):
USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader
Chengfeng Ye (1):
firewire: fix potential uaf in outbound_phy_packet_callback()
Christophe JAILLET (1):
bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
Chuanhong Guo (1):
mtd: rawnand: fix ecc parameters for mt7622
Codrin Ciubotariu (1):
ASoC: dmaengine: Restore NULL prepare_slave_config() callback
Dan Vacura (1):
usb: gadget: uvc: Fix crash when encoding data for usb request
Daniel Hellstrom (1):
can: grcan: use ofdev->dev when allocating DMA memory
Daniel Starke (7):
tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2
tty: n_gsm: fix malformed counter for out of frame data
tty: n_gsm: fix insufficient txframe size
tty: n_gsm: fix missing explicit ldisc flush
tty: n_gsm: fix wrong command retry handling
tty: n_gsm: fix wrong command frame length field encoding
tty: n_gsm: fix incorrect UA handling
Daniel Vetter (1):
drm/vgem: Close use-after-free race in vgem_gem_create
Daniele Palmas (1):
USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions
Duoming Zhou (5):
drivers: net: hippi: Fix deadlock in rr_close()
can: grcan: grcan_close(): fix deadlock
nfc: replace improper check device_is_registered() in netlink related functions
nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
NFC: netlink: fix sleep in atomic bug when firmware download timeout
Eric Dumazet (3):
tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter()
tcp: make sure treq->af_specific is initialized
Fabio Estevam (1):
ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
Filipe Manana (1):
btrfs: always log symlinks in full mode
Florian Westphal (1):
netfilter: nft_socket: only do sk lookups when indev is available
Francesco Ruggeri (1):
tcp: md5: incorrect tcp_header_len for incoming connections
Greg Kroah-Hartman (1):
Linux 4.19.242
H. Nikolaus Schaller (1):
ARM: dts: Fix mmc order for omap3-gta04
Hangyu Hua (1):
usb: misc: fix improper handling of refcount in uss720_probe()
Helge Deller (1):
parisc: Merge model and model name into one line in /proc/cpuinfo
Henry Lin (1):
xhci: stop polling roothubs after shutdown
Ido Schimmel (1):
selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
Jakob Koschel (1):
firewire: remove check of list iterator against head past the loop body
Jian Shen (1):
net: hns3: add validity check for message data length
Jiazi Li (1):
dm: fix mempool NULL pointer race when completing IO
Johan Hovold (1):
serial: imx: fix overrun interrupts in DMA mode
Jonathan Lemon (1):
net: bcmgenet: hide status block before TX timestamping
Kees Cook (1):
USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS
Krzysztof Kozlowski (1):
phy: samsung: exynos5250-sata: fix missing device put in probe error paths
Lv Ruyi (1):
pinctrl: pistachio: fix use of irq_of_parse_and_map()
Maciej W. Rozycki (3):
serial: 8250: Also set sticky MCR bits in console restoration
serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device
MIPS: Fix CP0 counter erratum detection for R4k CPUs
Macpaul Lin (1):
usb: mtu3: fix USB 3.0 dual-role-switch from device to host
Manish Chopra (1):
bnx2x: fix napi API usage sequence
Mark Brown (1):
ASoC: wm8958: Fix change notifications for DSP controls
Max Krummenacher (1):
ARM: dts: imx6ull-colibri: fix vqmmc regulator
Miaoqian Lin (3):
phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
mtd: rawnand: Fix return value check of wait_for_completion_timeout
Michael Hennerich (1):
iio: dac: ad5446: Fix read_raw not returning set value
Mike Snitzer (1):
dm: interlock pending dm_io and dm_wait_for_bios_completion
Mikulas Patocka (3):
hex2bin: make the function hex_to_bin constant-time
hex2bin: fix access beyond string end
x86: __memcpy_flushcache: fix wrong alignment if size > 2^32
Minchan Kim (1):
mm: fix unexpected zeroed page mapping with zram swap
Niels Dossche (1):
firewire: core: extend card->lock in fw_core_handle_bus_reset
Oliver Neukum (2):
USB: quirks: add a Realtek card reader
USB: quirks: add STRING quirk for VCOM device
Pali Rohár (2):
PCI: aardvark: Clear all MSIs at setup
PCI: aardvark: Fix reading MSI interrupt number
Peilin Ye (2):
ip_gre: Make o_seqno start from 0 in native mode
ip6_gre: Avoid updating tunnel->tun_hlen in __gre6_xmit()
Pengcheng Yang (1):
ipvs: correctly print the memory size of ip_vs_conn_tab
Ricky WU (1):
mmc: rtsx: add 74 Clocks in power on flow
Ronnie Sahlberg (1):
cifs: destage any unwritten data to the server before calling copychunk_write
Sandipan Das (1):
kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU
Sergey Shtylyov (1):
smsc911x: allow using IRQ0
Shravya Kumbham (1):
net: emaclite: Add error handling for of_address_to_resource()
Slark Xiao (1):
USB: serial: option: add support for Cinterion MV32-WA/MV32-WB
Takashi Sakamoto (1):
ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
Thinh Nguyen (2):
usb: dwc3: core: Fix tx/rx threshold settings
usb: dwc3: gadget: Return proper request status
Thomas Pfaff (1):
genirq: Synchronize interrupt thread startup
Trond Myklebust (1):
Revert "SUNRPC: attempt AF_LOCAL connect on setup"
Vijayavardhan Vennapusa (1):
usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
Weitao Wang (1):
USB: Fix xhci event ring dequeue pointer ERDP update issue
Xin Long (1):
sctp: check asoc strreset_chunk in sctp_generate_reconf_event
Yang Yingliang (2):
clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()
net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()
Zheyu Ma (2):
iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
ASoC: wm8731: Disable the regulator when probing fails
Zizhuang Deng (1):
iio: dac: ad5592r: Fix the missing return value.
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 241 +SUBLEVEL = 242 EXTRAVERSION = NAME = "People's Front"
arch/arm/boot/dts/imx6qdl-apalis.dtsi +8 -2
@@ -313,6 +313,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>;
@@ -540,8 +542,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 >; };
@@ -807,6 +807,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
arch/arm/boot/dts/imx6ull-colibri.dtsi +1 -1
@@ -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;
arch/arm/boot/dts/logicpd-som-lv-35xx-devkit.dts +15 -0
@@ -15,3 +15,18 @@ model = "LogicPD Zoom OMAP35xx SOM-LV Development Kit"; compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3"; }; + +&omap3_pmx_core2 { + pinctrl-names = "default"; + pinctrl-0 = <&hsusb2_2_pins>; + hsusb2_2_pins: pinmux_hsusb2_2_pins { + pinctrl-single,pins = < + OMAP3430_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */ + OMAP3430_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */ + OMAP3430_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */ + OMAP3430_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */ + OMAP3430_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */ + OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */ + >; + }; +};
arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts +15 -0
@@ -15,3 +15,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 */ + >; + }; +};
arch/arm/boot/dts/logicpd-som-lv.dtsi +0 -15
@@ -269,21 +269,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";
arch/arm/boot/dts/omap3-gta04.dtsi +2 -0
@@ -29,6 +29,8 @@ aliases { display0 = &lcd; display1 = &tv0; + /delete-property/ mmc2; + /delete-property/ mmc3; }; /* fixed 26MHz oscillator */
arch/arm/mach-omap2/omap4-common.c +2 -0
@@ -318,10 +318,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:
arch/mips/include/asm/timex.h +4 -4
@@ -40,9 +40,9 @@typedef unsigned int cycles_t ;/* -* On R4000/R4400 before version 5.0 an erratum exists such that if the -* cycle counter is read in the exact moment that it is matching the -* compare register, no interrupt will be generated. +* On R4000/R4400 an erratum exists such that if the cycle counter is +* read in the exact moment that it is matching the compare register, +* no interrupt will be generated. * * There is a suggested workaround and also the erratum can't strike if * the compare interrupt isn't being used as the clock source device.
@@ -63,7 +63,7 @@ static inline int can_use_mips_counter(unsigned int prid)if (!__builtin_constant_p (cpu_has_counter)) asmvolatile ("" :"=m" (cpu_data[0 ].options));if (likely (cpu_has_counter && - prid >= (PRID_IMP_R4000 |PRID_REV_ENCODE_44 (5 ,0 )))) + prid > (PRID_IMP_R4000 |PRID_REV_ENCODE_44 (15 ,15 ))))return 1 ;else return 0 ;
arch/mips/kernel/time.c +3 -8
@@ -140,15 +140,10 @@ static __init int cpu_has_mfc0_count_bug(void)case CPU_R4400MC :/* * The published errata for the R4400 up to 3.0 say the CPU -* has the mfc0 from count bug. +* has the mfc0 from count bug. This seems the last version +* produced. */ -if ((current_cpu_data.processor_id &0xff ) <=0x30 ) -return 1 ; - -/* -* we assume newer revisions are ok -*/ -return 0 ; +return 1 ; }return 0 ;
arch/parisc/kernel/processor.c +1 -2
@@ -423,8 +423,7 @@ show_cpuinfo (struct seq_file *m, void *v) }seq_printf (m," (0x%02lx)\n" , boot_cpu_data.pdc.capabilities); -seq_printf (m,"model\t\t: %s\n" -"model name\t: %s\n" , +seq_printf (m,"model\t\t: %s - %s\n" , boot_cpu_data.pdc.sys_model_name, cpuinfo->dev ? cpuinfo->dev->name :"Unknown" );
arch/x86/include/asm/microcode.h +2 -0
@@ -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
arch/x86/kernel/cpu/microcode/core.c +3 -3
@@ -773,9 +773,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;
@@ -787,7 +787,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)
arch/x86/kvm/cpuid.c +5 -0
@@ -532,6 +532,11 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,union cpuid10_eax eax;union cpuid10_edx edx; +if (!static_cpu_has (X86_FEATURE_ARCH_PERFMON )) { + entry->eax = entry->ebx = entry->ecx = entry->edx =0 ; +break ; + } +perf_get_x86_pmu_capability (&cap);/*
arch/x86/lib/usercopy_64.c +1 -1
@@ -161,7 +161,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);
arch/x86/power/cpu.c +8 -0
@@ -26,6 +26,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;
@@ -268,6 +269,13 @@ static void notrace __restore_processor_state(struct saved_context *ctxt) x86_platform.restore_sched_clock_state ();mtrr_bp_restore ();perf_restore_debug_store (); + +microcode_bsp_resume (); + +/* +* This needs to happen after the microcode has been updated upon resume +* because some of the MSRs are "emulated" in microcode. +*/ msr_restore_context (ctxt); }
drivers/bus/sunxi-rsb.c +2 -0
@@ -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);
drivers/clk/sunxi/clk-sun9i-mmc.c +2 -0
@@ -117,6 +117,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);
drivers/firewire/core-card.c +3 -0
@@ -681,6 +681,7 @@ EXPORT_SYMBOL_GPL(fw_card_release);void fw_core_remove_card (struct fw_card *card) {struct fw_card_driver dummy_driver = dummy_driver_template; +unsigned long flags; card->driver->update_phy_reg (card,4 ,PHY_LINK_ACTIVE |PHY_CONTENDER ,0 );
@@ -695,7 +696,9 @@ void fw_core_remove_card(struct fw_card *card) dummy_driver.stop_iso = card->driver->stop_iso; card->driver = &dummy_driver; +spin_lock_irqsave (&card->lock, flags);fw_destroy_nodes (card); +spin_unlock_irqrestore (&card->lock, flags);/* Wait for all users, especially device workqueue jobs, to finish. */ fw_card_put (card);
drivers/firewire/core-cdev.c +3 -1
@@ -1495,6 +1495,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet, {struct outbound_phy_packet_event *e = container_of(packet, struct outbound_phy_packet_event, p); +struct client *e_client;switch (status) {/* expected: */
@@ -1511,9 +1512,10 @@ static void outbound_phy_packet_callback(struct fw_packet *packet, } e->phy_packet.data[0 ] = packet->timestamp; + e_client = e->client;queue_event (e->client, &e->event, &e->phy_packet,sizeof (e->phy_packet) + e->phy_packet.length,NULL ,0 ); -client_put (e->client); +client_put (e_client); }static int ioctl_send_phy_packet (struct client *client,union ioctl_arg *arg)
drivers/firewire/core-topology.c +3 -6
@@ -386,16 +386,13 @@ static void report_found_node(struct fw_card *card, card->bm_retries =0 ; } +/* Must be called with card->lock held */ void fw_destroy_nodes (struct fw_card *card) { -unsigned long flags; - -spin_lock_irqsave (&card->lock, flags); card->color++;if (card->local_node !=NULL )for_each_fw_node (card, card->local_node, report_lost_node); card->local_node =NULL ; -spin_unlock_irqrestore (&card->lock, flags); }static void move_tree (struct fw_node *node0,struct fw_node *node1,int port)
@@ -521,6 +518,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,struct fw_node *local_node;unsigned long flags; +spin_lock_irqsave (&card->lock, flags); +/* * If the selfID buffer is not the immediate successor of the * previously processed one, we cannot reliably compare the
@@ -532,8 +531,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, card->bm_retries =0 ; } -spin_lock_irqsave (&card->lock, flags); - card->broadcast_channel_allocated = card->broadcast_channel_auto_allocated; card->node_id = node_id;/*
drivers/firewire/core-transaction.c +16 -14
@@ -86,24 +86,25 @@ static int try_cancel_split_timeout(struct fw_transaction *t)static int close_transaction (struct fw_transaction *transaction,struct fw_card *card,int rcode) { -struct fw_transaction *t; +struct fw_transaction *t =NULL , *iter;unsigned long flags;spin_lock_irqsave (&card->lock, flags); -list_for_each_entry (t, &card->transaction_list, link) { -if (t == transaction) { -if (!try_cancel_split_timeout (t)) { +list_for_each_entry (iter, &card->transaction_list, link) { +if (iter == transaction) { +if (!try_cancel_split_timeout (iter)) {spin_unlock_irqrestore (&card->lock, flags); goto timed_out; } -list_del_init (&t->link); - card->tlabel_mask &= ~(1ULL << t->tlabel); +list_del_init (&iter->link); + card->tlabel_mask &= ~(1ULL << iter->tlabel); + t = iter;break ; } }spin_unlock_irqrestore (&card->lock, flags); -if (&t->link != &card->transaction_list) { +if (t) { t->callback (card, rcode,NULL ,0 , t->callback_data);return 0 ; }
@@ -938,7 +939,7 @@ EXPORT_SYMBOL(fw_core_handle_request);void fw_core_handle_response (struct fw_card *card,struct fw_packet *p) { -struct fw_transaction *t; +struct fw_transaction *t =NULL , *iter;unsigned long flags;u32 *data;size_t data_length;
@@ -950,20 +951,21 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p) rcode =HEADER_GET_RCODE (p->header[1 ]);spin_lock_irqsave (&card->lock, flags); -list_for_each_entry (t, &card->transaction_list, link) { -if (t->node_id == source && t->tlabel == tlabel) { -if (!try_cancel_split_timeout (t)) { +list_for_each_entry (iter, &card->transaction_list, link) { +if (iter->node_id == source && iter->tlabel == tlabel) { +if (!try_cancel_split_timeout (iter)) {spin_unlock_irqrestore (&card->lock, flags); goto timed_out; } -list_del_init (&t->link); - card->tlabel_mask &= ~(1ULL << t->tlabel); +list_del_init (&iter->link); + card->tlabel_mask &= ~(1ULL << iter->tlabel); + t = iter;break ; } }spin_unlock_irqrestore (&card->lock, flags); -if (&t->link == &card->transaction_list) { +if (!t) { timed_out:fw_notice (card,"unsolicited response (source %x, tlabel %x)\n" , source, tlabel);
drivers/firewire/sbp2.c +7 -6
@@ -421,7 +421,7 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request, void *payload, size_t length, void *callback_data) { struct sbp2_logical_unit *lu = callback_data; -struct sbp2_orb *orb; +struct sbp2_orb *orb =NULL , *iter;struct sbp2_status status;unsigned long flags;
@@ -446,17 +446,18 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,/* Lookup the orb corresponding to this status write. */ spin_lock_irqsave (&lu->tgt->lock, flags); -list_for_each_entry (orb, &lu->orb_list, link) { +list_for_each_entry (iter, &lu->orb_list, link) {if (STATUS_GET_ORB_HIGH (status) ==0 && -STATUS_GET_ORB_LOW (status) == orb->request_bus) { - orb->rcode =RCODE_COMPLETE ; -list_del (&orb->link); +STATUS_GET_ORB_LOW (status) == iter->request_bus) { + iter->rcode =RCODE_COMPLETE ; +list_del (&iter->link); + orb = iter;break ; } }spin_unlock_irqrestore (&lu->tgt->lock, flags); -if (&orb->link != &lu->orb_list) { +if (orb) { orb->callback (orb, &status);kref_put (&orb->kref, free_orb);/* orb callback reference */ }else {
drivers/gpio/gpiolib-of.c +1 -1
@@ -525,7 +525,7 @@ static void of_gpiochip_init_valid_mask(struct gpio_chip *chip) i, &start);of_property_read_u32_index (np,"gpio-reserved-ranges" , i +1 , &count); -if (start >= chip->ngpio || start + count >= chip->ngpio) +if (start >= chip->ngpio || start + count > chip->ngpio)continue ;bitmap_clear (chip->valid_mask, start, count);
drivers/gpu/drm/vgem/vgem_drv.c +6 -3
@@ -189,9 +189,10 @@ static struct drm_gem_object *vgem_gem_create(struct drm_device *dev,return ERR_CAST (obj); ret =drm_gem_handle_create (file, &obj->base, handle); -drm_gem_object_put_unlocked (&obj->base); -if (ret) +if (ret) { +drm_gem_object_put_unlocked (&obj->base);return ERR_PTR (ret); + }return &obj->base; }
@@ -214,7 +215,9 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev, args->size = gem_object->size; args->pitch = pitch; -DRM_DEBUG_DRIVER ("Created object of size %lld\n" , size); +drm_gem_object_put_unlocked (gem_object); + +DRM_DEBUG_DRIVER ("Created object of size %llu\n" , args->size);return 0 ; }
drivers/hwmon/adt7470.c +2 -2
@@ -33,6 +33,7 @@#include <linux/kthread.h> #include <linux/slab.h> #include <linux/util_macros.h> +#include <linux/sched.h> /* Addresses to scan */ static const unsigned short normal_i2c[] = {0x2C ,0x2E ,0x2F ,I2C_CLIENT_END };
@@ -273,11 +274,10 @@ static int adt7470_update_thread(void *p)adt7470_read_temperatures (client, data);mutex_unlock (&data->lock); -set_current_state (TASK_INTERRUPTIBLE );if (kthread_should_stop ())break ; -schedule_timeout (msecs_to_jiffies (data->auto_update_interval)); +schedule_timeout_interruptible (msecs_to_jiffies (data->auto_update_interval)); }return 0 ;
drivers/iio/dac/ad5446.c +1 -1
@@ -171,7 +171,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;
drivers/iio/dac/ad5592r-base.c +1 -1
@@ -531,7 +531,7 @@ static int ad5592r_alloc_channels(struct ad5592r_state *st)if (!ret) st->channel_modes[reg] = tmp; -fwnode_property_read_u32 (child,"adi,off-state" , &tmp); + ret =fwnode_property_read_u32 (child,"adi,off-state" , &tmp);if (!ret) st->channel_offstate[reg] = tmp; }
drivers/iio/magnetometer/ak8975.c +1 -0
@@ -404,6 +404,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; }/*
drivers/md/dm.c +12 -7
@@ -631,21 +631,20 @@ static void start_io_acct(struct dm_io *io) false, 0, &io->stats_aux); } -static void end_io_acct (struct dm_io *io) +static void end_io_acct (struct mapped_device *md,struct bio *bio, +unsigned long start_time,struct dm_stats_aux *stats_aux) { -struct mapped_device *md = io->md; -struct bio *bio = io->orig_bio; -unsigned long duration = jiffies - io->start_time; +unsigned long duration = jiffies - start_time;int pending;int rw =bio_data_dir (bio);generic_end_io_acct (md->queue,bio_op (bio), &dm_disk (md)->part0, - io->start_time); + start_time);if (unlikely (dm_stats_used (&md->stats)))dm_stats_account_io (&md->stats,bio_data_dir (bio), bio->bi_iter.bi_sector,bio_sectors (bio), - true, duration, &io->stats_aux); + true, duration, stats_aux);/* * After this is decremented the bio must not be touched if it is
@@ -872,6 +871,8 @@ static void dec_pending(struct dm_io *io, blk_status_t error)blk_status_t io_error;struct bio *bio;struct mapped_device *md = io->md; +unsigned long start_time =0 ; +struct dm_stats_aux stats_aux;/* Push-back supersedes any I/O errors */ if (unlikely (error)) {
@@ -898,8 +899,10 @@ static void dec_pending(struct dm_io *io, blk_status_t error) io_error = io->status; bio = io->orig_bio; -end_io_acct (io); + start_time = io->start_time; + stats_aux = io->stats_aux;free_io (md, io); +end_io_acct (md, bio, start_time, &stats_aux);if (io_error ==BLK_STS_DM_REQUEUE )return ;
@@ -2472,6 +2475,8 @@ static int dm_wait_for_completion(struct mapped_device *md, long task_state) }finish_wait (&md->wait, &wait); +smp_rmb ();/* paired with atomic_dec_return in end_io_acct */ +return r; }
drivers/mmc/host/rtsx_pci_sdmmc.c +21 -10
@@ -49,10 +49,7 @@ struct realtek_pci_sdmmc {bool double_clk;bool eject;bool initial_mode; -int power_state; -#define SDMMC_POWER_ON 1 -#define SDMMC_POWER_OFF 0 - +int prev_power_state;int sg_count;s32 cookie;int cookie_sg_count;
@@ -914,14 +911,21 @@ static int sd_set_bus_width(struct realtek_pci_sdmmc *host,return err; } -static int sd_power_on (struct realtek_pci_sdmmc *host) +static int sd_power_on (struct realtek_pci_sdmmc *host,unsigned char power_mode) {struct rtsx_pcr *pcr = host->pcr;int err; -if (host->power_state ==SDMMC_POWER_ON ) +if (host->prev_power_state ==MMC_POWER_ON )return 0 ; +if (host->prev_power_state ==MMC_POWER_UP ) { +rtsx_pci_write_register (pcr,SD_BUS_STAT ,SD_CLK_TOGGLE_EN ,0 ); + goto finish; + } + +msleep (100 ); +rtsx_pci_init_cmd (pcr);rtsx_pci_add_cmd (pcr,WRITE_REG_CMD ,CARD_SELECT ,0x07 ,SD_MOD_SEL ); rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
@@ -940,11 +944,17 @@ static int sd_power_on(struct realtek_pci_sdmmc *host)if (err <0 )return err; +mdelay (1 ); + err =rtsx_pci_write_register (pcr,CARD_OE ,SD_OUTPUT_EN ,SD_OUTPUT_EN );if (err <0 )return err; - host->power_state =SDMMC_POWER_ON ; +/* send at least 74 clocks */ +rtsx_pci_write_register (pcr,SD_BUS_STAT ,SD_CLK_TOGGLE_EN ,SD_CLK_TOGGLE_EN ); + +finish: + host->prev_power_state = power_mode;return 0 ; }
@@ -953,7 +963,7 @@ static int sd_power_off(struct realtek_pci_sdmmc *host)struct rtsx_pcr *pcr = host->pcr;int err; - host->power_state =SDMMC_POWER_OFF ; + host->prev_power_state =MMC_POWER_OFF ;rtsx_pci_init_cmd (pcr);
@@ -979,7 +989,7 @@ static int sd_set_power_mode(struct realtek_pci_sdmmc *host,if (power_mode ==MMC_POWER_OFF ) err =sd_power_off (host);else - err =sd_power_on (host); + err =sd_power_on (host, power_mode);return err; }
@@ -1414,10 +1424,11 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) host =mmc_priv (mmc); host->pcr = pcr; + mmc->ios.power_delay_ms =5 ; host->mmc = mmc; host->pdev = pdev; host->cookie =-1 ; - host->power_state =SDMMC_POWER_OFF ; + host->prev_power_state =MMC_POWER_OFF ;INIT_WORK (&host->work, sd_request);platform_set_drvdata (pdev, host); pcr->slots[RTSX_SD_CARD ].p_dev = pdev;
drivers/mtd/nand/raw/mtk_ecc.c +8 -4
@@ -51,6 +51,7 @@struct mtk_ecc_caps {u32 err_mask; +u32 err_shift;const u8 *ecc_strength;const u32 *ecc_regs;u8 num_ecc_strength;
@@ -84,7 +85,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 {
@@ -229,7 +230,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 */
@@ -453,6 +454,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 ,
@@ -463,6 +465,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 ,
@@ -472,10 +475,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 ,
drivers/mtd/nand/raw/sh_flctl.c +8 -6
@@ -399,7 +399,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;
@@ -440,13 +441,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:
@@ -456,7 +458,7 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,dma_unmap_single (chan->device->dev, dma_addr, len, dir); -/* ret > 0 is success */ +/* ret == 0 is success */ return ret; }
@@ -480,7 +482,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 */
@@ -539,7 +541,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 */
drivers/net/can/grcan.c +6 -2
@@ -252,6 +252,7 @@ struct grcan_device_config {struct grcan_priv {struct can_priv can;/* must be the first member */ struct net_device *dev; +struct device *ofdev_dev;struct napi_struct napi;struct grcan_registers __iomem *regs;/* ioremap'ed registers */
@@ -928,7 +929,7 @@ static void grcan_free_dma_buffers(struct net_device *dev)struct grcan_priv *priv =netdev_priv (dev);struct grcan_dma *dma = &priv->dma; -dma_free_coherent (&dev->dev, dma->base_size, dma->base_buf, +dma_free_coherent (priv->ofdev_dev, dma->base_size, dma->base_buf, dma->base_handle);memset (dma,0 ,sizeof (*dma)); }
@@ -953,7 +954,7 @@ static int grcan_allocate_dma_buffers(struct net_device *dev,/* Extra GRCAN_BUFFER_ALIGNMENT to allow for alignment */ dma->base_size = lsize + ssize +GRCAN_BUFFER_ALIGNMENT ; - dma->base_buf =dma_alloc_coherent (&dev->dev, + dma->base_buf =dma_alloc_coherent (priv->ofdev_dev, dma->base_size, &dma->base_handle,GFP_KERNEL );
@@ -1117,8 +1118,10 @@ static int grcan_close(struct net_device *dev) priv->closing = true;if (priv->need_txbug_workaround) { +spin_unlock_irqrestore (&priv->lock, flags);del_timer_sync (&priv->hang_timer);del_timer_sync (&priv->rr_timer); +spin_lock_irqsave (&priv->lock, flags); }netif_stop_queue (dev);grcan_stop_hardware (dev);
@@ -1604,6 +1607,7 @@ static int grcan_setup_netdev(struct platform_device *ofdev,memcpy (&priv->config, &grcan_module_config,sizeof (struct grcan_device_config )); priv->dev = dev; + priv->ofdev_dev = &ofdev->dev; priv->regs = base; priv->can.bittiming_const = &grcan_bittiming_const; priv->can.do_set_bittiming = grcan_set_bittiming;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +5 -4
@@ -14297,10 +14297,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);
@@ -14405,6 +14401,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 */
drivers/net/ethernet/broadcom/genet/bcmgenet.c +7 -0
@@ -1549,6 +1549,11 @@ static struct sk_buff *bcmgenet_put_tx_csum(struct net_device *dev,return skb; } +static void bcmgenet_hide_tsb (struct sk_buff *skb) +{ +__skb_pull (skb,sizeof (struct status_64 )); +} +static netdev_tx_t bcmgenet_xmit (struct sk_buff *skb,struct net_device *dev) {struct bcmgenet_priv *priv =netdev_priv (dev);
@@ -1657,6 +1662,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 */
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +7 -0
@@ -60,6 +60,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);
drivers/net/ethernet/smsc/smsc911x.c +1 -1
@@ -2446,7 +2446,7 @@ static int smsc911x_drv_probe(struct platform_device *pdev)if (irq == -EPROBE_DEFER ) { retval = -EPROBE_DEFER ; goto out_0; - }else if (irq <=0 ) { + }else if (irq <0 ) {pr_warn ("Could not allocate irq resource\n" ); retval = -ENODEV ; goto out_0;
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -0
@@ -873,6 +873,7 @@ static int sun8i_dwmac_register_mdio_mux(struct stmmac_priv *priv) ret =mdio_mux_init (priv->device, mdio_mux, mdio_mux_syscon_switch_fn, &gmac->mux_handle, priv, priv->mii); +of_node_put (mdio_mux);return ret; }
drivers/net/ethernet/xilinx/xilinx_emaclite.c +12 -3
@@ -827,10 +827,10 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg,static int xemaclite_mdio_setup (struct net_local *lp,struct device *dev) {struct mii_bus *bus; -int rc;struct resource res;struct device_node *np =of_get_parent (lp->phy_node);struct device_node *npp; +int rc, ret;/* Don't register the MDIO bus if the phy_node or its parent node * can't be found.
@@ -840,8 +840,14 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)return -ENODEV ; } npp =of_get_parent (np); - -of_address_to_resource (npp,0 , &res); + ret =of_address_to_resource (npp,0 , &res); +of_node_put (npp); +if (ret) { +dev_err (dev,"%s resource error!\n" , + dev->of_node->full_name); +of_node_put (np); +return ret; + }if (lp->ndev->mem_start != res.start) {struct phy_device *phydev; phydev =of_phy_find_device (lp->phy_node);
@@ -850,6 +856,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) "MDIO of the phy is not registered yet\n"); else put_device(&phydev->mdio.dev); +of_node_put (np);return 0 ; }
@@ -862,6 +869,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) bus =mdiobus_alloc ();if (!bus) {dev_err (dev,"Failed to allocate mdiobus\n" ); +of_node_put (np);return -ENOMEM ; }
@@ -874,6 +882,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) bus->parent = dev; rc =of_mdiobus_register (bus, np); +of_node_put (np);if (rc) {dev_err (dev,"Failed to register mdio bus.\n" ); goto err_register;
drivers/net/hippi/rrunner.c +2 -0
@@ -1352,7 +1352,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);
drivers/nfc/nfcmrvl/main.c +1 -1
@@ -194,6 +194,7 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv) {struct nci_dev *ndev = priv->ndev; +nci_unregister_device (ndev);if (priv->ndev->nfc_dev->fw_download_in_progress)nfcmrvl_fw_dnld_abort (priv);
@@ -202,7 +203,6 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv)if (gpio_is_valid (priv->config.reset_n_io))gpio_free (priv->config.reset_n_io); -nci_unregister_device (ndev);nci_free_device (ndev);kfree (priv); }
drivers/pci/controller/pci-aardvark.c +7 -9
@@ -103,6 +103,7 @@#define PCIE_MSI_ADDR_HIGH_REG (CONTROL_BASE_ADDR + 0x54)#define PCIE_MSI_STATUS_REG (CONTROL_BASE_ADDR + 0x58)#define PCIE_MSI_MASK_REG (CONTROL_BASE_ADDR + 0x5C) +#define PCIE_MSI_ALL_MASK GENMASK(31, 0)#define PCIE_MSI_PAYLOAD_REG (CONTROL_BASE_ADDR + 0x9C)#define PCIE_MSI_DATA_MASK GENMASK(15, 0)
@@ -489,6 +490,7 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)advk_writel (pcie, reg,PCIE_CORE_CTRL2_REG );/* Clear all interrupts */ +advk_writel (pcie,PCIE_MSI_ALL_MASK ,PCIE_MSI_STATUS_REG );advk_writel (pcie,PCIE_ISR0_ALL_MASK ,PCIE_ISR0_REG );advk_writel (pcie,PCIE_ISR1_ALL_MASK ,PCIE_ISR1_REG );advk_writel (pcie,PCIE_IRQ_ALL_MASK ,HOST_CTRL_INT_STATUS_REG );
@@ -501,7 +503,7 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)advk_writel (pcie,PCIE_ISR1_ALL_MASK ,PCIE_ISR1_MASK_REG );/* Unmask all MSI's */ -advk_writel (pcie,0 ,PCIE_MSI_MASK_REG ); +advk_writel (pcie, ~(u32 )PCIE_MSI_ALL_MASK ,PCIE_MSI_MASK_REG );/* Enable summary interrupt for GIC SPI source */ reg =PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK );
@@ -1033,23 +1035,19 @@ static void advk_pcie_remove_irq_domain(struct advk_pcie *pcie)static void advk_pcie_handle_msi (struct advk_pcie *pcie) {u32 msi_val, msi_mask, msi_status, msi_idx; -u16 msi_data; +int virq; msi_mask =advk_readl (pcie,PCIE_MSI_MASK_REG ); msi_val =advk_readl (pcie,PCIE_MSI_STATUS_REG ); - msi_status = msi_val & ~msi_mask; + msi_status = msi_val & ((~msi_mask) &PCIE_MSI_ALL_MASK );for (msi_idx =0 ; msi_idx <MSI_IRQ_NUM ; msi_idx++) {if (!(BIT (msi_idx) & msi_status))continue ; -/* -* msi_idx contains bits [4:0] of the msi_data and msi_data -* contains 16bit MSI interrupt number -*/ advk_writel (pcie,BIT (msi_idx),PCIE_MSI_STATUS_REG ); - msi_data =advk_readl (pcie,PCIE_MSI_PAYLOAD_REG ) &PCIE_MSI_DATA_MASK ; -generic_handle_irq (msi_data); + virq =irq_find_mapping (pcie->msi_inner_domain, msi_idx); +generic_handle_irq (virq); } advk_writel(pcie, PCIE_ISR0_MSI_INT_PENDING,
drivers/phy/samsung/phy-exynos5250-sata.c +15 -6
@@ -193,6 +193,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 ;
@@ -201,20 +202,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);
@@ -222,11 +224,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[] = {
drivers/pinctrl/pinctrl-pistachio.c +3 -3
@@ -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; }
drivers/tty/n_gsm.c +21 -19
@@ -72,6 +72,8 @@ module_param(debug, int, 0600);*/ #define MAX_MRU 1500#define MAX_MTU 1500 +/* SOF, ADDR, CTRL, LEN1, LEN2, ..., FCS, EOF */ +#define PROT_OVERHEAD 7#define GSM_NET_TX_TIMEOUT (HZ*10)/**
@@ -823,7 +825,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)break ;case 2 :/* Unstructed with modem bits. Always one byte as we never send inline break data */ - *dp++ =gsm_encode_modem (dlci); + *dp++ = (gsm_encode_modem (dlci) <<1 ) |EA ;break ; }WARN_ON (kfifo_out_locked (dlci->fifo, dp , len, &dlci->lock) != len);
@@ -1300,11 +1302,12 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,static void gsm_control_transmit (struct gsm_mux *gsm,struct gsm_control *ctrl) { -struct gsm_msg *msg =gsm_data_alloc (gsm,0 , ctrl->len +1 , gsm->ftype); +struct gsm_msg *msg =gsm_data_alloc (gsm,0 , ctrl->len +2 , gsm->ftype);if (msg ==NULL )return ; - msg->data[0 ] = (ctrl->cmd <<1 ) |2 |EA ;/* command */ -memcpy (msg->data +1 , ctrl->data, ctrl->len); + msg->data[0 ] = (ctrl->cmd <<1 ) |CR |EA ;/* command */ + msg->data[1 ] = (ctrl->len <<1 ) |EA ; +memcpy (msg->data +2 , ctrl->data, ctrl->len);gsm_data_queue (gsm->dlci[0 ], msg); }
@@ -1327,7 +1330,6 @@ static void gsm_control_retransmit(struct timer_list *t)spin_lock_irqsave (&gsm->control_lock, flags); ctrl = gsm->pending_cmd;if (ctrl) { - gsm->cretries--;if (gsm->cretries ==0 ) { gsm->pending_cmd =NULL ; ctrl->error = -ETIMEDOUT ;
@@ -1336,6 +1338,7 @@ static void gsm_control_retransmit(struct timer_list *t)wake_up (&gsm->event);return ; } + gsm->cretries--;gsm_control_transmit (gsm, ctrl);mod_timer (&gsm->t2_timer, jiffies + gsm->t2 *HZ /100 ); }
@@ -1376,7 +1379,7 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,/* 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;
@@ -1808,7 +1811,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 ;
@@ -1959,7 +1961,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
@@ -2096,6 +2099,7 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)gsm_dlci_release (gsm->dlci[i]);mutex_unlock (&gsm->mutex);/* Now wipe the queues */ +tty_ldisc_flush (gsm->tty);list_for_each_entry_safe (txq, ntxq, &gsm->tx_list, list)kfree (txq);INIT_LIST_HEAD (&gsm->tx_list);
@@ -2196,7 +2200,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);
@@ -2513,7 +2517,7 @@ static int gsmld_config(struct tty_struct *tty, struct gsm_mux *gsm,/* 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 ;
@@ -2856,19 +2860,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);
drivers/tty/serial/8250/8250_pci.c +4 -4
@@ -2656,7 +2656,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,
@@ -3172,10 +3172,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, },
@@ -4028,7 +4028,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.
drivers/tty/serial/8250/8250_port.c +1 -1
@@ -3273,7 +3273,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 ); }/*
drivers/tty/serial/imx.c +1 -1
@@ -1369,7 +1369,7 @@ static int imx_uart_startup(struct uart_port *port)imx_uart_writel (sport, ucr1,UCR1 ); ucr4 =imx_uart_readl (sport,UCR4 ) & ~UCR4_OREN ; -if (!sport->dma_is_enabled) +if (!dma_is_inited) ucr4 |=UCR4_OREN ;imx_uart_writel (sport, ucr4,UCR4 );
drivers/usb/core/quirks.c +6 -0
@@ -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 },
drivers/usb/dwc3/core.c +4 -4
@@ -1213,10 +1213,10 @@ static void dwc3_get_properties(struct dwc3 *dwc)u8 lpm_nyet_threshold;u8 tx_de_emphasis;u8 hird_threshold; -u8 rx_thr_num_pkt_prd; -u8 rx_max_burst_prd; -u8 tx_thr_num_pkt_prd; -u8 tx_max_burst_prd; +u8 rx_thr_num_pkt_prd =0 ; +u8 rx_max_burst_prd =0 ; +u8 tx_thr_num_pkt_prd =0 ; +u8 tx_max_burst_prd =0 ;/* default to highest possible threshold */ lpm_nyet_threshold =0xf ;
drivers/usb/dwc3/gadget.c +30 -1
@@ -2415,6 +2415,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)
@@ -2444,7 +2445,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;
drivers/usb/gadget/configfs.c +2 -0
@@ -1412,6 +1412,8 @@ static void configfs_composite_unbind(struct usb_gadget *gadget)usb_ep_autoconfig_reset (cdev->gadget);spin_lock_irqsave (&gi->spinlock, flags); cdev->gadget =NULL ; + cdev->deactivations =0 ; + gadget->deactivated = false;set_gadget_data (gadget,NULL );spin_unlock_irqrestore (&gi->spinlock, flags); }
drivers/usb/gadget/function/uvc_queue.c +2 -0
@@ -242,6 +242,8 @@ void uvcg_queue_cancel(struct uvc_video_queue *queue, int disconnect) buf->state =UVC_BUF_STATE_ERROR ;vb2_buffer_done (&buf->buf.vb2_buf,VB2_BUF_STATE_ERROR ); } + queue->buf_used =0 ; +/* This must be protected by the irqlock spinlock to avoid race * conditions between uvc_queue_buffer and the disconnection event that * could result in an interruptible wait in uvc_dequeue_buffer. Do not
drivers/usb/host/xhci-ring.c +2 -0
@@ -2848,6 +2848,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 ; }
drivers/usb/host/xhci.c +11 -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 */
drivers/usb/misc/uss720.c +1 -2
@@ -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);
drivers/usb/mtu3/mtu3_dr.c +2 -4
@@ -30,10 +30,8 @@ enum mtu3_vbus_id_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 */
drivers/usb/serial/cp210x.c +2 -0
@@ -195,6 +195,8 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ + { USB_DEVICE(0x17A8, 0x0101) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Int Ant) */ + { USB_DEVICE(0x17A8, 0x0102) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Ext Ant) */ { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
drivers/usb/serial/option.c +12 -0
@@ -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),
drivers/usb/serial/whiteheat.c +2 -3
@@ -611,9 +611,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:
fs/btrfs/tree-log.c +13 -1
@@ -4906,6 +4906,18 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans,mutex_lock (&inode->log_mutex); } +/* +* For symlinks, we must always log their content, which is stored in an +* inline extent, otherwise we could end up with an empty symlink after +* log replay, which is invalid on linux (symlink(2) returns -ENOENT if +* one attempts to create an empty symlink). +* We don't need to worry about flushing delalloc, because when we create +* the inline extent when the symlink is created (we never have delalloc +* for symlinks). +*/ +if (S_ISLNK (inode->vfs_inode.i_mode)) + inode_only =LOG_INODE_ALL ; +/* * a brute force approach to making sure we get the most uptodate * copies of everything.
@@ -5462,7 +5474,7 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans, } ctx->log_new_dentries = false; -if (type ==BTRFS_FT_DIR || type ==BTRFS_FT_SYMLINK ) +if (type ==BTRFS_FT_DIR ) log_mode =LOG_INODE_ALL ; ret =btrfs_log_inode (trans, root,BTRFS_I (di_inode), log_mode,0 ,LLONG_MAX , ctx);
fs/cifs/smb2ops.c +8 -0
@@ -1144,9 +1144,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 ;
include/linux/kernel.h +1 -1
@@ -631,7 +631,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);
include/net/tcp.h +6 -0
@@ -594,6 +594,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 *);
@@ -1938,6 +1939,11 @@ struct tcp_request_sock_ops { enum tcp_synack_type synack_type); }; +extern const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops; +#if IS_ENABLED (CONFIG_IPV6 ) +extern const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops; +#endif +#ifdef CONFIG_SYN_COOKIES static inline __u32 cookie_init_sequence(const struct tcp_request_sock_ops *ops, const struct sock *sk, struct sk_buff *skb,
kernel/irq/internals.h +2 -0
@@ -29,12 +29,14 @@ extern struct irqaction chained_action;* IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed * IRQTF_AFFINITY - irq thread is requested to adjust affinity * IRQTF_FORCED_THREAD - irq action is force threaded +* IRQTF_READY - signals that irq thread is ready */ enum {IRQTF_RUNTHREAD ,IRQTF_WARNED ,IRQTF_AFFINITY ,IRQTF_FORCED_THREAD , +IRQTF_READY , };/*
kernel/irq/irqdesc.c +2 -0
@@ -404,6 +404,7 @@ static struct irq_desc *alloc_desc(int irq, int node, unsigned int flags,lockdep_set_class (&desc->lock, &irq_desc_lock_class);mutex_init (&desc->request_mutex);init_rcu_head (&desc->rcu); +init_waitqueue_head (&desc->wait_for_threads);desc_set_defaults (irq, desc, node, affinity, owner);irqd_set (&desc->irq_data, flags);
@@ -568,6 +569,7 @@ int __init early_irq_init(void)raw_spin_lock_init (&desc[i].lock);lockdep_set_class (&desc[i].lock, &irq_desc_lock_class);mutex_init (&desc[i].request_mutex); +init_waitqueue_head (&desc[i].wait_for_threads);desc_set_defaults (i, &desc[i], node,NULL ,NULL ); }return arch_early_irq_init ();
kernel/irq/manage.c +29 -10
@@ -1063,6 +1063,31 @@ static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action)raw_spin_unlock_irq (&desc->lock); } +/* +* Internal function to notify that a interrupt thread is ready. +*/ +static void irq_thread_set_ready (struct irq_desc *desc, +struct irqaction *action) +{ +set_bit (IRQTF_READY , &action->thread_flags); +wake_up (&desc->wait_for_threads); +} + +/* +* Internal function to wake up a interrupt thread and wait until it is +* ready. +*/ +static void wake_up_and_wait_for_irq_thread_ready (struct irq_desc *desc, +struct irqaction *action) +{ +if (!action || !action->thread) +return ; + +wake_up_process (action->thread); +wait_event (desc->wait_for_threads, +test_bit (IRQTF_READY , &action->thread_flags)); +} +/* * Interrupt handler thread */
@@ -1074,6 +1099,8 @@ static int irq_thread(void *data)irqreturn_t (*handler_fn)(struct irq_desc *desc,struct irqaction *action); +irq_thread_set_ready (desc, action); +if (force_irqthreads &&test_bit (IRQTF_FORCED_THREAD , &action->thread_flags)) handler_fn = irq_forced_thread_fn;
@@ -1462,8 +1489,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) }if (!shared) { -init_waitqueue_head (&desc->wait_for_threads); -/* Setup the type (level, edge polarity) if configured: */ if (new->flags &IRQF_TRIGGER_MASK ) { ret = __irq_set_trigger(desc,
@@ -1553,14 +1578,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)irq_setup_timings (desc, new); -/* -* Strictly no need to wake it up, but hung_task complains -* when no hard interrupt wakes the thread up. -*/ -if (new->thread) -wake_up_process (new->thread); -if (new->secondary) -wake_up_process (new->secondary->thread); +wake_up_and_wait_for_irq_thread_ready (desc, new); +wake_up_and_wait_for_irq_thread_ready (desc, new->secondary);register_irq_proc (irq, desc); new->dir =NULL ;
lib/hexdump.c +31 -10
56 lines not on this page · raw message
mm/page_io.c +0 -55
73 lines not on this page · raw message
net/ipv4/igmp.c +6 -3
@@ -2416,9 +2416,10 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct newpsl->sl_addr[i] = psl->sl_addr[i];/* decrease mem now to avoid the memleak warning */ atomic_sub (IP_SFLSIZE (psl->sl_max), &sk->sk_omem_alloc); -kfree_rcu (psl, rcu); }rcu_assign_pointer (pmc->sflist, newpsl); +if (psl) +kfree_rcu (psl, rcu); psl = newpsl; } rv =1 ;/* > 0 for insert logic below if sl_count is 0 */
@@ -2516,11 +2517,13 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) psl->sl_count, psl->sl_addr, 0);/* decrease mem now to avoid the memleak warning */ atomic_sub (IP_SFLSIZE (psl->sl_max), &sk->sk_omem_alloc); -kfree_rcu (psl, rcu); - }else + }else { (void )ip_mc_del_src (in_dev, &msf->imsf_multiaddr, pmc->sfmode,0 ,NULL ,0 ); + }rcu_assign_pointer (pmc->sflist, newpsl); +if (psl) +kfree_rcu (psl, rcu); pmc->sfmode = msf->imsf_fmode; err =0 ; done:
net/ipv4/ip_gre.c +3 -5
@@ -435,14 +435,12 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev, __be16 proto) {struct ip_tunnel *tunnel =netdev_priv (dev); - -if (tunnel->parms.o_flags &TUNNEL_SEQ ) - tunnel->o_seqno++; +__be16 flags = tunnel->parms.o_flags;/* Push GRE header. */ gre_build_header (skb, tunnel->tun_hlen, - tunnel->parms.o_flags, proto, tunnel->parms.o_key, -htonl (tunnel->o_seqno)); + flags, proto, tunnel->parms.o_key, + (flags &TUNNEL_SEQ ) ?htonl (tunnel->o_seqno++) :0 );ip_tunnel_xmit (skb, dev, tnl_params, tnl_params->protocol); }
net/ipv4/syncookies.c +1 -0
@@ -337,6 +337,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb) ireq =inet_rsk (req); treq =tcp_rsk (req); + treq->af_specific = &tcp_request_sock_ipv4_ops; treq->rcv_isn =ntohl (th->seq) -1 ; treq->snt_isn = cookie; treq->ts_off =0 ;
net/ipv4/tcp_input.c +11 -1
@@ -5167,7 +5167,17 @@ static void tcp_new_space(struct sock *sk) sk->sk_write_space (sk); } -static void tcp_check_space (struct sock *sk) +/* Caller made space either from: +* 1) Freeing skbs in rtx queues (after tp->snd_una has advanced) +* 2) Sent skbs from output queue (and thus advancing tp->snd_nxt) +* +* We might be able to generate EPOLLOUT to the application if: +* 1) Space consumed in output/rtx queues is below sk->sk_sndbuf/2 +* 2) notsent amount (tp->write_seq - tp->snd_nxt) became +* small enough that tcp_stream_memory_free() decides it +* is time to generate EPOLLOUT. +*/ +void tcp_check_space (struct sock *sk) {if (sock_flag (sk,SOCK_QUEUE_SHRUNK )) {sock_reset_flag (sk,SOCK_QUEUE_SHRUNK );
net/ipv4/tcp_ipv4.c +1 -1
@@ -1372,7 +1372,7 @@ struct request_sock_ops tcp_request_sock_ops __read_mostly = { .syn_ack_timeout = tcp_syn_ack_timeout, }; -static const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { +const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { .mss_clamp =TCP_MSS_DEFAULT , #ifdef CONFIG_TCP_MD5SIG .req_md5_lookup = tcp_v4_md5_lookup,
net/ipv4/tcp_minisocks.c +1 -1
@@ -550,7 +550,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, newtp->tsoffset = treq->ts_off;#ifdef CONFIG_TCP_MD5SIG newtp->md5sig_info =NULL ;/*XXX*/ -if (newtp->af_specific->md5_lookup (sk, newsk)) +if (treq->af_specific->req_md5_lookup (sk,req_to_sk (req))) newtp->tcp_header_len +=TCPOLEN_MD5SIG_ALIGNED ;#endif if (skb->len >=TCP_MSS_DEFAULT + newtp->tcp_header_len)
net/ipv4/tcp_output.c +1 -0
@@ -69,6 +69,7 @@ static void tcp_event_new_data_sent(struct sock *sk, struct sk_buff *skb)NET_ADD_STATS (sock_net (sk),LINUX_MIB_TCPORIGDATASENT ,tcp_skb_pcount (skb)); +tcp_check_space (sk); }/* SND.NXT, if window was not shrunk or the amount of shrunk was less than one
net/ipv6/ip6_gre.c +3 -2
@@ -750,6 +750,7 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,struct ip_tunnel_info *tun_info;const struct ip_tunnel_key *key;__be16 flags; +int tun_hlen; tun_info =skb_tunnel_info (skb); if (unlikely(!tun_info ||
@@ -767,9 +768,9 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb, dsfield = key->tos; flags = key->tun_flags & (TUNNEL_CSUM |TUNNEL_KEY |TUNNEL_SEQ ); - tunnel->tun_hlen =gre_calc_hlen (flags); + tun_hlen =gre_calc_hlen (flags); - gre_build_header(skb, tunnel->tun_hlen, + gre_build_header(skb, tun_hlen, flags, protocol, tunnel_id_to_key32(tun_info->key.tun_id), (flags & TUNNEL_SEQ) ? htonl(tunnel->o_seqno++)
net/ipv6/syncookies.c +1 -0
@@ -181,6 +181,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) ireq =inet_rsk (req); treq =tcp_rsk (req); + treq->af_specific = &tcp_request_sock_ipv6_ops; treq->tfo_listener = false;if (security_inet_conn_request (sk, skb, req))
net/ipv6/tcp_ipv6.c +1 -1
@@ -789,7 +789,7 @@ struct request_sock_ops tcp6_request_sock_ops __read_mostly = { .syn_ack_timeout = tcp_syn_ack_timeout, }; -static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { +const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { .mss_clamp =IPV6_MIN_MTU -sizeof (struct tcphdr ) -sizeof (struct ipv6hdr ), #ifdef CONFIG_TCP_MD5SIG
net/netfilter/ipvs/ip_vs_conn.c +1 -1
@@ -1426,7 +1426,7 @@ int __init ip_vs_conn_init(void)pr_info ("Connection hash table configured " "(size=%d, memory=%ldKbytes)\n" , ip_vs_conn_tab_size, - (long )(ip_vs_conn_tab_size*sizeof (struct list_head ))/1024 ); + (long )(ip_vs_conn_tab_size*sizeof (*ip_vs_conn_tab))/1024 );IP_VS_DBG (0 ,"Each connection entry needs %zd bytes at least\n" ,sizeof (struct ip_vs_conn ));
net/netfilter/nft_socket.c +38 -14
76 lines not on this page · raw message
net/nfc/core.c +14 -15
@@ -50,7 +50,7 @@ int nfc_fw_download(struct nfc_dev *dev, const char *firmware_name)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -106,7 +106,7 @@ int nfc_dev_up(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -154,7 +154,7 @@ int nfc_dev_down(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -218,7 +218,7 @@ int nfc_start_poll(struct nfc_dev *dev, u32 im_protocols, u32 tm_protocols)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -257,7 +257,7 @@ int nfc_stop_poll(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -302,7 +302,7 @@ int nfc_dep_link_up(struct nfc_dev *dev, int target_index, u8 comm_mode)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -346,7 +346,7 @@ int nfc_dep_link_down(struct nfc_dev *dev)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -412,7 +412,7 @@ int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -458,7 +458,7 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx, u8 mode)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -505,7 +505,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb,device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ;kfree_skb (skb); goto error;
@@ -562,7 +562,7 @@ int nfc_enable_se(struct nfc_dev *dev, u32 se_idx)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -611,7 +611,7 @@ int nfc_disable_se(struct nfc_dev *dev, u32 se_idx)device_lock (&dev->dev); -if (!device_is_registered (&dev->dev)) { +if (dev->shutting_down) { rc = -ENODEV ; goto error; }
@@ -1139,6 +1139,7 @@ int nfc_register_device(struct nfc_dev *dev) dev->rfkill =NULL ; } } + dev->shutting_down = false;device_unlock (&dev->dev); rc =nfc_genl_device_added (dev);
@@ -1171,12 +1172,10 @@ void nfc_unregister_device(struct nfc_dev *dev)rfkill_unregister (dev->rfkill);rfkill_destroy (dev->rfkill); } + dev->shutting_down = true;device_unlock (&dev->dev);if (dev->ops->check_presence) { -device_lock (&dev->dev); - dev->shutting_down = true; -device_unlock (&dev->dev);del_timer_sync (&dev->check_pres_timer);cancel_work_sync (&dev->check_pres_work); }
net/nfc/netlink.c +2 -2
@@ -1262,7 +1262,7 @@ int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name,struct sk_buff *msg;void *hdr; - msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_KERNEL ); + msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_ATOMIC );if (!msg)return -ENOMEM ;
@@ -1278,7 +1278,7 @@ int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name,genlmsg_end (msg, hdr); -genlmsg_multicast (&nfc_genl_family, msg,0 ,0 ,GFP_KERNEL ); +genlmsg_multicast (&nfc_genl_family, msg,0 ,0 ,GFP_ATOMIC );return 0 ;
net/sctp/sm_sideeffect.c +4 -0
@@ -473,6 +473,10 @@ void sctp_generate_reconf_event(struct timer_list *t) goto out_unlock; } +/* This happens when the response arrives after the timer is triggered. */ +if (!asoc->strreset_chunk) + goto out_unlock; + error = sctp_do_sm(net, SCTP_EVENT_T_TIMEOUT, SCTP_ST_TIMEOUT(SCTP_EVENT_TIMEOUT_RECONF), asoc->state, asoc->ep, asoc,
net/sunrpc/xprtsock.c +0 -3
@@ -2974,9 +2974,6 @@ static struct rpc_xprt *xs_setup_local(struct xprt_create *args) }xprt_set_bound (xprt);xs_format_peer_addresses (xprt,"local" ,RPCBIND_NETID_LOCAL ); - ret =ERR_PTR (xs_local_setup_socket (transport)); -if (ret) - goto out_err;break ;default : ret =ERR_PTR (-EAFNOSUPPORT );
sound/firewire/fireworks/fireworks_hwdep.c +1 -0
@@ -35,6 +35,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained, type =SNDRV_FIREWIRE_EVENT_EFW_RESPONSE ;if (copy_to_user (buf, &type,sizeof (type)))return -EFAULT ; + count +=sizeof (type); remained -=sizeof (type); buf +=sizeof (type);
sound/soc/codecs/wm8731.c +11 -8
@@ -604,7 +604,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731) ret =wm8731_reset (wm8731->regmap);if (ret <0 ) {dev_err (dev,"Failed to issue reset: %d\n" , ret); - goto err_regulator_enable; + goto err; }/* Clear POWEROFF, keep everything else disabled */
@@ -621,10 +621,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731)regcache_mark_dirty (wm8731->regmap); -err_regulator_enable: -/* Regulators will be enabled by bias management */ -regulator_bulk_disable (ARRAY_SIZE (wm8731->supplies), wm8731->supplies); - +err:return ret; }
@@ -768,21 +765,27 @@ static int wm8731_i2c_probe(struct i2c_client *i2c, ret =PTR_ERR (wm8731->regmap);dev_err (&i2c->dev,"Failed to allocate register map: %d\n" , ret); -return ret; + goto err_regulator_enable; } ret =wm8731_hw_init (&i2c->dev, wm8731);if (ret !=0 ) -return ret; + goto err_regulator_enable; ret =devm_snd_soc_register_component (&i2c->dev, &soc_component_dev_wm8731, &wm8731_dai,1 );if (ret !=0 ) {dev_err (&i2c->dev,"Failed to register CODEC: %d\n" , ret); -return ret; + goto err_regulator_enable; }return 0 ; + +err_regulator_enable: +/* Regulators will be enabled by bias management */ +regulator_bulk_disable (ARRAY_SIZE (wm8731->supplies), wm8731->supplies); + +return ret; }static int wm8731_i2c_remove (struct i2c_client *client)
sound/soc/codecs/wm8958-dsp2.c +4 -4
@@ -537,7 +537,7 @@ static int wm8958_mbc_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (component, mbc, wm8994->mbc_ena[mbc]); -return 0 ; +return 1 ; }#define WM8958_MBC_SWITCH (xname, xval) {\
@@ -663,7 +663,7 @@ static int wm8958_vss_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (component, vss, wm8994->vss_ena[vss]); -return 0 ; +return 1 ; }
@@ -737,7 +737,7 @@ static int wm8958_hpf_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (component, hpf %3 , ucontrol->value.integer.value[0 ]); -return 0 ; +return 1 ; }#define WM8958_HPF_SWITCH (xname, xval) {\
@@ -831,7 +831,7 @@ static int wm8958_enh_eq_put(struct snd_kcontrol *kcontrol,wm8958_dsp_apply (component, eq, ucontrol->value.integer.value[0 ]); -return 0 ; +return 1 ; }#define WM8958_ENH_EQ_SWITCH (xname, xval) {\
sound/soc/soc-generic-dmaengine-pcm.c +3 -3
@@ -91,10 +91,10 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream,memset (&slave_config,0 ,sizeof (slave_config)); -if (pcm->config && pcm->config->prepare_slave_config) - prepare_slave_config = pcm->config->prepare_slave_config; -else +if (!pcm->config) prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; +else + prepare_slave_config = pcm->config->prepare_slave_config;if (prepare_slave_config) { ret =prepare_slave_config (substream, params, &slave_config);
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh +3 -0
@@ -61,9 +61,12 @@ setup_prepare() vrf_prepare mirror_gre_topo_create + # Avoid changing br1's PVID while it is operational as a L3 interface. + ip link set dev br1 down ip link set dev $swp3 master br1 bridge vlan add dev br1 vid 555 pvid untagged self + ip link set dev br1 up ip address add dev br1 192.0.2.129/28 ip address add dev br1 2001:db8:2::1/64