Linux 4.14.189
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.189 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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
------------
Documentation/devicetree/bindings/usb/dwc3.txt | 2 Makefile | 2 arch/arc/include/asm/elf.h | 2 arch/arc/kernel/entry.S | 16 +---- arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 4 + arch/arm/boot/dts/socfpga.dtsi | 2 arch/arm/boot/dts/socfpga_arria10.dtsi | 2 arch/arm/mach-imx/pm-imx6.c | 10 ++- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 5 + arch/arm64/include/asm/alternative.h | 16 ++--- arch/arm64/include/asm/debug-monitors.h | 2 arch/arm64/include/asm/pgtable-prot.h | 2 arch/arm64/kernel/alternative.c | 16 ----- arch/arm64/kernel/debug-monitors.c | 20 +++++- arch/arm64/kernel/kgdb.c | 2 arch/arm64/kernel/ptrace.c | 4 - arch/arm64/kernel/vmlinux.lds.S | 3 - arch/arm64/kvm/hyp-init.S | 11 ++- arch/mips/kernel/time.c | 13 +--- arch/s390/include/asm/kvm_host.h | 8 +- arch/s390/kernel/early.c | 2 arch/s390/mm/hugetlbpage.c | 2 arch/x86/include/asm/processor.h | 2 arch/x86/kernel/cpu/common.c | 2 arch/x86/kernel/fpu/xstate.c | 2 arch/x86/kvm/kvm_cache_regs.h | 2 arch/x86/kvm/mmu.c | 2 arch/x86/kvm/vmx.c | 2 arch/x86/kvm/x86.c | 2 drivers/acpi/video_detect.c | 19 ++++++ drivers/block/nbd.c | 25 +++++--- drivers/block/zram/zram_drv.c | 3 - drivers/char/tpm/tpm_tis_core.c | 2 drivers/char/virtio_console.c | 3 - drivers/dma/fsl-edma.c | 7 ++ drivers/gpu/drm/exynos/exynos_drm_mic.c | 4 + drivers/gpu/drm/radeon/ci_dpm.c | 7 +- drivers/gpu/host1x/bus.c | 9 +++ drivers/hid/hid-magicmouse.c | 6 ++ drivers/hwmon/emc2103.c | 2 drivers/hwtracing/intel_th/pci.c | 15 +++++ drivers/i2c/busses/i2c-eg20t.c | 1 drivers/iio/accel/mma8452.c | 5 + drivers/iio/health/afe4403.c | 13 ++-- drivers/iio/health/afe4404.c | 8 +- drivers/iio/humidity/hdc100x.c | 10 ++- drivers/iio/magnetometer/ak8974.c | 29 +++++----- drivers/iio/pressure/ms5611_core.c | 11 ++- drivers/iio/pressure/zpa2326.c | 4 + drivers/input/serio/i8042-x86ia64io.h | 7 ++ drivers/md/dm.c | 15 ++++- drivers/message/fusion/mptscsih.c | 4 - drivers/misc/atmel-ssc.c | 24 ++++---- drivers/misc/mei/bus.c | 3 - drivers/mmc/host/sdhci.c | 2 drivers/mtd/nand/brcmnand/brcmnand.c | 5 + drivers/mtd/nand/oxnas_nand.c | 24 ++++++-- drivers/net/dsa/bcm_sf2.c | 2 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 drivers/net/ethernet/cadence/macb_main.c | 2 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 8 +- drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 12 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 14 +++- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 drivers/net/usb/qmi_wwan.c | 1 drivers/net/usb/smsc95xx.c | 9 ++- drivers/net/wireless/ath/ath9k/hif_usb.c | 48 +++------------- drivers/net/wireless/ath/ath9k/hif_usb.h | 5 - drivers/nvme/host/rdma.c | 2 drivers/of/of_mdio.c | 9 ++- drivers/phy/allwinner/phy-sun4i-usb.c | 5 + drivers/spi/spi-fsl-dspi.c | 39 +++++++++++-- drivers/spi/spi-sun6i.c | 14 ++-- drivers/spi/spidev.c | 24 ++++---- drivers/staging/comedi/drivers/addi_apci_1500.c | 10 ++- drivers/thermal/cpu_cooling.c | 6 +- drivers/thermal/mtk_thermal.c | 6 -- drivers/uio/uio_pdrv_genirq.c | 2 drivers/usb/c67x00/c67x00-sched.c | 2 drivers/usb/chipidea/core.c | 24 ++++++++ drivers/usb/dwc2/platform.c | 3 - drivers/usb/gadget/function/f_uac1_legacy.c | 2 drivers/usb/gadget/udc/atmel_usba_udc.c | 2 drivers/usb/host/ehci-platform.c | 5 - drivers/usb/host/ohci-platform.c | 5 - drivers/usb/host/xhci-plat.c | 10 --- drivers/usb/serial/ch341.c | 1 drivers/usb/serial/cypress_m8.c | 2 drivers/usb/serial/cypress_m8.h | 3 + drivers/usb/serial/iuu_phoenix.c | 8 +- drivers/usb/serial/option.c | 6 ++ fs/btrfs/extent_io.c | 40 ++++++++----- fs/cifs/inode.c | 9 +++ fs/fuse/file.c | 12 +++- fs/gfs2/ops_fstype.c | 12 +++- include/linux/cgroup-defs.h | 8 ++ include/linux/cgroup.h | 4 + include/net/dst.h | 10 +++ include/net/genetlink.h | 8 -- include/sound/compress_driver.h | 10 +++ include/trace/events/rxrpc.h | 2 kernel/cgroup/cgroup.c | 29 ++++++---- kernel/sched/fair.c | 10 +++ kernel/time/timer.c | 4 - net/ceph/osd_client.c | 1 net/core/sock.c | 2 net/ipv4/ping.c | 3 + net/ipv4/tcp.c | 15 +++-- net/ipv4/tcp_cong.c | 2 net/ipv4/tcp_ipv4.c | 15 ++++- net/ipv4/tcp_output.c | 10 ++- net/l2tp/l2tp_core.c | 5 - net/llc/af_llc.c | 10 ++- net/netlink/genetlink.c | 49 ---------------- net/sched/sch_atm.c | 8 +- sound/core/compress_offload.c | 4 + sound/drivers/opl3/opl3_synth.c | 2 sound/pci/hda/hda_auto_parser.c | 6 ++ sound/usb/line6/capture.c | 2 sound/usb/line6/playback.c | 2 sound/usb/midi.c | 17 ++++- sound/usb/quirks-table.h | 52 ++++++++++++++++++ tools/perf/util/stat.c | 6 +- 123 files changed, 685 insertions(+), 406 deletions(-)
AceLan Kao (2):
net: usb: qmi_wwan: add support for Quectel EG95 LTE modem
USB: serial: option: add Quectel EG95 LTE modem
Alexander Lobakin (1):
virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
Alexander Shishkin (3):
intel_th: pci: Add Jasper Lake CPU support
intel_th: pci: Add Tiger Lake PCH-H support
intel_th: pci: Add Emmitsburg PCH support
Alexander Usyskin (1):
mei: bus: don't clean driver pointer
Andre Edich (2):
smsc95xx: check return value of smsc95xx_reset
smsc95xx: avoid memory leak in smsc95xx_bind
Andrew Scull (1):
KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART
Andy Shevchenko (1):
i2c: eg20t: Load module automatically if ID matches
Angelo Dureghello (1):
spi: fix initial SPI_SR value in spi-fsl-dspi
Ard Biesheuvel (2):
arm64/alternatives: use subsections for replacement sequences arm64/alternatives: don't patch up internal branches
Bob Peterson (1):
gfs2: read-only mounts should grab the sd_freeze_gl glock
Boris Burkov (1):
btrfs: fix fatal extent_buffer readahead vs releasepage race
Chirantan Ekbote (1):
fuse: Fix parameter for FS_IOC_{GET,SET}FLAGS
Christian Borntraeger (1):
KVM: s390: reduce number of IO pins to 1
Christoph Paasch (1):
tcp: make sure listeners don't initialize congestion-control state
Chuanhua Han (1):
spi: spi-fsl-dspi: use IRQF_SHARED mode to request IRQ
Chuhong Yuan (1):
iio: mma8452: Add missed iio_device_unregister() call in mma8452_probe()
Ciara Loftus (1):
ixgbe: protect ring accesses with READ- and WRITE_ONCE
Colin Ian King (1):
phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked
Cong Wang (3):
net_sched: fix a memory leak in atm_tc_init()
cgroup: fix cgroup_sk_alloc() for sk_clone_lock()
cgroup: Fix sock_cgroup_data on big-endian.
Dan Carpenter (1):
staging: comedi: verify array index is correct before using it
David Howells (1):
rxrpc: Fix trace string
David Pedersen (1):
Input: i8042 - add Lenovo XiaoXin Air 12 to i8042 nomux list
Davide Caratti (1):
bnxt_en: fix NULL dereference in case SR-IOV configuration fails
Dinghao Liu (1):
iio: magnetometer: ak8974: Fix runtime PM imbalance on error
Dmitry Torokhov (1):
HID: magicmouse: do not set up autorepeat
Enric Balletbo i Serra (1):
Revert "thermal: mediatek: fix register index error"
Eric Dumazet (5):
llc: make sure applications use ARPHRD_ETHER
tcp: md5: add missing memory barriers in tcp_md5_do_add()/tcp_md5_hash_key()
tcp: md5: refine tcp_md5_do_add()/tcp_md5_hash_key() barriers
tcp: md5: allow changing MD5 keys in all socket states
tcp: md5: do not send silly options in SYNCOOKIES
Esben Haabendal (1):
uio_pdrv_genirq: fix use without device tree and no interrupt
Finley Xiao (1):
thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power
Florian Fainelli (2):
net: dsa: bcm_sf2: Fix node reference count
of: of_mdio: Correct loop scanning logic
Frederic Weisbecker (1):
timer: Fix wheel index calculation on last level
Greg Kroah-Hartman (2):
Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb" Linux 4.14.189
Gustavo A. R. Silva (1):
arm64: alternative: Use true and false for boolean values
Haibo Chen (1):
mmc: sdhci: do not enable card detect interrupt for gpio cd type
Hans de Goede (1):
ACPI: video: Use native backlight on Acer Aspire 5783z
Hector Martin (1):
ALSA: usb-audio: add quirk for MacroSilicon MS2109
Huacai Chen (1):
MIPS: Fix build for LTS kernel caused by backporting lpj adjustment
Hui Wang (1):
ALSA: hda - let hs_mic be picked ahead of hp_mic
Ido Schimmel (1):
mlxsw: spectrum_router: Remove inappropriate usage of WARN_ON()
Igor Moura (1):
USB: serial: ch341: add new Product ID for CH340
Ilya Dryomov (1):
libceph: don't omit recovery_deletes in target_copy()
James Hilliard (1):
USB: serial: cypress_m8: enable Simply Automated UPB PIM
Janosch Frank (1):
s390/mm: fix huge pte soft dirty copying
Jerome Brunet (1):
arm64: dts: meson: add missing gxl rng clock
Jin Yao (1):
perf stat: Zero all the 'ena' and 'run' array slot stats for interval mode
Johan Hovold (1):
USB: serial: iuu_phoenix: fix memory corruption
Jonathan Cameron (5):
iio:magnetometer:ak8974: Fix alignment and data leak issues iio:humidity:hdc100x Fix alignment and data leak issues iio:pressure:ms5611 Fix buffer element alignment iio:health:afe4403 Fix timestamp alignment and prevent data leak. iio:health:afe4404 Fix timestamp alignment and prevent data leak.
Jörgen Storvist (1):
USB: serial: option: add GosunCn GM500 series
Kevin Buettner (1):
copy_xstate_to_kernel: Fix typo which caused GDB regression
Krzysztof Kozlowski (5):
spi: spi-fsl-dspi: Fix lockup if device is removed during SPI transfer
spi: spi-fsl-dspi: Fix external abort on interrupt in resume or exit paths
spi: spi-fsl-dspi: Fix lockup if device is shutdown during SPI transfer
ARM: dts: socfpga: Align L2 cache-controller nodename with dtschema
dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler
Li Heng (1):
net: cxgb4: fix return error value in t4_prep_fw
Marc Kleine-Budde (1):
spi: spi-sun6i: sun6i_spi_transfer_one(): fix setting of clock rate
Martin Varghese (1):
net: Added pointer check for dst->ops->neigh_lookup in dst_neigh_lookup_skb
Max Gurtovoy (1):
nvme-rdma: assign completion vector correctly
Michał Mirosław (2):
usb: gadget: udc: atmel: fix uninitialized read in debug printk
misc: atmel-ssc: lock with mutex instead of spinlock
Mikulas Patocka (1):
dm: use noio when sending kobject event
Minas Harutyunyan (1):
usb: dwc2: Fix shutdown callback in platform
Miquel Raynal (3):
mtd: rawnand: oxnas: Keep track of registered devices
mtd: rawnand: oxnas: Unregister all devices on error
mtd: rawnand: oxnas: Release all devices in the _remove() path
Navid Emamdoost (2):
drm/exynos: fix ref count leak in mic_pre_enable
iio: pressure: zpa2326: handle pm_runtime_get_sync failure
Neil Armstrong (1):
doc: dt: bindings: usb: dwc3: Update entries for disabling SS instances in park mode
Nicolas Ferre (1):
net: macb: mark device wake capable when "magic-packet" property present
Paolo Bonzini (1):
KVM: x86: bit 8 of non-leaf PDPEs is not reserved
Paul Menzel (1):
ACPI: video: Use native backlight on Acer TravelMate 5735Z
Peng Ma (1):
spi: spi-fsl-dspi: Adding shutdown hook
Peter Chen (1):
usb: chipidea: core: add wakeup support for extcon
Peter Zijlstra (1):
x86/entry: Increase entry_stack size to a full page
Sabrina Dubroca (1):
ipv4: fill fl4_icmp_{type,code} in ping_v4_sendmsg
Sasha Levin (3):
Revert "usb/ohci-platform: Fix a warning when hibernating" Revert "usb/ehci-platform: Set PM runtime as active on resume" Revert "usb/xhci-plat: Set PM runtime as active on resume"
Sean Christopherson (2):
KVM: x86: Inject #GP if guest attempts to toggle CR4.LA57 in 64-bit mode
KVM: x86: Mark CR4.TSD as being possibly owned by the guest
Sean Tranchetti (1):
genetlink: remove genl_bind
Suraj Jitindar Singh (1):
x86/cpu: Move x86_cache_bits settings
Takashi Iwai (2):
ALSA: line6: Perform sanity check for each URB creation
ALSA: usb-audio: Fix race against the error recovery URB submission
Thierry Reding (1):
gpu: host1x: Detach driver on unregister
Tom Rix (2):
drm/radeon: fix double free
USB: c67x00: fix use after free in c67x00_giveback_urb
Tomas Henzl (1):
scsi: mptscsih: Fix read sense data size
Tony Lindgren (1):
ARM: dts: omap4-droid4: Fix spi configuration and increase rate
Vasily Averin (1):
tpm_tis: extra chip->ops check on error path in tpm_tis_core_init
Vasily Gorbik (1):
s390/kasan: fix early pgm check handler execution
Vincent Guittot (1):
sched/fair: handle case of task_h_load() returning 0
Vineet Gupta (2):
ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE
ARC: elf: use right ELF_ARCH
Vinod Koul (1):
ALSA: compress: fix partial_drain completion state
Vishwas M (1):
hwmon: (emc2103) fix unable to change fan pwm1_enable attribute
Wade Mealing (1):
Revert "zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()"
Wei Li (1):
arm64: kgdb: Fix single-step exception handling oops
Will Deacon (2):
KVM: arm64: Fix definition of PAGE_HYP_DEVICE
arm64: ptrace: Override SPSR.SS when single-stepping is enabled
Xin Long (1):
l2tp: remove skb_dst_set() from l2tp_xmit_skb()
Zhang Qiang (1):
usb: gadget: function: fix missing spinlock in f_uac1_legacy
Zhang Xiaoxu (1):
cifs: update ctime and mtime during truncate
Zheng Bin (1):
nbd: Fix memory leak in nbd_add_socket
Zhenzhong Duan (2):
spi: spidev: fix a race between spidev_release and spidev_remove
spi: spidev: fix a potential use-after-free in spidev_release()
xidongwang (1):
ALSA: opl3: fix infoleak in opl3
yu kuai (1):
ARM: imx6: add missing put_device() call in imx6q_suspend_init()
Álvaro Fernández Rojas (1):
mtd: rawnand: brcmnand: fix CS0 layout
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/usb/dwc3.txt +2 -0
@@ -47,6 +47,8 @@ Optional properties: from P0 to P1/P2/P3 without delay. - snps,dis-tx-ipgap-linecheck-quirk: when set, disable u2mac linestate check during HS transmit. + - snps,parkmode-disable-ss-quirk: when set, all SuperSpeed bus instances in + park mode are disabled. - snps,dis_metastability_quirk: when set, disable metastability workaround. CAUTION: use only if you are absolutely sure of it. - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 188 +SUBLEVEL = 189 EXTRAVERSION = NAME = Petit Gorille
arch/arc/include/asm/elf.h +1 -1
@@ -26,7 +26,7 @@#define R_ARC_32_PCREL 0x31/*to set parameters in the core dumps */ -#define ELF_ARCH EM_ARCOMPACT +#define ELF_ARCH EM_ARC_INUSE#define ELF_CLASS ELFCLASS32#ifdef CONFIG_CPU_BIG_ENDIAN
arch/arc/kernel/entry.S +5 -11
@@ -156,7 +156,6 @@ END(EV_Extension) tracesys: ; save EFA in case tracer wants the PC of traced task ; using ERET won't work since next-PC has already committed - lr r12, [efa] GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11 st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address
@@ -199,15 +198,9 @@ tracesys_exit: ; Breakpoint TRAP ; --------------------------------------------- trap_with_param: - - ; stop_pc info by gdb needs this info - lr r0, [efa] + mov r0, r12 ; EFA in case ptracer/gdb wants stop_pc mov r1, sp - ; Now that we have read EFA, it is safe to do "fake" rtie - ; and get out of CPU exception mode - FAKE_RET_FROM_EXCPN - ; Save callee regs in case gdb wants to have a look ; SP will grow up by size of CALLEE Reg-File ; NOTE: clobbers r12
@@ -234,6 +227,10 @@ ENTRY(EV_Trap) EXCEPTION_PROLOGUE + lr r12, [efa] + + FAKE_RET_FROM_EXCPN + ;============ TRAP 1 :breakpoints ; Check ECR for trap with arg (PROLOGUE ensures r9 has ECR) bmsk.f 0, r9, 7
@@ -241,9 +238,6 @@ ENTRY(EV_Trap) ;============ TRAP (no param): syscall top level - ; First return from Exception to pure K mode (Exception/IRQs renabled) - FAKE_RET_FROM_EXCPN - ; If syscall tracing ongoing, invoke pre-post-hooks GET_CURR_THR_INFO_FLAGS r10 btst r10, TIF_SYSCALL_TRACE
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +3 -1
@@ -16,8 +16,10 @@ #interrupt-cells = <2>; #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <3000000>; + spi-max-frequency = <9600000>; spi-cs-high; + spi-cpol; + spi-cpha; cpcap_adc: adc { compatible = "motorola,mapphone-cpcap-adc";
arch/arm/boot/dts/socfpga.dtsi +1 -1
@@ -706,7 +706,7 @@ }; }; - L2: l2-cache@fffef000 { + L2: cache-controller@fffef000 { compatible = "arm,pl310-cache"; reg = <0xfffef000 0x1000>; interrupts = <0 38 0x04>;
arch/arm/boot/dts/socfpga_arria10.dtsi +1 -1
@@ -606,7 +606,7 @@ reg = <0xffcfb100 0x80>; }; - L2: l2-cache@fffff000 { + L2: cache-controller@fffff000 { compatible = "arm,pl310-cache"; reg = <0xfffff000 0x1000>; interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/mach-imx/pm-imx6.c +6 -4
@@ -483,14 +483,14 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)if (!ocram_pool) {pr_warn ("%s: ocram pool unavailable!\n" , __func__); ret = -ENODEV ; - goto put_node; + goto put_device; } ocram_base =gen_pool_alloc (ocram_pool,MX6Q_SUSPEND_OCRAM_SIZE );if (!ocram_base) {pr_warn ("%s: unable to alloc ocram!\n" , __func__); ret = -ENOMEM ; - goto put_node; + goto put_device; } ocram_pbase =gen_pool_virt_to_phys (ocram_pool, ocram_base);
@@ -513,7 +513,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata) ret =imx6_pm_get_base (&pm_info->mmdc_base, socdata->mmdc_compat);if (ret) {pr_warn ("%s: failed to get mmdc base %d!\n" , __func__, ret); - goto put_node; + goto put_device; } ret =imx6_pm_get_base (&pm_info->src_base, socdata->src_compat);
@@ -560,7 +560,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata) &imx6_suspend, MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info)); - goto put_node; + goto put_device; pl310_cache_map_failed:iounmap (pm_info->gpc_base.vbase);
@@ -570,6 +570,8 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)iounmap (pm_info->src_base.vbase); src_map_failed:iounmap (pm_info->mmdc_base.vbase); +put_device: +put_device (&pdev->dev); put_node:of_node_put (node);
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +5 -0
@@ -245,6 +245,11 @@ }; }; +&hwrng { + clocks = <&clkc CLKID_RNG0>; + clock-names = "core"; +}; + &i2c_A { clocks = <&clkc CLKID_I2C>; };
arch/arm64/include/asm/alternative.h +8 -8
@@ -68,11 +68,11 @@ void apply_alternatives(void *start, size_t length);".pushsection .altinstructions,\"a\"\n" \ ALTINSTR_ENTRY(feature) \".popsection\n" \ -".pushsection .altinstr_replacement, \"a\"\n" \ +".subsection 1\n" \"663:\n\t" \ newinstr"\n" \"664:\n\t" \ -".popsection\n\t" \ +".previous\n\t" \".org . - (664b-663b) + (662b-661b)\n\t" \".org . - (662b-661b) + (664b-663b)\n" \".endif\n"
@@ -112,9 +112,9 @@ void apply_alternatives(void *start, size_t length); 662: .pushsection .altinstructions, "a" altinstruction_entry 661b, 663f, \cap, 662b-661b, 664f-663f .popsection - .pushsection .altinstr_replacement,"ax" + .subsection 1 663: \insn2 -664: .popsection +664: .previous .org . - (664b-663b) + (662b-661b) .org . - (662b-661b) + (664b-663b) .endif
@@ -155,7 +155,7 @@ void apply_alternatives(void *start, size_t length); .pushsection .altinstructions, "a" altinstruction_entry 663f, 661f, \cap, 664f-663f, 662f-661f .popsection - .pushsection .altinstr_replacement, "ax" + .subsection 1 .align 2 /* So GAS knows label 661 is suitably aligned */ 661: .endm
@@ -174,9 +174,9 @@ void apply_alternatives(void *start, size_t length); .macro alternative_else 662: .if .Lasm_alt_mode==0 - .pushsection .altinstr_replacement,"ax" + .subsection 1 .else - .popsection + .previous .endif 663: .endm
@@ -187,7 +187,7 @@ void apply_alternatives(void *start, size_t length); .macro alternative_endif 664: .if .Lasm_alt_mode==0 - .popsection + .previous .endif .org . - (664b-663b) + (662b-661b) .org . - (662b-661b) + (664b-663b)
arch/arm64/include/asm/debug-monitors.h +2 -0
@@ -119,6 +119,8 @@ void disable_debug_monitors(enum dbg_active_el el);void user_rewind_single_step (struct task_struct *task);void user_fastforward_single_step (struct task_struct *task); +void user_regs_reset_single_step (struct user_pt_regs *regs, +struct task_struct *task);void kernel_enable_single_step (struct pt_regs *regs);void kernel_disable_single_step (void );
arch/arm64/include/asm/pgtable-prot.h +1 -1
@@ -65,7 +65,7 @@#define PAGE_HYP __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_HYP_XN)#define PAGE_HYP_EXEC __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY)#define PAGE_HYP_RO __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY | PTE_HYP_XN) -#define PAGE_HYP_DEVICE __pgprot(PROT_DEVICE_nGnRE | PTE_HYP) +#define PAGE_HYP_DEVICE __pgprot(_PROT_DEFAULT | PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_HYP | PTE_HYP_XN)#define PAGE_S2 __pgprot(_PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_NORMAL) | PTE_S2_RDONLY)#define PAGE_S2_DEVICE __pgprot(_PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_DEVICE_nGnRE) | PTE_S2_RDONLY | PTE_UXN)
arch/arm64/kernel/alternative.c +2 -14
@@ -44,20 +44,8 @@ struct alt_region {*/ static bool branch_insn_requires_update (struct alt_instr *alt,unsigned long pc) { -unsigned long replptr; - -if (kernel_text_address (pc)) -return 1 ; - - replptr = (unsigned long )ALT_REPL_PTR (alt); -if (pc >= replptr && pc <= (replptr + alt->alt_len)) -return 0 ; - -/* -* Branching into *another* alternate sequence is doomed, and -* we're not even trying to fix it up. -*/ -BUG (); +unsigned long replptr = (unsigned long )ALT_REPL_PTR (alt); +return !(pc >= replptr && pc <= (replptr + alt->alt_len)); }#define align_down (x, a) ((unsigned long)(x) & ~(((unsigned long)(a)) - 1))
arch/arm64/kernel/debug-monitors.c +16 -4
@@ -150,17 +150,20 @@ postcore_initcall(debug_monitors_init);/* * Single step API and exception handling. */ -static void set_regs_spsr_ss (struct pt_regs *regs) +static void set_user_regs_spsr_ss (struct user_pt_regs *regs) { regs->pstate |=DBG_SPSR_SS ; } -NOKPROBE_SYMBOL (set_regs_spsr_ss); +NOKPROBE_SYMBOL (set_user_regs_spsr_ss); -static void clear_regs_spsr_ss (struct pt_regs *regs) +static void clear_user_regs_spsr_ss (struct user_pt_regs *regs) { regs->pstate &= ~DBG_SPSR_SS ; } -NOKPROBE_SYMBOL (clear_regs_spsr_ss); +NOKPROBE_SYMBOL (clear_user_regs_spsr_ss); + +#define set_regs_spsr_ss (r) set_user_regs_spsr_ss(&(r)->user_regs) +#define clear_regs_spsr_ss (r) clear_user_regs_spsr_ss(&(r)->user_regs)/* EL1 Single Step Handler hooks */ static LIST_HEAD (step_hook);
@@ -397,6 +400,15 @@ void user_fastforward_single_step(struct task_struct *task)clear_regs_spsr_ss (task_pt_regs (task)); } +void user_regs_reset_single_step (struct user_pt_regs *regs, +struct task_struct *task) +{ +if (test_tsk_thread_flag (task,TIF_SINGLESTEP )) +set_user_regs_spsr_ss (regs); +else +clear_user_regs_spsr_ss (regs); +} +/* Kernel API */ void kernel_enable_single_step (struct pt_regs *regs) {
arch/arm64/kernel/kgdb.c +1 -1
@@ -258,7 +258,7 @@ static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)if (user_mode (regs) || !kgdb_single_step)return DBG_HOOK_ERROR ; -kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); +kgdb_handle_exception (0 ,SIGTRAP ,0 , regs);return DBG_HOOK_HANDLED ; }NOKPROBE_SYMBOL (kgdb_step_brk_fn);
arch/arm64/kernel/ptrace.c +2 -2
@@ -1496,8 +1496,8 @@ static int valid_native_regs(struct user_pt_regs *regs)*/ int valid_user_regs (struct user_pt_regs *regs,struct task_struct *task) { -if (!test_tsk_thread_flag (task,TIF_SINGLESTEP )) - regs->pstate &= ~DBG_SPSR_SS ; +/* https://lore.kernel.org/lkml/20191118131525.GA4180@willie-the-truck */ +user_regs_reset_single_step (regs, task);if (is_compat_thread (task_thread_info (task)))return valid_compat_regs (regs);
arch/arm64/kernel/vmlinux.lds.S +0 -3
@@ -154,9 +154,6 @@ SECTIONS *(.altinstructions) __alt_instructions_end = .; } - .altinstr_replacement : { - *(.altinstr_replacement) - } . = ALIGN(PAGE_SIZE); __inittext_end = .;
arch/arm64/kvm/hyp-init.S +7 -4
@@ -147,11 +147,15 @@ ENTRY(__kvm_handle_stub_hvc) 1: cmp x0, #HVC_RESET_VECTORS b.ne 1f -reset: + /* - * Reset kvm back to the hyp stub. Do not clobber x0-x4 in - * case we coming via HVC_SOFT_RESTART. + * Set the HVC_RESET_VECTORS return code before entering the common + * path so that we do not clobber x0-x2 in case we are coming via + * HVC_SOFT_RESTART. */ + mov x0, xzr +reset: + /* Reset kvm back to the hyp stub. */ mrs x5, sctlr_el2 ldr x6, =SCTLR_ELx_FLAGS bic x5, x5, x6 // Clear SCTL_M and etc
@@ -162,7 +166,6 @@ reset: /* Install stub vectors */ adr_l x5, __hyp_stub_vectors msr vbar_el2, x5 - mov x0, xzr eret 1: /* Bad stub call */
arch/mips/kernel/time.c +4 -9
@@ -40,10 +40,8 @@ static unsigned long glb_lpj_ref_freq;static int cpufreq_callback (struct notifier_block *nb,unsigned long val,void *data) { -struct cpufreq_freqs *freq = data; -struct cpumask *cpus = freq->policy->cpus; -unsigned long lpj;int cpu; +struct cpufreq_freqs *freq = data;/* * Skip lpj numbers adjustment if the CPU-freq transition is safe for
@@ -64,6 +62,7 @@ static int cpufreq_callback(struct notifier_block *nb, } } + cpu = freq->cpu;/* * Adjust global lpj variable and per-CPU udelay_val number in * accordance with the new CPU frequency.
@@ -74,12 +73,8 @@ static int cpufreq_callback(struct notifier_block *nb, glb_lpj_ref_freq, freq->new); -for_each_cpu (cpu, cpus) { - lpj =cpufreq_scale (per_cpu (pcp_lpj_ref, cpu), -per_cpu (pcp_lpj_ref_freq, cpu), - freq->new); - cpu_data[cpu].udelay_val = (unsigned int )lpj; - } + cpu_data[cpu].udelay_val =cpufreq_scale (per_cpu (pcp_lpj_ref, cpu), +per_cpu (pcp_lpj_ref_freq, cpu), freq->new); }return NOTIFY_OK ;
arch/s390/include/asm/kvm_host.h +4 -4
@@ -33,12 +33,12 @@#define KVM_USER_MEM_SLOTS 32/* -* These seem to be used for allocating ->chip in the routing table, -* which we don't use. 4096 is an out-of-thin-air value. If we need -* to look at ->chip later on, we'll need to revisit this. +* These seem to be used for allocating ->chip in the routing table, which we +* don't use. 1 is as small as we can get to reduce the needed memory. If we +* need to look at ->chip later on, we'll need to revisit this. */ #define KVM_NR_IRQCHIPS 1 -#define KVM_IRQCHIP_NUM_PINS 4096 +#define KVM_IRQCHIP_NUM_PINS 1#define KVM_HALT_POLL_NS_DEFAULT 80000/* s390-specific vcpu->requests bit members */
arch/s390/kernel/early.c +2 -0
@@ -317,6 +317,8 @@ static noinline __init void setup_lowcore_early(void)psw_t psw; psw.mask =PSW_MASK_BASE |PSW_DEFAULT_KEY |PSW_MASK_EA |PSW_MASK_BA ; +if (IS_ENABLED (CONFIG_KASAN )) + psw.mask |=PSW_MASK_DAT ; psw.addr = (unsigned long ) s390_base_ext_handler; S390_lowcore.external_new_psw = psw; psw.addr = (unsigned long ) s390_base_pgm_handler;
arch/s390/mm/hugetlbpage.c +1 -1
@@ -117,7 +117,7 @@ static inline pte_t __rste_to_pte(unsigned long rste) _PAGE_YOUNG);#ifdef CONFIG_MEM_SOFT_DIRTY pte_val (pte) |=move_set_bit (rste, _SEGMENT_ENTRY_SOFT_DIRTY, - _PAGE_DIRTY); + _PAGE_SOFT_DIRTY);#endif pte_val (pte) |=move_set_bit (rste, _SEGMENT_ENTRY_NOEXEC, _PAGE_NOEXEC);
arch/x86/include/asm/processor.h +1 -1
@@ -344,7 +344,7 @@ struct x86_hw_tss {#define INVALID_IO_BITMAP_OFFSET 0x8000struct entry_stack { -unsigned long words[64 ]; +char stack[PAGE_SIZE ]; };struct entry_stack_page {
arch/x86/kernel/cpu/common.c +1 -1
@@ -854,6 +854,7 @@ void get_cpu_cap(struct cpuinfo_x86 *c) else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36)) c->x86_phys_bits = 36;#endif + c->x86_cache_bits = c->x86_phys_bits;if (c->extended_cpuid_level >=0x8000000a ) c->x86_capability[CPUID_8000_000A_EDX ] =cpuid_edx (0x8000000a );
@@ -894,7 +895,6 @@ static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c) } }#endif - c->x86_cache_bits = c->x86_phys_bits; }#define NO_SPECULATION BIT(0)
arch/x86/kernel/fpu/xstate.c +1 -1
@@ -1029,7 +1029,7 @@ int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int ofcopy_part (offsetof(struct fxregs_state , st_space),128 , &xsave->i387.st_space, &kbuf, &offset_start, &count);if (header.xfeatures &XFEATURE_MASK_SSE ) -copy_part (xstate_offsets[XFEATURE_MASK_SSE ],256 , +copy_part (xstate_offsets[XFEATURE_SSE ],256 , &xsave->i387.xmm_space, &kbuf, &offset_start, &count);/* * Fill xsave->i387.sw_reserved value for ptrace frame:
arch/x86/kvm/kvm_cache_regs.h +1 -1
@@ -5,7 +5,7 @@#define KVM_POSSIBLE_CR0_GUEST_BITS X86_CR0_TS#define KVM_POSSIBLE_CR4_GUEST_BITS \ (X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \ - | X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE) + | X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE | X86_CR4_TSD)static inline unsigned long kvm_register_read (struct kvm_vcpu *vcpu,enum kvm_reg reg)
arch/x86/kvm/mmu.c +1 -1
@@ -4244,7 +4244,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, nonleaf_bit8_rsvd |rsvd_bits (7 ,7 ) |rsvd_bits (maxphyaddr,51 ); rsvd_check->rsvd_bits_mask[0 ][2 ] = exb_bit_rsvd | - nonleaf_bit8_rsvd | gbpages_bit_rsvd | + gbpages_bit_rsvd |rsvd_bits (maxphyaddr,51 ); rsvd_check->rsvd_bits_mask[0 ][1 ] = exb_bit_rsvd |rsvd_bits (maxphyaddr,51 );
arch/x86/kvm/vmx.c +2 -0
@@ -5592,6 +5592,8 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)static void set_cr4_guest_host_mask (struct vcpu_vmx *vmx) { +BUILD_BUG_ON (KVM_CR4_GUEST_OWNED_BITS & ~KVM_POSSIBLE_CR4_GUEST_BITS ); + vmx->vcpu.arch.cr4_guest_owned_bits =KVM_CR4_GUEST_OWNED_BITS ;if (enable_ept) vmx->vcpu.arch.cr4_guest_owned_bits |=X86_CR4_PGE ;
arch/x86/kvm/x86.c +2 -0
@@ -806,6 +806,8 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)if (is_long_mode (vcpu)) {if (!(cr4 &X86_CR4_PAE ))return 1 ; +if ((cr4 ^ old_cr4) &X86_CR4_LA57 ) +return 1 ; }else if (is_paging (vcpu) && (cr4 &X86_CR4_PAE ) && ((cr4 ^ old_cr4) & pdptr_bits) && !load_pdptrs(vcpu, vcpu->arch.walk_mmu,
drivers/acpi/video_detect.c +19 -0
@@ -328,6 +328,25 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"), }, }, + { + .callback = video_detect_force_native, + .ident = "Acer Aspire 5738z", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"), + DMI_MATCH(DMI_BOARD_NAME, "JV50"), + }, + }, + { + /* https://bugzilla.kernel.org/show_bug.cgi?id=207835 */ + .callback = video_detect_force_native, + .ident = "Acer TravelMate 5735Z", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5735Z"), + DMI_MATCH(DMI_BOARD_NAME, "BA51_MV"), + }, + }, /* * Desktops which falsely report a backlight and which our heuristics
drivers/block/nbd.c +15 -10
@@ -960,25 +960,26 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg, test_bit(NBD_BOUND, &config->runtime_flags))) {dev_err (disk_to_dev (nbd->disk),"Device being setup by another task" ); -sockfd_put (sock); -return -EBUSY ; + err = -EBUSY ; + goto put_socket; + } + + nsock =kzalloc (sizeof (*nsock),GFP_KERNEL ); +if (!nsock) { + err = -ENOMEM ; + goto put_socket; } socks =krealloc (config->socks, (config->num_connections +1 ) *sizeof (struct nbd_sock *),GFP_KERNEL );if (!socks) { -sockfd_put (sock); -return -ENOMEM ; +kfree (nsock); + err = -ENOMEM ; + goto put_socket; } config->socks = socks; - nsock =kzalloc (sizeof (struct nbd_sock ),GFP_KERNEL ); -if (!nsock) { -sockfd_put (sock); -return -ENOMEM ; - } - nsock->fallback_index =-1 ; nsock->dead = false;mutex_init (&nsock->tx_lock);
@@ -990,6 +991,10 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,atomic_inc (&config->live_connections);return 0 ; + +put_socket: +sockfd_put (sock); +return err; }static int nbd_reconnect_socket (struct nbd_device *nbd,unsigned long arg)
drivers/block/zram/zram_drv.c +2 -1
@@ -1648,7 +1648,8 @@ static ssize_t hot_add_show(struct class *class,return ret;return scnprintf (buf,PAGE_SIZE ,"%d\n" , ret); } -static CLASS_ATTR_RO (hot_add); +static struct class_attribute class_attr_hot_add = +__ATTR (hot_add,0400 , hot_add_show,NULL ); static ssize_t hot_remove_store(struct class *class, struct class_attribute *attr,
drivers/char/tpm/tpm_tis_core.c +1 -1
@@ -897,7 +897,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,return 0 ; out_err: -if ((chip->ops !=NULL ) && (chip->ops->clk_enable !=NULL )) +if (chip->ops->clk_enable !=NULL ) chip->ops->clk_enable (chip, false);tpm_tis_remove (chip);
drivers/char/virtio_console.c +2 -1
@@ -2158,6 +2158,7 @@ static struct virtio_device_id id_table[] = { { VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID }, { 0 }, }; +MODULE_DEVICE_TABLE (virtio, id_table);static unsigned int features[] = { VIRTIO_CONSOLE_F_SIZE,
@@ -2170,6 +2171,7 @@ static struct virtio_device_id rproc_serial_id_table[] = {#endif { 0 }, }; +MODULE_DEVICE_TABLE (virtio, rproc_serial_id_table);static unsigned int rproc_serial_features[] = { };
@@ -2322,6 +2324,5 @@ static void __exit fini(void)module_init (init);module_exit (fini); -MODULE_DEVICE_TABLE (virtio, id_table);MODULE_DESCRIPTION ("Virtio console driver" );MODULE_LICENSE ("GPL" );
drivers/dma/fsl-edma.c +7 -0
@@ -682,6 +682,13 @@ static irqreturn_t fsl_edma_tx_handler(int irq, void *dev_id) fsl_chan = &fsl_edma->chans[ch];spin_lock (&fsl_chan->vchan.lock); + +if (!fsl_chan->edesc) { +/* terminate_all called before */ +spin_unlock (&fsl_chan->vchan.lock); +continue ; + } +if (!fsl_chan->edesc->iscyclic) {list_del (&fsl_chan->edesc->vdesc.node);vchan_cookie_complete (&fsl_chan->edesc->vdesc);
drivers/gpu/drm/exynos/exynos_drm_mic.c +3 -1
@@ -267,8 +267,10 @@ static void mic_pre_enable(struct drm_bridge *bridge) goto unlock; ret =pm_runtime_get_sync (mic->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (mic->dev); goto unlock; + }mic_set_path (mic,1 );
drivers/gpu/drm/radeon/ci_dpm.c +3 -4
@@ -5551,6 +5551,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)if (!rdev->pm.dpm.ps)return -ENOMEM ; power_state_offset = (u8 *)state_array->states; + rdev->pm.dpm.num_ps =0 ;for (i =0 ; i < state_array->ucNumEntries; i++) {u8 *idx; power_state = (union pplib_power_state *)power_state_offset;
@@ -5560,10 +5561,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)if (!rdev->pm.power_state[i].clock_info)return -EINVAL ; ps =kzalloc (sizeof (struct ci_ps ),GFP_KERNEL ); -if (ps ==NULL ) { -kfree (rdev->pm.dpm.ps); +if (ps ==NULL )return -ENOMEM ; - } rdev->pm.dpm.ps[i].ps_priv = ps; ci_parse_pplib_non_clock_info(rdev, &rdev->pm.dpm.ps[i], non_clock_info,
@@ -5585,8 +5584,8 @@ static int ci_parse_power_table(struct radeon_device *rdev) k++; } power_state_offset +=2 + power_state->v2.ucNumDPMLevels; + rdev->pm.dpm.num_ps = i +1 ; } - rdev->pm.dpm.num_ps = state_array->ucNumEntries;/* fill in the vce power states */ for (i =0 ; i <RADEON_MAX_VCE_LEVELS ; i++) {
drivers/gpu/host1x/bus.c +9 -0
@@ -615,8 +615,17 @@ EXPORT_SYMBOL(host1x_driver_register_full);*/ void host1x_driver_unregister (struct host1x_driver *driver) { +struct host1x *host1x; +driver_unregister (&driver->driver); +mutex_lock (&devices_lock); + +list_for_each_entry (host1x, &devices, list) +host1x_detach_driver (host1x, driver); + +mutex_unlock (&devices_lock); +mutex_lock (&drivers_lock);list_del_init (&driver->list);mutex_unlock (&drivers_lock);
drivers/hid/hid-magicmouse.c +6 -0
@@ -451,6 +451,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd__set_bit (MSC_RAW , input->mscbit); } +/* +* hid-input may mark device as using autorepeat, but neither +* the trackpad, nor the mouse actually want it. +*/ +__clear_bit (EV_REP , input->evbit); +return 0 ; }
drivers/hwmon/emc2103.c +1 -1
@@ -454,7 +454,7 @@ static ssize_t pwm1_enable_store(struct device *dev, } result =read_u8_from_i2c (client,REG_FAN_CONF1 , &conf_reg); -if (result) { +if (result <0 ) { count = result; goto err; }
drivers/hwtracing/intel_th/pci.c +15 -0
@@ -213,11 +213,21 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa0a6), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Tiger Lake PCH-H */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x43a6 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, {/* Jasper Lake PCH */ PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x4da6 ), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Jasper Lake CPU */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x4e29 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, {/* Elkhart Lake CPU */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4529),
@@ -228,6 +238,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Emmitsburg PCH */ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, { 0 }, };
drivers/i2c/busses/i2c-eg20t.c +1 -0
@@ -189,6 +189,7 @@ static const struct pci_device_id pch_pcidev_id[] = { { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_I2C), 1, }, {0,} }; +MODULE_DEVICE_TABLE (pci, pch_pcidev_id);static irqreturn_t pch_i2c_handler (int irq,void *pData);
drivers/iio/accel/mma8452.c +4 -1
@@ -1583,10 +1583,13 @@ static int mma8452_probe(struct i2c_client *client, ret =mma8452_set_freefall_mode (data, false);if (ret <0 ) - goto buffer_cleanup; + goto unregister_device;return 0 ; +unregister_device: +iio_device_unregister (indio_dev); + buffer_cleanup:iio_triggered_buffer_cleanup (indio_dev);
drivers/iio/health/afe4403.c +8 -5
@@ -71,6 +71,7 @@ static const struct reg_field afe4403_reg_fields[] = {* @regulator: Pointer to the regulator for the IC * @trig: IIO trigger for this device * @irq: ADC_RDY line interrupt number +* @buffer: Used to construct data layout to push into IIO buffer. */ struct afe4403_data {struct device *dev;
@@ -80,6 +81,8 @@ struct afe4403_data {struct regulator *regulator;struct iio_trigger *trig;int irq; +/* Ensure suitable alignment for timestamp */ +s32 buffer[8 ]__aligned(8) ; };enum afe4403_chan_id {
@@ -318,7 +321,6 @@ static irqreturn_t afe4403_trigger_handler(int irq, void *private)struct iio_dev *indio_dev = pf->indio_dev;struct afe4403_data *afe =iio_priv (indio_dev);int ret, bit, i =0 ; -s32 buffer[8 ];u8 tx[4 ] = {AFE440X_CONTROL0 ,0x0 ,0x0 ,AFE440X_CONTROL0_READ };u8 rx[3 ];
@@ -335,9 +337,9 @@ static irqreturn_t afe4403_trigger_handler(int irq, void *private)if (ret) goto err; - buffer[i++] = (rx[0 ] <<16 ) | - (rx[1 ] <<8 ) | - (rx[2 ]); + afe->buffer[i++] = (rx[0 ] <<16 ) | + (rx[1 ] <<8 ) | + (rx[2 ]); }/* Disable reading from the device */
@@ -346,7 +348,8 @@ static irqreturn_t afe4403_trigger_handler(int irq, void *private)if (ret) goto err; -iio_push_to_buffers_with_timestamp (indio_dev, buffer, pf->timestamp); +iio_push_to_buffers_with_timestamp (indio_dev, afe->buffer, + pf->timestamp); err:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/health/afe4404.c +5 -3
@@ -91,6 +91,7 @@ static const struct reg_field afe4404_reg_fields[] = {* @regulator: Pointer to the regulator for the IC * @trig: IIO trigger for this device * @irq: ADC_RDY line interrupt number +* @buffer: Used to construct a scan to push to the iio buffer. */ struct afe4404_data {struct device *dev;
@@ -99,6 +100,7 @@ struct afe4404_data {struct regulator *regulator;struct iio_trigger *trig;int irq; +s32 buffer[10 ]__aligned(8) ; };enum afe4404_chan_id {
@@ -337,17 +339,17 @@ static irqreturn_t afe4404_trigger_handler(int irq, void *private)struct iio_dev *indio_dev = pf->indio_dev;struct afe4404_data *afe =iio_priv (indio_dev);int ret, bit, i =0 ; -s32 buffer[10 ];for_each_set_bit (bit, indio_dev->active_scan_mask, indio_dev->masklength) { ret =regmap_read (afe->regmap, afe4404_channel_values[bit], - &buffer[i++]); + &afe->buffer[i++]);if (ret) goto err; } -iio_push_to_buffers_with_timestamp (indio_dev, buffer, pf->timestamp); +iio_push_to_buffers_with_timestamp (indio_dev, afe->buffer, + pf->timestamp); err:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/humidity/hdc100x.c +7 -3
@@ -46,6 +46,11 @@ struct hdc100x_data {/* integration time of the sensor */ int adc_int_us[2 ]; +/* Ensure natural alignment of timestamp */ +struct { +__be16 channels[2 ]; +s64 ts__aligned(8) ; + } scan; };/* integration time in us */
@@ -327,7 +332,6 @@ static irqreturn_t hdc100x_trigger_handler(int irq, void *p)struct i2c_client *client = data->client;int delay = data->adc_int_us[0 ] + data->adc_int_us[1 ];int ret; -s16 buf[8 ];/* 2x s16 + padding + 8 byte timestamp */ /* dual read starts at temp register */ mutex_lock (&data->lock);
@@ -338,13 +342,13 @@ static irqreturn_t hdc100x_trigger_handler(int irq, void *p) }usleep_range (delay, delay +1000 ); - ret =i2c_master_recv (client, (u8 *)buf,4 ); + ret =i2c_master_recv (client, (u8 *)data->scan.channels,4 );if (ret <0 ) {dev_err (&client->dev,"cannot read sensor data\n" ); goto err; } -iio_push_to_buffers_with_timestamp (indio_dev, buf, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan,iio_get_time_ns (indio_dev)); err:mutex_unlock (&data->lock);
drivers/iio/magnetometer/ak8974.c +17 -12
@@ -184,6 +184,11 @@ struct ak8974 {bool drdy_irq;struct completion drdy_complete;bool drdy_active_low; +/* Ensure timestamp is naturally aligned */ +struct { +__le16 channels[3 ]; +s64 ts__aligned(8) ; + } scan; };static const char ak8974_reg_avdd[] ="avdd" ;
@@ -580,7 +585,6 @@ static void ak8974_fill_buffer(struct iio_dev *indio_dev) {struct ak8974 *ak8974 =iio_priv (indio_dev);int ret; -__le16 hw_values[8 ];/* Three axes + 64bit padding */ pm_runtime_get_sync (&ak8974->i2c->dev);mutex_lock (&ak8974->lock);
@@ -590,13 +594,13 @@ static void ak8974_fill_buffer(struct iio_dev *indio_dev)dev_err (&ak8974->i2c->dev,"error triggering measure\n" ); goto out_unlock; } - ret =ak8974_getresult (ak8974, hw_values); + ret =ak8974_getresult (ak8974, ak8974->scan.channels);if (ret) {dev_err (&ak8974->i2c->dev,"error getting measures\n" ); goto out_unlock; } -iio_push_to_buffers_with_timestamp (indio_dev, hw_values, +iio_push_to_buffers_with_timestamp (indio_dev, &ak8974->scan,iio_get_time_ns (indio_dev)); out_unlock:
@@ -765,19 +769,21 @@ static int ak8974_probe(struct i2c_client *i2c, ak8974->map =devm_regmap_init_i2c (i2c, &ak8974_regmap_config);if (IS_ERR (ak8974->map)) {dev_err (&i2c->dev,"failed to allocate register map\n" ); +pm_runtime_put_noidle (&i2c->dev); +pm_runtime_disable (&i2c->dev);return PTR_ERR (ak8974->map); } ret =ak8974_set_power (ak8974,AK8974_PWR_ON );if (ret) {dev_err (&i2c->dev,"could not power on\n" ); - goto power_off; + goto disable_pm; } ret =ak8974_detect (ak8974);if (ret) {dev_err (&i2c->dev,"neither AK8974 nor AMI30x found\n" ); - goto power_off; + goto disable_pm; } ret =ak8974_selftest (ak8974);
@@ -787,14 +793,9 @@ static int ak8974_probe(struct i2c_client *i2c, ret =ak8974_reset (ak8974);if (ret) {dev_err (&i2c->dev,"AK8974 reset failed\n" ); - goto power_off; + goto disable_pm; } -pm_runtime_set_autosuspend_delay (&i2c->dev, -AK8974_AUTOSUSPEND_DELAY ); -pm_runtime_use_autosuspend (&i2c->dev); -pm_runtime_put (&i2c->dev); - indio_dev->dev.parent = &i2c->dev; indio_dev->channels = ak8974_channels; indio_dev->num_channels =ARRAY_SIZE (ak8974_channels);
@@ -847,6 +848,11 @@ static int ak8974_probe(struct i2c_client *i2c, goto cleanup_buffer; } +pm_runtime_set_autosuspend_delay (&i2c->dev, +AK8974_AUTOSUSPEND_DELAY ); +pm_runtime_use_autosuspend (&i2c->dev); +pm_runtime_put (&i2c->dev); +return 0 ; cleanup_buffer:
@@ -855,7 +861,6 @@ static int ak8974_probe(struct i2c_client *i2c,pm_runtime_put_noidle (&i2c->dev);pm_runtime_disable (&i2c->dev);ak8974_set_power (ak8974,AK8974_PWR_OFF ); -power_off:regulator_bulk_disable (ARRAY_SIZE (ak8974->regs), ak8974->regs);return ret;
drivers/iio/pressure/ms5611_core.c +8 -3
@@ -215,16 +215,21 @@ static irqreturn_t ms5611_trigger_handler(int irq, void *p)struct iio_poll_func *pf = p;struct iio_dev *indio_dev = pf->indio_dev;struct ms5611_state *st =iio_priv (indio_dev); -s32 buf[4 ];/* s32 (pressure) + s32 (temp) + 2 * s32 (timestamp) */ +/* Ensure buffer elements are naturally aligned */ +struct { +s32 channels[2 ]; +s64 ts__aligned(8) ; + } scan;int ret;mutex_lock (&st->lock); - ret =ms5611_read_temp_and_pressure (indio_dev, &buf[1 ], &buf[0 ]); + ret =ms5611_read_temp_and_pressure (indio_dev, &scan.channels[1 ], + &scan.channels[0 ]);mutex_unlock (&st->lock);if (ret <0 ) goto err; -iio_push_to_buffers_with_timestamp (indio_dev, buf, +iio_push_to_buffers_with_timestamp (indio_dev, &scan,iio_get_time_ns (indio_dev)); err:
drivers/iio/pressure/zpa2326.c +3 -1
@@ -672,8 +672,10 @@ static int zpa2326_resume(const struct iio_dev *indio_dev)int err; err =pm_runtime_get_sync (indio_dev->dev.parent); -if (err <0 ) +if (err <0 ) { +pm_runtime_put (indio_dev->dev.parent);return err; + }if (err >0 ) {/*
drivers/input/serio/i8042-x86ia64io.h +7 -0
@@ -429,6 +429,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), }, }, + { +/* Lenovo XiaoXin Air 12 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_NAME, "80UN"), + }, + }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
drivers/md/dm.c +12 -3
@@ -12,6 +12,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/mutex.h> +#include <linux/sched/mm.h> #include <linux/sched/signal.h> #include <linux/blkpg.h> #include <linux/bio.h>
@@ -2665,17 +2666,25 @@ EXPORT_SYMBOL_GPL(dm_internal_resume_fast);int dm_kobject_uevent (struct mapped_device *md,enum kobject_action action,unsigned cookie) { +int r; +unsigned noio_flag;char udev_cookie[DM_COOKIE_LENGTH ];char *envp[] = { udev_cookie,NULL }; + noio_flag =memalloc_noio_save (); +if (!cookie) -return kobject_uevent (&disk_to_dev (md->disk)->kobj, action); + r =kobject_uevent (&disk_to_dev (md->disk)->kobj, action);else {snprintf (udev_cookie,DM_COOKIE_LENGTH ,"%s=%u" ,DM_COOKIE_ENV_VAR_NAME , cookie); -return kobject_uevent_env (&disk_to_dev (md->disk)->kobj, - action, envp); + r =kobject_uevent_env (&disk_to_dev (md->disk)->kobj, + action, envp); } + +memalloc_noio_restore (noio_flag); + +return r; }uint32_t dm_next_uevent_seq (struct mapped_device *md)
drivers/message/fusion/mptscsih.c +1 -3
@@ -118,8 +118,6 @@ int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);int mptscsih_resume (struct pci_dev *pdev);#endif -#define SNS_LEN (scp) SCSI_SENSE_BUFFERSIZE -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*
@@ -2420,7 +2418,7 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR/* Copy the sense received into the scsi command block. */ req_index =le16_to_cpu (mf->u.frame.hwhdr.msgctxu.fld.req_idx); sense_data = ((u8 *)ioc->sense_buf_pool + (req_index *MPT_SENSE_BUFFER_ALLOC )); -memcpy (sc->sense_buffer, sense_data,SNS_LEN (sc)); +memcpy (sc->sense_buffer, sense_data,MPT_SENSE_BUFFER_ALLOC );/* Log SMART data (asc = 0x5D, non-IM case only) if required. */
drivers/misc/atmel-ssc.c +12 -12
@@ -13,7 +13,7 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/io.h> -#include <linux/spinlock.h> +#include <linux/mutex.h> #include <linux/atmel-ssc.h> #include <linux/slab.h> #include <linux/module.h>
@@ -23,7 +23,7 @@#include "../../sound/soc/atmel/atmel_ssc_dai.h" /* Serialize access to ssc_list and user count */ -static DEFINE_SPINLOCK (user_lock); +static DEFINE_MUTEX (user_lock);static LIST_HEAD (ssc_list);struct ssc_device *ssc_request (unsigned int ssc_num)
@@ -31,7 +31,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)int ssc_valid =0 ;struct ssc_device *ssc; -spin_lock (&user_lock); +mutex_lock (&user_lock);list_for_each_entry (ssc, &ssc_list, list) {if (ssc->pdev->dev.of_node) { if (of_alias_get_id(ssc->pdev->dev.of_node, "ssc")
@@ -47,18 +47,18 @@ struct ssc_device *ssc_request(unsigned int ssc_num) }if (!ssc_valid) { -spin_unlock (&user_lock); +mutex_unlock (&user_lock);pr_err ("ssc: ssc%d platform device is missing\n" , ssc_num);return ERR_PTR (-ENODEV ); }if (ssc->user) { -spin_unlock (&user_lock); +mutex_unlock (&user_lock);dev_dbg (&ssc->pdev->dev,"module busy\n" );return ERR_PTR (-EBUSY ); } ssc->user++; -spin_unlock (&user_lock); +mutex_unlock (&user_lock);clk_prepare (ssc->clk);
@@ -70,14 +70,14 @@ void ssc_free(struct ssc_device *ssc) {bool disable_clk = true; -spin_lock (&user_lock); +mutex_lock (&user_lock);if (ssc->user) ssc->user--;else { disable_clk = false;dev_dbg (&ssc->pdev->dev,"device already free\n" ); } -spin_unlock (&user_lock); +mutex_unlock (&user_lock);if (disable_clk)clk_unprepare (ssc->clk);
@@ -240,9 +240,9 @@ static int ssc_probe(struct platform_device *pdev)return -ENXIO ; } -spin_lock (&user_lock); +mutex_lock (&user_lock);list_add_tail (&ssc->list, &ssc_list); -spin_unlock (&user_lock); +mutex_unlock (&user_lock);platform_set_drvdata (pdev, ssc);
@@ -261,9 +261,9 @@ static int ssc_remove(struct platform_device *pdev)ssc_sound_dai_remove (ssc); -spin_lock (&user_lock); +mutex_lock (&user_lock);list_del (&ssc->list); -spin_unlock (&user_lock); +mutex_unlock (&user_lock);return 0 ; }
drivers/misc/mei/bus.c +1 -2
@@ -722,9 +722,8 @@ static int mei_cl_device_remove(struct device *dev)mei_cldev_unregister_callbacks (cldev);module_put (THIS_MODULE ); - dev->driver =NULL ; -return ret; +return ret; } static ssize_t name_show(struct device *dev, struct device_attribute *a,
drivers/mmc/host/sdhci.c +1 -1
@@ -133,7 +133,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)u32 present;if ((host->quirks &SDHCI_QUIRK_BROKEN_CARD_DETECTION ) || - !mmc_card_is_removable (host->mmc)) + !mmc_card_is_removable (host->mmc) ||mmc_can_gpio_cd (host->mmc))return ;if (enable) {
drivers/mtd/nand/brcmnand/brcmnand.c +3 -2
@@ -491,8 +491,9 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) }else { ctrl->cs_offsets = brcmnand_cs_offsets; -/* v5.0 and earlier has a different CS0 offset layout */ -if (ctrl->nand_version <=0x0500 ) +/* v3.3-5.0 have a different CS0 offset layout */ +if (ctrl->nand_version >=0x0303 && + ctrl->nand_version <=0x0500 ) ctrl->cs0_offsets = brcmnand_cs_offsets_cs0; }
drivers/mtd/nand/oxnas_nand.c +18 -6
@@ -36,6 +36,7 @@ struct oxnas_nand_ctrl {void __iomem *io_base;struct clk *clk;struct nand_chip *chips[OXNAS_NAND_MAX_CHIPS ]; +unsigned int nchips; };static uint8_t oxnas_nand_read_byte (struct mtd_info *mtd)
@@ -86,9 +87,9 @@ static int oxnas_nand_probe(struct platform_device *pdev)struct nand_chip *chip;struct mtd_info *mtd;struct resource *res; -int nchips =0 ;int count =0 ;int err =0 ; +int i;/* Allocate memory for the device structure (and zero it) */ oxnas = devm_kzalloc(&pdev->dev, sizeof(*oxnas),
@@ -150,12 +151,12 @@ static int oxnas_nand_probe(struct platform_device *pdev)if (err) goto err_cleanup_nand; - oxnas->chips[nchips] = chip; - ++nchips; + oxnas->chips[oxnas->nchips] = chip; + ++oxnas->nchips; }/* Exit if no chips found */ -if (!nchips) { +if (!oxnas->nchips) { err = -ENODEV ; goto err_clk_unprepare; }
@@ -168,6 +169,13 @@ static int oxnas_nand_probe(struct platform_device *pdev)nand_cleanup (chip); err_release_child:of_node_put (nand_np); + +for (i =0 ; i < oxnas->nchips; i++) { + chip = oxnas->chips[i]; +WARN_ON (mtd_device_unregister (nand_to_mtd (chip))); +nand_cleanup (chip); + } + err_clk_unprepare:clk_disable_unprepare (oxnas->clk);return err;
@@ -176,9 +184,13 @@ static int oxnas_nand_probe(struct platform_device *pdev)static int oxnas_nand_remove (struct platform_device *pdev) {struct oxnas_nand_ctrl *oxnas =platform_get_drvdata (pdev); +struct nand_chip *chip; +int i; -if (oxnas->chips[0 ]) -nand_release (oxnas->chips[0 ]); +for (i =0 ; i < oxnas->nchips; i++) { + chip = oxnas->chips[i]; +nand_release (chip); + }clk_disable_unprepare (oxnas->clk);
drivers/net/dsa/bcm_sf2.c +2 -0
@@ -1175,6 +1175,8 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)*/ set_bit (0 , priv->cfp.used); +/* Balance of_node_put() done by of_find_node_by_name() */ +of_node_get (dn); ports =of_find_node_by_name (dn,"ports" );if (ports) {bcm_sf2_identify_ports (priv, ports);
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +1 -1
@@ -344,6 +344,7 @@ static void bnxt_free_vf_resources(struct bnxt *bp) } } + bp->pf.active_vfs =0 ;kfree (bp->pf.vf); bp->pf.vf =NULL ; }
@@ -608,7 +609,6 @@ void bnxt_sriov_disable(struct bnxt *bp)bnxt_free_vf_resources (bp); - bp->pf.active_vfs =0 ;/* Reclaim all resources for the PF. */ rtnl_lock ();bnxt_restore_pf_fw_resources (bp);
drivers/net/ethernet/cadence/macb_main.c +1 -1
@@ -3516,7 +3516,7 @@ static int macb_probe(struct platform_device *pdev) bp->wol =0 ;if (of_get_property (np,"magic-packet" ,NULL )) bp->wol |=MACB_WOL_HAS_MAGIC_PACKET ; -device_init_wakeup (&pdev->dev, bp->wol &MACB_WOL_HAS_MAGIC_PACKET ); +device_set_wakeup_capable (&pdev->dev, bp->wol &MACB_WOL_HAS_MAGIC_PACKET );spin_lock_init (&bp->lock);
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +4 -4
@@ -3361,7 +3361,7 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info, drv_fw = &fw_info->fw_hdr;/* Read the header of the firmware on the card */ - ret = -t4_read_flash (adap,FLASH_FW_START , + ret =t4_read_flash (adap,FLASH_FW_START ,sizeof (*card_fw) /sizeof (uint32_t ), (uint32_t *)card_fw,1 );if (ret ==0 ) {
@@ -3390,8 +3390,8 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,should_install_fs_fw (adap, card_fw_usable,be32_to_cpu (fs_fw->fw_ver), be32_to_cpu(card_fw->fw_ver))) { - ret = -t4_fw_upgrade(adap, adap->mbox, fw_data, - fw_size,0 ); + ret = t4_fw_upgrade(adap, adap->mbox, fw_data, + fw_size,0 );if (ret !=0 ) {dev_err (adap->pdev_dev,"failed to install firmware: %d\n" , ret);
@@ -3422,7 +3422,7 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,FW_HDR_FW_VER_MICRO_G (c),FW_HDR_FW_VER_BUILD_G (c),FW_HDR_FW_VER_MAJOR_G (k),FW_HDR_FW_VER_MINOR_G (k), FW_HDR_FW_VER_MICRO_G(k), FW_HDR_FW_VER_BUILD_G(k)); - ret =EINVAL ; + ret = -EINVAL ; goto bye; }
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c +6 -6
@@ -917,7 +917,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter, ring->queue_index = txr_idx;/* assign ring to adapter */ - adapter->tx_ring[txr_idx] = ring; +WRITE_ONCE (adapter->tx_ring[txr_idx], ring);/* update count and index */ txr_count--;
@@ -944,7 +944,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter,set_ring_xdp (ring);/* assign ring to adapter */ - adapter->xdp_ring[xdp_idx] = ring; +WRITE_ONCE (adapter->xdp_ring[xdp_idx], ring);/* update count and index */ xdp_count--;
@@ -991,7 +991,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter, ring->queue_index = rxr_idx;/* assign ring to adapter */ - adapter->rx_ring[rxr_idx] = ring; +WRITE_ONCE (adapter->rx_ring[rxr_idx], ring);/* update count and index */ rxr_count--;
@@ -1020,13 +1020,13 @@ static void ixgbe_free_q_vector(struct ixgbe_adapter *adapter, int v_idx)ixgbe_for_each_ring (ring, q_vector->tx) {if (ring_is_xdp (ring)) - adapter->xdp_ring[ring->queue_index] =NULL ; +WRITE_ONCE (adapter->xdp_ring[ring->queue_index],NULL );else - adapter->tx_ring[ring->queue_index] =NULL ; +WRITE_ONCE (adapter->tx_ring[ring->queue_index],NULL ); }ixgbe_for_each_ring (ring, q_vector->rx) - adapter->rx_ring[ring->queue_index] =NULL ; +WRITE_ONCE (adapter->rx_ring[ring->queue_index],NULL ); adapter->q_vector[v_idx] =NULL ;napi_hash_del (&q_vector->napi);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +11 -3
@@ -6842,7 +6842,10 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) }for (i =0 ; i < adapter->num_rx_queues; i++) { -struct ixgbe_ring *rx_ring = adapter->rx_ring[i]; +struct ixgbe_ring *rx_ring =READ_ONCE (adapter->rx_ring[i]); + +if (!rx_ring) +continue ; non_eop_descs += rx_ring->rx_stats.non_eop_descs; alloc_rx_page_failed += rx_ring->rx_stats.alloc_rx_page_failed; alloc_rx_buff_failed += rx_ring->rx_stats.alloc_rx_buff_failed;
@@ -6861,15 +6864,20 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) packets =0 ;/* gather some stats to the adapter struct that are per queue */ for (i =0 ; i < adapter->num_tx_queues; i++) { -struct ixgbe_ring *tx_ring = adapter->tx_ring[i]; +struct ixgbe_ring *tx_ring =READ_ONCE (adapter->tx_ring[i]); + +if (!tx_ring) +continue ; restart_queue += tx_ring->tx_stats.restart_queue; tx_busy += tx_ring->tx_stats.tx_busy; bytes += tx_ring->stats.bytes; packets += tx_ring->stats.packets; }for (i =0 ; i < adapter->num_xdp_queues; i++) { -struct ixgbe_ring *xdp_ring = adapter->xdp_ring[i]; +struct ixgbe_ring *xdp_ring =READ_ONCE (adapter->xdp_ring[i]); +if (!xdp_ring) +continue ; restart_queue += xdp_ring->tx_stats.restart_queue; tx_busy += xdp_ring->tx_stats.tx_busy; bytes += xdp_ring->stats.bytes;
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +1 -1
@@ -4932,7 +4932,7 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb,return NOTIFY_DONE ; fib_work =kzalloc (sizeof (*fib_work),GFP_ATOMIC ); -if (WARN_ON (!fib_work)) +if (!fib_work)return NOTIFY_BAD ; router = container_of(nb, struct mlxsw_sp_router, fib_nb);
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1294,6 +1294,7 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ + {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */ {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */ {QMI_QUIRK_SET_DTR(0x2cb7, 0x0104, 4)}, /* Fibocom NL678 series */ {QMI_FIXED_INTF(0x0489, 0xe0b4, 0)}, /* Foxconn T77W968 LTE */
drivers/net/usb/smsc95xx.c +8 -1
@@ -1301,11 +1301,14 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)/* Init all registers */ ret =smsc95xx_reset (dev); +if (ret) + goto free_pdata;/* detect device revision as different features may be available */ ret =smsc95xx_read_reg (dev,ID_REV , &val);if (ret <0 ) -return ret; + goto free_pdata; + val >>=16 ; pdata->chip_id = val; pdata->mdix_ctrl =get_mdix_status (dev->net);
@@ -1331,6 +1334,10 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf)schedule_delayed_work (&pdata->carrier_check,CARRIER_CHECK_DELAY );return 0 ; + +free_pdata: +kfree (pdata); +return ret; }static void smsc95xx_unbind (struct usbnet *dev,struct usb_interface *intf)
drivers/net/wireless/ath/ath9k/hif_usb.c +11 -37
135 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/hif_usb.h +0 -5
@@ -86,11 +86,6 @@ struct tx_buf {struct list_head list; }; -struct rx_buf { -struct sk_buff *skb; -struct hif_device_usb *hif_dev; -}; -#define HIF_USB_TX_STOP BIT(0)#define HIF_USB_TX_FLUSH BIT(1)
drivers/nvme/host/rdma.c +1 -1
@@ -470,7 +470,7 @@ static int nvme_rdma_create_queue_ib(struct nvme_rdma_queue *queue)* Spread I/O queues completion vectors according their queue index. * Admin queues can always go on completion vector 0. */ - comp_vector = idx ==0 ? idx : idx -1 ; + comp_vector = (idx ==0 ? idx : idx -1 ) % ibdev->num_comp_vectors;/* +1 for ib_stop_cq */ queue->ib_cq = ib_alloc_cq(ibdev, queue,
drivers/of/of_mdio.c +7 -2
@@ -256,10 +256,15 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) child->name, addr);if (of_mdiobus_child_is_phy (child)) { +/* -ENODEV is the return code that PHYLIB has +* standardized on to indicate that bus +* scanning should continue. +*/ rc =of_mdiobus_register_phy (mdio, child, addr); -if (rc && rc != -ENODEV ) +if (!rc) +break ; +if (rc != -ENODEV ) goto unregister; -break ; } } }
drivers/phy/allwinner/phy-sun4i-usb.c +3 -2
@@ -549,13 +549,14 @@ static void sun4i_usb_phy0_id_vbus_det_scan(struct work_struct *work)struct sun4i_usb_phy_data *data = container_of(work, struct sun4i_usb_phy_data, detect.work);struct phy *phy0 = data->phys[0 ].phy; -struct sun4i_usb_phy *phy =phy_get_drvdata (phy0); +struct sun4i_usb_phy *phy;bool force_session_end, id_notify = false, vbus_notify = false;int id_det, vbus_det; -if (phy0 ==NULL ) +if (!phy0)return ; + phy =phy_get_drvdata (phy0); id_det =sun4i_usb_phy0_get_id_det (data); vbus_det =sun4i_usb_phy0_get_vbus_det (data);
drivers/spi/spi-fsl-dspi.c +33 -6
@@ -49,6 +49,9 @@#define SPI_MCR_PCSIS (0x3F << 16)#define SPI_MCR_CLR_TXF (1 << 11)#define SPI_MCR_CLR_RXF (1 << 10) +#define SPI_MCR_DIS_TXF (1 << 13) +#define SPI_MCR_DIS_RXF (1 << 12) +#define SPI_MCR_HALT (1 << 0)#define SPI_TCR 0x08#define SPI_TCR_GET_TCNT (x) (((x) & 0xffff0000) >> 16)
@@ -73,7 +76,7 @@#define SPI_SR 0x2c#define SPI_SR_EOQF 0x10000000#define SPI_SR_TCFQF 0x80000000 -#define SPI_SR_CLEAR 0xdaad0000 +#define SPI_SR_CLEAR 0x9aaf0000#define SPI_RSER_TFFFE BIT(25)#define SPI_RSER_TFFFD BIT(24)
@@ -903,6 +906,8 @@ static int dspi_suspend(struct device *dev)struct spi_master *master =dev_get_drvdata (dev);struct fsl_dspi *dspi =spi_master_get_devdata (master); +if (dspi->irq) +disable_irq (dspi->irq);spi_master_suspend (master);clk_disable_unprepare (dspi->clk);
@@ -923,6 +928,8 @@ static int dspi_resume(struct device *dev)if (ret)return ret;spi_master_resume (master); +if (dspi->irq) +enable_irq (dspi->irq);return 0 ; }
@@ -1024,8 +1031,8 @@ static int dspi_probe(struct platform_device *pdev) goto out_clk_put; } - ret =devm_request_irq (&pdev->dev, dspi->irq, dspi_interrupt,0 , - pdev->name, dspi); + ret =request_threaded_irq (dspi->irq, dspi_interrupt,NULL , +IRQF_SHARED , pdev->name, dspi);if (ret <0 ) {dev_err (&pdev->dev,"Unable to attach DSPI interrupt\n" ); goto out_clk_put;
@@ -1035,7 +1042,7 @@ static int dspi_probe(struct platform_device *pdev) ret =dspi_request_dma (dspi, res->start);if (ret <0 ) {dev_err (&pdev->dev,"can't get dma channels\n" ); - goto out_clk_put; + goto out_free_irq; } }
@@ -1048,11 +1055,14 @@ static int dspi_probe(struct platform_device *pdev) ret =spi_register_master (master);if (ret !=0 ) {dev_err (&pdev->dev,"Problem registering DSPI master\n" ); - goto out_clk_put; + goto out_free_irq; }return ret; +out_free_irq: +if (dspi->irq) +free_irq (dspi->irq, dspi); out_clk_put:clk_disable_unprepare (dspi->clk); out_master_put:
@@ -1067,13 +1077,29 @@ static int dspi_remove(struct platform_device *pdev)struct fsl_dspi *dspi =spi_master_get_devdata (master);/* Disconnect from the SPI framework */ +spi_unregister_controller (dspi->master); + +/* Disable RX and TX */ +regmap_update_bits (dspi->regmap,SPI_MCR , +SPI_MCR_DIS_TXF |SPI_MCR_DIS_RXF , +SPI_MCR_DIS_TXF |SPI_MCR_DIS_RXF ); + +/* Stop Running */ +regmap_update_bits (dspi->regmap,SPI_MCR ,SPI_MCR_HALT ,SPI_MCR_HALT ); +dspi_release_dma (dspi); +if (dspi->irq) +free_irq (dspi->irq, dspi);clk_disable_unprepare (dspi->clk); -spi_unregister_master (dspi->master);return 0 ; } +static void dspi_shutdown (struct platform_device *pdev) +{ +dspi_remove (pdev); +} +static struct platform_driver fsl_dspi_driver = { .driver.name =DRIVER_NAME , .driver.of_match_table = fsl_dspi_dt_ids,
@@ -1081,6 +1107,7 @@ static struct platform_driver fsl_dspi_driver = { .driver.pm = &dspi_pm, .probe = dspi_probe, .remove = dspi_remove, + .shutdown = dspi_shutdown, };module_platform_driver (fsl_dspi_driver);
drivers/spi/spi-sun6i.c +6 -8
@@ -202,7 +202,7 @@ static int sun6i_spi_transfer_one(struct spi_master *master, struct spi_transfer *tfr) {struct sun6i_spi *sspi =spi_master_get_devdata (master); -unsigned int mclk_rate, div, timeout; +unsigned int mclk_rate, div, div_cdr1, div_cdr2, timeout;unsigned int start, end, tx_time;unsigned int trig_level;unsigned int tx_len =0 ;
@@ -291,14 +291,12 @@ static int sun6i_spi_transfer_one(struct spi_master *master,* First try CDR2, and if we can't reach the expected * frequency, fall back to CDR1. */ - div = mclk_rate / (2 * tfr->speed_hz); -if (div <= (SUN6I_CLK_CTL_CDR2_MASK +1 )) { -if (div >0 ) - div--; - - reg =SUN6I_CLK_CTL_CDR2 (div) |SUN6I_CLK_CTL_DRS ; + div_cdr1 =DIV_ROUND_UP (mclk_rate, tfr->speed_hz); + div_cdr2 =DIV_ROUND_UP (div_cdr1,2 ); +if (div_cdr2 <= (SUN6I_CLK_CTL_CDR2_MASK +1 )) { + reg =SUN6I_CLK_CTL_CDR2 (div_cdr2 -1 ) |SUN6I_CLK_CTL_DRS ; }else { - div =ilog2 (mclk_rate) -ilog2 (tfr->speed_hz); + div =min (SUN6I_CLK_CTL_CDR1_MASK ,order_base_2 (div_cdr1)); reg =SUN6I_CLK_CTL_CDR1 (div); }
drivers/spi/spidev.c +12 -12
@@ -607,15 +607,20 @@ static int spidev_open(struct inode *inode, struct file *filp)static int spidev_release (struct inode *inode,struct file *filp) {struct spidev_data *spidev; +int dofree;mutex_lock (&device_list_lock); spidev = filp->private_data; filp->private_data =NULL ; +spin_lock_irq (&spidev->spi_lock); +/* ... after we unbound from the underlying device? */ + dofree = (spidev->spi ==NULL ); +spin_unlock_irq (&spidev->spi_lock); +/* last close? */ spidev->users--;if (!spidev->users) { -int dofree;kfree (spidev->tx_buffer); spidev->tx_buffer =NULL ;
@@ -623,19 +628,14 @@ static int spidev_release(struct inode *inode, struct file *filp)kfree (spidev->rx_buffer); spidev->rx_buffer =NULL ; -spin_lock_irq (&spidev->spi_lock); -if (spidev->spi) - spidev->speed_hz = spidev->spi->max_speed_hz; - -/* ... after we unbound from the underlying device? */ - dofree = (spidev->spi ==NULL ); -spin_unlock_irq (&spidev->spi_lock); -if (dofree)kfree (spidev); +else + spidev->speed_hz = spidev->spi->max_speed_hz; }#ifdef CONFIG_SPI_SLAVE -spi_slave_abort (spidev->spi); +if (!dofree) +spi_slave_abort (spidev->spi);#endif mutex_unlock (&device_list_lock);
@@ -782,13 +782,13 @@ static int spidev_remove(struct spi_device *spi) {struct spidev_data *spidev =spi_get_drvdata (spi); +/* prevent new opens */ +mutex_lock (&device_list_lock);/* make sure ops on existing fds can abort cleanly */ spin_lock_irq (&spidev->spi_lock); spidev->spi =NULL ;spin_unlock_irq (&spidev->spi_lock); -/* prevent new opens */ -mutex_lock (&device_list_lock);list_del (&spidev->device_entry);device_destroy (spidev_class, spidev->devt);clear_bit (MINOR (spidev->devt), minors);
drivers/staging/comedi/drivers/addi_apci_1500.c +7 -3
@@ -465,9 +465,9 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,unsigned int lo_mask = data[5 ] << shift;unsigned int chan_mask = hi_mask | lo_mask;unsigned int old_mask = (1 << shift) -1 ; -unsigned int pm = devpriv->pm[trig] & old_mask; -unsigned int pt = devpriv->pt[trig] & old_mask; -unsigned int pp = devpriv->pp[trig] & old_mask; +unsigned int pm; +unsigned int pt; +unsigned int pp;if (trig >1 ) { dev_dbg(dev->class_dev,
@@ -480,6 +480,10 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,return -EINVAL ; } + pm = devpriv->pm[trig] & old_mask; + pt = devpriv->pt[trig] & old_mask; + pp = devpriv->pp[trig] & old_mask; +switch (data[2 ]) {case COMEDI_DIGITAL_TRIG_DISABLE :/* clear trigger configuration */
drivers/thermal/cpu_cooling.c +3 -3
@@ -280,11 +280,11 @@ static u32 cpu_power_to_freq(struct cpufreq_cooling_device *cpufreq_cdev,int i;struct freq_table *freq_table = cpufreq_cdev->freq_table; -for (i =1 ; i <= cpufreq_cdev->max_level; i++) -if (power > freq_table[i].power) +for (i =0 ; i < cpufreq_cdev->max_level; i++) +if (power >= freq_table[i].power)break ; -return freq_table[i -1 ].frequency; +return freq_table[i].frequency; }/**
drivers/thermal/mtk_thermal.c +2 -4
@@ -407,8 +407,7 @@ static int mtk_thermal_bank_temperature(struct mtk_thermal_bank *bank)u32 raw;for (i =0 ; i < conf->bank_data[bank->id].num_sensors; i++) { - raw =readl (mt->thermal_base + - conf->msr[conf->bank_data[bank->id].sensors[i]]); + raw =readl (mt->thermal_base + conf->msr[i]); temp = raw_to_mcelsius(mt, conf->bank_data[bank->id].sensors[i],
@@ -545,8 +544,7 @@ static void mtk_thermal_init_bank(struct mtk_thermal *mt, int num,for (i =0 ; i < conf->bank_data[num].num_sensors; i++)writel (conf->sensor_mux_values[conf->bank_data[num].sensors[i]], - mt->thermal_base + - conf->adcpnp[conf->bank_data[num].sensors[i]]); + mt->thermal_base + conf->adcpnp[i]);writel ((1 << conf->bank_data[num].num_sensors) -1 , mt->thermal_base +TEMP_MONCTL0 );
drivers/uio/uio_pdrv_genirq.c +1 -1
@@ -148,7 +148,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)if (!uioinfo->irq) { ret =platform_get_irq (pdev,0 ); uioinfo->irq = ret; -if (ret == -ENXIO && pdev->dev.of_node) +if (ret == -ENXIO ) uioinfo->irq =UIO_IRQ_NONE ;else if (ret <0 ) {dev_err (&pdev->dev,"failed to get IRQ\n" );
drivers/usb/c67x00/c67x00-sched.c +1 -1
@@ -500,7 +500,7 @@ c67x00_giveback_urb(struct c67x00_hcd *c67x00, struct urb *urb, int status)c67x00_release_urb (c67x00, urb);usb_hcd_unlink_urb_from_ep (c67x00_hcd_to_hcd (c67x00), urb);spin_unlock (&c67x00->lock); -usb_hcd_giveback_urb (c67x00_hcd_to_hcd (c67x00), urb, urbp->status); +usb_hcd_giveback_urb (c67x00_hcd_to_hcd (c67x00), urb, status);spin_lock (&c67x00->lock); }
drivers/usb/chipidea/core.c +24 -0
@@ -1159,6 +1159,29 @@ static void ci_controller_suspend(struct ci_hdrc *ci)enable_irq (ci->irq); } +/* +* Handle the wakeup interrupt triggered by extcon connector +* We need to call ci_irq again for extcon since the first +* interrupt (wakeup int) only let the controller be out of +* low power mode, but not handle any interrupts. +*/ +static void ci_extcon_wakeup_int (struct ci_hdrc *ci) +{ +struct ci_hdrc_cable *cable_id, *cable_vbus; +u32 otgsc =hw_read_otgsc (ci, ~0 ); + + cable_id = &ci->platdata->id_extcon; + cable_vbus = &ci->platdata->vbus_extcon; + +if (!IS_ERR (cable_id->edev) && ci->is_otg && + (otgsc &OTGSC_IDIE ) && (otgsc &OTGSC_IDIS )) +ci_irq (ci->irq, ci); + +if (!IS_ERR (cable_vbus->edev) && ci->is_otg && + (otgsc &OTGSC_BSVIE ) && (otgsc &OTGSC_BSVIS )) +ci_irq (ci->irq, ci); +} +static int ci_controller_resume (struct device *dev) {struct ci_hdrc *ci =dev_get_drvdata (dev);
@@ -1191,6 +1214,7 @@ static int ci_controller_resume(struct device *dev)enable_irq (ci->irq);if (ci_otg_is_fsm_mode (ci))ci_otg_fsm_wakeup_by_srp (ci); +ci_extcon_wakeup_int (ci); }return 0 ;
drivers/usb/dwc2/platform.c +2 -1
@@ -338,7 +338,8 @@ static void dwc2_driver_shutdown(struct platform_device *dev) {struct dwc2_hsotg *hsotg =platform_get_drvdata (dev); -disable_irq (hsotg->irq); +dwc2_disable_global_interrupts (hsotg); +synchronize_irq (hsotg->irq); }/**
drivers/usb/gadget/function/f_uac1_legacy.c +2 -0
@@ -339,7 +339,9 @@ static int f_audio_out_ep_complete(struct usb_ep *ep, struct usb_request *req)/* Copy buffer is full, add it to the play_queue */ if (audio_buf_size - copy_buf->actual < req->actual) { +spin_lock_irq (&audio->lock);list_add_tail (©_buf->list, &audio->play_queue); +spin_unlock_irq (&audio->lock);schedule_work (&audio->playback_work); copy_buf =f_audio_buffer_alloc (audio_buf_size);if (IS_ERR (copy_buf))
drivers/usb/gadget/udc/atmel_usba_udc.c +1 -1
@@ -912,7 +912,7 @@ static int usba_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)u32 status;DBG (DBG_GADGET |DBG_QUEUE ,"ep_dequeue: %s, req %p\n" , - ep->ep.name, req); + ep->ep.name, _req);spin_lock_irqsave (&udc->lock, flags);
drivers/usb/host/ehci-platform.c +0 -5
@@ -390,11 +390,6 @@ static int ehci_platform_resume(struct device *dev) }ehci_resume (hcd, priv->reset_on_resume); - -pm_runtime_disable (dev); -pm_runtime_set_active (dev); -pm_runtime_enable (dev); -return 0 ; }#endif /* CONFIG_PM_SLEEP */
drivers/usb/host/ohci-platform.c +0 -5
@@ -355,11 +355,6 @@ static int ohci_platform_resume(struct device *dev) }ohci_resume (hcd, false); - -pm_runtime_disable (dev); -pm_runtime_set_active (dev); -pm_runtime_enable (dev); -return 0 ; }#endif /* CONFIG_PM_SLEEP */
drivers/usb/host/xhci-plat.c +1 -9
@@ -381,15 +381,7 @@ static int __maybe_unused xhci_plat_resume(struct device *dev)if (ret)return ret; - ret =xhci_resume (xhci,0 ); -if (ret) -return ret; - -pm_runtime_disable (dev); -pm_runtime_set_active (dev); -pm_runtime_enable (dev); - -return 0 ; +return xhci_resume (xhci,0 ); }static int __maybe_unused xhci_plat_runtime_suspend (struct device *dev)
drivers/usb/serial/ch341.c +1 -0
@@ -84,6 +84,7 @@static const struct usb_device_id id_table[] = { {USB_DEVICE (0x4348 ,0x5523 ) }, + {USB_DEVICE (0x1a86 ,0x7522 ) }, {USB_DEVICE (0x1a86 ,0x7523 ) }, {USB_DEVICE (0x1a86 ,0x5523 ) }, { },
drivers/usb/serial/cypress_m8.c +2 -0
@@ -63,6 +63,7 @@ static const struct usb_device_id id_table_earthmate[] = {static const struct usb_device_id id_table_cyphidcomrs232[] = { {USB_DEVICE (VENDOR_ID_CYPRESS ,PRODUCT_ID_CYPHIDCOM ) }, + {USB_DEVICE (VENDOR_ID_SAI ,PRODUCT_ID_CYPHIDCOM ) }, {USB_DEVICE (VENDOR_ID_POWERCOM ,PRODUCT_ID_UPS ) }, {USB_DEVICE (VENDOR_ID_FRWD ,PRODUCT_ID_CYPHIDCOM_FRWD ) }, { }/* Terminating entry */
@@ -77,6 +78,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, + { USB_DEVICE(VENDOR_ID_SAI, PRODUCT_ID_CYPHIDCOM) }, { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) }, { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) },
drivers/usb/serial/cypress_m8.h +3 -0
@@ -25,6 +25,9 @@#define VENDOR_ID_CYPRESS 0x04b4#define PRODUCT_ID_CYPHIDCOM 0x5500 +/* Simply Automated HID->COM UPB PIM (using Cypress PID 0x5500) */ +#define VENDOR_ID_SAI 0x17dd +/* FRWD Dongle - a GPS sports watch */ #define VENDOR_ID_FRWD 0x6737#define PRODUCT_ID_CYPHIDCOM_FRWD 0x0001
drivers/usb/serial/iuu_phoenix.c +5 -3
@@ -704,14 +704,16 @@ static int iuu_uart_write(struct tty_struct *tty, struct usb_serial_port *port,struct iuu_private *priv =usb_get_serial_port_data (port);unsigned long flags; -if (count >256 ) -return -ENOMEM ; -spin_lock_irqsave (&priv->lock, flags); + count =min (count,256 - priv->writelen); +if (count ==0 ) + goto out; +/* fill the buffer */ memcpy (priv->writebuf + priv->writelen, buf, count); priv->writelen += count; +out:spin_unlock_irqrestore (&priv->lock, flags);return count;
drivers/usb/serial/option.c +6 -0
@@ -248,6 +248,7 @@ static void option_instat_callback(struct urb *urb);/* These Quectel products use Quectel's vendor ID */ #define QUECTEL_PRODUCT_EC21 0x0121#define QUECTEL_PRODUCT_EC25 0x0125 +#define QUECTEL_PRODUCT_EG95 0x0195#define QUECTEL_PRODUCT_BG96 0x0296#define QUECTEL_PRODUCT_EP06 0x0306#define QUECTEL_PRODUCT_EM12 0x0512
@@ -1100,6 +1101,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(4) }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25), .driver_info = RSVD(4) }, + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95), + .driver_info = RSVD(4) }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
@@ -2030,6 +2033,9 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */ .driver_info = RSVD(6) }, + { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ + { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ + { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */ { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
fs/btrfs/extent_io.c +24 -16
@@ -4862,25 +4862,28 @@ struct extent_buffer *alloc_dummy_extent_buffer(struct btrfs_fs_info *fs_info,static void check_buffer_tree_ref (struct extent_buffer *eb) {int refs; -/* the ref bit is tricky. We have to make sure it is set -* if we have the buffer dirty. Otherwise the -* code to free a buffer can end up dropping a dirty -* page +/* +* The TREE_REF bit is first set when the extent_buffer is added +* to the radix tree. It is also reset, if unset, when a new reference +* is created by find_extent_buffer. * -* Once the ref bit is set, it won't go away while the -* buffer is dirty or in writeback, and it also won't -* go away while we have the reference count on the -* eb bumped. +* It is only cleared in two cases: freeing the last non-tree +* reference to the extent_buffer when its STALE bit is set or +* calling releasepage when the tree reference is the only reference. * -* We can't just set the ref bit without bumping the -* ref on the eb because free_extent_buffer might -* see the ref bit and try to clear it. If this happens -* free_extent_buffer might end up dropping our original -* ref by mistake and freeing the page before we are able -* to add one more ref. +* In both cases, care is taken to ensure that the extent_buffer's +* pages are not under io. However, releasepage can be concurrently +* called with creating new references, which is prone to race +* conditions between the calls to check_buffer_tree_ref in those +* codepaths and clearing TREE_REF in try_release_extent_buffer. * -* So bump the ref count first, then set the bit. If someone -* beat us to it, drop the ref we added. +* The actual lifetime of the extent_buffer in the radix tree is +* adequately protected by the refcount, but the TREE_REF bit and +* its corresponding reference are not. To protect against this +* class of races, we call check_buffer_tree_ref from the codepaths +* which trigger io after they set eb->io_pages. Note that once io is +* initiated, TREE_REF can no longer be cleared, so that is the +* moment at which any such race is best fixed. */ refs =atomic_read (&eb->refs);if (refs >=2 &&test_bit (EXTENT_BUFFER_TREE_REF , &eb->bflags))
@@ -5344,6 +5347,11 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,clear_bit (EXTENT_BUFFER_READ_ERR , &eb->bflags); eb->read_mirror =0 ;atomic_set (&eb->io_pages, num_reads); +/* +* It is possible for releasepage to clear the TREE_REF bit before we +* set io_pages. See check_buffer_tree_ref for a more detailed comment. +*/ +check_buffer_tree_ref (eb);for (i =0 ; i < num_pages; i++) { page = eb->pages[i];
fs/cifs/inode.c +9 -0
@@ -2216,6 +2216,15 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs,if (rc ==0 ) { cifsInode->server_eof = attrs->ia_size;cifs_setsize (inode, attrs->ia_size); + +/* +* The man page of truncate says if the size changed, +* then the st_ctime and st_mtime fields for the file +* are updated. +*/ + attrs->ia_ctime = attrs->ia_mtime =current_time (inode); + attrs->ia_valid |=ATTR_CTIME |ATTR_MTIME ; +cifs_truncate_page (inode->i_mapping, inode->i_size); }
fs/fuse/file.c +11 -1
@@ -17,6 +17,7 @@#include <linux/swap.h> #include <linux/falloc.h> #include <linux/uio.h> +#include <linux/fs.h> static const struct file_operations fuse_direct_io_file_operations;
@@ -2534,7 +2535,16 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,struct iovec *iov = iov_page; iov->iov_base = (void __user *)arg; - iov->iov_len =_IOC_SIZE (cmd); + +switch (cmd) { +case FS_IOC_GETFLAGS : +case FS_IOC_SETFLAGS : + iov->iov_len =sizeof (int ); +break ; +default : + iov->iov_len =_IOC_SIZE (cmd); +break ; + }if (_IOC_DIR (cmd) & _IOC_WRITE) { in_iov = iov;
fs/gfs2/ops_fstype.c +11 -1
@@ -1179,7 +1179,17 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent goto fail_per_node; } -if (!sb_rdonly (sb)) { +if (sb_rdonly (sb)) { +struct gfs2_holder freeze_gh; + + error =gfs2_glock_nq_init (sdp->sd_freeze_gl,LM_ST_SHARED , +GL_EXACT , &freeze_gh); +if (error) { +fs_err (sdp,"can't make FS RO: %d\n" , error); + goto fail_per_node; + } +gfs2_glock_dq_uninit (&freeze_gh); + }else { error =gfs2_make_fs_rw (sdp);if (error) {fs_err (sdp,"can't make FS RW: %d\n" , error);
include/linux/cgroup-defs.h +6 -2
@@ -681,7 +681,9 @@ struct sock_cgroup_data { union { #ifdef __LITTLE_ENDIAN struct { - u8 is_data; + u8 is_data : 1; + u8 no_refcnt : 1; + u8 unused : 6; u8 padding; u16 prioidx; u32 classid;
@@ -691,7 +693,9 @@ struct sock_cgroup_data {u32 classid;u16 prioidx;u8 padding; - u8 is_data; + u8 unused : 6; + u8 no_refcnt : 1; + u8 is_data : 1; } __packed;#endif u64 val;
include/linux/cgroup.h +3 -1
@@ -714,6 +714,7 @@ extern spinlock_t cgroup_sk_update_lock;void cgroup_sk_alloc_disable (void );void cgroup_sk_alloc (struct sock_cgroup_data *skcd); +void cgroup_sk_clone (struct sock_cgroup_data *skcd);void cgroup_sk_free (struct sock_cgroup_data *skcd);static inline struct cgroup *sock_cgroup_ptr (struct sock_cgroup_data *skcd)
@@ -727,7 +728,7 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)*/ v =READ_ONCE (skcd->val); -if (v &1 ) +if (v &3 )return &cgrp_dfl_root.cgrp;return (struct cgroup *)(unsigned long )v ?: &cgrp_dfl_root.cgrp;
@@ -739,6 +740,7 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)#else /* CONFIG_CGROUP_DATA */ static inline void cgroup_sk_alloc (struct sock_cgroup_data *skcd) {} +static inline void cgroup_sk_clone (struct sock_cgroup_data *skcd) {}static inline void cgroup_sk_free (struct sock_cgroup_data *skcd) {}#endif /* CONFIG_CGROUP_DATA */
include/net/dst.h +9 -1
@@ -427,7 +427,15 @@ static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, costatic inline struct neighbour *dst_neigh_lookup_skb (const struct dst_entry *dst,struct sk_buff *skb) { -struct neighbour *n = dst->ops->neigh_lookup (dst, skb,NULL ); +struct neighbour *n =NULL ; + +/* The packets from tunnel devices (eg bareudp) may have only +* metadata in the dst pointer of skb. Hence a pointer check of +* neigh_lookup is needed. +*/ +if (dst->ops->neigh_lookup) + n = dst->ops->neigh_lookup (dst, skb,NULL ); +return IS_ERR (n) ?NULL : n; }
include/net/genetlink.h +0 -8
@@ -34,12 +34,6 @@ struct genl_info;* do additional, common, filtering and return an error * @post_doit: called after an operation's doit callback, it may * undo operations done by pre_doit, for example release locks -* @mcast_bind: a socket bound to the given multicast group (which -* is given as the offset into the groups array) -* @mcast_unbind: a socket was unbound from the given multicast group. -* Note that unbind() will not be called symmetrically if the -* generic netlink family is removed while there are still open -* sockets. * @attrbuf: buffer to store parsed attributes (private) * @mcgrps: multicast groups used by this family * @n_mcgrps: number of multicast groups
@@ -62,8 +56,6 @@ struct genl_family {void (*post_doit)(const struct genl_ops *ops,struct sk_buff *skb,struct genl_info *info); -int (*mcast_bind)(struct net *net,int group); -void (*mcast_unbind)(struct net *net,int group);struct nlattr ** attrbuf;/* private */ const struct genl_ops * ops;const struct genl_multicast_group *mcgrps;
include/sound/compress_driver.h +9 -1
@@ -72,6 +72,7 @@ struct snd_compr_runtime {* @direction: stream direction, playback/recording * @metadata_set: metadata set flag, true when set * @next_track: has userspace signal next track transition, true when set +* @partial_drain: undergoing partial_drain for stream, true when set * @private_data: pointer to DSP private data */ struct snd_compr_stream {
@@ -83,6 +84,7 @@ struct snd_compr_stream {enum snd_compr_direction direction;bool metadata_set;bool next_track; +bool partial_drain;void *private_data; };
@@ -186,7 +188,13 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)if (snd_BUG_ON (!stream))return ; - stream->runtime->state =SNDRV_PCM_STATE_SETUP ; +/* for partial_drain case we are back to running state on success */ +if (stream->partial_drain) { + stream->runtime->state =SNDRV_PCM_STATE_RUNNING ; + stream->partial_drain = false;/* clear this flag as well */ + }else { + stream->runtime->state =SNDRV_PCM_STATE_SETUP ; + }wake_up (&stream->runtime->sleep); }
include/trace/events/rxrpc.h +1 -1
@@ -333,7 +333,7 @@ enum rxrpc_congest_change { EM(rxrpc_cong_begin_retransmission, " Retrans") \ EM(rxrpc_cong_cleared_nacks, " Cleared") \ EM(rxrpc_cong_new_low_nack, " NewLowN") \ - EM(rxrpc_cong_no_change, "") \ + EM(rxrpc_cong_no_change, " -") \ EM(rxrpc_cong_progress, " Progres") \ EM(rxrpc_cong_retransmit_again, " ReTxAgn") \EM (rxrpc_cong_rtt_window_end," RttWinE" ) \
kernel/cgroup/cgroup.c +18 -11
@@ -5798,17 +5798,8 @@ void cgroup_sk_alloc_disable(void)void cgroup_sk_alloc (struct sock_cgroup_data *skcd) { -if (cgroup_sk_alloc_disabled) -return ; - -/* Socket clone path */ -if (skcd->val) { -/* -* We might be cloning a socket which is left in an empty -* cgroup and the cgroup might have already been rmdir'd. -* Don't use cgroup_get_live(). -*/ -cgroup_get (sock_cgroup_ptr (skcd)); +if (cgroup_sk_alloc_disabled) { + skcd->no_refcnt =1 ;return ; }
@@ -5832,8 +5823,24 @@ void cgroup_sk_alloc(struct sock_cgroup_data *skcd)rcu_read_unlock (); } +void cgroup_sk_clone (struct sock_cgroup_data *skcd) +{ +/* Socket clone path */ +if (skcd->val) { +/* +* We might be cloning a socket which is left in an empty +* cgroup and the cgroup might have already been rmdir'd. +* Don't use cgroup_get_live(). +*/ +cgroup_get (sock_cgroup_ptr (skcd)); + } +} +void cgroup_sk_free (struct sock_cgroup_data *skcd) { +if (skcd->no_refcnt) +return ; +cgroup_put (sock_cgroup_ptr (skcd)); }
kernel/sched/fair.c +9 -1
@@ -6871,7 +6871,15 @@ static int detach_tasks(struct lb_env *env)if (!can_migrate_task (p, env)) goto next; - load =task_h_load (p); +/* +* Depending of the number of CPUs and tasks and the +* cgroup hierarchy, task_h_load() can return a null +* value. Make sure that env->imbalance decreases +* otherwise detach_tasks() will stop only after +* detaching up to loop_max tasks. +*/ + load = max_t(unsigned long, task_h_load(p), 1); +if (sched_feat (LB_MIN ) && load <16 && !env->sd->nr_balance_failed) goto next;
kernel/time/timer.c +2 -2
@@ -502,8 +502,8 @@ static int calc_wheel_index(unsigned long expires, unsigned long clk)* Force expire obscene large timeouts to expire at the * capacity limit of the wheel. */ -if (expires >=WHEEL_TIMEOUT_CUTOFF ) - expires =WHEEL_TIMEOUT_MAX ; +if (delta >=WHEEL_TIMEOUT_CUTOFF ) + expires = clk +WHEEL_TIMEOUT_MAX ; idx =calc_index (expires,LVL_DEPTH -1 ); }
net/ceph/osd_client.c +1 -0
@@ -384,6 +384,7 @@ static void target_copy(struct ceph_osd_request_target *dest, dest->size = src->size; dest->min_size = src->min_size; dest->sort_bitwise = src->sort_bitwise; + dest->recovery_deletes = src->recovery_deletes; dest->flags = src->flags; dest->paused = src->paused;
net/core/sock.c +1 -1
@@ -1689,7 +1689,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)/* sk->sk_memcg will be populated at accept() time */ newsk->sk_memcg =NULL ; -cgroup_sk_alloc (&newsk->sk_cgrp_data); +cgroup_sk_clone (&newsk->sk_cgrp_data);rcu_read_lock (); filter =rcu_dereference (sk->sk_filter);
net/ipv4/ping.c +3 -0
@@ -801,6 +801,9 @@ static int ping_v4_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)inet_sk_flowi_flags (sk), faddr, saddr,0 ,0 , sk->sk_uid); + fl4.fl4_icmp_type = user_icmph.type; + fl4.fl4_icmp_code = user_icmph.code; +security_sk_classify_flow (sk,flowi4_to_flowi (&fl4)); rt =ip_route_output_flow (net, &fl4, sk);if (IS_ERR (rt)) {
net/ipv4/tcp.c +9 -6
@@ -2366,6 +2366,9 @@ int tcp_disconnect(struct sock *sk, int flags) tp->snd_cwnd_cnt =0 ; tp->window_clamp =0 ; tp->delivered =0 ; +if (icsk->icsk_ca_ops->release) + icsk->icsk_ca_ops->release (sk); +memset (icsk->icsk_ca_priv,0 ,sizeof (icsk->icsk_ca_priv));tcp_set_ca_state (sk, TCP_CA_Open); tp->is_sack_reneg =0 ;tcp_clear_retrans (tp);
@@ -2759,10 +2762,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,#ifdef CONFIG_TCP_MD5SIG case TCP_MD5SIG :case TCP_MD5SIG_EXT : -if ((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN )) - err = tp->af_specific->md5_parse (sk, optname, optval, optlen); -else - err = -EINVAL ; + err = tp->af_specific->md5_parse (sk, optname, optval, optlen);break ;#endif case TCP_USER_TIMEOUT :
@@ -3394,10 +3394,13 @@ EXPORT_SYMBOL(tcp_md5_hash_skb_data);int tcp_md5_hash_key (struct tcp_md5sig_pool *hp,const struct tcp_md5sig_key *key) { +u8 keylen =READ_ONCE (key->keylen);/* paired with WRITE_ONCE() in tcp_md5_do_add */ struct scatterlist sg; -sg_init_one (&sg, key->key, key->keylen); -ahash_request_set_crypt (hp->md5_req, &sg,NULL , key->keylen); +sg_init_one (&sg, key->key, keylen); +ahash_request_set_crypt (hp->md5_req, &sg,NULL , keylen); + +/* tcp_md5_do_add() might change key->key under us */ return crypto_ahash_update (hp->md5_req); }EXPORT_SYMBOL (tcp_md5_hash_key);
net/ipv4/tcp_cong.c +1 -1
@@ -199,7 +199,7 @@ static void tcp_reinit_congestion_control(struct sock *sk, icsk->icsk_ca_setsockopt =1 ;memset (icsk->icsk_ca_priv,0 ,sizeof (icsk->icsk_ca_priv)); -if (sk->sk_state !=TCP_CLOSE ) +if (!((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN )))tcp_init_congestion_control (sk); }
net/ipv4/tcp_ipv4.c +12 -3
@@ -995,9 +995,18 @@ int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr, key =tcp_md5_do_lookup_exact (sk, addr, family, prefixlen);if (key) { -/* Pre-existing entry - just update that one. */ +/* Pre-existing entry - just update that one. +* Note that the key might be used concurrently. +*/ memcpy (key->key, newkey, newkeylen); - key->keylen = newkeylen; + +/* Pairs with READ_ONCE() in tcp_md5_hash_key(). +* Also note that a reader could catch new key->keylen value +* but old key->key[], this is the reason we use __GFP_ZERO +* at sock_kmalloc() time below these lines. +*/ +WRITE_ONCE (key->keylen, newkeylen); +return 0 ; }
@@ -1013,7 +1022,7 @@ int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr,rcu_assign_pointer (tp->md5sig_info, md5sig); } - key =sock_kmalloc (sk,sizeof (*key), gfp); + key =sock_kmalloc (sk,sizeof (*key), gfp | __GFP_ZERO);if (!key)return -ENOMEM ;if (!tcp_alloc_md5sig_pool ()) {
net/ipv4/tcp_output.c +6 -4
@@ -616,7 +616,8 @@ static unsigned int tcp_synack_options(struct request_sock *req, unsigned int mss, struct sk_buff *skb, struct tcp_out_options *opts, const struct tcp_md5sig_key *md5, - struct tcp_fastopen_cookie *foc) + struct tcp_fastopen_cookie *foc, + enum tcp_synack_type synack_type) { struct inet_request_sock *ireq = inet_rsk(req);unsigned int remaining =MAX_TCP_OPTION_SPACE ;
@@ -631,7 +632,8 @@ static unsigned int tcp_synack_options(struct request_sock *req,* rather than TS in order to fit in better with old, * buggy kernels, but that was deemed to be unnecessary. */ - ireq->tstamp_ok &= !ireq->sack_ok; +if (synack_type !=TCP_SYNACK_COOKIE ) + ireq->tstamp_ok &= !ireq->sack_ok; }#endif
@@ -3252,8 +3254,8 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst, md5 =tcp_rsk (req)->af_specific->req_md5_lookup (sk,req_to_sk (req));#endif skb_set_hash (skb,tcp_rsk (req)->txhash,PKT_HASH_TYPE_L4 ); - tcp_header_size =tcp_synack_options (req, mss, skb, &opts, md5, foc) + -sizeof (*th); + tcp_header_size =tcp_synack_options (req, mss, skb, &opts, md5, + foc, synack_type) +sizeof (*th);skb_push (skb, tcp_header_size);skb_reset_transport_header (skb);
net/l2tp/l2tp_core.c +1 -4
@@ -1141,6 +1141,7 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb,/* Queue the packet to IP for output */ skb->ignore_df =1 ; +skb_dst_drop (skb);#if IS_ENABLED (CONFIG_IPV6 )if (l2tp_sk_is_v6 (tunnel->sock)) error =inet6_csk_xmit (tunnel->sock, skb,NULL );
@@ -1214,10 +1215,6 @@ int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb, int hdr_len goto out_unlock; } -/* Get routing info from the tunnel socket */ -skb_dst_drop (skb); -skb_dst_set (skb,sk_dst_check (sk,0 )); - inet =inet_sk (sk); fl = &inet->cork.fl;switch (tunnel->encap) {
net/llc/af_llc.c +7 -3
@@ -273,6 +273,10 @@ static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr)if (!sock_flag (sk,SOCK_ZAPPED )) goto out; +if (!addr->sllc_arphrd) + addr->sllc_arphrd =ARPHRD_ETHER ; +if (addr->sllc_arphrd !=ARPHRD_ETHER ) + goto out; rc = -ENODEV ;if (sk->sk_bound_dev_if) { llc->dev =dev_get_by_index (&init_net, sk->sk_bound_dev_if);
@@ -330,15 +334,15 @@ static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)if (unlikely (!sock_flag (sk,SOCK_ZAPPED ) || addrlen !=sizeof (*addr))) goto out; rc = -EAFNOSUPPORT ; -if (unlikely (addr->sllc_family !=AF_LLC )) +if (!addr->sllc_arphrd) + addr->sllc_arphrd =ARPHRD_ETHER ; +if (unlikely (addr->sllc_family !=AF_LLC || addr->sllc_arphrd !=ARPHRD_ETHER )) goto out; rc = -ENODEV ;rcu_read_lock ();if (sk->sk_bound_dev_if) { llc->dev =dev_get_by_index_rcu (&init_net, sk->sk_bound_dev_if);if (llc->dev) { -if (!addr->sllc_arphrd) - addr->sllc_arphrd = llc->dev->type;if (is_zero_ether_addr (addr->sllc_mac))memcpy (addr->sllc_mac, llc->dev->dev_addr,IFHWADDRLEN );
net/netlink/genetlink.c +0 -49
60 lines not on this page · raw message
net/sched/sch_atm.c +4 -4
@@ -545,15 +545,15 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt)if (!p->link.q) p->link.q = &noop_qdisc;pr_debug ("atm_tc_init: link (%p) qdisc %p\n" , &p->link, p->link.q); + p->link.vcc =NULL ; + p->link.sock =NULL ; + p->link.common.classid = sch->handle; + p->link.ref =1 ; err =tcf_block_get (&p->link.block, &p->link.filter_list);if (err)return err; - p->link.vcc =NULL ; - p->link.sock =NULL ; - p->link.common.classid = sch->handle; - p->link.ref =1 ;tasklet_init (&p->task, sch_atm_dequeue, (unsigned long )sch);return 0 ; }
sound/core/compress_offload.c +4 -0
@@ -723,6 +723,9 @@ static int snd_compr_stop(struct snd_compr_stream *stream) retval = stream->ops->trigger (stream,SNDRV_PCM_TRIGGER_STOP );if (!retval) { +/* clear flags and stop any drain wait */ + stream->partial_drain = false; + stream->metadata_set = false;snd_compr_drain_notify (stream); stream->runtime->total_bytes_available =0 ; stream->runtime->total_bytes_transferred =0 ;
@@ -880,6 +883,7 @@ static int snd_compr_partial_drain(struct snd_compr_stream *stream)if (stream->next_track == false)return -EPERM ; + stream->partial_drain = true; retval = stream->ops->trigger (stream,SND_COMPR_TRIGGER_PARTIAL_DRAIN );if (retval) {pr_debug ("Partial drain returned failure\n" );
sound/drivers/opl3/opl3_synth.c +2 -0
@@ -104,6 +104,8 @@ int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file, {struct snd_dm_fm_info info; +memset (&info,0 ,sizeof (info)); + info.fm_mode = opl3->fm_mode; info.rhythm = opl3->rhythm;if (copy_to_user (argp, &info,sizeof (struct snd_dm_fm_info )))
sound/pci/hda/hda_auto_parser.c +6 -0
@@ -76,6 +76,12 @@ static int compare_input_type(const void *ap, const void *bp)if (a->type != b->type)return (int )(a->type - b->type); +/* If has both hs_mic and hp_mic, pick the hs_mic ahead of hp_mic. */ +if (a->is_headset_mic && b->is_headphone_mic) +return -1 ;/* don't swap */ +else if (a->is_headphone_mic && b->is_headset_mic) +return 1 ;/* swap */ +/* In case one has boost and the other one has not, pick the one with boost first. */ return (int )(b->has_boost_on_pin - a->has_boost_on_pin);
sound/usb/line6/capture.c +2 -0
@@ -291,6 +291,8 @@ int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm) urb->interval =LINE6_ISO_INTERVAL ; urb->error_count =0 ; urb->complete = audio_in_callback; +if (usb_urb_ep_type_check (urb)) +return -EINVAL ; }return 0 ;
sound/usb/line6/playback.c +2 -0
@@ -436,6 +436,8 @@ int line6_create_audio_out_urbs(struct snd_line6_pcm *line6pcm) urb->interval =LINE6_ISO_INTERVAL ; urb->error_count =0 ; urb->complete = audio_out_callback; +if (usb_urb_ep_type_check (urb)) +return -EINVAL ; }return 0 ;
sound/usb/midi.c +12 -5
@@ -1477,6 +1477,8 @@ void snd_usbmidi_disconnect(struct list_head *p)spin_unlock_irq (&umidi->disc_lock);up_write (&umidi->disc_rwsem); +del_timer_sync (&umidi->error_timer); +for (i =0 ; i <MIDI_MAX_ENDPOINTS ; ++i) {struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i];if (ep->out)
@@ -1503,7 +1505,6 @@ void snd_usbmidi_disconnect(struct list_head *p) ep->in =NULL ; } } -del_timer_sync (&umidi->error_timer); }EXPORT_SYMBOL (snd_usbmidi_disconnect);
@@ -2260,16 +2261,22 @@ void snd_usbmidi_input_stop(struct list_head *p) }EXPORT_SYMBOL (snd_usbmidi_input_stop); -static void snd_usbmidi_input_start_ep (struct snd_usb_midi_in_endpoint *ep) +static void snd_usbmidi_input_start_ep (struct snd_usb_midi *umidi, +struct snd_usb_midi_in_endpoint *ep) {unsigned int i; +unsigned long flags;if (!ep)return ;for (i =0 ; i <INPUT_URBS ; ++i) {struct urb *urb = ep->urbs[i]; - urb->dev = ep->umidi->dev; -snd_usbmidi_submit_urb (urb,GFP_KERNEL ); +spin_lock_irqsave (&umidi->disc_lock, flags); +if (!atomic_read (&urb->use_count)) { + urb->dev = ep->umidi->dev; +snd_usbmidi_submit_urb (urb,GFP_ATOMIC ); + } +spin_unlock_irqrestore (&umidi->disc_lock, flags); } }
@@ -2285,7 +2292,7 @@ void snd_usbmidi_input_start(struct list_head *p)if (umidi->input_running || !umidi->opened[1 ])return ;for (i =0 ; i <MIDI_MAX_ENDPOINTS ; ++i) -snd_usbmidi_input_start_ep (umidi->endpoints[i].in); +snd_usbmidi_input_start_ep (umidi, umidi->endpoints[i].in); umidi->input_running =1 ; }EXPORT_SYMBOL (snd_usbmidi_input_start);
sound/usb/quirks-table.h +52 -0
56 lines not on this page · raw message
tools/perf/util/stat.c +4 -2
@@ -350,8 +350,10 @@ int perf_stat_process_counter(struct perf_stat_config *config,* interval mode, otherwise overall avg running * averages will be shown for each interval. */ -if (config->interval) -init_stats (ps->res_stats); +if (config->interval) { +for (i =0 ; i <3 ; i++) +init_stats (&ps->res_stats[i]); + }if (counter->per_pkg)zero_per_pkg (counter);