Linux 3.18.125
Greg KH
maintainer-----------
NOTE! Are there still any users of this tree? It only makes sense to keep doing 3.18.y updates if people are using it. And from what I can see in the "real world", no one is actually updating devices that rely on 3.18.y to the newer kernel releases. So I think I'm going to stop maintaining this tree soon unless someone speaks up and says "I am using it!" Please let me know.
-----------
I'm announcing the release of the 3.18.125 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/at91sam9263.dtsi | 2 arch/arm/boot/dts/exynos5250.dtsi | 2 arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 arch/arm/boot/dts/exynos5420.dtsi | 6 - arch/arm/boot/dts/sama5d3xmb.dtsi | 2 arch/arm/boot/dts/sama5d4.dtsi | 2 arch/arm/kvm/mmu.c | 2 arch/arm/mach-at91/board-dt-sama5.c | 18 +++ arch/arm/mach-omap2/control.h | 4 arch/arm/mach-omap2/timer.c | 36 +++++++ arch/arm/mach-shmobile/setup-r8a7740.c | 7 + arch/arm/mm/ioremap.c | 2 arch/mips/kernel/smp-cps.c | 2 arch/powerpc/kernel/tm.S | 20 +++- arch/s390/kernel/kprobes.c | 12 ++ arch/s390/kvm/gaccess.c | 18 +-- arch/x86/kernel/cpu/perf_event_intel_ds.c | 4 arch/x86/kernel/cpu/perf_event_intel_rapl.c | 44 +++++++-- arch/x86/kernel/irq.c | 3 arch/x86/kernel/ldt.c | 4 arch/x86/kernel/process.c | 2 arch/x86/pci/fixup.c | 7 + drivers/ata/ahci_xgene.c | 12 +- drivers/ata/libata-core.c | 2 drivers/bus/arm-cci.c | 3 drivers/clk/rockchip/clk-cpu.c | 10 +- drivers/gpu/drm/i915/i915_gem.c | 2 drivers/i2c/busses/i2c-scmi.c | 1 drivers/iio/inkern.c | 3 drivers/iommu/intel-iommu.c | 9 + drivers/mcb/mcb-internal.h | 1 drivers/mcb/mcb-pci.c | 27 +++-- drivers/md/dm-thin.c | 1 drivers/md/dm.c | 4 drivers/media/usb/dvb-usb-v2/af9035.c | 6 - drivers/mfd/omap-usb-host.c | 11 +- drivers/misc/cxl/context.c | 82 +++++++++++++----- drivers/misc/cxl/file.c | 14 +-- drivers/mmc/host/sdhci.c | 19 +--- drivers/mtd/mtd_blkdevs.c | 10 +- drivers/net/ethernet/broadcom/bcmsysport.c | 22 ++-- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 17 +++ drivers/net/ethernet/davicom/dm9000.c | 34 +++---- drivers/net/ethernet/intel/igb/igb_main.c | 9 + drivers/net/ethernet/marvell/mvpp2.c | 10 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 5 - drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 8 + drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 3 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 3 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h | 3 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 12 +- drivers/net/ethernet/realtek/r8169.c | 8 - drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 - drivers/net/team/team.c | 5 + drivers/net/usb/asix_common.c | 3 drivers/net/usb/ax88179_178a.c | 3 drivers/net/usb/smsc75xx.c | 4 drivers/net/usb/smsc95xx.c | 3 drivers/net/usb/sr9800.c | 3 drivers/net/wireless/iwlwifi/pcie/drv.c | 4 drivers/net/wireless/rtlwifi/pci.h | 2 drivers/net/wireless/rtlwifi/rtl8821ae/hw.c | 17 +++ drivers/net/wireless/rtlwifi/rtl8821ae/sw.c | 5 + drivers/net/wireless/rtlwifi/wifi.h | 3 drivers/of/of_pci.c | 1 drivers/pci/access.c | 9 + drivers/pci/quirks.c | 1 drivers/phy/phy-omap-control.c | 7 - drivers/phy/phy-sun4i-usb.c | 3 drivers/phy/phy-ti-pipe3.c | 10 +- drivers/pinctrl/freescale/pinctrl-imx25.c | 4 drivers/pinctrl/pinctrl-at91.c | 15 +++ drivers/scsi/scsi_lib.c | 2 drivers/scsi/scsi_pm.c | 20 ++-- drivers/tty/n_tty.c | 11 -- drivers/tty/serial/fsl_lpuart.c | 9 + drivers/tty/serial/samsung.c | 56 +++++++----- drivers/tty/tty_audit.c | 2 drivers/usb/class/cdc-acm.c | 14 +-- drivers/usb/core/devio.c | 4 drivers/usb/core/hub.c | 15 +-- drivers/usb/dwc2/gadget.c | 10 +- drivers/usb/gadget/function/f_uac1.c | 2 drivers/usb/gadget/legacy/inode.c | 1 drivers/usb/host/ehci-sched.c | 6 - drivers/usb/host/ehci-tegra.c | 2 drivers/usb/host/xhci-hub.c | 18 +-- drivers/usb/musb/Kconfig | 4 drivers/usb/musb/musb_cppi41.c | 4 drivers/usb/musb/musb_debugfs.c | 16 +-- drivers/usb/serial/qcserial.c | 54 +++++++---- drivers/usb/storage/unusual_uas.h | 10 ++ drivers/video/fbdev/aty/atyfb.h | 3 drivers/video/fbdev/aty/atyfb_base.c | 7 - drivers/video/fbdev/aty/mach64_ct.c | 10 +- drivers/video/fbdev/broadsheetfb.c | 8 + fs/btrfs/file.c | 9 + fs/btrfs/ordered-data.c | 14 +++ fs/btrfs/ordered-data.h | 3 fs/btrfs/xattr.c | 8 + fs/cachefiles/namei.c | 2 fs/ext4/extents.c | 8 + fs/fat/fatent.c | 1 fs/nfs/callback.c | 6 - fs/nfs/nfs4client.c | 25 ++++- fs/nfs/nfs4proc.c | 21 +++- fs/ocfs2/alloc.c | 18 +-- fs/overlayfs/inode.c | 3 fs/quota/quota_v2.c | 12 +- fs/splice.c | 7 + include/linux/compiler-gcc.h | 16 +++ include/linux/compiler-intel.h | 3 include/linux/compiler.h | 4 include/linux/nfs_fs_sb.h | 3 include/linux/phy/omap_control_phy.h | 6 - include/linux/tty.h | 6 - include/net/af_unix.h | 4 include/net/scm.h | 1 include/net/sock.h | 2 kernel/events/core.c | 11 ++ kernel/rcu/tree_plugin.h | 1 kernel/resource.c | 13 ++ kernel/sched/fair.c | 23 ++++- kernel/sched/sched.h | 2 kernel/trace/trace_events.c | 69 ++++++++++++--- lib/string.c | 2 mm/huge_memory.c | 6 + mm/migrate.c | 2 mm/mremap.c | 21 +++- net/core/rtnetlink.c | 27 +++++ net/core/scm.c | 7 + net/ipv4/ip_fragment.c | 12 +- net/ipv4/ip_tunnel.c | 9 + net/ipv6/addrconf.c | 10 +- net/ipv6/ip6_tunnel.c | 14 ++- net/ipv6/mcast.c | 16 +-- net/ipv6/ndisc.c | 3 net/ipv6/xfrm6_output.c | 2 net/netlabel/netlabel_unlabeled.c | 3 net/sched/sch_gred.c | 2 net/sctp/socket.c | 14 +-- net/socket.c | 11 +- net/unix/af_unix.c | 4 net/unix/garbage.c | 8 - net/wireless/reg.c | 1 net/xfrm/xfrm_user.c | 15 +++ security/keys/process_keys.c | 7 - sound/pci/hda/patch_realtek.c | 2 sound/soc/soc-dapm.c | 12 -- sound/usb/mixer.c | 2 sound/usb/mixer_maps.c | 12 -- sound/usb/mixer_quirks.c | 37 ++++++++ sound/usb/mixer_quirks.h | 4 tools/lib/api/fs/debugfs.c | 2 tools/lib/api/fs/fs.c | 2 tools/perf/Makefile | 4 tools/perf/bench/sched-pipe.c | 2 tools/perf/builtin-top.c | 1 tools/perf/perf-sys.h | 1 tools/perf/util/annotate.h | 8 - tools/perf/util/cloexec.c | 4 tools/perf/util/machine.c | 4 tools/testing/selftests/efivarfs/config | 1 tools/testing/selftests/tc-testing/tdc_batch.py | 62 +++++++++++++ 166 files changed, 1151 insertions(+), 459 deletions(-)
Abhilash Kesavan (2):
drivers: bus: check cci device tree node status
ARM: dts: disable CCI on exynos5420 based arndale-octa
Al Viro (1):
cachefiles: fix the race between cachefiles_bury_object() and rmdir(2)
Alan Stern (3):
USB: EHCI: adjust error return code
USB: hub: fix up early-exit pathway in hub_activate
USB: fix the usbfs flag sanitization for control transfers
Alex Williamson (2):
iommu/vt-d: Fix VM domain ID leak
PCI: Fix devfn for VPD access through function 0
Alexander Stein (1):
ARM: at91/dt: sam9263: Add missing clocks to lcdc node
Alexey Brodkin (1):
perf tools: Fix statfs.f_type data type mismatch build error with uclibc
Andrei Otcheretianski (1):
cfg80211: reg: Init wiphy_idx in regulatory_hint_core()
Anssi Hannula (1):
ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly
Arik Nemtsov (1):
iwlwifi: pcie: correctly define 7265-D cfg
Bjørn Mork (1):
USB: qcserial: Fix support for HP lt4112 LTE/HSPA+ Gobi 4G Modem
Bo Shen (2):
ARM: at91/dt: sama5d4: fix the timer reg length
ARM: at91: sama5d3: dt: correct the sound route
Brian Norris (1):
mtd: blkdevs: fix potential deadlock + lockdep warnings
Chanwoo Choi (1):
serial: samsung: Add the support for Exynos5433 SoC
Chris Mi (1):
selftests: Introduce a new script to generate tc batch file
Chris Wilson (1):
Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"
Christian Borntraeger (1):
s390/kvm: REPLACE barrier fixup with READ_ONCE
Christoph Hellwig (1):
scsi: ->queue_rq can't sleep
Chuck Lever (1):
NFS: Ignore transport protocol when detecting server trunking
Colin Ian King (1):
fbdev/broadsheetfb: fix memory leak
Cong Wang (1):
net: drop skb on failure in ip_check_defrag()
Dan Carpenter (1):
usb: gadget: gadgetfs: fix an oops in ep_write()
Daniel Borkmann (2):
rtnl: don't account unused struct ifla_port_vsi in rtnl_port_size
lib: make memzero_explicit more robust against dead store elimination
Darrick J. Wong (1):
uas: disable UAS on Apricorn SATA dongles
David Ahern (1):
net/ipv6: Fix index counter for unicast addresses in in6_dump_addrs
David Dueck (1):
pinctrl: at91: fix null pointer dereference
Edgar Cherkasov (1):
i2c: i2c-scmi: fix for i2c_smbus_write_block_data
Eric Biggers (1):
KEYS: put keyring if install_session_keyring_to_cred() fails
Eric Dumazet (2):
rtnl: limit IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES to 4096
ipv6: mcast: fix a use-after-free in inet6_mc_check
Eugenia Emantayev (1):
net/mlx4_en: Remove dependency between timestamping capability and service_task
Ezequiel Garcia (1):
MIPS: Fix up obsolete cpu_set usage
Fabien Proriol (1):
iio: iio: Fix iio_channel_read return if channel havn't info
Filipe Manana (2):
Btrfs: avoid syncing log in the fast fsync path when not necessary
Btrfs: do not ignore errors from btrfs_lookup_xattr in do_setxattr
Florian Fainelli (6):
net: systemport: Fix wake-up interrupt race during resume
asix: Check for supported Wake-on-LAN modes
ax88179_178a: Check for supported Wake-on-LAN modes
sr9800: Check for supported Wake-on-LAN modes
smsc75xx: Check for Wake-on-LAN modes
smsc95xx: Check for Wake-on-LAN modes
Geert Uytterhoeven (1):
ARM: shmobile: r8a7740: Instantiate GIC from C board code in legacy builds
Greg Kroah-Hartman (1):
Linux 3.18.125
Hannes Frederic Sowa (2):
net: fix warnings in 'make htmldocs' by moving macro definition out of field declaration
unix: correctly track in-flight fds in sending process user_struct
Hans de Goede (1):
phy-sun4i-usb: Change disconnect threshold value for sun6i
Heiko Stübner (1):
clk: rockchip: fix deadlock possibility in cpuclk
Heiner Kallweit (1):
r8169: fix NAPI handling under high load
Ian Munsie (1):
cxl: Fix issues when unmapping contexts
Ido Schimmel (2):
team: Forbid enslaving team device to itself
rtnetlink: Disallow FDB configuration for non-Ethernet device
Jakub Kicinski (1):
net: sched: gred: pass the right attribute to gred_change_table_def()
Jan Beulich (2):
x86/ldt: Fix small LDT allocation for Xen
igb: fix NULL derefs due to skipped SR-IOV enabling
Jan Kara (2):
quota: Fix maximum quota limit settings
vfs: Make sendfile(2) killable even better
Jeff Barnhill (1):
net/ipv6: Display all addresses in output of /proc/net/if_inet6
Jeff Layton (1):
nfs: fix high load average due to callback thread sleeping
Jiri Olsa (2):
perf/ring_buffer: Prevent concurent ring buffer access s390/ftrace/jprobes: Fix conflict between jprobes and function graph tracing
Jisheng Zhang (2):
mmc: sdhci: restore behavior when setting VDD via external regulator x86/idle: Restore trace_cpu_idle to mwait_idle() calls
Joerg Roedel (1):
x86/irq: Check for valid irq descriptor in check_irq_vectors_for_cpu_disable()
Johannes Thumshirn (1):
mcb: mcb-pci: Only remap the 1st 0x200 bytes of BAR 0
Jongsung Kim (1):
stmmac: fix valid numbers of unicast filter entries
Jozef Balga (1):
media: af9035: prevent buffer overflow on write
Junichi Nomura (1):
dm: fix AB-BA deadlock in __dm_destroy()
Kan Liang (1):
perf/x86/intel: Fix bug for "cycles:p" and "cycles:pp" on SLM
Ken Xue (1):
Revert "SCSI: Fix NULL pointer dereference in runtime PM"
Khazhismel Kumykov (1):
fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters()
Larry Finger (2):
rtlwifi: rtl8821ae: Fix system lockups on boot
rtlwifi: rtl8821ae: Fix lockups on boot
Lars-Peter Clausen (1):
ASoC: dapm: Don't add prefix to widget stream name
Lei Yang (1):
selftests/efivarfs: add required kernel configs
Lennart Sorensen (1):
ARM: dra7xx: Fix counter frequency drift for AM572x errata i856
Linus Torvalds (2):
/proc/iomem: only expose physical resource addresses to privileged users
mremap: properly flush TLB before releasing the page
Lorenzo Pieralisi (1):
of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources()
Maik Broemme (1):
PCI: Mark Atheros AR9580 to avoid bus reset
Marc Zyngier (1):
arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm
Marcelo Ricardo Leitner (1):
sctp: fix race on sctp_id2asoc
Mateusz Sylwestrzak (1):
ALSA: hda - Add headset mic support for Acer Aspire V5-573G
Mathias Nyman (1):
xhci: Don't print a warning when setting link state for disabled ports
Maxime Chevallier (1):
net: mvpp2: Extract the correct ethtype from the skb for tx csum offload
Michael Neuling (2):
powerpc/tm: Fix userspace r13 corruption powerpc/tm: Avoid possible userspace r1 corruption on reclaim
Mike Snitzer (1):
dm thin: restore requested 'error_if_no_space' setting on OODS to WRITE transition
Miklos Szeredi (1):
ovl: fix open in stacked overlay
Mikulas Patocka (1):
mach64: detect the dot clock divider correctly on sparc
Namhyung Kim (2):
perf machine: Fix __machine__findnew_thread() error path perf tools: Fix segfault for symbol annotation on TUI
Naoya Horiguchi (1):
mm: migrate: hugetlb: putback destination hugepage to active list
Niklas Cassel (1):
net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules
Paolo Abeni (2):
ip_tunnel: be careful when accessing the inner header
ip6_tunnel: be careful when accessing the inner header
Paul E. McKenney (1):
rcu: Clear need_qs flag to prevent splat
Peter Chen (1):
usb: gadget: f_uac1: access freed memory at f_audio_free_inst
Peter Hurley (2):
Revert "tty: Fix pty master poll() after slave closes v2"
tty: audit: Fix audit source
Peter Zijlstra (1):
perf: Fix PERF_EVENT_IOC_PERIOD deadlock
Phil Auld (1):
sched/fair: Fix throttle_list starvation with low CFS quota
Prarit Bhargava (1):
x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs
Rasmus Villemoes (2):
usb: musb: Fix a few off-by-one lengths perf tools: Disable parallelism for 'make clean'
Robert Baldyga (1):
usb: dwc2: gadget: kill requests with 'force' in s3c_hsotg_udc_stop()
Robert Jarzmik (1):
net: ethernet: davicom: fix devicetree irq resource
Sean Tranchetti (2):
netlabel: check for IPV4MASK in addrinfo_get
xfrm: validate template mode
Shahed Shaikh (1):
qlcnic: fix Tx descriptor corruption on 82xx devices
Shota Suzuki (1):
igb: Unpair the queues when changing the number of queues
Srikar Dronamraju (1):
perf bench numa: Fix to show proper convergence stats
Stefan Agner (1):
tty: serial: fsl_lpuart: fix clearing of receive flag
Stefano Brivio (1):
ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called
Steffen Klassert (1):
xfrm: Validate address prefix lengths in the xfrm selector.
Stephane Eranian (1):
perf/rapl: Fix sysfs_show() initialization for RAPL PMU
Steven Rostedt (Red Hat) (1):
tracing: Fix enabling of syscall events on the command line
Sudip Mukherjee (1):
libata: blacklist Micron 500IT SSD with MU01 firmware
Suman Tripathi (1):
ahci_xgene: Fix the DMA state machine lockup for the ATA_CMD_PACKET PIO mode command.
Sylwester Nawrocki (1):
dm9000: Fix irq trigger type setup on non-dt platforms
Thadeu Lima de Souza Cascardo (1):
xfrm6: call kfree_skb when skb is toobig
Theodore Ts'o (1):
ext4: fix an ext3 collapse range regression in xfstests
Thomas Petazzoni (1):
ARM: 8799/1: mm: fix pci_ioremap_io() offset check
Tobias Herzog (1):
cdc-acm: correct counting of UART states in serial state notification
Tony Lindgren (2):
mfd: omap-usb-host: Fix dts probe of children
usb: musb: Fix randconfig build issues for Kconfig options
Trond Myklebust (3):
NFSv4: Cache the NFSv4/v4.1 client owner_id in the struct nfs_client NFSv4/v4.1: Verify the client owner id during trunking detection
NFSv4: Remove incorrect check in can_open_delegated()
Uwe Kleine-König (1):
pinctrl: imx25: ensure that a pin with id i is at position i in the info array
Vignesh R (1):
phy: phy-ti-pipe3: fix inconsistent enumeration of PCIe gen2 cards
Vince Hsu (1):
usb: host: ehci-tegra: request deferred probe when failing to get phy
Vineet Gupta (1):
perf tools: Avoid build splat for syscall numbers with uclibc
Vivek Gautam (1):
arm: dts: Use pmu_system_controller phandle for dp phy
Wenwen Wang (2):
net: cxgb3_main: fix a missing-check bug
net: socket: fix a missing-check bug
Wenyou Yang (1):
ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
Xin Long (1):
sctp: translate network order to host order when users get a hmacid
Yu Zhao (1):
net/usb: cancel pending work when unbinding smsc75xx
alex chen (1):
ocfs2: fix journal commit deadlock in ocfs2_convert_inline_data_to_extents
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 124 +SUBLEVEL = 125 EXTRAVERSION = NAME = Diseased Newt
arch/arm/boot/dts/at91sam9263.dtsi +2 -0
@@ -913,6 +913,8 @@ interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fb>; + clocks = <&lcd_clk>, <&lcd_clk>; + clock-names = "lcdc_clk", "hclk"; status = "disabled"; };
arch/arm/boot/dts/exynos5250.dtsi +1 -1
@@ -732,7 +732,7 @@ dp_phy: video-phy@10040720 { compatible = "samsung,exynos5250-dp-video-phy"; - reg = <0x10040720 4>; + samsung,pmu-syscon = <&pmu_system_controller>; #phy-cells = <0>; };
arch/arm/boot/dts/exynos5420-arndale-octa.dts +4 -0
@@ -372,3 +372,7 @@ &usbdrd_dwc3_1 { dr_mode = "host"; }; + +&cci { + status = "disabled"; +};
arch/arm/boot/dts/exynos5420.dtsi +3 -3
@@ -120,7 +120,7 @@ }; }; - cci@10d20000 { + cci: cci@10d20000 { compatible = "arm,cci-400"; #address-cells = <1>; #size-cells = <1>;
@@ -503,8 +503,8 @@ }; dp_phy: video-phy@10040728 { - compatible = "samsung,exynos5250-dp-video-phy"; - reg = <0x10040728 4>; + compatible = "samsung,exynos5420-dp-video-phy"; + samsung,pmu-syscon = <&pmu_system_controller>; #phy-cells = <0>; };
arch/arm/boot/dts/sama5d3xmb.dtsi +1 -1
@@ -176,7 +176,7 @@ "Headphone Jack", "HPOUTR", "IN2L", "Line In Jack", "IN2R", "Line In Jack", - "MICBIAS", "IN1L", + "Mic", "MICBIAS", "IN1L", "Mic"; atmel,ssc-controller = <&ssc0>;
arch/arm/boot/dts/sama5d4.dtsi +1 -1
@@ -939,7 +939,7 @@ pit: timer@fc068630 { compatible = "atmel,at91sam9260-pit"; - reg = <0xfc068630 0xf>; + reg = <0xfc068630 0x10>; interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>; clocks = <&h32ck>; };
arch/arm/kvm/mmu.c +2 -0
@@ -760,6 +760,7 @@ void stage2_unmap_vm(struct kvm *kvm)int idx; idx =srcu_read_lock (&kvm->srcu); +down_read (¤t->mm->mmap_sem);spin_lock (&kvm->mmu_lock); slots =kvm_memslots (kvm);
@@ -767,6 +768,7 @@ void stage2_unmap_vm(struct kvm *kvm)stage2_unmap_memslot (kvm, memslot);spin_unlock (&kvm->mmu_lock); +up_read (¤t->mm->mmap_sem);srcu_read_unlock (&kvm->srcu, idx); }
arch/arm/mach-at91/board-dt-sama5.c +18 -0
@@ -17,6 +17,7 @@#include <linux/of_platform.h> #include <linux/phy.h> #include <linux/clk-provider.h> +#include <linux/phy.h> #include <asm/setup.h> #include <asm/irq.h>
@@ -27,8 +28,25 @@#include "at91_aic.h" #include "generic.h" +static int ksz8081_phy_fixup (struct phy_device *phy) +{ +int value; + + value =phy_read (phy,0x16 ); + value &= ~0x20 ; +phy_write (phy,0x16 , value); + +return 0 ; +} +static void __init sama5_dt_device_init (void ) { +if (of_machine_is_compatible ("atmel,sama5d4ek" ) && +IS_ENABLED (CONFIG_PHYLIB )) { +phy_register_fixup_for_id ("fc028000.etherne:00" , + ksz8081_phy_fixup); + } +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }
arch/arm/mach-omap2/control.h +4 -0
@@ -286,6 +286,10 @@#define OMAP5XXX_CONTROL_STATUS 0x134#define OMAP5_DEVICETYPE_MASK (0x7 << 6) +/* DRA7XX CONTROL CORE BOOTSTRAP */ +#define DRA7_CTRL_CORE_BOOTSTRAP 0x6c4 +#define DRA7_SPEEDSELECT_MASK (0x3 << 8) +/* * REVISIT: This list of registers is not comprehensive - there are more * that should be added.
arch/arm/mach-omap2/timer.c +34 -2
@@ -54,6 +54,7 @@#include "soc.h" #include "common.h" +#include "control.h" #include "powerdomain.h" #include "omap-secure.h"
@@ -496,7 +497,8 @@ static void __init realtime_counter_init(void)void __iomem *base;static struct clk *sys_clk;unsigned long rate; -unsigned int reg, num, den; +unsigned int reg; +unsigned long long num, den; base =ioremap (REALTIME_COUNTER_BASE ,SZ_32 );if (!base) {
@@ -511,6 +513,35 @@ static void __init realtime_counter_init(void) } rate =clk_get_rate (sys_clk); + +if (soc_is_dra7xx ()) { +/* +* Errata i856 says the 32.768KHz crystal does not start at +* power on, so the CPU falls back to an emulated 32KHz clock +* based on sysclk / 610 instead. This causes the master counter +* frequency to not be 6.144MHz but at sysclk / 610 * 375 / 2 +* (OR sysclk * 75 / 244) +* +* This affects at least the DRA7/AM572x 1.0, 1.1 revisions. +* Of course any board built without a populated 32.768KHz +* crystal would also need this fix even if the CPU is fixed +* later. +* +* Either case can be detected by using the two speedselect bits +* If they are not 0, then the 32.768KHz clock driving the +* coarse counter that corrects the fine counter every time it +* ticks is actually rate/610 rather than 32.768KHz and we +* should compensate to avoid the 570ppm (at 20MHz, much worse +* at other rates) too fast system time. +*/ + reg =omap_ctrl_readl (DRA7_CTRL_CORE_BOOTSTRAP ); +if (reg &DRA7_SPEEDSELECT_MASK ) { + num =75 ; + den =244 ; + goto sysclk1_based; + } + } +/* Numerator/denumerator values refer TRM Realtime Counter section */ switch (rate) {case 12000000 :
@@ -545,6 +576,7 @@ static void __init realtime_counter_init(void)break ; } +sysclk1_based:/* Program numerator and denumerator registers */ reg =readl_relaxed (base +INCREMENTER_NUMERATOR_OFFSET ) &NUMERATOR_DENUMERATOR_MASK ;
@@ -556,7 +588,7 @@ static void __init realtime_counter_init(void) reg |= den;writel_relaxed (reg, base +INCREMENTER_DENUMERATOR_RELOAD_OFFSET ); - arch_timer_freq = (rate / den) * num; + arch_timer_freq =DIV_ROUND_UP_ULL (rate * num, den);set_cntfreq ();iounmap (base);
arch/arm/mach-shmobile/setup-r8a7740.c +7 -0
@@ -792,7 +792,14 @@ void __init r8a7740_init_irq_of(void)void __iomem *intc_msk_base =ioremap_nocache (0xe6900040 ,0x10 );void __iomem *pfc_inta_ctrl =ioremap_nocache (0xe605807c ,0x4 ); +#ifdef CONFIG_ARCH_SHMOBILE_LEGACY +void __iomem *gic_dist_base =ioremap_nocache (0xc2800000 ,0x1000 ); +void __iomem *gic_cpu_base =ioremap_nocache (0xc2000000 ,0x1000 ); + +gic_init (0 ,29 , gic_dist_base, gic_cpu_base); +#else irqchip_init (); +#endif /* route signals to GIC */ iowrite32 (0x0 , pfc_inta_ctrl);
arch/arm/mm/ioremap.c +1 -1
@@ -447,7 +447,7 @@ void pci_ioremap_set_mem_type(int mem_type)int pci_ioremap_io (unsigned int offset,phys_addr_t phys_addr) { -BUG_ON (offset +SZ_64K >IO_SPACE_LIMIT ); +BUG_ON (offset +SZ_64K -1 >IO_SPACE_LIMIT ); return ioremap_page_range(PCI_IO_VIRT_BASE + offset, PCI_IO_VIRT_BASE + offset + SZ_64K,
arch/mips/kernel/smp-cps.c +1 -1
@@ -92,7 +92,7 @@ static void __init cps_smp_setup(void)#ifdef CONFIG_MIPS_MT_FPAFF /* If we have an FPU, enroll ourselves in the FPU-full mask */ if (cpu_has_fpu) -cpu_set (0 , mt_fpu_cpumask); +cpumask_set_cpu (0 , &mt_fpu_cpumask);#endif /* CONFIG_MIPS_MT_FPAFF */ }
arch/powerpc/kernel/tm.S +17 -3
@@ -199,13 +199,27 @@ dont_backup_fp: std r1, PACATMSCRATCH(r13) ld r1, PACAR1(r13) - /* Store the PPR in r11 and reset to decent value */ std r11, GPR11(r1) /* Temporary stash */ + /* + * Move the saved user r1 to the kernel stack in case PACATMSCRATCH is + * clobbered by an exception once we turn on MSR_RI below. + */ + ld r11, PACATMSCRATCH(r13) + std r11, GPR1(r1) + + /* + * Store r13 away so we can free up the scratch SPR for the SLB fault + * handler (needed once we start accessing the thread_struct). + */ + GET_SCRATCH0(r11) + std r11, GPR13(r1) + /* Reset MSR RI so we can take SLB faults again */ li r11, MSR_RI mtmsrd r11, 1 + /* Store the PPR in r11 and reset to decent value */ mfspr r11, SPRN_PPR HMT_MEDIUM
@@ -230,11 +244,11 @@ dont_backup_fp: SAVE_GPR(8, r7) /* user r8 */ SAVE_GPR(9, r7) /* user r9 */ SAVE_GPR(10, r7) /* user r10 */ - ld r3, PACATMSCRATCH(r13) /* user r1 */ + ld r3, GPR1(r1) /* user r1 */ ld r4, GPR7(r1) /* user r7 */ ld r5, GPR11(r1) /* user r11 */ ld r6, GPR12(r1) /* user r12 */ - GET_SCRATCH0(8) /* user r13 */ + ld r8, GPR13(r1) /* user r13 */ std r3, GPR1(r7) std r4, GPR7(r7) std r5, GPR11(r7)
arch/s390/kernel/kprobes.c +12 -0
@@ -633,6 +633,15 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) stack = (unsigned long ) regs->gprs[15 ];memcpy (kcb->jprobes_stack, (void *) stack,MIN_STACK_SIZE (stack)); + +/* +* jprobes use jprobe_return() which skips the normal return +* path of the function, and this messes up the accounting of the +* function graph tracer to get messed up. +* +* Pause function graph tracing while performing the jprobe function. +*/ +pause_graph_tracing ();return 1 ; }
@@ -646,6 +655,9 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)struct kprobe_ctlblk *kcb =get_kprobe_ctlblk ();unsigned long stack; +/* It's OK to start function graph tracing again */ +unpause_graph_tracing (); + stack = (unsigned long ) kcb->jprobe_saved_regs.gprs[15 ];/* Put the regs back */
arch/s390/kvm/gaccess.c +6 -12
@@ -229,12 +229,10 @@ static void ipte_lock_simple(struct kvm_vcpu *vcpu) goto out; ic = &vcpu->kvm->arch.sca->ipte_control; do { - old = *ic; - barrier(); + old = READ_ONCE(*ic); while (old.k) { cond_resched(); - old = *ic; - barrier(); + old = READ_ONCE(*ic); } new = old; new.k = 1;
@@ -253,8 +251,7 @@ static void ipte_unlock_simple(struct kvm_vcpu *vcpu) goto out; ic = &vcpu->kvm->arch.sca->ipte_control;do { - old = *ic; -barrier (); + old =READ_ONCE (*ic); new = old; new.k =0 ; }while (cmpxchg (&ic->val, old.val, new.val) != old.val);
@@ -269,12 +266,10 @@ static void ipte_lock_siif(struct kvm_vcpu *vcpu) ic = &vcpu->kvm->arch.sca->ipte_control; do { - old = *ic; - barrier(); + old = READ_ONCE(*ic); while (old.kg) { cond_resched(); - old = *ic; - barrier(); + old = READ_ONCE(*ic); } new = old; new.k = 1;
@@ -288,8 +283,7 @@ static void ipte_unlock_siif(struct kvm_vcpu *vcpu) ic = &vcpu->kvm->arch.sca->ipte_control; do { - old = *ic; - barrier(); + old = READ_ONCE(*ic); new = old; new.kh--; if (!new.kh)
arch/x86/kernel/cpu/perf_event_intel_ds.c +2 -2
@@ -568,8 +568,8 @@ struct event_constraint intel_atom_pebs_event_constraints[] = { };struct event_constraint intel_slm_pebs_event_constraints[] = { -/* UOPS_RETIRED.ALL, inv=1, cmask=16 (cycles:p). */ -INTEL_FLAGS_EVENT_CONSTRAINT (0x108001c2 ,0xf ), +/* INST_RETIRED.ANY_P, inv=1, cmask=16 (cycles:p). */ +INTEL_FLAGS_EVENT_CONSTRAINT (0x108000c0 ,0x1 ),/* Allow all events as PEBS with no flags */ INTEL_ALL_EVENT_CONSTRAINT (0 ,0x1 ),EVENT_CONSTRAINT_END
arch/x86/kernel/cpu/perf_event_intel_rapl.c +32 -12
61 lines not on this page · raw message
arch/x86/kernel/irq.c +3 -0
@@ -302,6 +302,9 @@ int check_irq_vectors_for_cpu_disable(void) irq =__this_cpu_read (vector_irq[vector]);if (irq >=0 ) { desc =irq_to_desc (irq); +if (!desc) +continue ; + data =irq_desc_get_irq_data (desc);cpumask_copy (&affinity_new, data->affinity);cpu_clear (this_cpu, affinity_new);
arch/x86/kernel/ldt.c +2 -2
@@ -58,7 +58,7 @@ static struct ldt_struct *alloc_ldt_struct(int size)if (alloc_size >PAGE_SIZE ) new_ldt->entries =vzalloc (alloc_size);else - new_ldt->entries =kzalloc (PAGE_SIZE ,GFP_KERNEL ); + new_ldt->entries = (void *)get_zeroed_page (GFP_KERNEL );if (!new_ldt->entries) {kfree (new_ldt);
@@ -95,7 +95,7 @@ static void free_ldt_struct(struct ldt_struct *ldt)if (ldt->size *LDT_ENTRY_SIZE >PAGE_SIZE )vfree (ldt->entries);else -kfree (ldt->entries); +free_page ((unsigned long )ldt->entries);kfree (ldt); }
arch/x86/kernel/process.c +2 -0
@@ -430,6 +430,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)static void mwait_idle (void ) {if (!current_set_polling_and_test ()) { +trace_cpu_idle_rcuidle (1 ,smp_processor_id ());if (this_cpu_has (X86_BUG_CLFLUSH_MONITOR )) {smp_mb ();/* quirk */ clflush ((void *)¤t_thread_info ()->flags);
@@ -441,6 +442,7 @@ static void mwait_idle(void)__sti_mwait (0 ,0 ); elselocal_irq_enable (); +trace_cpu_idle_rcuidle (PWR_EVENT_EXIT ,smp_processor_id ()); }else {local_irq_enable (); }
arch/x86/pci/fixup.c +7 -0
@@ -554,9 +554,16 @@ static void twinhead_reserve_killing_zone(struct pci_dev *dev) }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x27B9 , twinhead_reserve_killing_zone); +/* +* Broadwell EP Home Agent BARs erroneously return non-zero values when read. +* +* See http://www.intel.com/content/www/us/en/processors/xeon/xeon-e5-v4-spec-update.html +* entry BDF2. +*/ static void pci_bdwep_bar (struct pci_dev *dev) { dev->non_compliant_bars =1 ; } +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x6f60 , pci_bdwep_bar);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x6fa0 , pci_bdwep_bar);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x6fc0 , pci_bdwep_bar);
drivers/ata/ahci_xgene.c +7 -5
@@ -125,10 +125,11 @@ static int xgene_ahci_restart_engine(struct ata_port *ap)* xgene_ahci_qc_issue - Issue commands to the device * @qc: Command to issue * -* Due to Hardware errata for IDENTIFY DEVICE command, the controller cannot -* clear the BSY bit after receiving the PIO setup FIS. This results in the dma -* state machine goes into the CMFatalErrorUpdate state and locks up. By -* restarting the dma engine, it removes the controller out of lock up state. +* Due to Hardware errata for IDENTIFY DEVICE command and PACKET +* command of ATAPI protocol set, the controller cannot clear the BSY bit +* after receiving the PIO setup FIS. This results in the DMA state machine +* going into the CMFatalErrorUpdate state and locks up. By restarting the +* DMA engine, it removes the controller out of lock up state. */ static unsigned int xgene_ahci_qc_issue (struct ata_queued_cmd *qc) {
@@ -137,7 +138,8 @@ static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc)struct xgene_ahci_context *ctx = hpriv->plat_data;int rc =0 ; -if (unlikely (ctx->last_cmd[ap->port_no] ==ATA_CMD_ID_ATA )) +if (unlikely ((ctx->last_cmd[ap->port_no] ==ATA_CMD_ID_ATA ) || + (ctx->last_cmd[ap->port_no] ==ATA_CMD_PACKET )))xgene_ahci_restart_engine (ap); rc =ahci_qc_issue (qc);
drivers/ata/libata-core.c +2 -0
@@ -4249,6 +4249,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ATA_HORKAGE_NOLPM, },/* devices that don't properly handle queued TRIM commands */ + {"Micron_M500IT_*" ,"MU01" ,ATA_HORKAGE_NO_NCQ_TRIM | + ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "Micron_M500_*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "Crucial_CT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
drivers/bus/arm-cci.c +3 -0
@@ -976,6 +976,9 @@ static int cci_probe(void)if (!np)return -ENODEV ; +if (!of_device_is_available (np)) +return -ENODEV ; + cci_config =of_match_node (arm_cci_matches, np)->data;if (!cci_config)return -ENODEV ;
drivers/clk/rockchip/clk-cpu.c +6 -4
@@ -124,10 +124,11 @@ static int rockchip_cpuclk_pre_rate_change(struct rockchip_cpuclk *cpuclk, {const struct rockchip_cpuclk_reg_data *reg_data = cpuclk->reg_data;unsigned long alt_prate, alt_div; +unsigned long flags; alt_prate =clk_get_rate (cpuclk->alt_parent); -spin_lock (cpuclk->lock); +spin_lock_irqsave (cpuclk->lock, flags);/* * If the old parent clock speed is less than the clock speed
@@ -164,7 +165,7 @@ static int rockchip_cpuclk_pre_rate_change(struct rockchip_cpuclk *cpuclk, cpuclk->reg_base + reg_data->core_reg); } -spin_unlock (cpuclk->lock); +spin_unlock_irqrestore (cpuclk->lock, flags);return 0 ; }
@@ -173,6 +174,7 @@ static int rockchip_cpuclk_post_rate_change(struct rockchip_cpuclk *cpuclk, {const struct rockchip_cpuclk_reg_data *reg_data = cpuclk->reg_data;const struct rockchip_cpuclk_rate_table *rate; +unsigned long flags; rate =rockchip_get_cpuclk_settings (cpuclk, ndata->new_rate);if (!rate) {
@@ -181,7 +183,7 @@ static int rockchip_cpuclk_post_rate_change(struct rockchip_cpuclk *cpuclk,return -EINVAL ; } -spin_lock (cpuclk->lock); +spin_lock_irqsave (cpuclk->lock, flags);if (ndata->old_rate < ndata->new_rate)rockchip_cpuclk_set_dividers (cpuclk, rate);
@@ -201,7 +203,7 @@ static int rockchip_cpuclk_post_rate_change(struct rockchip_cpuclk *cpuclk,if (ndata->old_rate > ndata->new_rate)rockchip_cpuclk_set_dividers (cpuclk, rate); -spin_unlock (cpuclk->lock); +spin_unlock_irqrestore (cpuclk->lock, flags);return 0 ; }
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -5144,7 +5144,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)if (!mutex_is_locked (mutex))return false; -#if defined(CONFIG_SMP ) && !defined(CONFIG_DEBUG_MUTEXES ) +#if defined(CONFIG_SMP ) || defined(CONFIG_DEBUG_MUTEXES )return mutex->owner == task;#else /* Since UP may be pre-empted, we cannot assume that we own the lock */
drivers/i2c/busses/i2c-scmi.c +1 -0
@@ -152,6 +152,7 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, mt_params[3 ].type =ACPI_TYPE_INTEGER ; mt_params[3 ].integer.value = len; mt_params[4 ].type =ACPI_TYPE_BUFFER ; + mt_params[4 ].buffer.length = len; mt_params[4 ].buffer.pointer = data->block +1 ; }break ;
drivers/iio/inkern.c +3 -0
@@ -426,6 +426,9 @@ static int iio_channel_read(struct iio_channel *chan, int *val, int *val2,if (val2 ==NULL ) val2 = &unused; +if (!iio_channel_has_info (chan->channel, info)) +return -EINVAL ; +if (chan->indio_dev->info->read_raw_multi) { ret = chan->indio_dev->info->read_raw_multi(chan->indio_dev, chan->channel, INDIO_MAX_RAW_ELEMENTS,
drivers/iommu/intel-iommu.c +6 -3
@@ -1759,8 +1759,9 @@ static int domain_init(struct dmar_domain *domain, int guest_width)static void domain_exit (struct dmar_domain *domain) { +struct dmar_drhd_unit *drhd; +struct intel_iommu *iommu;struct page *freelist =NULL ; -int i;/* Domain 0 is reserved, so dont process it */ if (!domain)
@@ -1780,8 +1781,10 @@ static void domain_exit(struct dmar_domain *domain)/* clear attached or cached domains */ rcu_read_lock (); -for_each_set_bit (i, domain->iommu_bmp, g_num_of_iommus) -iommu_detach_domain (domain, g_iommus[i]); +for_each_active_iommu (iommu, drhd) +if (domain_type_is_vm (domain) || +test_bit (iommu->seq_id, domain->iommu_bmp)) +iommu_detach_domain (domain, iommu);rcu_read_unlock ();dma_free_pagelist (freelist);
drivers/mcb/mcb-internal.h +1 -0
@@ -7,6 +7,7 @@#define PCI_DEVICE_ID_MEN_CHAMELEON 0x4d45#define CHAMELEON_FILENAME_LEN 12#define CHAMELEONV2_MAGIC 0xabce +#define CHAM_HEADER_SIZE 0x200enum chameleon_descriptor_type {CHAMELEON_DTYPE_GENERAL =0x0 ,
drivers/mcb/mcb-pci.c +18 -9
@@ -17,6 +17,7 @@struct priv {struct mcb_bus *bus; +phys_addr_t mapbase;void __iomem *base; };
@@ -31,8 +32,8 @@ static int mcb_pci_get_irq(struct mcb_device *mdev)static int mcb_pci_probe (struct pci_dev *pdev,const struct pci_device_id *id) { +struct resource *res;struct priv *priv; -phys_addr_t mapbase;int ret;int num_cells;unsigned long flags;
@@ -47,19 +48,21 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)return -ENODEV ; } - mapbase =pci_resource_start (pdev,0 ); -if (!mapbase) { + priv->mapbase =pci_resource_start (pdev,0 ); +if (!priv->mapbase) {dev_err (&pdev->dev,"No PCI resource\n" ); goto err_start; } - ret =pci_request_region (pdev,0 ,KBUILD_MODNAME ); -if (ret) { -dev_err (&pdev->dev,"Failed to request PCI BARs\n" ); + res =request_mem_region (priv->mapbase,CHAM_HEADER_SIZE , +KBUILD_MODNAME ); +if (IS_ERR (res)) { +dev_err (&pdev->dev,"Failed to request PCI memory\n" ); + ret =PTR_ERR (res); goto err_start; } - priv->base =pci_iomap (pdev,0 ,0 ); + priv->base =ioremap (priv->mapbase,CHAM_HEADER_SIZE );if (!priv->base) {dev_err (&pdev->dev,"Cannot ioremap\n" ); ret = -ENOMEM ;
@@ -84,7 +87,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) priv->bus->get_irq = mcb_pci_get_irq; - ret =chameleon_parse_cells (priv->bus, mapbase, priv->base); + ret =chameleon_parse_cells (priv->bus, priv->mapbase, priv->base);if (ret <0 ) goto err_drvdata; num_cells = ret;
@@ -93,8 +96,10 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)mcb_bus_add_devices (priv->bus); +return 0 ; + err_drvdata: -pci_iounmap (pdev, priv->base); +iounmap (priv->base); err_ioremap:pci_release_region (pdev,0 ); err_start:
@@ -107,6 +112,10 @@ static void mcb_pci_remove(struct pci_dev *pdev)struct priv *priv =pci_get_drvdata (pdev);mcb_release_bus (priv->bus); + +iounmap (priv->base); +release_region (priv->mapbase,CHAM_HEADER_SIZE ); +pci_disable_device (pdev); }static const struct pci_device_id mcb_pci_tbl[] = {
drivers/md/dm-thin.c +1 -0
@@ -1909,6 +1909,7 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)case PM_WRITE :if (old_mode != new_mode)notify_of_pool_mode_change (pool,"write" ); + pool->pf.error_if_no_space = pt->requested_pf.error_if_no_space;dm_pool_metadata_read_write (pool->pmd); pool->process_bio = process_bio; pool->process_discard = process_discard;
drivers/md/dm.c +2 -2
@@ -2599,14 +2599,14 @@ static void __dm_destroy(struct mapped_device *md, bool wait)* do not race with internal suspend. */ mutex_lock (&md->suspend_lock); + map =dm_get_live_table (md, &srcu_idx);if (!dm_suspended_md (md)) {dm_table_presuspend_targets (map);dm_table_postsuspend_targets (map); } -mutex_unlock (&md->suspend_lock); -/* dm_put_live_table must be before msleep, otherwise deadlock is possible */ dm_put_live_table (md, srcu_idx); +mutex_unlock (&md->suspend_lock);/* * Rare, but there may be I/O requests still going to complete,
drivers/media/usb/dvb-usb-v2/af9035.c +4 -2
@@ -389,8 +389,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, msg[0].addr == (state->af9033_i2c_addr[1] >> 1)) reg |=0x100000 ; - ret =af9035_wr_regs (d, reg, &msg[0 ].buf[3 ], - msg[0 ].len -3 ); + ret = (msg[0 ].len >=3 ) ?af9035_wr_regs (d, reg, + &msg[0 ].buf[3 ], + msg[0 ].len -3 ) + : -EOPNOTSUPP ; }else {/* I2C write */ u8 buf[MAX_XFER_SIZE ];
drivers/mfd/omap-usb-host.c +6 -5
@@ -558,8 +558,8 @@ static int usbhs_omap_get_dt_pdata(struct device *dev, }static const struct of_device_id usbhs_child_match_table[] = { - { .compatible ="ti,omap-ehci" , }, - { .compatible ="ti,omap-ohci" , }, + { .compatible ="ti,ehci-omap" , }, + { .compatible ="ti,ohci-omap3" , }, { } };
@@ -886,6 +886,7 @@ static struct platform_driver usbhs_omap_driver = { .pm = &usbhsomap_dev_pm_ops, .of_match_table = usbhs_omap_dt_ids, }, + .probe = usbhs_omap_probe, .remove = usbhs_omap_remove, };
@@ -895,9 +896,9 @@ MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("usb host common core driver for omap EHCI and OHCI" ); -static int __init omap_usbhs_drvinit (void ) +static int omap_usbhs_drvinit (void ) { -return platform_driver_probe (&usbhs_omap_driver, usbhs_omap_probe); +return platform_driver_register (&usbhs_omap_driver); }/*
@@ -909,7 +910,7 @@ static int __init omap_usbhs_drvinit(void)*/ fs_initcall_sync (omap_usbhs_drvinit); -static void __exit omap_usbhs_drvexit(void) +static void omap_usbhs_drvexit (void ) {platform_driver_unregister (&usbhs_omap_driver); }
drivers/misc/cxl/context.c +63 -19
113 lines not on this page · raw message
drivers/misc/cxl/file.c +8 -6
@@ -140,18 +140,20 @@ static long afu_ioctl_start_work(struct cxl_context *ctx,pr_devel ("%s: pe: %i\n" , __func__, ctx->pe); -mutex_lock (&ctx->status_mutex); -if (ctx->status !=OPENED ) { - rc = -EIO ; - goto out; - } - +/* Do this outside the status_mutex to avoid a circular dependency with +* the locking in cxl_mmap_fault() */ if (copy_from_user (&work, uwork,sizeof (struct cxl_ioctl_start_work ))) { rc = -EFAULT ; goto out; } +mutex_lock (&ctx->status_mutex); +if (ctx->status !=OPENED ) { + rc = -EIO ; + goto out; + } +/* * if any of the reserved fields are set or any of the unused * flags are set it's invalid
drivers/mmc/host/sdhci.c +6 -13
@@ -1248,19 +1248,6 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,struct mmc_host *mmc = host->mmc;u8 pwr =0 ; -if (!IS_ERR (mmc->supply.vmmc)) { -spin_unlock_irq (&host->lock); -mmc_regulator_set_ocr (mmc, mmc->supply.vmmc, vdd); -spin_lock_irq (&host->lock); - -if (mode !=MMC_POWER_OFF ) -sdhci_writeb (host,SDHCI_POWER_ON ,SDHCI_POWER_CONTROL ); -else -sdhci_writeb (host,0 ,SDHCI_POWER_CONTROL ); - -return ; - } -if (mode !=MMC_POWER_OFF ) {switch (1 << vdd) {case MMC_VDD_165_195 :
@@ -1319,6 +1306,12 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,if (host->quirks &SDHCI_QUIRK_DELAY_AFTER_POWER )mdelay (10 ); } + +if (!IS_ERR (mmc->supply.vmmc)) { +spin_unlock_irq (&host->lock); +mmc_regulator_set_ocr (mmc, mmc->supply.vmmc, vdd); +spin_lock_irq (&host->lock); + } }/*****************************************************************************\
drivers/mtd/mtd_blkdevs.c +5 -5
@@ -195,8 +195,8 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)if (!dev)return -ERESTARTSYS ;/* FIXME: busy loop! -arnd*/ -mutex_lock (&dev->lock);mutex_lock (&mtd_table_mutex); +mutex_lock (&dev->lock);if (dev->open) goto unlock;
@@ -220,8 +220,8 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) unlock: dev->open++; -mutex_unlock (&mtd_table_mutex);mutex_unlock (&dev->lock); +mutex_unlock (&mtd_table_mutex);blktrans_dev_put (dev);return ret;
@@ -231,8 +231,8 @@ error_release: error_put:module_put (dev->tr->owner);kref_put (&dev->ref, blktrans_dev_release); -mutex_unlock (&mtd_table_mutex);mutex_unlock (&dev->lock); +mutex_unlock (&mtd_table_mutex);blktrans_dev_put (dev);return ret; }
@@ -244,8 +244,8 @@ static void blktrans_release(struct gendisk *disk, fmode_t mode)if (!dev)return ; -mutex_lock (&dev->lock);mutex_lock (&mtd_table_mutex); +mutex_lock (&dev->lock);if (--dev->open) goto unlock;
@@ -259,8 +259,8 @@ static void blktrans_release(struct gendisk *disk, fmode_t mode)__put_mtd_device (dev->mtd); } unlock: -mutex_unlock (&mtd_table_mutex);mutex_unlock (&dev->lock); +mutex_unlock (&mtd_table_mutex);blktrans_dev_put (dev); }
drivers/net/ethernet/broadcom/bcmsysport.c +11 -11
@@ -769,14 +769,22 @@ static void bcm_sysport_resume_from_wol(struct bcm_sysport_priv *priv) {u32 reg; -/* Stop monitoring MPD interrupt */ -intrl2_0_mask_set (priv,INTRL2_0_MPD ); -/* Clear the MagicPacket detection logic */ reg =umac_readl (priv,UMAC_MPD_CTRL ); reg &= ~MPD_EN ;umac_writel (priv, reg,UMAC_MPD_CTRL ); + reg =intrl2_0_readl (priv,INTRL2_CPU_STATUS ); +if (reg &INTRL2_0_MPD ) +netdev_info (priv->netdev,"Wake-on-LAN (MPD) interrupt!\n" ); + +if (reg &INTRL2_0_BRCM_MATCH_TAG ) { + reg =rxchk_readl (priv,RXCHK_BRCM_TAG_MATCH_STATUS ) & +RXCHK_BRCM_TAG_MATCH_MASK ; +netdev_info (priv->netdev, +"Wake-on-LAN (filters 0x%02x) interrupt!\n" , reg); + } +netif_dbg (priv, wol, priv->netdev,"resumed from WOL\n" ); }
@@ -809,11 +817,6 @@ static irqreturn_t bcm_sysport_rx_isr(int irq, void *dev_id)if (priv->irq0_stat &INTRL2_0_TX_RING_FULL )bcm_sysport_tx_reclaim_all (priv); -if (priv->irq0_stat &INTRL2_0_MPD ) { -netdev_info (priv->netdev,"Wake-on-LAN interrupt!\n" ); -bcm_sysport_resume_from_wol (priv); - } -return IRQ_HANDLED ; }
@@ -1786,9 +1789,6 @@ static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)/* UniMAC receive needs to be turned on */ umac_enable_set (priv,CMD_RX_EN ,1 ); -/* Enable the interrupt wake-up source */ -intrl2_0_mask_clear (priv,INTRL2_0_MPD ); -netif_dbg (priv, wol, ndev,"entered WOL mode\n" );return 0 ;
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +17 -0
@@ -2146,6 +2146,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EPERM ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_SET_QSET_PARAMS ) +return -EINVAL ;if (t.qset_idx >=SGE_QSETS )return -EINVAL ; if (!in_range(t.intr_lat, 0, M_NEWTIMER) ||
@@ -2245,6 +2247,9 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_GET_QSET_PARAMS ) +return -EINVAL ; +/* Display qsets for all ports when offload enabled */ if (test_bit (OFFLOAD_DEVMAP_BIT , &adapter->open_device_map)) { q1 =0 ;
@@ -2289,6 +2294,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&edata, useraddr,sizeof (edata)))return -EFAULT ; +if (edata.cmd !=CHELSIO_SET_QSET_NUM ) +return -EINVAL ;if (edata.val <1 || (edata.val >1 && !(adapter->flags &USING_MSIX )))return -EINVAL ;
@@ -2329,6 +2336,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EPERM ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_LOAD_FW ) +return -EINVAL ;/* Check t.len sanity ? */ fw_data =memdup_user (useraddr +sizeof (t), t.len);if (IS_ERR (fw_data))
@@ -2352,6 +2361,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&m, useraddr,sizeof (m)))return -EFAULT ; +if (m.cmd !=CHELSIO_SETMTUTAB ) +return -EINVAL ;if (m.nmtus !=NMTUS )return -EINVAL ;if (m.mtus[0 ] <81 )/* accommodate SACK */
@@ -2393,6 +2404,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&m, useraddr,sizeof (m)))return -EFAULT ; +if (m.cmd !=CHELSIO_SET_PM ) +return -EINVAL ;if (!is_power_of_2 (m.rx_pg_sz) || !is_power_of_2 (m.tx_pg_sz))return -EINVAL ;/* not power of 2 */
@@ -2426,6 +2439,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EIO ;/* need the memory controllers */ if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_GET_MEM ) +return -EINVAL ;if ((t.addr &7 ) || (t.len &7 ))return -EINVAL ;if (t.mem_id ==MEM_CM )
@@ -2478,6 +2493,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EAGAIN ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_SET_TRACE_FILTER ) +return -EINVAL ; tp = (const struct trace_params *)&t.sip;if (t.config_tx)
drivers/net/ethernet/davicom/dm9000.c +18 -16
@@ -125,7 +125,6 @@ struct board_info {struct resource *data_res;struct resource *addr_req;/* resources requested */ struct resource *data_req; -struct resource *irq_res;int irq_wake;
@@ -1297,21 +1296,18 @@ static int dm9000_open(struct net_device *dev) {struct board_info *db =netdev_priv (dev); -unsigned long irqflags = db->irq_res->flags &IRQF_TRIGGER_MASK ; +unsigned int irq_flags =irq_get_trigger_type (dev->irq);if (netif_msg_ifup (db))dev_dbg (db->dev,"enabling %s\n" , dev->name); -/* If there is no IRQ type specified, default to something that -* may work, and tell the user that this is a problem */ - -if (irqflags ==IRQF_TRIGGER_NONE ) - irqflags =irq_get_trigger_type (dev->irq); - -if (irqflags ==IRQF_TRIGGER_NONE ) +/* If there is no IRQ type specified, tell the user that this is a +* problem +*/ +if (irq_flags ==IRQF_TRIGGER_NONE )dev_warn (db->dev,"WARNING: no IRQ resource flags set.\n" ); - irqflags |=IRQF_SHARED ; + irq_flags |=IRQF_SHARED ;/* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */ iow (db,DM9000_GPR ,0 );/* REG_1F bit0 activate phyxcer */
@@ -1320,7 +1316,7 @@ dm9000_open(struct net_device *dev)/* Initialize DM9000 board */ dm9000_init_dm9000 (dev); -if (request_irq (dev->irq, dm9000_interrupt, irqflags, dev->name, dev)) +if (request_irq (dev->irq, dm9000_interrupt, irq_flags, dev->name, dev))return -EAGAIN ;/* Now that we have an interrupt handler hooked up we can unmask * our interrupts
@@ -1460,15 +1456,22 @@ dm9000_probe(struct platform_device *pdev) db->addr_res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); db->data_res =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); - db->irq_res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); -if (db->addr_res ==NULL || db->data_res ==NULL || - db->irq_res ==NULL ) { -dev_err (db->dev,"insufficient resources\n" ); +if (!db->addr_res || !db->data_res) { +dev_err (db->dev,"insufficient resources addr=%p data=%p\n" , + db->addr_res, db->data_res); ret = -ENOENT ; goto out; } + ndev->irq =platform_get_irq (pdev,0 ); +if (ndev->irq <0 ) { +dev_err (db->dev,"interrupt resource unavailable: %d\n" , + ndev->irq); + ret = ndev->irq; + goto out; + } + db->irq_wake =platform_get_irq (pdev,1 );if (db->irq_wake >=0 ) {dev_dbg (db->dev,"wakeup irq %d\n" , db->irq_wake);
@@ -1530,7 +1533,6 @@ dm9000_probe(struct platform_device *pdev)/* fill in parameters for net-dev structure */ ndev->base_addr = (unsigned long )db->io_addr; - ndev->irq = db->irq_res->start;/* ensure at least we have a default set of IO routines */ dm9000_set_io (db, iosize);
drivers/net/ethernet/intel/igb/igb_main.c +9 -0
@@ -2866,6 +2866,13 @@ static void igb_probe_vfs(struct igb_adapter *adapter)if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211))return ; +/* Of the below we really only want the effect of getting +* IGB_FLAG_HAS_MSIX set (if available), without which +* igb_enable_sriov() has no effect. +*/ +igb_set_interrupt_capability (adapter, true); +igb_reset_interrupt_capability (adapter); +pci_sriov_set_totalvfs (pdev,7 );igb_enable_sriov (pdev, max_vfs);
@@ -2941,6 +2948,8 @@ void igb_set_flag_queue_pairs(struct igb_adapter *adapter,*/ if (adapter->rss_queues > (max_rss_queues /2 )) adapter->flags |=IGB_FLAG_QUEUE_PAIRS ; +else + adapter->flags &= ~IGB_FLAG_QUEUE_PAIRS ;break ; } }
drivers/net/ethernet/marvell/mvpp2.c +6 -4
@@ -27,6 +27,7 @@#include <linux/of_address.h> #include <linux/phy.h> #include <linux/clk.h> +#include <linux/if_vlan.h> #include <uapi/linux/ppp_defs.h> #include <net/ip.h> #include <net/ipv6.h>
@@ -4246,7 +4247,7 @@ static void mvpp2_txq_desc_put(struct mvpp2_tx_queue *txq) }/* Set Tx descriptors fields relevant for CSUM calculation */ -static u32 mvpp2_txq_desc_csum (int l3_offs,int l3_proto, +static u32 mvpp2_txq_desc_csum (int l3_offs,__be16 l3_proto,int ip_hdr_len,int l4_proto) {u32 command;
@@ -4957,14 +4958,15 @@ static u32 mvpp2_skb_tx_csum(struct mvpp2_port *port, struct sk_buff *skb)if (skb->ip_summed ==CHECKSUM_PARTIAL ) {int ip_hdr_len =0 ;u8 l4_proto; +__be16 l3_proto =vlan_get_protocol (skb); -if (skb->protocol ==htons (ETH_P_IP )) { +if (l3_proto ==htons (ETH_P_IP )) {struct iphdr *ip4h =ip_hdr (skb);/* Calculate IPv4 checksum and L4 checksum */ ip_hdr_len = ip4h->ihl; l4_proto = ip4h->protocol; - }else if (skb->protocol ==htons (ETH_P_IPV6 )) { + }else if (l3_proto ==htons (ETH_P_IPV6 )) {struct ipv6hdr *ip6h =ipv6_hdr (skb);/* Read l4_protocol from one of IPv6 extra headers */
@@ -4976,7 +4978,7 @@ static u32 mvpp2_skb_tx_csum(struct mvpp2_port *port, struct sk_buff *skb) }return mvpp2_txq_desc_csum (skb_network_offset (skb), - skb->protocol, ip_hdr_len, l4_proto); + l3_proto, ip_hdr_len, l4_proto); }return MVPP2_TXD_L4_CSUM_NOT |MVPP2_TXD_IP_CSUM_DISABLE ;
drivers/net/ethernet/mellanox/mlx4/en_netdev.c +2 -3
@@ -2638,9 +2638,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, }queue_delayed_work (mdev->workqueue, &priv->stats_task,STATS_DELAY ); -if (mdev->dev->caps.flags2 &MLX4_DEV_CAP_FLAG2_TS ) -queue_delayed_work (mdev->workqueue, &priv->service_task, -SERVICE_TASK_DELAY ); +queue_delayed_work (mdev->workqueue, &priv->service_task, +SERVICE_TASK_DELAY ); err =register_netdev (dev);if (err) {
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +5 -3
@@ -1796,7 +1796,8 @@ struct qlcnic_hardware_ops {int (*config_loopback) (struct qlcnic_adapter *,u8 );int (*clear_loopback) (struct qlcnic_adapter *,u8 );int (*config_promisc_mode) (struct qlcnic_adapter *,u32 ); -void (*change_l2_filter) (struct qlcnic_adapter *,u64 *,u16 ); +void (*change_l2_filter)(struct qlcnic_adapter *adapter,u64 *addr, +u16 vlan,struct qlcnic_host_tx_ring *tx_ring);int (*get_board_info) (struct qlcnic_adapter *);void (*set_mac_filter_count) (struct qlcnic_adapter *);void (*free_mac_list) (struct qlcnic_adapter *);
@@ -2038,9 +2039,10 @@ static inline int qlcnic_nic_set_promisc(struct qlcnic_adapter *adapter, }static inline void qlcnic_change_filter (struct qlcnic_adapter *adapter, -u64 *addr,u16 id) +u64 *addr,u16 vlan, +struct qlcnic_host_tx_ring *tx_ring) { - adapter->ahw->hw_ops->change_l2_filter (adapter, addr, id); + adapter->ahw->hw_ops->change_l2_filter (adapter, addr, vlan, tx_ring); }static inline int qlcnic_get_board_info (struct qlcnic_adapter *adapter)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +2 -1
@@ -2132,7 +2132,8 @@ out: }void qlcnic_83xx_change_l2_filter (struct qlcnic_adapter *adapter,u64 *addr, -u16 vlan_id) +u16 vlan_id, +struct qlcnic_host_tx_ring *tx_ring) {u8 mac[ETH_ALEN ];memcpy (&mac, addr,ETH_ALEN );
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h +2 -1
@@ -549,7 +549,8 @@ int qlcnic_83xx_wrt_reg_indirect(struct qlcnic_adapter *, ulong, u32);int qlcnic_83xx_nic_set_promisc (struct qlcnic_adapter *,u32 );int qlcnic_83xx_config_hw_lro (struct qlcnic_adapter *,int );int qlcnic_83xx_config_rss (struct qlcnic_adapter *,int ); -void qlcnic_83xx_change_l2_filter (struct qlcnic_adapter *,u64 *,u16 ); +void qlcnic_83xx_change_l2_filter (struct qlcnic_adapter *adapter,u64 *addr, +u16 vlan,struct qlcnic_host_tx_ring *ring);int qlcnic_83xx_get_pci_info (struct qlcnic_adapter *,struct qlcnic_pci_info *);int qlcnic_83xx_set_nic_info (struct qlcnic_adapter *,struct qlcnic_info *);void qlcnic_83xx_initialize_nic (struct qlcnic_adapter *,int );
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h +2 -1
@@ -172,7 +172,8 @@ int qlcnic_82xx_napi_add(struct qlcnic_adapter *adapter, struct net_device *netdev);void qlcnic_82xx_get_beacon_state (struct qlcnic_adapter *);void qlcnic_82xx_change_filter (struct qlcnic_adapter *adapter, -u64 *uaddr,u16 vlan_id); +u64 *uaddr,u16 vlan_id, +struct qlcnic_host_tx_ring *tx_ring);int qlcnic_82xx_config_intr_coalesce (struct qlcnic_adapter *,struct ethtool_coalesce *);int qlcnic_82xx_set_rx_coalesce (struct qlcnic_adapter *);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +6 -6
@@ -268,13 +268,12 @@ static void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, }void qlcnic_82xx_change_filter (struct qlcnic_adapter *adapter,u64 *uaddr, -u16 vlan_id) +u16 vlan_id,struct qlcnic_host_tx_ring *tx_ring) {struct cmd_desc_type0 *hwdesc;struct qlcnic_nic_req *req;struct qlcnic_mac_req *mac_req;struct qlcnic_vlan_req *vlan_req; -struct qlcnic_host_tx_ring *tx_ring = adapter->tx_ring;u32 producer;u64 word;
@@ -301,7 +300,8 @@ void qlcnic_82xx_change_filter(struct qlcnic_adapter *adapter, u64 *uaddr,static void qlcnic_send_filter (struct qlcnic_adapter *adapter,struct cmd_desc_type0 *first_desc, -struct sk_buff *skb) +struct sk_buff *skb, +struct qlcnic_host_tx_ring *tx_ring) {struct vlan_ethhdr *vh = (struct vlan_ethhdr *)(skb->data);struct ethhdr *phdr = (struct ethhdr *)(skb->data);
@@ -335,7 +335,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter, tmp_fil->vlan_id == vlan_id) {if (jiffies > (QLCNIC_READD_AGE *HZ + tmp_fil->ftime))qlcnic_change_filter (adapter, &src_addr, - vlan_id); + vlan_id, tx_ring); tmp_fil->ftime = jiffies;return ; }
@@ -350,7 +350,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter,if (!fil)return ; -qlcnic_change_filter (adapter, &src_addr, vlan_id); +qlcnic_change_filter (adapter, &src_addr, vlan_id, tx_ring); fil->ftime = jiffies; fil->vlan_id = vlan_id;memcpy (fil->faddr, &src_addr,ETH_ALEN );
@@ -766,7 +766,7 @@ netdev_tx_t qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) }if (adapter->drv_mac_learn) -qlcnic_send_filter (adapter, first_desc, skb); +qlcnic_send_filter (adapter, first_desc, skb, tx_ring); tx_ring->tx_stats.tx_bytes += skb->len; tx_ring->tx_stats.xmit_called++;
drivers/net/ethernet/realtek/r8169.c +3 -5
@@ -7445,17 +7445,15 @@ static int rtl8169_poll(struct napi_struct *napi, int budget) struct rtl8169_private *tp = container_of(napi, struct rtl8169_private, napi);struct net_device *dev = tp->dev;u16 enable_mask =RTL_EVENT_NAPI | tp->event_slow; -int work_done=0 ; +int work_done;u16 status; status =rtl_get_events (tp);rtl_ack_events (tp, status & ~tp->event_slow); -if (status &RTL_EVENT_NAPI_RX ) - work_done =rtl_rx (dev, tp, (u32 ) budget); + work_done =rtl_rx (dev, tp, (u32 ) budget); -if (status &RTL_EVENT_NAPI_TX ) -rtl_tx (dev, tp); +rtl_tx (dev, tp);if (status & tp->event_slow) { enable_mask &= ~tp->event_slow;
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 -1
@@ -130,7 +130,7 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,*/ int stmmac_mdio_reset (struct mii_bus *bus) { -#if defined(CONFIG_STMMAC_PLATFORM ) +#if IS_ENABLED (CONFIG_STMMAC_PLATFORM )struct net_device *ndev = bus->priv;struct stmmac_priv *priv =netdev_priv (ndev);unsigned int mii_address = priv->hw->mii.addr;
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +2 -3
@@ -85,7 +85,7 @@ static int dwmac1000_validate_mcast_bins(int mcast_bins)/* This function validates the number of Unicast address entries supported * by a particular Synopsys 10/100/1000 controller. The Synopsys controller -* supports 1, 32, 64, or 128 Unicast filter entries for it's Unicast filter +* supports 1..32, 64, or 128 Unicast filter entries for it's Unicast filter * logic. This function validates a valid, supported configuration is * selected, and defaults to 1 Unicast address if an unsupported * configuration is selected.
@@ -95,8 +95,7 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)int x = ucast_entries;switch (x) { -case 1 : -case 32 : + case 1 ... 32:case 64 :case 128 :break ;
drivers/net/team/team.c +5 -0
@@ -1143,6 +1143,11 @@ static int team_port_add(struct team *team, struct net_device *port_dev)return -EBUSY ; } +if (dev == port_dev) { +netdev_err (dev,"Cannot enslave team device to itself\n" ); +return -EINVAL ; + } +if (port_dev->features &NETIF_F_VLAN_CHALLENGED &&vlan_uses_dev (dev)) { netdev_err(dev, "Device %s is VLAN challenged and team device has VLAN set up\n",
drivers/net/usb/asix_common.c +3 -0
@@ -417,6 +417,9 @@ int asix_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=AX_MONITOR_LINK ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/usb/ax88179_178a.c +3 -0
@@ -566,6 +566,9 @@ ax88179_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=AX_MONITOR_MODE_RWLC ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/usb/smsc75xx.c +4 -0
@@ -728,6 +728,9 @@ static int smsc75xx_ethtool_set_wol(struct net_device *net,struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0 ]);int ret; +if (wolinfo->wolopts & ~SUPPORTED_WAKE ) +return -EINVAL ; + pdata->wolopts = wolinfo->wolopts &SUPPORTED_WAKE ; ret =device_set_wakeup_enable (&dev->udev->dev, pdata->wolopts);
@@ -1506,6 +1509,7 @@ static void smsc75xx_unbind(struct usbnet *dev, struct usb_interface *intf) {struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0 ]);if (pdata) { +cancel_work_sync (&pdata->set_multicast);netif_dbg (dev, ifdown, dev->net,"free pdata\n" );kfree (pdata); pdata =NULL ;
drivers/net/usb/smsc95xx.c +3 -0
@@ -727,6 +727,9 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0 ]);int ret; +if (wolinfo->wolopts & ~SUPPORTED_WAKE ) +return -EINVAL ; + pdata->wolopts = wolinfo->wolopts &SUPPORTED_WAKE ; ret =device_set_wakeup_enable (&dev->udev->dev, pdata->wolopts);
drivers/net/usb/sr9800.c +3 -0
@@ -421,6 +421,9 @@ sr_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=SR_MONITOR_LINK ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/wireless/iwlwifi/pcie/drv.c +3 -1
@@ -533,8 +533,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) else if (cfg == &iwl7265_n_cfg) cfg_7265d = &iwl7265d_n_cfg;if (cfg_7265d && - (iwl_trans->hw_rev &CSR_HW_REV_TYPE_MSK ) ==CSR_HW_REV_TYPE_7265D ) + (iwl_trans->hw_rev &CSR_HW_REV_TYPE_MSK ) ==CSR_HW_REV_TYPE_7265D ) { cfg = cfg_7265d; + iwl_trans->cfg = cfg_7265d; + }#endif pci_set_drvdata (pdev, iwl_trans);
drivers/net/wireless/rtlwifi/pci.h +2 -0
@@ -247,6 +247,8 @@ struct rtl_pci {/* MSI support */ bool msi_support;bool using_msi; +/* interrupt clear before set */ +bool int_clear; };struct mp_adapter {
drivers/net/wireless/rtlwifi/rtl8821ae/hw.c +17 -0
@@ -2253,11 +2253,28 @@ void rtl8821ae_set_qos(struct ieee80211_hw *hw, int aci) } } +static void rtl8821ae_clear_interrupt (struct ieee80211_hw *hw) +{ +struct rtl_priv *rtlpriv =rtl_priv (hw); +u32 tmp =rtl_read_dword (rtlpriv,REG_HISR ); + +rtl_write_dword (rtlpriv,REG_HISR , tmp); + + tmp =rtl_read_dword (rtlpriv,REG_HISRE ); +rtl_write_dword (rtlpriv,REG_HISRE , tmp); + + tmp =rtl_read_dword (rtlpriv,REG_HSISR ); +rtl_write_dword (rtlpriv,REG_HSISR , tmp); +} +void rtl8821ae_enable_interrupt (struct ieee80211_hw *hw) {struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw)); +if (rtlpci->int_clear) +rtl8821ae_clear_interrupt (hw);/*clear it here first*/ +rtl_write_dword (rtlpriv,REG_HIMR , rtlpci->irq_mask[0 ] &0xFFFFFFFF );rtl_write_dword (rtlpriv,REG_HIMRE , rtlpci->irq_mask[1 ] &0xFFFFFFFF ); rtlpci->irq_enabled = true;
drivers/net/wireless/rtlwifi/rtl8821ae/sw.c +5 -0
@@ -142,6 +142,7 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)rtl8821ae_bt_reg_init (hw); rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support; + rtlpci->int_clear = rtlpriv->cfg->mod_params->int_clear; rtlpriv->btcoexist.btc_ops =rtl_btc_get_ops_pointer (); rtlpriv->dm.dm_initialgain_enable =1 ;
@@ -213,6 +214,7 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw) rtlpriv->psc.swctrl_lps = rtlpriv->cfg->mod_params->swctrl_lps; rtlpriv->psc.fwctrl_lps = rtlpriv->cfg->mod_params->fwctrl_lps; rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support; + rtlpci->msi_support = rtlpriv->cfg->mod_params->int_clear;if (rtlpriv->cfg->mod_params->disable_watchdog)pr_info ("watchdog disabled\n" ); rtlpriv->psc.reg_fwctrl_lps =3 ;
@@ -334,6 +336,7 @@ static struct rtl_mod_params rtl8821ae_mod_params = { .swctrl_lps = false, .fwctrl_lps = true, .msi_support = true, + .int_clear = true, .debug = DBG_EMERG, .disable_watchdog = 0, };
@@ -463,6 +466,7 @@ module_param_named(fwlps, rtl8821ae_mod_params.fwctrl_lps, bool, 0444);module_param_named (msi, rtl8821ae_mod_params.msi_support, bool,0444 );module_param_named (disable_watchdog, rtl8821ae_mod_params.disable_watchdog, bool,0444 ); +module_param_named (int_clear, rtl8821ae_mod_params.int_clear, bool,0444 );MODULE_PARM_DESC (swenc,"Set to 1 for software crypto (default 0)\n" );MODULE_PARM_DESC (ips,"Set to 0 to not use link power save (default 1)\n" );MODULE_PARM_DESC (swlps,"Set to 1 to use SW control power save (default 0)\n" );
@@ -470,6 +474,7 @@ MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n");MODULE_PARM_DESC (msi,"Set to 1 to use MSI interrupts mode (default 1)\n" );MODULE_PARM_DESC (debug,"Set debug level (0-5) (default 0)" );MODULE_PARM_DESC (disable_watchdog,"Set to 1 to disable the watchdog (default 0)\n" ); +MODULE_PARM_DESC (int_clear,"Set to 0 to disable interrupt clear before set (default 1)\n" ); static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume);
drivers/net/wireless/rtlwifi/wifi.h +3 -0
@@ -2212,6 +2212,9 @@ struct rtl_mod_params {/* default 0: 1 means disable */ bool disable_watchdog; + +/* default 0: 1 means do not disable interrupts */ +bool int_clear; };struct rtl_hal_usbint_cfg {
drivers/of/of_pci.c +0 -1
@@ -229,7 +229,6 @@ parse_failed:list_for_each_entry (window, resources, list)kfree (window->res);pci_free_resource_list (resources); -kfree (bus_range);return err; }EXPORT_SYMBOL_GPL (of_pci_get_host_bridge_resources);
drivers/pci/access.c +6 -3
@@ -355,7 +355,8 @@ static const struct pci_vpd_ops pci_vpd_pci22_ops = {static ssize_t pci_vpd_f0_read (struct pci_dev *dev,loff_t pos,size_t count,void *arg) { -struct pci_dev *tdev =pci_get_slot (dev->bus,PCI_SLOT (dev->devfn)); +struct pci_dev *tdev =pci_get_slot (dev->bus, +PCI_DEVFN (PCI_SLOT (dev->devfn),0 ));ssize_t ret;if (!tdev)
@@ -369,7 +370,8 @@ static ssize_t pci_vpd_f0_read(struct pci_dev *dev, loff_t pos, size_t count,static ssize_t pci_vpd_f0_write (struct pci_dev *dev,loff_t pos,size_t count,const void *arg) { -struct pci_dev *tdev =pci_get_slot (dev->bus,PCI_SLOT (dev->devfn)); +struct pci_dev *tdev =pci_get_slot (dev->bus, +PCI_DEVFN (PCI_SLOT (dev->devfn),0 ));ssize_t ret;if (!tdev)
@@ -388,7 +390,8 @@ static const struct pci_vpd_ops pci_vpd_f0_ops = {static int pci_vpd_f0_dev_check (struct pci_dev *dev) { -struct pci_dev *tdev =pci_get_slot (dev->bus,PCI_SLOT (dev->devfn)); +struct pci_dev *tdev =pci_get_slot (dev->bus, +PCI_DEVFN (PCI_SLOT (dev->devfn),0 ));int ret =0 ;if (!tdev)
drivers/pci/quirks.c +1 -0
@@ -3081,6 +3081,7 @@ static void quirk_no_bus_reset(struct pci_dev *dev)DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x0030 , quirk_no_bus_reset);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x0032 , quirk_no_bus_reset);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x003c , quirk_no_bus_reset); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x0033 , quirk_no_bus_reset);#ifdef CONFIG_ACPI /*
drivers/phy/phy-omap-control.c +3 -4
@@ -29,10 +29,9 @@/** * omap_control_pcie_pcs - set the PCS delay count * @dev: the control module device -* @id: index of the pcie PHY (should be 1 or 2) * @delay: 8 bit delay value */ -void omap_control_pcie_pcs (struct device *dev,u8 id,u8 delay) +void omap_control_pcie_pcs (struct device *dev,u8 delay) {u32 val;struct omap_control_phy *control_phy;
@@ -55,8 +54,8 @@ void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) val =readl (control_phy->pcie_pcs); val &= ~(OMAP_CTRL_PCIE_PCS_MASK << - (id *OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT )); - val |= delay << (id *OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT ); +OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT ); + val |= (delay <<OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT );writel (val, control_phy->pcie_pcs); }EXPORT_SYMBOL_GPL (omap_control_pcie_pcs);
drivers/phy/phy-sun4i-usb.c +2 -1
@@ -240,7 +240,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)else data->num_phys =3 ; -if (of_device_is_compatible (np,"allwinner,sun4i-a10-usb-phy" )) +if (of_device_is_compatible (np,"allwinner,sun4i-a10-usb-phy" ) || +of_device_is_compatible (np,"allwinner,sun6i-a31-usb-phy" )) data->disc_thresh =3 ;else data->disc_thresh =2 ;
drivers/phy/phy-ti-pipe3.c +6 -4
@@ -82,7 +82,6 @@ struct ti_pipe3 {struct clk *refclk;struct clk *div_clk;struct pipe3_dpll_map *dpll_map; -u8 id; };static struct pipe3_dpll_map dpll_map_usb[] = {
@@ -217,8 +216,13 @@ static int ti_pipe3_init(struct phy *x)u32 val;int ret =0 ; +/* +* Set pcie_pcs register to 0x96 for proper functioning of phy +* as recommended in AM572x TRM SPRUHZ6, section 18.5.2.2, table +* 18-1804. +*/ if (of_device_is_compatible (phy->dev->of_node,"ti,phy-pipe3-pcie" )) { -omap_control_pcie_pcs (phy->control_dev, phy->id,0xF1 ); +omap_control_pcie_pcs (phy->control_dev,0x96 );return 0 ; }
@@ -347,8 +351,6 @@ static int ti_pipe3_probe(struct platform_device *pdev) }if (of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { -if (of_property_read_u8 (node,"id" , &phy->id) <0 ) - phy->id =1 ; clk =devm_clk_get (phy->dev,"dpll_ref" );if (IS_ERR (clk)) {
drivers/pinctrl/freescale/pinctrl-imx25.c +3 -1
@@ -26,7 +26,8 @@#include "pinctrl-imx.h" enum imx25_pads { -MX25_PAD_RESERVE0 =1 , +MX25_PAD_RESERVE0 =0 , +MX25_PAD_RESERVE1 =1 ,MX25_PAD_A10 =2 ,MX25_PAD_A13 =3 ,MX25_PAD_A14 =4 ,
@@ -169,6 +170,7 @@ enum imx25_pads {/* Pad names for the pinmux subsystem */ static const struct pinctrl_pin_desc imx25_pinctrl_pads[] = {IMX_PINCTRL_PIN (MX25_PAD_RESERVE0 ), +IMX_PINCTRL_PIN (MX25_PAD_RESERVE1 ),IMX_PINCTRL_PIN (MX25_PAD_A10 ),IMX_PINCTRL_PIN (MX25_PAD_A13 ),IMX_PINCTRL_PIN (MX25_PAD_A14 ),
drivers/pinctrl/pinctrl-at91.c +15 -0
@@ -322,6 +322,9 @@ static const struct pinctrl_ops at91_pctrl_ops = {static void __iomem *pin_to_controller (struct at91_pinctrl *info,unsigned int bank) { +if (!gpio_chips[bank]) +return NULL ; +return gpio_chips[bank]->regbase; }
@@ -731,6 +734,10 @@ static int at91_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, pin = &pins_conf[i];at91_pin_dbg (info->dev, pin); pio =pin_to_controller (info, pin->bank); + +if (!pio) +continue ; + mask =pin_to_mask (pin->pin);at91_mux_disable_interrupt (pio, mask);switch (pin->mux) {
@@ -850,6 +857,10 @@ static int at91_pinconf_get(struct pinctrl_dev *pctldev, *config =0 ;dev_dbg (info->dev,"%s:%d, pin_id=%d" , __func__, __LINE__, pin_id); pio =pin_to_controller (info,pin_to_bank (pin_id)); + +if (!pio) +return -EINVAL ; + pin = pin_id %MAX_NB_GPIO_PER_BANK ;if (at91_mux_get_multidrive (pio, pin))
@@ -891,6 +902,10 @@ static int at91_pinconf_set(struct pinctrl_dev *pctldev,"%s:%d, pin_id=%d, config=0x%lx" , __func__, __LINE__, pin_id, config); pio =pin_to_controller (info,pin_to_bank (pin_id)); + +if (!pio) +return -EINVAL ; + pin = pin_id %MAX_NB_GPIO_PER_BANK ; mask =pin_to_mask (pin);
drivers/scsi/scsi_lib.c +1 -1
@@ -616,7 +616,7 @@ static int scsi_alloc_sgtable(struct scsi_data_buffer *sdb, int nents, } ret =__sg_alloc_table (&sdb->table, nents,SCSI_MAX_SG_SEGMENTS , - first_chunk, gfp_mask, scsi_sg_alloc); + first_chunk,GFP_ATOMIC , scsi_sg_alloc);if (unlikely (ret))scsi_free_sgtable (sdb, mq);return ret;
drivers/scsi/scsi_pm.c +10 -10
@@ -221,13 +221,13 @@ static int sdev_runtime_suspend(struct device *dev)struct scsi_device *sdev =to_scsi_device (dev);int err =0 ; -if (pm && pm->runtime_suspend) { - err =blk_pre_runtime_suspend (sdev->request_queue); -if (err) -return err; + err =blk_pre_runtime_suspend (sdev->request_queue); +if (err) +return err; +if (pm && pm->runtime_suspend) err = pm->runtime_suspend (dev); -blk_post_runtime_suspend (sdev->request_queue, err); - } +blk_post_runtime_suspend (sdev->request_queue, err); +return err; }
@@ -250,11 +250,11 @@ static int sdev_runtime_resume(struct device *dev)const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm :NULL ;int err =0 ; -if (pm && pm->runtime_resume) { -blk_pre_runtime_resume (sdev->request_queue); +blk_pre_runtime_resume (sdev->request_queue); +if (pm && pm->runtime_resume) err = pm->runtime_resume (dev); -blk_post_runtime_resume (sdev->request_queue, err); - } +blk_post_runtime_resume (sdev->request_queue, err); +return err; }
drivers/tty/n_tty.c +3 -8
@@ -195,7 +195,7 @@ static inline int tty_copy_to_user(struct tty_struct *tty, {struct n_tty_data *ldata = tty->disc_data; -tty_audit_add_data (tty, to, n, ldata->icanon); +tty_audit_add_data (tty, from, n, ldata->icanon);return copy_to_user (to, from, n); }
@@ -2472,17 +2472,12 @@ static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file,poll_wait (file, &tty->read_wait, wait);poll_wait (file, &tty->write_wait, wait); -if (test_bit (TTY_OTHER_CLOSED , &tty->flags)) - mask |=POLLHUP ;if (input_available_p (tty,1 )) mask |=POLLIN |POLLRDNORM ; -else if (mask &POLLHUP ) { -tty_flush_to_ldisc (tty); -if (input_available_p (tty,1 )) - mask |=POLLIN |POLLRDNORM ; - }if (tty->packet && tty->link->ctrl_status) mask |=POLLPRI |POLLIN |POLLRDNORM ; +if (test_bit (TTY_OTHER_CLOSED , &tty->flags)) + mask |=POLLHUP ;if (tty_hung_up_p (file)) mask |=POLLHUP ;if (!(mask & (POLLHUP |POLLIN |POLLRDNORM ))) {
drivers/tty/serial/fsl_lpuart.c +6 -3
@@ -910,13 +910,16 @@ static void lpuart_setup_watermark(struct lpuart_port *sport)writeb (val |UARTPFIFO_TXFE |UARTPFIFO_RXFE , sport->port.membase +UARTPFIFO ); -/* explicitly clear RDRF */ -readb (sport->port.membase +UARTSR1 ); -/* flush Tx and Rx FIFO */ writeb (UARTCFIFO_TXFLUSH |UARTCFIFO_RXFLUSH , sport->port.membase +UARTCFIFO ); +/* explicitly clear RDRF */ +if (readb (sport->port.membase +UARTSR1 ) &UARTSR1_RDRF ) { +readb (sport->port.membase +UARTDR ); +writeb (UARTSFIFO_RXUF , sport->port.membase +UARTSFIFO ); + } +writeb (0 , sport->port.membase +UARTTWFIFO );writeb (1 , sport->port.membase +UARTRWFIFO );
drivers/tty/serial/samsung.c +36 -20
80 lines not on this page · raw message
drivers/tty/tty_audit.c +1 -1
@@ -265,7 +265,7 @@ static struct tty_audit_buf *tty_audit_buf_get(struct tty_struct *tty,* * Audit @data of @size from @tty, if necessary. */ -void tty_audit_add_data (struct tty_struct *tty,unsigned char *data, +void tty_audit_add_data (struct tty_struct *tty,const void *data,size_t size,unsigned icanon) {struct tty_audit_buf *buf;
drivers/usb/class/cdc-acm.c +7 -7
@@ -336,17 +336,17 @@ static void acm_ctrl_irq(struct urb *urb)if (difference &ACM_CTRL_DSR ) acm->iocount.dsr++; -if (difference &ACM_CTRL_BRK ) - acm->iocount.brk++; -if (difference &ACM_CTRL_RI ) - acm->iocount.rng++;if (difference &ACM_CTRL_DCD ) acm->iocount.dcd++; -if (difference &ACM_CTRL_FRAMING ) +if (newctrl &ACM_CTRL_BRK ) + acm->iocount.brk++; +if (newctrl &ACM_CTRL_RI ) + acm->iocount.rng++; +if (newctrl &ACM_CTRL_FRAMING ) acm->iocount.frame++; -if (difference &ACM_CTRL_PARITY ) +if (newctrl &ACM_CTRL_PARITY ) acm->iocount.parity++; -if (difference &ACM_CTRL_OVERRUN ) +if (newctrl &ACM_CTRL_OVERRUN ) acm->iocount.overrun++;spin_unlock (&acm->read_lock);
drivers/usb/core/devio.c +2 -2
@@ -1326,8 +1326,6 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb u =0 ;switch (uurb->type) {case USBDEVFS_URB_TYPE_CONTROL : -if (is_in) - allow_short = true;if (!usb_endpoint_xfer_control (&ep->desc))return -EINVAL ;/* min 8 byte setup packet */
@@ -1357,6 +1355,8 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb is_in =0 ; uurb->endpoint &= ~USB_DIR_IN ; } +if (is_in) + allow_short = true; snoop(&ps->dev->dev, "control urb: bRequestType=%02x " "bRequest=%02x wValue=%04x " "wIndex=%04x wLength=%04x\n",
drivers/usb/core/hub.c +6 -9
@@ -1000,11 +1000,8 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)device_lock (hub->intfdev);/* Was the hub disconnected while we were waiting? */ -if (hub->disconnected) { -device_unlock (hub->intfdev); -kref_put (&hub->kref, hub_release); -return ; - } +if (hub->disconnected) + goto disconnected;if (type ==HUB_INIT2 ) goto init2; goto init3;
@@ -1230,12 +1227,12 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)/* Scan all ports that need attention */ kick_hub_wq (hub); -/* Allow autosuspend if it was suppressed */ -if (type <=HUB_INIT3 ) +if (type ==HUB_INIT2 || type ==HUB_INIT3 ) { +/* Allow autosuspend if it was suppressed */ + disconnected:usb_autopm_put_interface_async (to_usb_interface (hub->intfdev)); - -if (type ==HUB_INIT2 || type ==HUB_INIT3 )device_unlock (hub->intfdev); + }kref_put (&hub->kref, hub_release); }
drivers/usb/dwc2/gadget.c +7 -3
@@ -2590,7 +2590,7 @@ error:* s3c_hsotg_ep_disable - disable given endpoint * @ep: The endpoint to disable. */ -static int s3c_hsotg_ep_disable (struct usb_ep *ep) +static int s3c_hsotg_ep_disable_force (struct usb_ep *ep,bool force) {struct s3c_hsotg_ep *hs_ep =our_ep (ep);struct s3c_hsotg *hsotg = hs_ep->parent;
@@ -2611,7 +2611,7 @@ static int s3c_hsotg_ep_disable(struct usb_ep *ep)spin_lock_irqsave (&hsotg->lock, flags);/* terminate all requests with shutdown */ -kill_all_requests (hsotg, hs_ep, -ESHUTDOWN , false); +kill_all_requests (hsotg, hs_ep, -ESHUTDOWN , force); hsotg->fifo_map &= ~(1 <<hs_ep->fifo_index); hs_ep->fifo_index =0 ;
@@ -2632,6 +2632,10 @@ static int s3c_hsotg_ep_disable(struct usb_ep *ep)return 0 ; } +static int s3c_hsotg_ep_disable (struct usb_ep *ep) +{ +return s3c_hsotg_ep_disable_force (ep, false); +}/** * on_list - check request is on the given endpoint * @ep: The endpoint to check.
@@ -2933,7 +2937,7 @@ static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,/* all endpoints should be shutdown */ for (ep =1 ; ep < hsotg->num_of_eps; ep++) -s3c_hsotg_ep_disable (&hsotg->eps[ep].ep); +s3c_hsotg_ep_disable_force (&hsotg->eps[ep].ep, true);spin_lock_irqsave (&hsotg->lock, flags);
drivers/usb/gadget/function/f_uac1.c +1 -1
@@ -897,7 +897,6 @@ static void f_audio_free_inst(struct usb_function_instance *f)struct f_uac1_opts *opts; opts = container_of(f, struct f_uac1_opts, func_inst); -gaudio_cleanup (opts->card);if (opts->fn_play_alloc)kfree (opts->fn_play);if (opts->fn_cap_alloc)
@@ -935,6 +934,7 @@ static void f_audio_free(struct usb_function *f)struct f_audio *audio =func_to_audio (f);struct f_uac1_opts *opts; +gaudio_cleanup (&audio->card); opts = container_of(f->fi, struct f_uac1_opts, func_inst);kfree (audio);mutex_lock (&opts->lock);
drivers/usb/gadget/legacy/inode.c +1 -0
@@ -442,6 +442,7 @@ ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) kbuf =memdup_user (buf, len);if (IS_ERR (kbuf)) { value =PTR_ERR (kbuf); + kbuf =NULL ; goto free1; }
drivers/usb/host/ehci-sched.c +3 -3
@@ -1604,11 +1604,11 @@ iso_stream_schedule (*/ now2 = (now - base) & (mod -1 ); -/* Is the schedule already full? */ +/* Is the schedule about to wrap around? */ if (unlikely (!empty && start < period)) { -ehci_dbg (ehci,"iso sched full %p (%u-%u < %u mod %u)\n" , +ehci_dbg (ehci,"request %p would overflow (%u-%u < %u mod %u)\n" , urb, stream->next_uframe, base, period, mod); - status = -ENOSPC ; + status = -EFBIG ; goto fail; }
drivers/usb/host/ehci-tegra.c +1 -1
@@ -451,7 +451,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) u_phy =devm_usb_get_phy_by_phandle (&pdev->dev,"nvidia,phy" ,0 );if (IS_ERR (u_phy)) { - err =PTR_ERR (u_phy); + err = -EPROBE_DEFER ; goto cleanup_clk_en; } hcd->usb_phy = u_phy;
drivers/usb/host/xhci-hub.c +9 -9
@@ -926,17 +926,17 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, temp =readl (port_array[wIndex]);break ; } - -/* Software should not attempt to set -* port link state above '3' (U3) and the port -* must be enabled. -*/ -if ((temp &PORT_PE ) ==0 || - (link_state >USB_SS_PORT_LS_U3 )) { -xhci_warn (xhci,"Cannot set link state.\n" ); +/* Port must be enabled */ +if (!(temp &PORT_PE )) { + retval = -ENODEV ; +break ; + } +/* Can't set port link state above '3' (U3) */ +if (link_state >USB_SS_PORT_LS_U3 ) { +xhci_warn (xhci,"Cannot set port %d link state %d\n" , + wIndex, link_state); goto error; } -if (link_state ==USB_SS_PORT_LS_U3 ) { slot_id =xhci_find_slot_id_by_port (hcd, xhci, wIndex +1 );
drivers/usb/musb/Kconfig +4 -0
@@ -73,6 +73,8 @@ config USB_MUSB_DA8XX config USB_MUSB_TUSB6010 tristate "TUSB6010" + depends on ARCH_OMAP2PLUS || COMPILE_TEST + depends on NOP_USB_XCEIV = USB_MUSB_HDRC # both built-in or both modules config USB_MUSB_OMAP2PLUS tristate "OMAP2430 and onwards"
@@ -86,6 +88,7 @@ config USB_MUSB_AM35X config USB_MUSB_DSPS tristate "TI DSPS platforms" select USB_MUSB_AM335X_CHILD + depends on ARCH_OMAP2PLUS || COMPILE_TEST depends on OF_IRQ config USB_MUSB_BLACKFIN
@@ -94,6 +97,7 @@ config USB_MUSB_BLACKFIN config USB_MUSB_UX500 tristate "Ux500 platforms" + depends on ARCH_U8500 || COMPILE_TEST config USB_MUSB_JZ4740 tristate "JZ4740"
drivers/usb/musb/musb_cppi41.c +2 -2
@@ -629,9 +629,9 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller) ret =of_property_read_string_index (np,"dma-names" , i, &str);if (ret) goto err; -if (!strncmp (str,"tx" ,2 )) +if (strstarts (str,"tx" )) is_tx =1 ; -else if (!strncmp (str,"rx" ,2 )) +else if (strstarts (str,"rx" )) is_tx =0 ;else {dev_err (dev,"Wrong dmatype %s\n" , str);
drivers/usb/musb/musb_debugfs.c +8 -8
@@ -194,30 +194,30 @@ static ssize_t musb_test_mode_write(struct file *file,if (copy_from_user (&buf, ubuf,min_t (size_t,sizeof (buf) -1 , count)))return -EFAULT ; -if (!strncmp (buf,"force host" ,9 )) +if (strstarts (buf,"force host" )) test =MUSB_TEST_FORCE_HOST ; -if (!strncmp (buf,"fifo access" ,11 )) +if (strstarts (buf,"fifo access" )) test =MUSB_TEST_FIFO_ACCESS ; -if (!strncmp (buf,"force full-speed" ,15 )) +if (strstarts (buf,"force full-speed" )) test =MUSB_TEST_FORCE_FS ; -if (!strncmp (buf,"force high-speed" ,15 )) +if (strstarts (buf,"force high-speed" )) test =MUSB_TEST_FORCE_HS ; -if (!strncmp (buf,"test packet" ,10 )) { +if (strstarts (buf,"test packet" )) { test =MUSB_TEST_PACKET ;musb_load_testpacket (musb); } -if (!strncmp (buf,"test K" ,6 )) +if (strstarts (buf,"test K" )) test =MUSB_TEST_K ; -if (!strncmp (buf,"test J" ,6 )) +if (strstarts (buf,"test J" )) test =MUSB_TEST_J ; -if (!strncmp (buf,"test SE0 NAK" ,12 )) +if (strstarts (buf,"test SE0 NAK" )) test =MUSB_TEST_SE0_NAK ;musb_writeb (musb->mregs,MUSB_TESTMODE , test);
drivers/usb/serial/qcserial.c +34 -20
69 lines not on this page · raw message
drivers/usb/storage/unusual_uas.h +10 -0
@@ -40,6 +40,16 @@* and don't forget to CC: the USB development list <[email protected]> */ +/* +* Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI +* commands in UAS mode. Observed with the 1.28 firmware; are there others? +*/ +UNUSUAL_DEV (0x0984 ,0x0301 ,0x0128 ,0x0128 , +"Apricorn" , +"" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_IGNORE_UAS ), +/* https://bugzilla.kernel.org/show_bug.cgi?id=79511 */ UNUSUAL_DEV(0x0bc2, 0x2312, 0x0000, 0x9999, "Seagate",
drivers/video/fbdev/aty/atyfb.h +2 -1
@@ -335,6 +335,8 @@ extern const struct aty_pll_ops aty_pll_ct; /* Integrated */extern void aty_set_pll_ct (const struct fb_info *info,const union aty_pll *pll);extern u8 aty_ld_pll_ct (int offset,const struct atyfb_par *par); +extern const u8 aty_postdividers[8 ]; +/* * Hardware cursor support
@@ -361,7 +363,6 @@ static inline void wait_for_idle(struct atyfb_par *par)extern void aty_reset_engine (const struct atyfb_par *par);extern void aty_init_engine (struct atyfb_par *par,struct fb_info *info); -extern u8 aty_ld_pll_ct (int offset,const struct atyfb_par *par);void atyfb_copyarea (struct fb_info *info,const struct fb_copyarea *area);void atyfb_fillrect (struct fb_info *info,const struct fb_fillrect *rect);
drivers/video/fbdev/aty/atyfb_base.c +4 -3
@@ -3112,17 +3112,18 @@ static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,/* * PLL Reference Divider M: */ -M = pll_regs[2 ]; +M = pll_regs[PLL_REF_DIV ];/* * PLL Feedback Divider N (Dependent on CLOCK_CNTL): */ -N = pll_regs[7 + (clock_cntl &3 )]; +N = pll_regs[VCLK0_FB_DIV + (clock_cntl &3 )];/* * PLL Post Divider P (Dependent on CLOCK_CNTL): */ -P =1 << (pll_regs[6 ] >> ((clock_cntl &3 ) <<1 )); +P = aty_postdividers[((pll_regs[VCLK_POST_DIV ] >> ((clock_cntl &3 ) <<1 )) &3 ) | + ((pll_regs[PLL_EXT_CNTL ] >> (2 + (clock_cntl &3 ))) &4 )];/* * PLL Divider Q:
drivers/video/fbdev/aty/mach64_ct.c +5 -5
@@ -114,7 +114,7 @@ static void aty_st_pll_ct(int offset, u8 val, const struct atyfb_par *par)*/ #define Maximum_DSP_PRECISION 7 -static u8 postdividers[] = {1 ,2 ,4 ,8 ,3 }; +const u8 aty_postdividers[8 ] = {1 ,2 ,4 ,8 ,3 ,5 ,6 ,12 };static int aty_dsp_gt (const struct fb_info *info,u32 bpp,struct pll_ct *pll) {
@@ -221,7 +221,7 @@ static int aty_valid_pll_ct(const struct fb_info *info, u32 vclk_per, struct pll pll->vclk_post_div += (q <64 *8 ); pll->vclk_post_div += (q <32 *8 ); } - pll->vclk_post_div_real = postdividers[pll->vclk_post_div]; + pll->vclk_post_div_real = aty_postdividers[pll->vclk_post_div];// pll->vclk_post_div <<= 6; pll->vclk_fb_div = q * pll->vclk_post_div_real /8 ; pllvclk = (1000000 * 2 * pll->vclk_fb_div) /
@@ -512,7 +512,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll)u8 mclk_fb_div, pll_ext_cntl; pll->ct.pll_ref_div =aty_ld_pll_ct (PLL_REF_DIV , par); pll_ext_cntl =aty_ld_pll_ct (PLL_EXT_CNTL , par); - pll->ct.xclk_post_div_real = postdividers[pll_ext_cntl &0x07 ]; + pll->ct.xclk_post_div_real = aty_postdividers[pll_ext_cntl &0x07 ]; mclk_fb_div =aty_ld_pll_ct (MCLK_FB_DIV , par);if (pll_ext_cntl &PLL_MFB_TIMES_4_2B ) mclk_fb_div <<=1 ;
@@ -534,7 +534,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll) xpost_div += (q <64 *8 ); xpost_div += (q <32 *8 ); } - pll->ct.xclk_post_div_real = postdividers[xpost_div]; + pll->ct.xclk_post_div_real = aty_postdividers[xpost_div]; pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real /8 ;#ifdef CONFIG_PPC
@@ -583,7 +583,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll) mpost_div += (q <64 *8 ); mpost_div += (q <32 *8 ); } - sclk_post_div_real = postdividers[mpost_div]; + sclk_post_div_real = aty_postdividers[mpost_div]; pll->ct.sclk_fb_div = q * sclk_post_div_real /8 ; pll->ct.spll_cntl2 = mpost_div <<4 ;#ifdef DEBUG
drivers/video/fbdev/broadsheetfb.c +5 -3
@@ -636,7 +636,7 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par, err =broadsheet_spiflash_read_range (par, start_sector_addr, data_start_addr, sector_buffer);if (err) -return err; + goto out; }/* now we copy our data into the right place in the sector buffer */
@@ -657,7 +657,7 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par, err =broadsheet_spiflash_read_range (par, tail_start_addr, tail_len, sector_buffer + tail_start_addr);if (err) -return err; + goto out; }/* if we got here we have the full sector that we want to rewrite. */
@@ -665,11 +665,13 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,/* first erase the sector */ err =broadsheet_spiflash_erase_sector (par, start_sector_addr);if (err) -return err; + goto out;/* now write it */ err =broadsheet_spiflash_write_sector (par, start_sector_addr, sector_buffer, sector_size); +out: +kfree (sector_buffer);return err; }
fs/btrfs/file.c +6 -3
@@ -1879,6 +1879,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)struct btrfs_log_ctx ctx;int ret =0 ;bool full_sync =0 ; +const u64 len = end - start +1 ;trace_btrfs_sync_file (file, datasync);
@@ -1907,7 +1908,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)* all extents are persisted and the respective file extent * items are in the fs/subvol btree. */ - ret =btrfs_wait_ordered_range (inode, start, end - start +1 ); + ret =btrfs_wait_ordered_range (inode, start, len); }else {/* * Start any new ordered operations before starting to log the
@@ -1979,8 +1980,10 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)*/ smp_mb ();if (btrfs_inode_in_log (inode, root->fs_info->generation) || - (full_sync &&BTRFS_I (inode)->last_trans <= - root->fs_info->last_trans_committed)) { + (BTRFS_I (inode)->last_trans <= + root->fs_info->last_trans_committed && + (full_sync || + !btrfs_have_ordered_extents_in_range (inode, start, len)))) {/* * We'v had everything committed since the last time we were * modified so clear this flag in case it was set for whatever
fs/btrfs/ordered-data.c +14 -0
@@ -848,6 +848,20 @@ out:return entry; } +bool btrfs_have_ordered_extents_in_range (struct inode *inode, +u64 file_offset, +u64 len) +{ +struct btrfs_ordered_extent *oe; + + oe =btrfs_lookup_ordered_range (inode, file_offset, len); +if (oe) { +btrfs_put_ordered_extent (oe); +return true; + } +return false; +} +/* * lookup and return any extent before 'file_offset'. NULL is returned * if none is found
fs/btrfs/ordered-data.h +3 -0
@@ -191,6 +191,9 @@ btrfs_lookup_first_ordered_extent(struct inode * inode, u64 file_offset);struct btrfs_ordered_extent *btrfs_lookup_ordered_range (struct inode *inode,u64 file_offset,u64 len); +bool btrfs_have_ordered_extents_in_range (struct inode *inode, +u64 file_offset, +u64 len);int btrfs_ordered_update_i_size (struct inode *inode,u64 offset,struct btrfs_ordered_extent *ordered); int btrfs_find_ordered_sum(struct inode *inode, u64 offset, u64 disk_bytenr,
fs/btrfs/xattr.c +6 -2
@@ -111,6 +111,8 @@ static int do_setxattr(struct btrfs_trans_handle *trans, name, name_len, -1);if (!di && (flags &XATTR_REPLACE )) ret = -ENODATA ; +else if (IS_ERR (di)) + ret =PTR_ERR (di);else if (di) ret =btrfs_delete_one_dir_name (trans, root, path, di); goto out;
@@ -127,10 +129,12 @@ static int do_setxattr(struct btrfs_trans_handle *trans,ASSERT (mutex_is_locked (&inode->i_mutex)); di =btrfs_lookup_xattr (NULL , root, path,btrfs_ino (inode), name, name_len,0 ); -if (!di) { +if (!di) ret = -ENODATA ; +else if (IS_ERR (di)) + ret =PTR_ERR (di); +if (ret) goto out; - }btrfs_release_path (path); di =NULL ; }
fs/cachefiles/namei.c +1 -1
@@ -317,7 +317,7 @@ try_again: trap =lock_rename (cache->graveyard, dir);/* do some checks before getting the grave dentry */ -if (rep->d_parent != dir) { +if (rep->d_parent != dir ||IS_DEADDIR (d_inode (rep))) {/* the entry was probably culled when we dropped the parent dir * lock */ unlock_rename (cache->graveyard, dir);
fs/ext4/extents.c +8 -0
@@ -5400,6 +5400,14 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)loff_t new_size, ioffset;int ret; +/* +* We need to test this early because xfstests assumes that a +* collapse range of (0, 1) will return EOPNOTSUPP if the file +* system does not support collapse range. +*/ +if (!ext4_test_inode_flag (inode,EXT4_INODE_EXTENTS )) +return -EOPNOTSUPP ; +/* Collapse range works only on fs block size aligned offsets. */ if (offset & (EXT4_CLUSTER_SIZE (sb) -1 ) || len & (EXT4_CLUSTER_SIZE (sb) -1 ))
fs/fat/fatent.c +1 -0
@@ -684,6 +684,7 @@ int fat_count_free_clusters(struct super_block *sb)if (ops->ent_get (&fatent) ==FAT_ENT_FREE ) free++; }while (fat_ent_next (sbi, &fatent)); +cond_resched (); } sbi->free_clusters = free; sbi->free_clus_valid =1 ;
fs/nfs/callback.c +3 -3
@@ -128,7 +128,7 @@ nfs41_callback_svc(void *vrqstp)if (try_to_freeze ())continue ; -prepare_to_wait (&serv->sv_cb_waitq, &wq,TASK_UNINTERRUPTIBLE ); +prepare_to_wait (&serv->sv_cb_waitq, &wq,TASK_INTERRUPTIBLE );spin_lock_bh (&serv->sv_cb_lock);if (!list_empty (&serv->sv_cb_list)) { req = list_first_entry(&serv->sv_cb_list,
@@ -142,10 +142,10 @@ nfs41_callback_svc(void *vrqstp) error); }else {spin_unlock_bh (&serv->sv_cb_lock); -/* schedule_timeout to game the hung task watchdog */ -schedule_timeout (60 *HZ ); +schedule ();finish_wait (&serv->sv_cb_waitq, &wq); } +flush_signals (current); }return 0 ; }
fs/nfs/nfs4client.c +19 -6
@@ -228,6 +228,7 @@ static void nfs4_shutdown_client(struct nfs_client *clp)kfree (clp->cl_serverowner);kfree (clp->cl_serverscope);kfree (clp->cl_implid); +kfree (clp->cl_owner_id); }void nfs4_free_client (struct nfs_client *clp)
@@ -455,6 +456,14 @@ static void nfs4_swap_callback_idents(struct nfs_client *keep,spin_unlock (&nn->nfs_client_lock); } +static bool nfs4_match_client_owner_id (const struct nfs_client *clp1, +const struct nfs_client *clp2) +{ +if (clp1->cl_owner_id ==NULL || clp2->cl_owner_id ==NULL ) +return true; +return strcmp (clp1->cl_owner_id, clp2->cl_owner_id) ==0 ; +} +/** * nfs40_walk_client_list - Find server that recognizes a client ID *
@@ -486,9 +495,6 @@ int nfs40_walk_client_list(struct nfs_client *new,if (pos->rpc_ops != new->rpc_ops)continue ; -if (pos->cl_proto != new->cl_proto) -continue ; -if (pos->cl_minorversion != new->cl_minorversion)continue ;
@@ -514,6 +520,9 @@ int nfs40_walk_client_list(struct nfs_client *new,if (pos->cl_clientid != new->cl_clientid)continue ; +if (!nfs4_match_client_owner_id (pos, new)) +continue ; +atomic_inc (&pos->cl_count);spin_unlock (&nn->nfs_client_lock);
@@ -621,9 +630,6 @@ int nfs41_walk_client_list(struct nfs_client *new,if (pos->rpc_ops != new->rpc_ops)continue ; -if (pos->cl_proto != new->cl_proto) -continue ; -if (pos->cl_minorversion != new->cl_minorversion)continue ;
@@ -663,6 +669,13 @@ int nfs41_walk_client_list(struct nfs_client *new,if (!nfs4_check_clientid_trunking (pos, new))continue ; +/* Unlike NFSv4.0, we know that NFSv4.1 always uses the +* uniform string, however someone might switch the +* uniquifier string on us. +*/ +if (!nfs4_match_client_owner_id (pos, new)) +continue ; +atomic_inc (&pos->cl_count); *result = pos; status =0 ;
fs/nfs/nfs4proc.c +15 -6
@@ -1117,8 +1117,6 @@ static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode)return 0 ;if ((delegation->type & fmode) != fmode)return 0 ; -if (test_bit (NFS_DELEGATION_NEED_RECLAIM , &delegation->flags)) -return 0 ;if (test_bit (NFS_DELEGATION_RETURNING , &delegation->flags))return 0 ;nfs_mark_delegation_referenced (delegation);
@@ -4913,11 +4911,14 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp, }static unsigned int -nfs4_init_nonuniform_client_string (const struct nfs_client *clp, +nfs4_init_nonuniform_client_string (struct nfs_client *clp,char *buf,size_t len) {unsigned int result; +if (clp->cl_owner_id !=NULL ) +return strlcpy (buf, clp->cl_owner_id, len); +rcu_read_lock (); result = scnprintf(buf, len, "Linux NFSv4.0 %s/%s %s", clp->cl_ipaddr,
@@ -4926,24 +4927,32 @@ nfs4_init_nonuniform_client_string(const struct nfs_client *clp,rpc_peeraddr2str (clp->cl_rpcclient, RPC_DISPLAY_PROTO));rcu_read_unlock (); + clp->cl_owner_id =kstrdup (buf,GFP_KERNEL );return result; }static unsigned int -nfs4_init_uniform_client_string (const struct nfs_client *clp, +nfs4_init_uniform_client_string (struct nfs_client *clp,char *buf,size_t len) {const char *nodename = clp->cl_rpcclient->cl_nodename; +unsigned int result; + +if (clp->cl_owner_id !=NULL ) +return strlcpy (buf, clp->cl_owner_id, len);if (nfs4_client_id_uniquifier[0 ] !='\0' ) -return scnprintf (buf, len,"Linux NFSv%u.%u %s/%s" , + result =scnprintf (buf, len,"Linux NFSv%u.%u %s/%s" , clp->rpc_ops->version, clp->cl_minorversion, nfs4_client_id_uniquifier, nodename); -return scnprintf (buf, len,"Linux NFSv%u.%u %s" , +else + result =scnprintf (buf, len,"Linux NFSv%u.%u %s" , clp->rpc_ops->version, clp->cl_minorversion, nodename); + clp->cl_owner_id =kstrdup (buf,GFP_KERNEL ); +return result; }/*
fs/ocfs2/alloc.c +9 -9
@@ -6871,7 +6871,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode,if (IS_ERR (handle)) { ret =PTR_ERR (handle);mlog_errno (ret); - goto out_unlock; + goto out; } ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
@@ -6929,7 +6929,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode,if (ret) {mlog_errno (ret); need_free =1 ; - goto out_commit; + goto out_unlock; } page_end =PAGE_CACHE_SIZE ;
@@ -6962,12 +6962,16 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode,if (ret) {mlog_errno (ret); need_free =1 ; - goto out_commit; + goto out_unlock; } inode->i_blocks =ocfs2_inode_sector_count (inode); } +out_unlock: +if (pages) +ocfs2_unlock_and_free_pages (pages, num_pages); + out_commit:if (ret <0 && did_quota) dquot_free_space_nodirty(inode,
@@ -6987,15 +6991,11 @@ out_commit:ocfs2_commit_trans (osb, handle); -out_unlock: +out:if (data_ac)ocfs2_free_alloc_context (data_ac); - -out: -if (pages) { -ocfs2_unlock_and_free_pages (pages, num_pages); +if (pages)kfree (pages); - }return ret; }
fs/overlayfs/inode.c +3 -0
@@ -377,6 +377,9 @@ struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags)ovl_path_upper (dentry, &realpath); } +if (realpath.dentry->d_flags &DCACHE_OP_SELECT_INODE ) +return realpath.dentry->d_op->d_select_inode (realpath.dentry, file_flags); +return d_backing_inode (realpath.dentry); }
fs/quota/quota_v2.c +8 -4
@@ -117,12 +117,16 @@ static int v2_read_file_info(struct super_block *sb, int type) qinfo = info->dqi_priv;if (version ==0 ) {/* limits are stored as unsigned 32-bit data */ - info->dqi_max_spc_limit =0xffffffffULL <<QUOTABLOCK_BITS ; + info->dqi_max_spc_limit =0xffffffffLL <<QUOTABLOCK_BITS ; info->dqi_max_ino_limit =0xffffffff ; }else { -/* used space is stored as unsigned 64-bit value in bytes */ - info->dqi_max_spc_limit =0xffffffffffffffffULL ;/* 2^64-1 */ - info->dqi_max_ino_limit =0xffffffffffffffffULL ; +/* +* Used space is stored as unsigned 64-bit value in bytes but +* quota core supports only signed 64-bit values so use that +* as a limit +*/ + info->dqi_max_spc_limit =0x7fffffffffffffffLL ;/* 2^63-1 */ + info->dqi_max_ino_limit =0x7fffffffffffffffLL ; } info->dqi_bgrace =le32_to_cpu (dinfo.dqi_bgrace); info->dqi_igrace =le32_to_cpu (dinfo.dqi_igrace);
fs/splice.c +7 -0
@@ -809,6 +809,13 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des*/ static int splice_from_pipe_next (struct pipe_inode_info *pipe,struct splice_desc *sd) { +/* +* Check for signal early to make process killable when there are +* always buffers available +*/ +if (signal_pending (current)) +return -ERESTARTSYS ; +while (!pipe->nrbufs) {if (!pipe->writers)return 0 ;
include/linux/compiler-gcc.h +15 -1
@@ -9,10 +9,24 @@ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) -/* Optimization barrier */ +/* The "volatile" is due to gcc bugs */ #define barrier () __asm__ __volatile__("": : :"memory") +/* +* This version is i.e. to prevent dead stores elimination on @ptr +* where gcc and llvm may behave differently when otherwise using +* normal barrier(): while gcc behavior gets along with a normal +* barrier(), llvm needs an explicit input variable to be assumed +* clobbered. The issue is as follows: while the inline asm might +* access any memory it wants, the compiler could have fit all of +* @ptr into memory registers instead, and since @ptr never escaped +* from that, it proofed that the inline asm wasn't touching any of +* it. This version works well with both compilers, i.e. we're telling +* the compiler that the inline asm absolutely may see the contents +* of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495 +*/ +#define barrier_data (ptr) __asm__ __volatile__("": :"r"(ptr) :"memory")/* * This macro obfuscates arithmetic on a variable address so that gcc
include/linux/compiler-intel.h +3 -0
@@ -13,9 +13,12 @@/* Intel ECC compiler doesn't support gcc specific asm stmts. * It uses intrinsics to do the equivalent things. */ +#undef barrier_data#undef RELOC_HIDE#undef OPTIMIZER_HIDE_VAR +#define barrier_data (ptr) barrier() +#define RELOC_HIDE (ptr, off) \ ({ unsigned long __ptr; \ __ptr = (unsigned long) (ptr); \
include/linux/compiler.h +4 -0
@@ -165,6 +165,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);# define barrier () __memory_barrier()#endif +#ifndef barrier_data +# define barrier_data (ptr) barrier() +#endif +/* Unreachable code */ #ifndef unreachable# define unreachable () do { } while (1)
include/linux/nfs_fs_sb.h +3 -0
@@ -74,6 +74,9 @@ struct nfs_client {/* idmapper */ struct idmap * cl_idmap; +/* Client owner identifier */ +const char * cl_owner_id; +/* Our own IP address, as a null-terminated string. * This is used to generate the mv0 callback address. */
include/linux/phy/omap_control_phy.h +3 -3
@@ -66,7 +66,7 @@ enum omap_control_usb_mode {#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0#define OMAP_CTRL_PCIE_PCS_MASK 0xff -#define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 0x8 +#define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 16#define OMAP_CTRL_USB2_PHY_PD BIT(28)
@@ -79,7 +79,7 @@ enum omap_control_usb_mode {void omap_control_phy_power (struct device *dev,int on);void omap_control_usb_set_mode (struct device *dev,enum omap_control_usb_mode mode); -void omap_control_pcie_pcs (struct device *dev,u8 id,u8 delay); +void omap_control_pcie_pcs (struct device *dev,u8 delay);#else static inline void omap_control_phy_power (struct device *dev,int on)
@@ -91,7 +91,7 @@ static inline void omap_control_usb_set_mode(struct device *dev, { } -static inline void omap_control_pcie_pcs (struct device *dev,u8 id,u8 delay) +static inline void omap_control_pcie_pcs (struct device *dev,u8 delay) { }#endif
include/linux/tty.h +3 -3
@@ -587,7 +587,7 @@ extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops);/* tty_audit.c */ #ifdef CONFIG_AUDIT -extern void tty_audit_add_data (struct tty_struct *tty,unsigned char *data, +extern void tty_audit_add_data (struct tty_struct *tty,const void *data,size_t size,unsigned icanon);extern void tty_audit_exit (void );extern void tty_audit_fork (struct signal_struct *sig);
@@ -595,8 +595,8 @@ extern void tty_audit_tiocsti(struct tty_struct *tty, char ch);extern void tty_audit_push (struct tty_struct *tty);extern int tty_audit_push_current (void );#else -static inline void tty_audit_add_data (struct tty_struct *tty, -unsigned char *data,size_t size,unsigned icanon) +static inline void tty_audit_add_data (struct tty_struct *tty,const void *data, +size_t size,unsigned icanon) { }static inline void tty_audit_tiocsti (struct tty_struct *tty,char ch)
include/net/af_unix.h +2 -2
@@ -6,8 +6,8 @@#include <linux/mutex.h> #include <net/sock.h> -void unix_inflight (struct file *fp); -void unix_notinflight (struct file *fp); +void unix_inflight (struct user_struct *user,struct file *fp); +void unix_notinflight (struct user_struct *user,struct file *fp);void unix_gc (void );void wait_for_unix_gc (void );struct sock *unix_get_socket (struct file *filp);
include/net/scm.h +1 -0
@@ -21,6 +21,7 @@ struct scm_creds {struct scm_fp_list {short count;short max; +struct user_struct *user;struct file *fp[SCM_MAX_FD ]; };
include/net/sock.h +1 -1
@@ -379,8 +379,8 @@ struct sock { sk_no_check_rx : 1, sk_userlocks : 4, sk_protocol : 8, -#define SK_PROTOCOL_MAX U8_MAX sk_type : 16; +#define SK_PROTOCOL_MAX U8_MAXkmemcheck_bitfield_end (flags);int sk_wmem_queued;gfp_t sk_allocation;
kernel/events/core.c +10 -1
@@ -3929,7 +3929,14 @@ retry: goto retry; } -__perf_event_period (&pe); +if (event->attr.freq) { + event->attr.sample_freq = value; + }else { + event->attr.sample_period = value; + event->hw.sample_period = value; + } + +local64_set (&event->hw.period_left,0 );raw_spin_unlock_irq (&ctx->lock);return 0 ;
@@ -6351,6 +6358,8 @@ void perf_tp_event(u64 addr, u64 count, void *record, int entry_size, goto unlock;list_for_each_entry_rcu (event, &ctx->event_list, event_entry) { +if (event->cpu !=smp_processor_id ()) +continue ;if (event->attr.type !=PERF_TYPE_TRACEPOINT )continue ;if (event->attr.config != entry->type)
kernel/rcu/tree_plugin.h +1 -0
@@ -328,6 +328,7 @@ void rcu_read_unlock_special(struct task_struct *t) special = t->rcu_read_unlock_special;if (special.b.need_qs) {rcu_preempt_qs (); + t->rcu_read_unlock_special.b.need_qs = false;if (!t->rcu_read_unlock_special.s) {local_irq_restore (flags);return ;
kernel/resource.c +11 -2
@@ -104,16 +104,25 @@ static int r_show(struct seq_file *m, void *v) {struct resource *root = m->private;struct resource *r = v, *p; +unsigned long long start, end;int width = root->end <0x10000 ?4 :8 ;int depth;for (depth =0 , p = r; depth <MAX_IORES_LEVEL ; depth++, p = p->parent)if (p->parent == root)break ; + +if (file_ns_capable (m->file, &init_user_ns,CAP_SYS_ADMIN )) { + start = r->start; + end = r->end; + }else { + start = end =0 ; + } +seq_printf (m,"%*s%0*llx-%0*llx : %s\n" , depth *2 ,"" , - width, (unsigned long long ) r->start, - width, (unsigned long long ) r->end, + width, start, + width, end, r->name ? r->name :"<BAD>" );return 0 ; }
kernel/sched/fair.c +20 -3
@@ -3416,9 +3416,14 @@ static void throttle_cfs_rq(struct cfs_rq *cfs_rq)raw_spin_lock (&cfs_b->lock);/* * Add to the _head_ of the list, so that an already-started -* distribute_cfs_runtime will not see us +* distribute_cfs_runtime will not see us. If disribute_cfs_runtime is +* not running add to the tail so that later runqueues don't get starved. */ -list_add_rcu (&cfs_rq->throttled_list, &cfs_b->throttled_cfs_rq); +if (cfs_b->distribute_running) +list_add_rcu (&cfs_rq->throttled_list, &cfs_b->throttled_cfs_rq); +else +list_add_tail_rcu (&cfs_rq->throttled_list, &cfs_b->throttled_cfs_rq); +if (!cfs_b->timer_active)__start_cfs_bandwidth (cfs_b, false);raw_spin_unlock (&cfs_b->lock);
@@ -3562,14 +3567,16 @@ static int do_sched_cfs_period_timer(struct cfs_bandwidth *cfs_b, int overrun)* in us over-using our runtime if it is all used during this loop, but * only by limited amounts in that extreme case. */ -while (throttled && cfs_b->runtime >0 ) { +while (throttled && cfs_b->runtime >0 && !cfs_b->distribute_running) { runtime = cfs_b->runtime; + cfs_b->distribute_running =1 ;raw_spin_unlock (&cfs_b->lock);/* we can't nest cfs_b->lock while distributing bandwidth */ runtime =distribute_cfs_runtime (cfs_b, runtime, runtime_expires);raw_spin_lock (&cfs_b->lock); + cfs_b->distribute_running =0 ; throttled = !list_empty (&cfs_b->throttled_cfs_rq); cfs_b->runtime -=min (runtime, cfs_b->runtime);
@@ -3680,6 +3687,11 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b)/* confirm we're still not at a refresh boundary */ raw_spin_lock (&cfs_b->lock); +if (cfs_b->distribute_running) { +raw_spin_unlock (&cfs_b->lock); +return ; + } +if (runtime_refresh_within (cfs_b, min_bandwidth_expiration)) {raw_spin_unlock (&cfs_b->lock);return ;
@@ -3689,6 +3701,9 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b) runtime = cfs_b->runtime; expires = cfs_b->runtime_expires; +if (runtime) + cfs_b->distribute_running =1 ; +raw_spin_unlock (&cfs_b->lock);if (!runtime)
@@ -3699,6 +3714,7 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b)raw_spin_lock (&cfs_b->lock);if (expires == cfs_b->runtime_expires) cfs_b->runtime -=min (runtime, cfs_b->runtime); + cfs_b->distribute_running =0 ;raw_spin_unlock (&cfs_b->lock); }
@@ -3790,6 +3806,7 @@ void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) cfs_b->period_timer.function = sched_cfs_period_timer;hrtimer_init (&cfs_b->slack_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); cfs_b->slack_timer.function = sched_cfs_slack_timer; + cfs_b->distribute_running =0 ; }static void init_cfs_rq_runtime (struct cfs_rq *cfs_rq)
kernel/sched/sched.h +2 -0
@@ -202,6 +202,8 @@ struct cfs_bandwidth {/* statistics */ int nr_periods, nr_throttled;u64 throttled_time; + +bool distribute_running;#endif };
kernel/trace/trace_events.c +55 -14
91 lines not on this page · raw message
lib/string.c +1 -1
@@ -699,7 +699,7 @@ EXPORT_SYMBOL(memset);void memzero_explicit (void *s,size_t count) {memset (s,0 , count); -barrier (); +barrier_data (s); }EXPORT_SYMBOL (memzero_explicit);
mm/huge_memory.c +5 -1
@@ -1462,7 +1462,7 @@ int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma,spinlock_t *old_ptl, *new_ptl;int ret =0 ;pmd_t pmd; - +bool force_flush = false;struct mm_struct *mm = vma->vm_mm; if ((old_addr & ~HPAGE_PMD_MASK) ||
@@ -1490,6 +1490,8 @@ int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma,if (new_ptl != old_ptl)spin_lock_nested (new_ptl,SINGLE_DEPTH_NESTING ); pmd =pmdp_get_and_clear (mm, old_addr, old_pmd); +if (pmd_present (pmd)) + force_flush = true;VM_BUG_ON (!pmd_none (*new_pmd));if (pmd_move_must_withdraw (new_ptl, old_ptl)) {
@@ -1498,6 +1500,8 @@ int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma,pgtable_trans_huge_deposit (mm, new_pmd, pgtable); }set_pmd_at (mm, new_addr, new_pmd,pmd_mksoft_dirty (pmd)); +if (force_flush) +flush_tlb_range (vma, old_addr, old_addr +PMD_SIZE );if (new_ptl != old_ptl)spin_unlock (new_ptl);spin_unlock (old_ptl);
mm/migrate.c +1 -1
@@ -1077,7 +1077,7 @@ out:if (rc !=MIGRATEPAGE_SUCCESS && put_new_page)put_new_page (new_hpage, private);else -put_page (new_hpage); +putback_active_hugepage (new_hpage);if (result) {if (rc)
mm/mremap.c +16 -5
@@ -97,6 +97,8 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,struct mm_struct *mm = vma->vm_mm;pte_t *old_pte, *new_pte, pte;spinlock_t *old_ptl, *new_ptl; +bool force_flush = false; +unsigned long len = old_end - old_addr;/* * When need_rmap_locks is true, we take the i_mmap_mutex and anon_vma
@@ -143,12 +145,26 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,if (pte_none (*old_pte))continue ; pte =ptep_get_and_clear (mm, old_addr, old_pte);
Lines of this file are not shown. View the raw message.
tools/testing/selftests/efivarfs/config new file +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/tc-testing/tdc_batch.py new file +62 -0
62 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.