Linux 4.14.34
Greg KH
maintainerI'm announcing the release of the 4.14.34 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/ls1021a.dtsi | 2 arch/arm64/crypto/Makefile | 2 arch/arm64/crypto/aes-ce-cipher.c | 281 -------------- arch/arm64/crypto/aes-ce-core.S | 87 ++++ arch/arm64/crypto/aes-ce-glue.c | 190 +++++++++ arch/x86/include/asm/microcode.h | 10 arch/x86/include/asm/processor.h | 1 arch/x86/kernel/aperture_64.c | 46 ++ arch/x86/kernel/cpu/common.c | 30 + arch/x86/kernel/cpu/microcode/amd.c | 44 +- arch/x86/kernel/cpu/microcode/core.c | 181 ++++++--- arch/x86/kernel/cpu/microcode/intel.c | 62 ++- arch/x86/xen/mmu_hvm.c | 2 block/bfq-cgroup.c | 7 block/blk-mq.c | 29 + crypto/Makefile | 1 drivers/acpi/acpi_video.c | 14 drivers/acpi/ec.c | 2 drivers/acpi/ec_sys.c | 2 drivers/acpi/internal.h | 2 drivers/bluetooth/btusb.c | 1 drivers/char/tpm/tpm-interface.c | 28 - drivers/char/tpm/tpm.h | 5 drivers/clk/clk-divider.c | 7 drivers/clk/hisilicon/clkdivider-hi6220.c | 2 drivers/clk/meson/clk-mpll.c | 2 drivers/clk/nxp/clk-lpc32xx.c | 2 drivers/clk/qcom/clk-regmap-divider.c | 2 drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 4 drivers/clk/sunxi-ng/ccu_div.c | 2 drivers/cpufreq/powernv-cpufreq.c | 37 + drivers/devfreq/devfreq.c | 3 drivers/edac/mv64x60_edac.c | 2 drivers/gpio/gpio-thunderx.c | 4 drivers/gpio/gpiolib.c | 3 drivers/gpu/drm/msm/dsi/pll/dsi_pll_14nm.c | 2 drivers/hwmon/ina2xx.c | 87 ++-- drivers/infiniband/core/cma.c | 1 drivers/infiniband/core/ucma.c | 7 drivers/infiniband/hw/i40iw/i40iw_cm.c | 5 drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 6 drivers/infiniband/hw/i40iw/i40iw_d.h | 1 drivers/infiniband/hw/i40iw/i40iw_puda.c | 2 drivers/infiniband/sw/rdmavt/cq.c | 10 drivers/input/touchscreen/goodix.c | 8 drivers/irqchip/irq-gic-v3.c | 11 drivers/md/bcache/alloc.c | 19 drivers/md/bcache/request.c | 22 + drivers/md/bcache/super.c | 6 drivers/media/v4l2-core/videobuf2-core.c | 4 drivers/mmc/host/sdhci-pci-core.c | 2 drivers/mmc/host/sdhci.c | 7 drivers/mtd/tests/oobtest.c | 21 + drivers/net/bonding/bond_main.c | 73 +-- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 23 - drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 17 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 13 drivers/net/ethernet/ibm/ibmvnic.c | 6 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 20 drivers/net/ethernet/marvell/sky2.c | 2 drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 77 ++- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 33 - drivers/net/ethernet/mellanox/mlx4/en_main.c | 4 drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 7 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 26 - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 18 drivers/net/ethernet/mellanox/mlx5/core/vport.c | 33 + drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 9 drivers/net/ethernet/realtek/r8169.c | 4 drivers/net/ppp/pptp.c | 1 drivers/net/team/team.c | 12 drivers/net/usb/lan78xx.c | 23 + drivers/net/vrf.c | 5 drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 22 - drivers/net/wireless/ti/wl1251/main.c | 3 drivers/nvme/target/fcloop.c | 47 +- drivers/pinctrl/intel/pinctrl-baytrail.c | 6 drivers/power/supply/axp288_charger.c | 13 drivers/rtc/rtc-ac100.c | 6 drivers/scsi/libiscsi.c | 24 + drivers/scsi/libsas/sas_expander.c | 4 drivers/scsi/megaraid/megaraid_sas_base.c | 2 drivers/scsi/megaraid/megaraid_sas_fp.c | 16 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 28 - drivers/spi/spi-sh-msiof.c | 12 drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 13 drivers/target/target_core_user.c | 7 drivers/thermal/int340x_thermal/int3400_thermal.c | 10 drivers/thermal/power_allocator.c | 2 drivers/tty/n_gsm.c | 17 drivers/uio/uio_hv_generic.c | 7 drivers/vhost/net.c | 4 drivers/vhost/vhost.c | 17 drivers/video/backlight/corgi_lcd.c | 2 drivers/video/backlight/tdo24m.c | 2 drivers/video/backlight/tosa_lcd.c | 2 drivers/video/fbdev/vfb.c | 17 drivers/watchdog/dw_wdt.c | 18 fs/dcache.c | 23 - include/linux/clk-provider.h | 2 include/linux/mlx5/driver.h | 2 net/8021q/vlan_dev.c | 6 net/core/dev.c | 4 net/ipv4/arp.c | 2 net/ipv4/fib_semantics.c | 20 net/ipv4/ip_tunnel.c | 11 net/ipv6/ip6_gre.c | 8 net/ipv6/ip6_output.c | 28 + net/ipv6/ip6_tunnel.c | 11 net/ipv6/ip6_vti.c | 7 net/ipv6/route.c | 3 net/ipv6/seg6_iptunnel.c | 16 net/ipv6/sit.c | 8 net/l2tp/l2tp_netlink.c | 2 net/mac80211/cfg.c | 28 + net/mac80211/driver-ops.h | 3 net/netlink/af_netlink.c | 3 net/rds/bind.c | 1 net/sched/act_api.c | 4 net/sched/act_bpf.c | 12 net/sched/act_skbmod.c | 3 net/sched/act_tunnel_key.c | 9 net/sctp/ipv6.c | 4 net/sctp/socket.c | 13 net/strparser/strparser.c | 4 sound/soc/intel/atom/sst/sst_stream.c | 2 sound/soc/intel/boards/cht_bsw_rt5645.c | 7 sound/soc/intel/skylake/skl-messages.c | 4 sound/soc/intel/skylake/skl-pcm.c | 4 tools/objtool/check.c | 11 tools/perf/arch/powerpc/util/sym-handling.c | 8 tools/perf/builtin-record.c | 4 tools/perf/builtin-report.c | 18 tools/perf/util/evsel.c | 47 ++ tools/perf/util/probe-event.c | 28 + tools/perf/util/symbol.c | 5 tools/perf/util/symbol.h | 1 tools/perf/util/util.c | 2 tools/testing/selftests/net/msg_zerocopy.c | 21 - 144 files changed, 1662 insertions(+), 782 deletions(-)
Alexander Potapenko (1):
netlink: make sure nladdr has correct size in netlink_connect()
Alexey Khoroshilov (1):
thermal: int3400_thermal: fix error handling in int3400_thermal_probe()
Andy Shevchenko (1):
sdhci: Advertise 2.0v supply on SDIO host controller
Ard Biesheuvel (1):
crypto: arm64/aes-ce-cipher - move assembler code to .S file
Arjun Vynipadath (1):
cxgb4vf: Fix SGE FL buffer initialization logic for 64K pages
Arnd Bergmann (1):
crypto: aes-generic - build with -Os on gcc-7+
Ashok Raj (4):
x86/microcode/intel: Check microcode revision before updating sibling threads x86/microcode/intel: Writeback and invalidate caches before updating microcode x86/microcode: Do not upload microcode if CPUs are offline x86/microcode: Synchronize late microcode loading
Borislav Petkov (8):
x86/microcode: Propagate return value from updating functions x86/CPU: Add a microcode loader callback
x86/CPU: Check CPU feature bits after microcode upgrade x86/microcode: Get rid of struct apply_microcode_ctx x86/microcode/intel: Look into the patch cache first x86/microcode: Request microcode on the BSP
x86/microcode: Attempt late loading only when new microcode is present x86/microcode: Fix CPU synchronization routine
Chaitra P B (1):
scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag.
Christophe JAILLET (2):
ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()' EDAC, mv64x60: Fix an error handling path
Colin Ian King (1):
wl1251: check return from call to wl1251_acx_arp_ip_filter
Craig Dillabaugh (1):
net sched actions: fix dumping which requires several messages to user space
Daniel Jurgens (1):
net/mlx5: Fix race for multiple RoCE enable
Dave Watson (1):
strparser: Fix sign of err codes
David Ahern (2):
net/ipv6: Fix route leaking between VRFs
vrf: Fix use after free and double free in vrf_finish_output
David Lebrun (1):
ipv6: sr: fix seg6 encap performances with TSO enabled
Davide Caratti (3):
net/sched: fix NULL dereference in the error path of tcf_bpf_init() net/sched: fix NULL dereference in the error path of tunnel_key_init() net/sched: fix NULL dereference on the error path of tcf_skbmod_init()
Dirk van der Merwe (1):
nfp: use full 40 bits of the NSP buffer address
Eran Ben Elisha (1):
net/mlx4_en: Fix mixed PFC and Global pause user control requests
Eric Dumazet (10):
net: fix possible out-of-bound read in skb_network_protocol()
pptp: remove a buggy dst release in pptp_connect()
sctp: do not leak kernel memory to user space
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
net: fool proof dev_valid_name()
ip_tunnel: better validate user provided tunnel names
ipv6: sit: better validate user provided tunnel names
ip6_gre: better validate user provided tunnel names
ip6_tunnel: better validate user provided tunnel names
vti6: better validate user provided tunnel names
Fuyun Liang (2):
net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg
net: hns3: fix for changing MTU
Gautham R. Shenoy (1):
powernv-cpufreq: Add helper to extract pstate from PMSR
Geert Uytterhoeven (2):
spi: sh-msiof: Fix timeout failures for TX-only DMA transfers
ACPI: EC: Fix debugfs_create_*() usage
Greg Kroah-Hartman (1):
Linux 4.14.34
Gustavo A. R. Silva (1):
PM / devfreq: Fix potential NULL pointer dereference in governor_store
Hangbin Liu (2):
l2tp: fix missing print session offset info
vlan: also check phy_driver ts_info for vlan's real device
Hans de Goede (5):
ACPI / video: Default lcd_only to true on Win8-ready and newer machines
ASoC: Intel: cht_bsw_rt5645: Analog Mic support
pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts
power: supply: axp288_charger: Properly stop work on probe-error / remove
Input: goodix - disable IRQs while suspended
Heiner Kallweit (1):
r8169: fix setting driver_data after register_netdev
Ioan Moldovan (1):
Bluetooth: Add a new 04ca:3015 QCA_ROME device
Jacob Keller (1):
i40evf: don't rely on netif_running() outside rtnl_lock()
James Smart (2):
nvme_fcloop: disassocate local port structs
nvme_fcloop: fix abort race condition
Jason Wang (3):
vhost: correctly remove wait queue during poll failure
vhost: validate log when IOTLB is enabled
vhost_net: add missing lock nesting notation
Jason Yan (2):
scsi: libsas: fix memory leak in sas_smp_get_phy_events()
scsi: libsas: fix error when getting phy events
Javier Martinez Canillas (1):
tpm: return a TPM_RC_COMMAND_CODE response if command is not implemented
Jeff Barnhill (1):
net/ipv6: Increment OUTxxx counters after netfilter hook
Jernej Škrabec (1):
clk: sunxi-ng: a83t: Add M divider to TCON1 clock
Jerome Brunet (1):
clk: divider: fix incorrect usage of container_of
Jian Shen (3):
net: hns3: Fix an error of total drop packet statistics
net: hns3: Fix a loop index error of tqp statistics query
net: hns3: Fix an error macro definition of HNS3_TQP_STAT
Jianbo Liu (2):
net/mlx5e: Fix memory usage issues in offloading TC flows net/mlx5e: Don't override vport admin link state in switchdev mode
Jin Yao (1):
perf report: Fix a no annotate browser displayed issue
Jiri Bohac (1):
x86/gart: Exclude GART aperture from vmcore
Jiri Olsa (1):
perf tools: Fix copyfile_offset update of output offset
Josh Poimboeuf (1):
objtool: Add Clang support
Kai-Heng Feng (1):
sky2: Increase D3 delay to sky2 stops working after suspend
Leon Romanovsky (1):
RDMA/cma: Mark end of CMA ID messages
Linus Walleij (1):
gpio: label descriptors using the device name
Maciej Purski (1):
hwmon: (ina2xx) Make calibration register value fixed
Martin Blumenstingl (1):
clk: meson: mpll: use 64-bit maths in params_from_rate
Masami Hiramatsu (2):
perf probe: Find versioned symbols from map
perf probe: Add warning message if there is unexpected event name
Mauro Carvalho Chehab (1):
media: videobuf2-core: don't go out of the buffer range
Mengting Zhang (1):
perf evsel: Enable ignore_missing_thread for pid option
Miguel Fadon Perlines (1):
arp: fix arp_filter on l3slave devices
Mike Christie (1):
tcmu: release blocks for partially setup cmds
Mike Marciniszyn (1):
IB/rdmavt: Allocate CQ memory on the correct node
Ming Lei (3):
blk-mq: avoid to map CPU into stale hw queue
blk-mq: fix race between updating nr_hw_queues and switching io sched
blk-mq: fix kernel oops in blk_mq_tag_idle()
Miquel Raynal (1):
mtd: mtd_oobtest: Handle bitflips during reads
Moni Shoua (1):
net/mlx4_en: Change default QoS settings
Moshe Shemesh (1):
net/mlx4_core: Fix memory leak while delete slave's resources
Nathan Fontenot (1):
ibmvnic: Don't handle RX interrupts when not up.
NeilBrown (2):
VFS: close race between getcwd() and d_move()
staging: lustre: disable preempt while sampling processor id.
Oleksij Rempel (1):
watchdog: dw_wdt: add stop watchdog operation
Or Gerlitz (1):
net/mlx5e: Avoid using the ipv6 stub in the TC offload neigh update path
Paolo Abeni (1):
ipv6: the entire IPv6 header chain must fit the first fragment
Paolo Valente (1):
block, bfq: put async queues for root bfq groups too
Parav Pandit (1):
RDMA/cma: Fix rdma_cm path querying for RoCE
Pardha Saradhi K (1):
ASoC: Intel: Skylake: Disable clock gating during firmware and library download
Peng Li (1):
net: hns3: free the ring_data structrue when change tqps
Peter Große (1):
mac80211: Fix setting TX power on monitor interfaces
Pieter \"PoroCYon\" Sluys (1):
vfb: fix video mode and line_length being set when loaded
Rafael David Tinoco (1):
scsi: libiscsi: Allow sd_shutdown on bad transport
Raghuram Chary J (1):
lan78xx: Crash in lan78xx_writ_reg (Workqueue: events lan78xx_deferred_multicast_write)
Rasmus Villemoes (1):
ARM: dts: ls1021a: add "fsl,ls1021a-esdhc" compatible string to esdhc node
Robert Jarzmik (1):
backlight: tdo24m: Fix the SPI CS between transfers
Roi Dayan (1):
net/mlx5e: Fix traffic being dropped on VF representor
Rui Hua (1):
bcache: ret IOERR when read meets metadata error
Shahar Klein (1):
net/mlx5e: Sync netdev vxlan ports at open
Shanker Donthineni (1):
irqchip/gic-v3: Fix the driver probe() fail due to disabled GICC entry
Shiraz Saleem (2):
i40iw: Fix sequence number for the first partial FPDU
i40iw: Correct Q1/XF object count equation
Shivasharan S (2):
scsi: megaraid_sas: Error handling for invalid ldcount provided by firmware in RAID map
scsi: megaraid_sas: unload flag should be set after scsi_remove_host is called
Sowmini Varadhan (2):
rds; Reset rs->rs_bound_addr in rds_add_bound() failure path selftests/net: fix bugs in address and port initialization
Stanislaw Gruszka (1):
rt2x00: do not pause queue unconditionally on error path
Stephen Hemminger (1):
uio_hv_generic: check that host supports monitor page
Tang Junhui (2):
bcache: stop writeback thread after detaching
bcache: segregate flash only volume write streams
Tatyana Nikolova (1):
i40iw: Validate correct IRD/ORD connection parameters
Tobias Brunner (1):
ipv6: Reinject IPv6 packets if IPsec policy matches after SNAT
Tony Lindgren (1):
tty: n_gsm: Allow ADM response in addition to UA for control dlci
Wei Yongjun (1):
gpio: thunderx: fix error return code in thunderx_gpio_probe()
Xin Long (5):
bonding: fix the err path for dev hwaddr sync in bond_enslave
bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave
bonding: process the err returned by dev_set_allmulti properly in bond_enslave
route: check sysctl_fib_multipath_use_neigh earlier than hash
team: move dev_mc_sync after master_upper_dev_link in team_port_add
Yi Zeng (1):
thermal: power_allocator: fix one race condition issue for thermal_instances list
chenxiang (1):
scsi: libsas: initialize sas_phy status according to response of DISCOVER
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 33 +SUBLEVEL = 34 EXTRAVERSION = NAME = Petit Gorille
arch/arm/boot/dts/ls1021a.dtsi +1 -1
@@ -155,7 +155,7 @@ }; esdhc: esdhc@1560000 { - compatible = "fsl,esdhc"; + compatible = "fsl,ls1021a-esdhc", "fsl,esdhc"; reg = <0x0 0x1560000 0x0 0x10000>; interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; clock-frequency = <0>;
arch/arm64/crypto/Makefile +1 -1
@@ -24,7 +24,7 @@ obj-$(CONFIG_CRYPTO_CRC32_ARM64_CE) += crc32-ce.o crc32-ce-y:= crc32-ce-core.o crc32-ce-glue.o obj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o -CFLAGS_aes-ce-cipher.o += -march=armv8-a+crypto +aes-ce-cipher-y := aes-ce-core.o aes-ce-glue.o obj-$(CONFIG_CRYPTO_AES_ARM64_CE_CCM) += aes-ce-ccm.o aes-ce-ccm-y := aes-ce-ccm-glue.o aes-ce-ccm-core.o
arch/arm64/crypto/aes-ce-cipher.c deleted +0 -281
281 lines not on this page · raw message
arch/arm64/crypto/aes-ce-core.S new file +87 -0
87 lines not on this page · raw message
arch/arm64/crypto/aes-ce-glue.c new file +190 -0
190 lines not on this page · raw message
arch/x86/include/asm/microcode.h +8 -2
@@ -37,7 +37,13 @@ struct cpu_signature {struct device ; -enum ucode_state {UCODE_ERROR ,UCODE_OK ,UCODE_NFOUND }; +enum ucode_state { +UCODE_OK =0 , +UCODE_NEW , +UCODE_UPDATED , +UCODE_NFOUND , +UCODE_ERROR , +};struct microcode_ops { enum ucode_state (*request_microcode_user) (int cpu,
@@ -54,7 +60,7 @@ struct microcode_ops {* are being called. * See also the "Synchronization" section in microcode_core.c. */ -int (*apply_microcode) (int cpu); +enum ucode_state (*apply_microcode) (int cpu);int (*collect_cpu_info) (int cpu,struct cpu_signature *csig); };
arch/x86/include/asm/processor.h +1 -0
@@ -968,4 +968,5 @@ bool xen_set_default_idle(void);void stop_this_cpu (void *dummy);void df_debug (struct pt_regs *regs,long error_code); +void microcode_check (void );#endif /* _ASM_X86_PROCESSOR_H */
arch/x86/kernel/aperture_64.c +45 -1
71 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +30 -0
@@ -1724,3 +1724,33 @@ static int __init init_cpu_syscore(void)return 0 ; }core_initcall (init_cpu_syscore); + +/* +* The microcode loader calls this upon late microcode load to recheck features, +* only when microcode has been updated. Caller holds microcode_mutex and CPU +* hotplug lock. +*/ +void microcode_check (void ) +{ +struct cpuinfo_x86 info; + +perf_check_microcode (); + +/* Reload CPUID max function as it might've changed. */ + info.cpuid_level =cpuid_eax (0 ); + +/* +* Copy all capability leafs to pick up the synthetic ones so that +* memcmp() below doesn't fail on that. The ones coming from CPUID will +* get overwritten in get_cpu_cap(). +*/ +memcpy (&info.x86_capability, &boot_cpu_data.x86_capability,sizeof (info.x86_capability)); + +get_cpu_cap (&info); + +if (!memcmp (&info.x86_capability, &boot_cpu_data.x86_capability,sizeof (info.x86_capability))) +return ; + +pr_warn ("x86/CPU: CPU features have changed after loading microcode, but might not take effect.\n" ); +pr_warn ("x86/CPU: Please consider either early loading through initrd/built-in or a potential BIOS update.\n" ); +}
arch/x86/kernel/cpu/microcode/amd.c +26 -18
94 lines not on this page · raw message
arch/x86/kernel/cpu/microcode/core.c +139 -42
248 lines not on this page · raw message
arch/x86/kernel/cpu/microcode/intel.c +48 -14
119 lines not on this page · raw message
arch/x86/xen/mmu_hvm.c +1 -1
@@ -75,6 +75,6 @@ void __init xen_hvm_init_mmu_ops(void)if (is_pagetable_dying_supported ()) pv_mmu_ops.exit_mmap = xen_hvm_exit_mmap;#ifdef CONFIG_PROC_VMCORE -register_oldmem_pfn_is_ram (&xen_oldmem_pfn_is_ram); +WARN_ON (register_oldmem_pfn_is_ram (&xen_oldmem_pfn_is_ram));#endif }
block/bfq-cgroup.c +5 -2
@@ -749,10 +749,11 @@ static void bfq_pd_offline(struct blkg_policy_data *pd)unsigned long flags;int i; +spin_lock_irqsave (&bfqd->lock, flags); +if (!entity)/* root group */ -return ; + goto put_async_queues; -spin_lock_irqsave (&bfqd->lock, flags);/* * Empty all service_trees belonging to this group before * deactivating the group itself.
@@ -783,6 +784,8 @@ static void bfq_pd_offline(struct blkg_policy_data *pd) }__bfq_deactivate_entity (entity, false); + +put_async_queues:bfq_put_async_queues (bfqd, bfqg);spin_unlock_irqrestore (&bfqd->lock, flags);
block/blk-mq.c +26 -3
@@ -1928,7 +1928,8 @@ static void blk_mq_exit_hctx(struct request_queue *q, {blk_mq_debugfs_unregister_hctx (hctx); -blk_mq_tag_idle (hctx); +if (blk_mq_hw_queue_mapped (hctx)) +blk_mq_tag_idle (hctx);if (set->ops->exit_request) set->ops->exit_request (set, hctx->fq->flush_rq, hctx_idx);
@@ -2314,6 +2315,9 @@ static void blk_mq_realloc_hw_ctxs(struct blk_mq_tag_set *set,struct blk_mq_hw_ctx **hctxs = q->queue_hw_ctx;blk_mq_sysfs_unregister (q); + +/* protect against switching io scheduler */ +mutex_lock (&q->sysfs_lock);for (i =0 ; i < set->nr_hw_queues; i++) {int node;
@@ -2358,6 +2362,7 @@ static void blk_mq_realloc_hw_ctxs(struct blk_mq_tag_set *set, } } q->nr_hw_queues = i; +mutex_unlock (&q->sysfs_lock);blk_mq_sysfs_register (q); }
@@ -2528,9 +2533,27 @@ static int blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set)static int blk_mq_update_queue_map (struct blk_mq_tag_set *set) { -if (set->ops->map_queues) +if (set->ops->map_queues) { +int cpu; +/* +* transport .map_queues is usually done in the following +* way: +* +* for (queue = 0; queue < set->nr_hw_queues; queue++) { +* mask = get_cpu_mask(queue) +* for_each_cpu(cpu, mask) +* set->mq_map[cpu] = queue; +* } +* +* When we need to remap, the table has to be cleared for +* killing stale mapping since one CPU may not be mapped +* to any hw queue. +*/ +for_each_possible_cpu (cpu) + set->mq_map[cpu] =0 ; +return set->ops->map_queues (set); -else + }else return blk_mq_map_queues (set); }
crypto/Makefile +1 -0
@@ -98,6 +98,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o CFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149 obj-$(CONFIG_CRYPTO_AES) += aes_generic.o +CFLAGS_aes_generic.o := $(call cc-ifversion, -ge, 0701, -Os) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356 obj-$(CONFIG_CRYPTO_AES_TI) += aes_ti.o obj-$(CONFIG_CRYPTO_CAMELLIA) += camellia_generic.o obj-$(CONFIG_CRYPTO_CAST_COMMON) += cast_common.o
drivers/acpi/acpi_video.c +12 -2
@@ -80,8 +80,8 @@ MODULE_PARM_DESC(report_key_events,static bool device_id_scheme = false;module_param (device_id_scheme, bool,0444 ); -static bool only_lcd = false; -module_param (only_lcd, bool,0444 ); +static int only_lcd =-1 ; +module_param (only_lcd, int,0444 );static int register_count;static DEFINE_MUTEX (register_count_mutex);
@@ -2136,6 +2136,16 @@ int acpi_video_register(void) goto leave; } +/* +* We're seeing a lot of bogus backlight interfaces on newer machines +* without a LCD such as desktops, servers and HDMI sticks. Checking +* the lcd flag fixes this, so enable this on any machines which are +* win8 ready (where we also prefer the native backlight driver, so +* normally the acpi_video code should not register there anyways). +*/ +if (only_lcd ==-1 ) + only_lcd =acpi_osi_is_win8 (); +dmi_check_system (video_dmi_table); ret =acpi_bus_register_driver (&acpi_video_bus);
drivers/acpi/ec.c +1 -1
@@ -1516,7 +1516,7 @@ static int acpi_ec_setup(struct acpi_ec *ec, bool handle_events) }acpi_handle_info (ec->handle, -"GPE=0x%lx, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n" , +"GPE=0x%x, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n" , ec->gpe, ec->command_addr, ec->data_addr);return ret; }
drivers/acpi/ec_sys.c +1 -1
@@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count)return -ENOMEM ; } -if (!debugfs_create_x32 ("gpe" ,0444 , dev_dir, (u32 *)&first_ec->gpe)) +if (!debugfs_create_x32 ("gpe" ,0444 , dev_dir, &first_ec->gpe)) goto error;if (!debugfs_create_bool ("use_global_lock" ,0444 , dev_dir, &first_ec->global_lock))
drivers/acpi/internal.h +1 -1
@@ -159,7 +159,7 @@ static inline void acpi_early_processor_osc(void) {}-------------------------------------------------------------------------- */ struct acpi_ec {acpi_handle handle; -unsigned long gpe; +u32 gpe;unsigned long command_addr;unsigned long data_addr;bool global_lock;
drivers/bluetooth/btusb.c +1 -0
@@ -277,6 +277,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x0489, 0xe09f), .driver_info = BTUSB_QCA_ROME }, { USB_DEVICE(0x0489, 0xe0a2), .driver_info = BTUSB_QCA_ROME }, { USB_DEVICE(0x04ca, 0x3011), .driver_info = BTUSB_QCA_ROME }, + { USB_DEVICE(0x04ca, 0x3015), .driver_info = BTUSB_QCA_ROME }, { USB_DEVICE(0x04ca, 0x3016), .driver_info = BTUSB_QCA_ROME },/* Broadcom BCM2035 */
drivers/char/tpm/tpm-interface.c +20 -8
@@ -328,7 +328,7 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip, }EXPORT_SYMBOL_GPL (tpm_calc_ordinal_duration); -static bool tpm_validate_command (struct tpm_chip *chip, +static int tpm_validate_command (struct tpm_chip *chip,struct tpm_space *space,const u8 *cmd,size_t len)
@@ -340,10 +340,10 @@ static bool tpm_validate_command(struct tpm_chip *chip,unsigned int nr_handles;if (len <TPM_HEADER_SIZE ) -return false; +return -EINVAL ;if (!space) -return true; +return 0 ;if (chip->flags &TPM_CHIP_FLAG_TPM2 && chip->nr_commands) { cc =be32_to_cpu (header->ordinal);
@@ -352,7 +352,7 @@ static bool tpm_validate_command(struct tpm_chip *chip,if (i <0 ) {dev_dbg (&chip->dev,"0x%04X is an invalid command\n" , cc); -return false; +return -EOPNOTSUPP ; } attrs = chip->cc_attrs_tbl[i];
@@ -362,11 +362,11 @@ static bool tpm_validate_command(struct tpm_chip *chip, goto err_len; } -return true; +return 0 ; err_len:dev_dbg (&chip->dev,"%s: insufficient command length %zu" , __func__, len); -return false; +return -EINVAL ; }/**
@@ -391,8 +391,20 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,unsigned long stop;bool need_locality; -if (!tpm_validate_command (chip, space, buf, bufsiz)) -return -EINVAL ; + rc =tpm_validate_command (chip, space, buf, bufsiz); +if (rc == -EINVAL ) +return rc; +/* +* If the command is not implemented by the TPM, synthesize a +* response with a TPM2_RC_COMMAND_CODE return for user-space. +*/ +if (rc == -EOPNOTSUPP ) { + header->length =cpu_to_be32 (sizeof (*header)); + header->tag =cpu_to_be16 (TPM2_ST_NO_SESSIONS ); + header->return_code =cpu_to_be32 (TPM2_RC_COMMAND_CODE | +TSS2_RESMGR_TPM_RC_LAYER ); +return bufsiz; + }if (bufsiz >TPM_BUFSIZE ) bufsiz =TPM_BUFSIZE ;
drivers/char/tpm/tpm.h +5 -0
@@ -93,12 +93,17 @@ enum tpm2_structures { TPM2_ST_SESSIONS = 0x8002, }; +/* Indicates from what layer of the software stack the error comes from */ +#define TSS2_RC_LAYER_SHIFT 16 +#define TSS2_RESMGR_TPM_RC_LAYER (11 << TSS2_RC_LAYER_SHIFT) +enum tpm2_return_codes {TPM2_RC_SUCCESS =0x0000 ,TPM2_RC_HASH =0x0083 ,/* RC_FMT1 */ TPM2_RC_HANDLE =0x008B ,TPM2_RC_INITIALIZE =0x0100 ,/* RC_VER1 */ TPM2_RC_DISABLED =0x0120 , +TPM2_RC_COMMAND_CODE =0x0143 ,TPM2_RC_TESTING =0x090A ,/* RC_WARN */ TPM2_RC_REFERENCE_H0 =0x0910 , };
drivers/clk/clk-divider.c +3 -4
@@ -118,12 +118,11 @@ static unsigned int _get_val(const struct clk_div_table *table,unsigned long divider_recalc_rate (struct clk_hw *hw,unsigned long parent_rate,unsigned int val,const struct clk_div_table *table, -unsigned long flags) +unsigned long flags,unsigned long width) { -struct clk_divider *divider =to_clk_divider (hw);unsigned int div; - div =_get_div (table, val, flags, divider->width); + div =_get_div (table, val, flags, width);if (!div) { WARN(!(flags & CLK_DIVIDER_ALLOW_ZERO), "%s: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not set\n",
@@ -145,7 +144,7 @@ static unsigned long clk_divider_recalc_rate(struct clk_hw *hw, val &=div_mask (divider->width);return divider_recalc_rate (hw, parent_rate, val, divider->table, - divider->flags); + divider->flags, divider->width); } static bool _is_valid_table_div(const struct clk_div_table *table,
drivers/clk/hisilicon/clkdivider-hi6220.c +1 -1
@@ -56,7 +56,7 @@ static unsigned long hi6220_clkdiv_recalc_rate(struct clk_hw *hw, val &=div_mask (dclk->width);return divider_recalc_rate (hw, parent_rate, val, dclk->table, -CLK_DIVIDER_ROUND_CLOSEST ); +CLK_DIVIDER_ROUND_CLOSEST , dclk->width); } static long hi6220_clkdiv_round_rate(struct clk_hw *hw, unsigned long rate,
drivers/clk/meson/clk-mpll.c +1 -1
@@ -98,7 +98,7 @@ static void params_from_rate(unsigned long requested_rate, *sdm =SDM_DEN -1 ; }else { *n2 = div; - *sdm =DIV_ROUND_UP (rem *SDM_DEN , requested_rate); + *sdm =DIV_ROUND_UP_ULL ((u64 )rem *SDM_DEN , requested_rate); } }
drivers/clk/nxp/clk-lpc32xx.c +1 -1
@@ -956,7 +956,7 @@ static unsigned long clk_divider_recalc_rate(struct clk_hw *hw, val &=div_mask (divider->width);return divider_recalc_rate (hw, parent_rate, val, divider->table, - divider->flags); + divider->flags, divider->width); } static long clk_divider_round_rate(struct clk_hw *hw, unsigned long rate,
drivers/clk/qcom/clk-regmap-divider.c +1 -1
@@ -59,7 +59,7 @@ static unsigned long div_recalc_rate(struct clk_hw *hw, div &=BIT (divider->width) -1 ;return divider_recalc_rate (hw, parent_rate, div,NULL , -CLK_DIVIDER_ROUND_CLOSEST ); +CLK_DIVIDER_ROUND_CLOSEST , divider->width); }const struct clk_ops clk_regmap_div_ops = {
drivers/clk/sunxi-ng/ccu-sun8i-a83t.c +2 -2
@@ -493,8 +493,8 @@ static SUNXI_CCU_MUX_WITH_GATE(tcon0_clk, "tcon0", tcon0_parents, 0x118, 24, 3, BIT(31), CLK_SET_RATE_PARENT);static const char *const tcon1_parents[] = {"pll-video1" }; -static SUNXI_CCU_MUX_WITH_GATE(tcon1_clk, "tcon1", tcon1_parents, - 0x11c, 24, 3, BIT(31), CLK_SET_RATE_PARENT); +static SUNXI_CCU_M_WITH_MUX_GATE(tcon1_clk, "tcon1", tcon1_parents, + 0x11c, 0, 4, 24, 2, BIT(31), CLK_SET_RATE_PARENT); static SUNXI_CCU_GATE(csi_misc_clk, "csi-misc", "osc24M", 0x130, BIT(16), 0);
drivers/clk/sunxi-ng/ccu_div.c +1 -1
@@ -71,7 +71,7 @@ static unsigned long ccu_div_recalc_rate(struct clk_hw *hw, parent_rate); val =divider_recalc_rate (hw, parent_rate, val, cd->div.table, - cd->div.flags); + cd->div.flags, cd->div.width);if (cd->common.features &CCU_FEATURE_FIXED_POSTDIV ) val /= cd->fixed_post_div;
drivers/cpufreq/powernv-cpufreq.c +23 -14
@@ -41,11 +41,9 @@#define POWERNV_MAX_PSTATES 256#define PMSR_PSAFE_ENABLE (1UL << 30)#define PMSR_SPR_EM_DISABLE (1UL << 31) -#define PMSR_MAX (x) ((x >> 32) & 0xFF) +#define MAX_PSTATE_SHIFT 32#define LPSTATE_SHIFT 48#define GPSTATE_SHIFT 56 -#define GET_LPSTATE (x) (((x) >> LPSTATE_SHIFT) & 0xFF) -#define GET_GPSTATE (x) (((x) >> GPSTATE_SHIFT) & 0xFF)#define MAX_RAMP_DOWN_TIME 5120/*
@@ -93,6 +91,7 @@ struct global_pstate_info { };static struct cpufreq_frequency_table powernv_freqs[POWERNV_MAX_PSTATES +1 ]; +u32 pstate_sign_prefix;static bool rebooting, throttled, occ_reset;static const char *const throttle_reason[] = {
@@ -147,6 +146,20 @@ static struct powernv_pstate_info {bool wof_enabled; } powernv_pstate_info; +static inline int extract_pstate (u64 pmsr_val,unsigned int shift) +{ +int ret = ((pmsr_val >> shift) &0xFF ); + +if (!ret) +return ret; + +return (pstate_sign_prefix | ret); +} + +#define extract_local_pstate (x) extract_pstate(x, LPSTATE_SHIFT) +#define extract_global_pstate (x) extract_pstate(x, GPSTATE_SHIFT) +#define extract_max_pstate (x) extract_pstate(x, MAX_PSTATE_SHIFT) +/* Use following macros for conversions between pstate_id and index */ static inline int idx_to_pstate (unsigned int i) {
@@ -277,6 +290,9 @@ static int init_powernv_pstates(void) powernv_pstate_info.nr_pstates = nr_pstates;pr_debug ("NR PStates %d\n" , nr_pstates); + + pstate_sign_prefix = pstate_min & ~0xFF ; +for (i =0 ; i < nr_pstates; i++) {u32 id =be32_to_cpu (pstate_ids[i]);u32 freq =be32_to_cpu (pstate_freqs[i]);
@@ -437,17 +453,10 @@ struct powernv_smp_call_data {static void powernv_read_cpu_freq (void *arg) {unsigned long pmspr_val; -s8 local_pstate_id;struct powernv_smp_call_data *freq_data = arg; pmspr_val =get_pmspr (SPRN_PMSR ); - -/* -* The local pstate id corresponds bits 48..55 in the PMSR. -* Note: Watch out for the sign! -*/ - local_pstate_id = (pmspr_val >>48 ) &0xFF ; - freq_data->pstate_id = local_pstate_id; + freq_data->pstate_id =extract_local_pstate (pmspr_val); freq_data->freq =pstate_id_to_freq (freq_data->pstate_id); pr_debug("cpu %d pmsr %016lX pstate_id %d frequency %d kHz\n",
@@ -521,7 +530,7 @@ static void powernv_cpufreq_throttle_check(void *data) chip =this_cpu_read (chip_info);/* Check for Pmax Capping */ - pmsr_pmax = (s8 )PMSR_MAX (pmsr); + pmsr_pmax =extract_max_pstate (pmsr); pmsr_pmax_idx =pstate_to_idx (pmsr_pmax);if (pmsr_pmax_idx != powernv_pstate_info.max) {if (chip->throttled)
@@ -644,8 +653,8 @@ void gpstate_timer_handler(unsigned long data)* value. Hence, read from PMCR to get correct data. */ val =get_pmspr (SPRN_PMCR ); - freq_data.gpstate_id = (s8 )GET_GPSTATE (val); - freq_data.pstate_id = (s8 )GET_LPSTATE (val); + freq_data.gpstate_id =extract_global_pstate (val); + freq_data.pstate_id =extract_local_pstate (val);if (freq_data.gpstate_id == freq_data.pstate_id) {reset_gpstates (policy);spin_unlock (&gpstates->gpstate_lock);
drivers/devfreq/devfreq.c +2 -1
@@ -935,7 +935,8 @@ static ssize_t governor_store(struct device *dev, struct device_attribute *attr,if (df->governor == governor) { ret =0 ; goto out; - }else if (df->governor->immutable || governor->immutable) { + }else if ((df->governor && df->governor->immutable) || + governor->immutable) { ret = -EINVAL ; goto out; }
drivers/edac/mv64x60_edac.c +1 -1
@@ -758,7 +758,7 @@ static int mv64x60_mc_err_probe(struct platform_device *pdev)/* Non-ECC RAM? */ printk (KERN_WARNING "%s: No ECC DIMMs discovered\n" , __func__); res = -ENODEV ; - goto err2; + goto err; }edac_dbg (3 ,"init mci\n" );
drivers/gpio/gpio-thunderx.c +3 -1
@@ -566,8 +566,10 @@ static int thunderx_gpio_probe(struct pci_dev *pdev, txgpio->irqd =irq_domain_create_hierarchy (irq_get_irq_data (txgpio->msix_entries[0 ].vector)->domain,0 ,0 ,of_node_to_fwnode (dev->of_node), &thunderx_gpio_irqd_ops, txgpio); -if (!txgpio->irqd) +if (!txgpio->irqd) { + err = -ENOMEM ; goto out; + }/* Push on irq_data and the domain for each line. */ for (i =0 ; i < ngpio; i++) {
drivers/gpio/gpiolib.c +2 -1
@@ -3340,7 +3340,8 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,return desc; } - status =gpiod_request (desc, con_id); +/* If a connection label was passed use that, else use the device name as label */ + status =gpiod_request (desc, con_id ? con_id :dev_name (dev));if (status <0 )return ERR_PTR (status);
drivers/gpu/drm/msm/dsi/pll/dsi_pll_14nm.c +1 -1
@@ -698,7 +698,7 @@ static unsigned long dsi_pll_14nm_postdiv_recalc_rate(struct clk_hw *hw, val &=div_mask (width);return divider_recalc_rate (hw, parent_rate, val,NULL , - postdiv->flags); + postdiv->flags, width); } static long dsi_pll_14nm_postdiv_round_rate(struct clk_hw *hw,
drivers/hwmon/ina2xx.c +50 -37
170 lines not on this page · raw message
drivers/infiniband/core/cma.c +1 -0
@@ -4453,6 +4453,7 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb) id_stats->qp_type = id->qp_type; i_id++; +nlmsg_end (skb, nlh); } cb->args[1 ] =0 ;
drivers/infiniband/core/ucma.c +4 -3
@@ -914,13 +914,14 @@ static ssize_t ucma_query_path(struct ucma_context *ctx, resp->path_data[i].flags =IB_PATH_GMP |IB_PATH_PRIMARY |IB_PATH_BIDIRECTIONAL ; -if (rec->rec_type ==SA_PATH_REC_TYPE_IB ) { -ib_sa_pack_path (rec, &resp->path_data[i].path_rec); - }else { +if (rec->rec_type ==SA_PATH_REC_TYPE_OPA ) {struct sa_path_rec ib;sa_convert_path_opa_to_ib (&ib, rec);ib_sa_pack_path (&ib, &resp->path_data[i].path_rec); + + }else { +ib_sa_pack_path (rec, &resp->path_data[i].path_rec); } }
drivers/infiniband/hw/i40iw/i40iw_cm.c +3 -2
@@ -125,7 +125,8 @@ static u8 i40iw_derive_hw_ird_setting(u16 cm_ird)* @conn_ird: connection IRD * @conn_ord: connection ORD */ -static void i40iw_record_ird_ord (struct i40iw_cm_node *cm_node,u16 conn_ird,u16 conn_ord) +static void i40iw_record_ird_ord (struct i40iw_cm_node *cm_node,u32 conn_ird, +u32 conn_ord) {if (conn_ird >I40IW_MAX_IRD_SIZE ) conn_ird =I40IW_MAX_IRD_SIZE ;
@@ -3841,7 +3842,7 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) } cm_node->apbvt_set = true; -i40iw_record_ird_ord (cm_node, (u16 )conn_param->ird, (u16 )conn_param->ord); +i40iw_record_ird_ord (cm_node, conn_param->ird, conn_param->ord);if (cm_node->send_rdma0_op ==SEND_RDMA_READ_ZERO && !cm_node->ord_size) cm_node->ord_size =1 ;
drivers/infiniband/hw/i40iw/i40iw_ctrl.c +4 -2
@@ -3875,8 +3875,10 @@ enum i40iw_status_code i40iw_config_fpm_values(struct i40iw_sc_dev *dev, u32 qp_ hmc_info->hmc_obj[I40IW_HMC_IW_APBVT_ENTRY ].cnt =1 ; hmc_info->hmc_obj[I40IW_HMC_IW_MR ].cnt = mrwanted; - hmc_info->hmc_obj[I40IW_HMC_IW_XF ].cnt =I40IW_MAX_WQ_ENTRIES * qpwanted; - hmc_info->hmc_obj[I40IW_HMC_IW_Q1 ].cnt =4 *I40IW_MAX_IRD_SIZE * qpwanted; + hmc_info->hmc_obj[I40IW_HMC_IW_XF ].cnt = +roundup_pow_of_two (I40IW_MAX_WQ_ENTRIES * qpwanted); + hmc_info->hmc_obj[I40IW_HMC_IW_Q1 ].cnt = +roundup_pow_of_two (2 *I40IW_MAX_IRD_SIZE * qpwanted); hmc_info->hmc_obj[I40IW_HMC_IW_XFFL ].cnt = hmc_info->hmc_obj[I40IW_HMC_IW_XF ].cnt / hmc_fpm_misc->xf_block_size; hmc_info->hmc_obj[I40IW_HMC_IW_Q1FL].cnt =
drivers/infiniband/hw/i40iw/i40iw_d.h +1 -0
@@ -93,6 +93,7 @@#define RDMA_OPCODE_MASK 0x0f#define RDMA_READ_REQ_OPCODE 1#define Q2_BAD_FRAME_OFFSET 72 +#define Q2_FPSN_OFFSET 64#define CQE_MAJOR_DRV 0x8000#define I40IW_TERM_SENT 0x01
drivers/infiniband/hw/i40iw/i40iw_puda.c +1 -1
@@ -1376,7 +1376,7 @@ static void i40iw_ieq_handle_exception(struct i40iw_puda_rsrc *ieq,u32 *hw_host_ctx = (u32 *)qp->hw_host_ctx;u32 rcv_wnd = hw_host_ctx[23 ];/* first partial seq # in q2 */ -u32 fps = qp->q2_buf[16 ]; +u32 fps = *(u32 *)(qp->q2_buf +Q2_FPSN_OFFSET );struct list_head *rxlist = &pfpdu->rxlist;struct list_head *plist;
drivers/infiniband/sw/rdmavt/cq.c +7 -3
@@ -198,7 +198,7 @@ struct ib_cq *rvt_create_cq(struct ib_device *ibdev,return ERR_PTR (-EINVAL );/* Allocate the completion queue structure. */ - cq =kzalloc (sizeof (*cq),GFP_KERNEL ); + cq =kzalloc_node (sizeof (*cq),GFP_KERNEL , rdi->dparms.node);if (!cq)return ERR_PTR (-ENOMEM );
@@ -214,7 +214,9 @@ struct ib_cq *rvt_create_cq(struct ib_device *ibdev, sz +=sizeof (struct ib_uverbs_wc ) * (entries +1 ); else sz += sizeof(struct ib_wc) * (entries + 1); - wc =vmalloc_user (sz); + wc = udata ? +vmalloc_user (sz) : +vzalloc_node (sz, rdi->dparms.node);if (!wc) { ret =ERR_PTR (-ENOMEM ); goto bail_cq;
@@ -369,7 +371,9 @@ int rvt_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) sz +=sizeof (struct ib_uverbs_wc ) * (cqe +1 ); else sz += sizeof(struct ib_wc) * (cqe + 1); - wc =vmalloc_user (sz); + wc = udata ? +vmalloc_user (sz) : +vzalloc_node (sz, rdi->dparms.node);if (!wc)return -ENOMEM ;
drivers/input/touchscreen/goodix.c +6 -2
@@ -808,8 +808,10 @@ static int __maybe_unused goodix_suspend(struct device *dev)int error;/* We need gpio pins to suspend/resume */ -if (!ts->gpiod_int || !ts->gpiod_rst) +if (!ts->gpiod_int || !ts->gpiod_rst) { +disable_irq (client->irq);return 0 ; + }wait_for_completion (&ts->firmware_loading_complete);
@@ -849,8 +851,10 @@ static int __maybe_unused goodix_resume(struct device *dev)struct goodix_ts_data *ts =i2c_get_clientdata (client);int error; -if (!ts->gpiod_int || !ts->gpiod_rst) +if (!ts->gpiod_int || !ts->gpiod_rst) { +enable_irq (client->irq);return 0 ; + }/* * Exit sleep mode by outputting HIGH level to INT pin
drivers/irqchip/irq-gic-v3.c +11 -0
@@ -1297,6 +1297,10 @@ gic_acpi_parse_madt_gicc(struct acpi_subtable_header *header,u32 size = reg == GIC_PIDR2_ARCH_GICv4 ?SZ_64K *4 :SZ_64K *2 ;void __iomem *redist_base; +/* GICC entry which has !ACPI_MADT_ENABLED is not unusable so skip */ +if (!(gicc->flags &ACPI_MADT_ENABLED )) +return 0 ; + redist_base =ioremap (gicc->gicr_base_address, size);if (!redist_base)return -ENOMEM ;
@@ -1346,6 +1350,13 @@ static int __init gic_acpi_match_gicc(struct acpi_subtable_header *header,if ((gicc->flags &ACPI_MADT_ENABLED ) && gicc->gicr_base_address)return 0 ; +/* +* It's perfectly valid firmware can pass disabled GICC entry, driver +* should not treat as errors, skip the entry instead of probe fail. +*/ +if (!(gicc->flags &ACPI_MADT_ENABLED )) +return 0 ; +return -ENODEV ; }
drivers/md/bcache/alloc.c +14 -5
@@ -515,15 +515,21 @@ struct open_bucket {/* * We keep multiple buckets open for writes, and try to segregate different -* write streams for better cache utilization: first we look for a bucket where -* the last write to it was sequential with the current write, and failing that -* we look for a bucket that was last used by the same task. +* write streams for better cache utilization: first we try to segregate flash +* only volume write streams from cached devices, secondly we look for a bucket +* where the last write to it was sequential with the current write, and +* failing that we look for a bucket that was last used by the same task. * * The ideas is if you've got multiple tasks pulling data into the cache at the * same time, you'll get better cache utilization if you try to segregate their * data and preserve locality. * -* For example, say you've starting Firefox at the same time you're copying a +* For example, dirty sectors of flash only volume is not reclaimable, if their +* dirty sectors mixed with dirty sectors of cached device, such buckets will +* be marked as dirty and won't be reclaimed, though the dirty data of cached +* device have been written back to backend device. +* +* And say you've starting Firefox at the same time you're copying a * bunch of files. Firefox will likely end up being fairly hot and stay in the * cache awhile, but the data you copied might not be; if you wrote all that * data to the same buckets it'd get invalidated at the same time.
@@ -540,7 +546,10 @@ static struct open_bucket *pick_data_bucket(struct cache_set *c,struct open_bucket *ret, *ret_task =NULL ;list_for_each_entry_reverse (ret, &c->data_buckets, list) -if (!bkey_cmp (&ret->key, search)) +if (UUID_FLASH_ONLY (&c->uuids[KEY_INODE (&ret->key)]) != +UUID_FLASH_ONLY (&c->uuids[KEY_INODE (search)])) +continue ; +else if (!bkey_cmp (&ret->key, search)) goto found;else if (ret->last_write_point == write_point) ret_task = ret;
drivers/md/bcache/request.c +22 -0
@@ -568,6 +568,7 @@ static void cache_lookup(struct closure *cl) { struct search *s = container_of(cl, struct search, iop.cl);struct bio *bio = &s->bio.bio; +struct cached_dev *dc;int ret;bch_btree_op_init (&s->op,-1 );
@@ -580,6 +581,27 @@ static void cache_lookup(struct closure *cl)return ; } +/* +* We might meet err when searching the btree, If that happens, we will +* get negative ret, in this scenario we should not recover data from +* backing device (when cache device is dirty) because we don't know +* whether bkeys the read request covered are all clean. +* +* And after that happened, s->iop.status is still its initial value +* before we submit s->bio.bio +*/ +if (ret <0 ) { +BUG_ON (ret == -EINTR ); +if (s->d && s->d->c && + !UUID_FLASH_ONLY (&s->d->c->uuids[s->d->id])) { + dc = container_of(s->d, struct cached_dev, disk); +if (dc &&atomic_read (&dc->has_dirty)) + s->recoverable = false; + } +if (!s->iop.status) + s->iop.status =BLK_STS_IOERR ; + } +closure_return (cl); }
drivers/md/bcache/super.c +6 -0
@@ -893,6 +893,12 @@ static void cached_dev_detach_finish(struct work_struct *w)mutex_lock (&bch_register_lock); +cancel_delayed_work_sync (&dc->writeback_rate_update); +if (!IS_ERR_OR_NULL (dc->writeback_thread)) { +kthread_stop (dc->writeback_thread); + dc->writeback_thread =NULL ; + } +memset (&dc->sb.set_uuid,0 ,16 );SET_BDEV_STATE (&dc->sb,BDEV_STATE_NONE );
drivers/media/v4l2-core/videobuf2-core.c +4 -0
@@ -332,6 +332,10 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,struct vb2_buffer *vb;int ret; +/* Ensure that q->num_buffers+num_buffers is below VB2_MAX_FRAME */ + num_buffers = min_t(unsigned int, num_buffers, +VB2_MAX_FRAME - q->num_buffers); +for (buffer =0 ; buffer < num_buffers; ++buffer) {/* Allocate videobuf buffer structures */ vb =kzalloc (q->buf_struct_size,GFP_KERNEL );
drivers/mmc/host/sdhci-pci-core.c +2 -0
@@ -806,6 +806,8 @@ static int intel_mrfld_mmc_probe_slot(struct sdhci_pci_slot *slot) slot->host->quirks2 |=SDHCI_QUIRK2_NO_1_8_V ;break ;case INTEL_MRFLD_SDIO : +/* Advertise 2.0v for compatibility with the SDIO card's OCR */ + slot->host->ocr_mask =MMC_VDD_20_21 |MMC_VDD_165_195 ; slot->host->mmc->caps |=MMC_CAP_NONREMOVABLE |MMC_CAP_POWER_OFF_CARD ;break ;
drivers/mmc/host/sdhci.c +7 -0
@@ -1470,6 +1470,13 @@ void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,if (mode !=MMC_POWER_OFF ) {switch (1 << vdd) {case MMC_VDD_165_195 : +/* +* Without a regulator, SDHCI does not support 2.0v +* so we only get here if the driver deliberately +* added the 2.0v range to ocr_avail. Map it to 1.8v +* for the purpose of turning on the power. +*/ +case MMC_VDD_20_21 : pwr =SDHCI_POWER_180 ;break ;case MMC_VDD_29_30 :
drivers/mtd/tests/oobtest.c +21 -0
@@ -193,6 +193,9 @@ static int verify_eraseblock(int ebnum) ops.datbuf =NULL ; ops.oobbuf = readbuf; err =mtd_read_oob (mtd, addr, &ops); +if (mtd_is_bitflip (err)) + err =0 ; +if (err || ops.oobretlen != use_len) {pr_err ("error: readoob failed at %#llx\n" , (long long )addr);
@@ -227,6 +230,9 @@ static int verify_eraseblock(int ebnum) ops.datbuf =NULL ; ops.oobbuf = readbuf; err =mtd_read_oob (mtd, addr, &ops); +if (mtd_is_bitflip (err)) + err =0 ; +if (err || ops.oobretlen != mtd->oobavail) {pr_err ("error: readoob failed at %#llx\n" , (long long )addr);
@@ -286,6 +292,9 @@ static int verify_eraseblock_in_one_go(int ebnum)/* read entire block's OOB at one go */ err =mtd_read_oob (mtd, addr, &ops); +if (mtd_is_bitflip (err)) + err =0 ; +if (err || ops.oobretlen != len) {pr_err ("error: readoob failed at %#llx\n" , (long long )addr);
@@ -527,6 +536,9 @@ static int __init mtd_oobtest_init(void)pr_info ("attempting to start read past end of OOB\n" );pr_info ("an error is expected...\n" ); err =mtd_read_oob (mtd, addr0, &ops); +if (mtd_is_bitflip (err)) + err =0 ; +if (err) {pr_info ("error occurred as expected\n" ); err =0 ;
@@ -571,6 +583,9 @@ static int __init mtd_oobtest_init(void)pr_info ("attempting to read past end of device\n" );pr_info ("an error is expected...\n" ); err =mtd_read_oob (mtd, mtd->size - mtd->writesize, &ops); +if (mtd_is_bitflip (err)) + err =0 ; +if (err) {pr_info ("error occurred as expected\n" ); err =0 ;
@@ -615,6 +630,9 @@ static int __init mtd_oobtest_init(void)pr_info ("attempting to read past end of device\n" );pr_info ("an error is expected...\n" ); err =mtd_read_oob (mtd, mtd->size - mtd->writesize, &ops); +if (mtd_is_bitflip (err)) + err =0 ; +if (err) {pr_info ("error occurred as expected\n" ); err =0 ;
@@ -684,6 +702,9 @@ static int __init mtd_oobtest_init(void) ops.datbuf =NULL ; ops.oobbuf = readbuf; err =mtd_read_oob (mtd, addr, &ops); +if (mtd_is_bitflip (err)) + err =0 ; +if (err) goto out; if (memcmpshow(addr, readbuf, writebuf,
drivers/net/bonding/bond_main.c +37 -36
97 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4vf/sge.c +17 -6
@@ -2619,8 +2619,8 @@ void t4vf_sge_stop(struct adapter *adapter)int t4vf_sge_init (struct adapter *adapter) {struct sge_params *sge_params = &adapter->params.sge; -u32 fl0 = sge_params->sge_fl_buffer_size[0 ]; -u32 fl1 = sge_params->sge_fl_buffer_size[1 ]; +u32 fl_small_pg = sge_params->sge_fl_buffer_size[0 ]; +u32 fl_large_pg = sge_params->sge_fl_buffer_size[1 ];struct sge *s = &adapter->sge;/*
@@ -2628,9 +2628,20 @@ int t4vf_sge_init(struct adapter *adapter)* the Physical Function Driver. Ideally we should be able to deal * with _any_ configuration. Practice is different ... */ -if (fl0 !=PAGE_SIZE || (fl1 !=0 && fl1 <= fl0)) { + +/* We only bother using the Large Page logic if the Large Page Buffer +* is larger than our Page Size Buffer. +*/ +if (fl_large_pg <= fl_small_pg) + fl_large_pg =0 ; + +/* The Page Size Buffer must be exactly equal to our Page Size and the +* Large Page Size Buffer should be 0 (per above) or a power of 2. +*/ +if (fl_small_pg !=PAGE_SIZE || + (fl_large_pg & (fl_large_pg -1 )) !=0 ) {dev_err (adapter->pdev_dev,"bad SGE FL buffer sizes [%d, %d]\n" , - fl0, fl1); + fl_small_pg, fl_large_pg);return -EINVAL ; } if ((sge_params->sge_control & RXPKTCPLMODE_F) !=
@@ -2642,8 +2653,8 @@ int t4vf_sge_init(struct adapter *adapter)/* * Now translate the adapter parameters into our internal forms. */ -if (fl1) - s->fl_pg_order =ilog2 (fl1) -PAGE_SHIFT ; +if (fl_large_pg) + s->fl_pg_order =ilog2 (fl_large_pg) -PAGE_SHIFT ; s->stat_len = ((sge_params->sge_control &EGRSTATUSPAGESIZE_F ) ?128 :64 ); s->pktshift =PKTSHIFT_G (sge_params->sge_control);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +4 -0
@@ -2092,6 +2092,10 @@ static int hclge_get_autoneg(struct hnae3_handle *handle) {struct hclge_vport *vport =hclge_get_vport (handle);struct hclge_dev *hdev = vport->back; +struct phy_device *phydev = hdev->hw.mac.phydev; + +if (phydev) +return phydev->autoneg;hclge_query_autoneg_result (hdev);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c +15 -2
@@ -1060,6 +1060,8 @@ hns3_nic_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)u64 rx_bytes =0 ;u64 tx_pkts =0 ;u64 rx_pkts =0 ; +u64 tx_drop =0 ; +u64 rx_drop =0 ;for (idx =0 ; idx < queue_num; idx++) {/* fetch the tx stats */
@@ -1068,6 +1070,8 @@ hns3_nic_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) start =u64_stats_fetch_begin_irq (&ring->syncp); tx_bytes += ring->stats.tx_bytes; tx_pkts += ring->stats.tx_pkts; + tx_drop += ring->stats.tx_busy; + tx_drop += ring->stats.sw_err_cnt; }while (u64_stats_fetch_retry_irq (&ring->syncp, start));/* fetch the rx stats */
@@ -1076,6 +1080,9 @@ hns3_nic_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) start =u64_stats_fetch_begin_irq (&ring->syncp); rx_bytes += ring->stats.rx_bytes; rx_pkts += ring->stats.rx_pkts; + rx_drop += ring->stats.non_vld_descs; + rx_drop += ring->stats.err_pkt_len; + rx_drop += ring->stats.l2_err; }while (u64_stats_fetch_retry_irq (&ring->syncp, start)); }
@@ -1091,8 +1098,8 @@ hns3_nic_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) stats->rx_missed_errors = netdev->stats.rx_missed_errors; stats->tx_errors = netdev->stats.tx_errors; - stats->rx_dropped = netdev->stats.rx_dropped; - stats->tx_dropped = netdev->stats.tx_dropped; + stats->rx_dropped = rx_drop + netdev->stats.rx_dropped; + stats->tx_dropped = tx_drop + netdev->stats.tx_dropped; stats->collisions = netdev->stats.collisions; stats->rx_over_errors = netdev->stats.rx_over_errors; stats->rx_frame_errors = netdev->stats.rx_frame_errors;
@@ -1306,6 +1313,8 @@ static int hns3_nic_change_mtu(struct net_device *netdev, int new_mtu)return ret; } + netdev->mtu = new_mtu; +/* if the netdev was running earlier, bring it up again */ if (if_running &&hns3_nic_net_open (netdev)) ret = -EINVAL ;
@@ -2687,8 +2696,12 @@ static int hns3_uninit_all_ring(struct hns3_nic_priv *priv) h->ae_algo->ops->reset_queue (h, i);hns3_fini_ring (priv->ring_data[i].ring); +devm_kfree (priv->dev, priv->ring_data[i].ring);hns3_fini_ring (priv->ring_data[i + h->kinfo.num_tqps].ring); +devm_kfree (priv->dev, + priv->ring_data[i + h->kinfo.num_tqps].ring); } +devm_kfree (priv->dev, priv->ring_data);return 0 ; }
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c +7 -6
@@ -22,7 +22,8 @@ struct hns3_stats {#define HNS3_TQP_STAT (_string, _member) { \ .stats_string = _string, \ .stats_size = FIELD_SIZEOF(struct ring_stats, _member), \ - .stats_offset = offsetof(struct hns3_enet_ring, stats), \ + .stats_offset = offsetof(struct hns3_enet_ring, stats) +\ + offsetof(struct ring_stats, _member), \ } \static const struct hns3_stats hns3_txq_stats[] = {
@@ -189,13 +190,13 @@ static u64 *hns3_get_stats_tqps(struct hnae3_handle *handle, u64 *data)struct hnae3_knic_private_info *kinfo = &handle->kinfo;struct hns3_enet_ring *ring;u8 *stat; -u32 i; +int i, j;/* get stats for Tx */ for (i =0 ; i < kinfo->num_tqps; i++) { ring = nic_priv->ring_data[i].ring; -for (i =0 ; i <HNS3_TXQ_STATS_COUNT ; i++) { - stat = (u8 *)ring + hns3_txq_stats[i].stats_offset; +for (j =0 ; j <HNS3_TXQ_STATS_COUNT ; j++) { + stat = (u8 *)ring + hns3_txq_stats[j].stats_offset; *data++ = *(u64 *)stat; } }
@@ -203,8 +204,8 @@ static u64 *hns3_get_stats_tqps(struct hnae3_handle *handle, u64 *data)/* get stats for Rx */ for (i =0 ; i < kinfo->num_tqps; i++) { ring = nic_priv->ring_data[i + kinfo->num_tqps].ring; -for (i =0 ; i <HNS3_RXQ_STATS_COUNT ; i++) { - stat = (u8 *)ring + hns3_rxq_stats[i].stats_offset; +for (j =0 ; j <HNS3_RXQ_STATS_COUNT ; j++) { + stat = (u8 *)ring + hns3_rxq_stats[j].stats_offset; *data++ = *(u64 *)stat; } }
drivers/net/ethernet/ibm/ibmvnic.c +6 -0
@@ -2209,6 +2209,12 @@ static irqreturn_t ibmvnic_interrupt_rx(int irq, void *instance)struct ibmvnic_sub_crq_queue *scrq = instance;struct ibmvnic_adapter *adapter = scrq->adapter; +/* When booting a kdump kernel we can hit pending interrupts +* prior to completing driver initialization. +*/ +if (unlikely (adapter->state !=VNIC_OPEN )) +return IRQ_NONE ; + adapter->rx_stats_buffers[scrq->scrq_num].interrupts++;if (napi_schedule_prep (&adapter->napi[scrq->scrq_num])) {
drivers/net/ethernet/intel/i40evf/i40evf_main.c +17 -3
@@ -1775,7 +1775,11 @@ static void i40evf_disable_vf(struct i40evf_adapter *adapter) adapter->flags |=I40EVF_FLAG_PF_COMMS_FAILED ; -if (netif_running (adapter->netdev)) { +/* We don't use netif_running() because it may be true prior to +* ndo_open() returning, so we can't assume it means all our open +* tasks have finished, since we're not holding the rtnl_lock here. +*/ +if (adapter->state == __I40EVF_RUNNING) {set_bit (__I40E_VSI_DOWN, adapter->vsi.state);netif_carrier_off (adapter->netdev);netif_tx_disable (adapter->netdev);
@@ -1833,6 +1837,7 @@ static void i40evf_reset_task(struct work_struct *work)struct i40evf_mac_filter *f;u32 reg_val;int i =0 , err; +bool running;while (test_and_set_bit (__I40EVF_IN_CLIENT_TASK, &adapter->crit_section))
@@ -1892,7 +1897,13 @@ static void i40evf_reset_task(struct work_struct *work) } continue_reset: -if (netif_running (netdev)) { +/* We don't use netif_running() because it may be true prior to +* ndo_open() returning, so we can't assume it means all our open +* tasks have finished, since we're not holding the rtnl_lock here. +*/ + running = (adapter->state == __I40EVF_RUNNING); + +if (running) {netif_carrier_off (netdev);netif_tx_stop_all_queues (netdev); adapter->link_up = false;
@@ -1936,7 +1947,10 @@ static void i40evf_reset_task(struct work_struct *work)mod_timer (&adapter->watchdog_timer, jiffies +2 ); -if (netif_running (adapter->netdev)) { +/* We were running when the reset started, so we need to restore some +* state here. +*/ +if (running) {/* allocate transmit descriptors */ err =i40evf_setup_all_tx_resources (adapter);if (err)
drivers/net/ethernet/marvell/sky2.c +1 -1
@@ -5087,7 +5087,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)INIT_WORK (&hw->restart_work, sky2_restart);pci_set_drvdata (pdev, hw); - pdev->d3_delay =150 ; + pdev->d3_delay =200 ;return 0 ;
drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c +46 -31
144 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +19 -14
@@ -1046,27 +1046,32 @@ static int mlx4_en_set_pauseparam(struct net_device *dev, {struct mlx4_en_priv *priv =netdev_priv (dev);struct mlx4_en_dev *mdev = priv->mdev; +u8 tx_pause, tx_ppp, rx_pause, rx_ppp;int err;if (pause->autoneg)return -EINVAL ; - priv->prof->tx_pause = pause->tx_pause !=0 ; - priv->prof->rx_pause = pause->rx_pause !=0 ; + tx_pause = !!(pause->tx_pause); + rx_pause = !!(pause->rx_pause); + rx_ppp = priv->prof->rx_ppp && !(tx_pause || rx_pause); + tx_ppp = priv->prof->tx_ppp && !(tx_pause || rx_pause); + err =mlx4_SET_PORT_general (mdev->dev, priv->port, priv->rx_skb_size +ETH_FCS_LEN , - priv->prof->tx_pause, - priv->prof->tx_ppp, - priv->prof->rx_pause, - priv->prof->rx_ppp); -if (err) -en_err (priv,"Failed setting pause params\n" ); -else -mlx4_en_update_pfc_stats_bitmap (mdev->dev, &priv->stats_bitmap, - priv->prof->rx_ppp, - priv->prof->rx_pause, - priv->prof->tx_ppp, - priv->prof->tx_pause); + tx_pause, tx_ppp, rx_pause, rx_ppp); +if (err) { +en_err (priv,"Failed setting pause params, err = %d\n" , err); +return err; + } + +mlx4_en_update_pfc_stats_bitmap (mdev->dev, &priv->stats_bitmap, + rx_ppp, rx_pause, tx_ppp, tx_pause); + + priv->prof->tx_pause = tx_pause; + priv->prof->rx_pause = rx_pause; + priv->prof->tx_ppp = tx_ppp; + priv->prof->rx_ppp = rx_ppp;return err; }
drivers/net/ethernet/mellanox/mlx4/en_main.c +2 -2
@@ -163,9 +163,9 @@ static void mlx4_en_get_profile(struct mlx4_en_dev *mdev) params->udp_rss =0 ; }for (i =1 ; i <=MLX4_MAX_PORTS ; i++) { - params->prof[i].rx_pause =1 ; + params->prof[i].rx_pause = !(pfcrx || pfctx); params->prof[i].rx_ppp = pfcrx; - params->prof[i].tx_pause =1 ; + params->prof[i].tx_pause = !(pfcrx || pfctx); params->prof[i].tx_ppp = pfctx; params->prof[i].tx_ring_size =MLX4_EN_DEF_TX_RING_SIZE ; params->prof[i].rx_ring_size =MLX4_EN_DEF_RX_RING_SIZE ;
drivers/net/ethernet/mellanox/mlx4/en_netdev.c +7 -0
@@ -3335,6 +3335,13 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, priv->msg_enable =MLX4_EN_MSG_LEVEL ;#ifdef CONFIG_MLX4_EN_DCB if (!mlx4_is_slave (priv->mdev->dev)) { +u8 prio; + +for (prio =0 ; prio <IEEE_8021QAZ_MAX_TCS ; ++prio) { + priv->ets.prio_tc[prio] = prio; + priv->ets.tc_tsa[prio] =IEEE_8021QAZ_TSA_VENDOR ; + } + priv->dcbx_cap =DCB_CAP_DCBX_VER_CEE |DCB_CAP_DCBX_HOST |DCB_CAP_DCBX_VER_IEEE ; priv->flags |=MLX4_EN_DCB_ENABLED ;
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +1 -0
@@ -476,6 +476,7 @@ struct mlx4_en_frag_info {#define MLX4_EN_BW_MIN 1#define MLX4_EN_BW_MAX 100/* Utilize 100% of the line */ +#define MLX4_EN_TC_VENDOR 0#define MLX4_EN_TC_ETS 7enum dcb_pfc_type {
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +1 -0
@@ -5089,6 +5089,7 @@ static void rem_slave_fs_rule(struct mlx4_dev *dev, int slave) &tracker->res_tree[RES_FS_RULE]);list_del (&fs_rule->com.list);spin_unlock_irq (mlx4_tlock (dev)); +kfree (fs_rule->mirr_mbox);kfree (fs_rule); state =0 ;break ;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +3 -7
@@ -2718,6 +2718,9 @@ int mlx5e_open(struct net_device *netdev)mlx5_set_port_admin_status (priv->mdev,MLX5_PORT_UP );mutex_unlock (&priv->state_lock); +if (mlx5e_vxlan_allowed (priv->mdev)) +udp_tunnel_get_rx_info (netdev); +return err; }
@@ -4276,13 +4279,6 @@ static void mlx5e_nic_enable(struct mlx5e_priv *priv)if (netdev->reg_state !=NETREG_REGISTERED )return ; -/* Device already registered: sync netdev system state */ -if (mlx5e_vxlan_allowed (mdev)) { -rtnl_lock (); -udp_tunnel_get_rx_info (netdev); -rtnl_unlock (); - } -queue_work (priv->wq, &priv->set_rx_mode_work);rtnl_lock ();
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +16 -10
@@ -43,6 +43,11 @@#include "en_tc.h" #include "fs_core.h" +#define MLX5E_REP_PARAMS_LOG_SQ_SIZE \ + max(0x6, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE) +#define MLX5E_REP_PARAMS_LOG_RQ_SIZE \ + max(0x6, MLX5E_PARAMS_MINIMUM_LOG_RQ_SIZE) +static const char mlx5e_rep_driver_name[] ="mlx5e_rep" ; static void mlx5e_rep_get_drvinfo(struct net_device *dev,
@@ -230,7 +235,7 @@ void mlx5e_remove_sqs_fwd_rules(struct mlx5e_priv *priv)static void mlx5e_rep_neigh_update_init_interval (struct mlx5e_rep_priv *rpriv) {#if IS_ENABLED (CONFIG_IPV6 ) -unsigned long ipv6_interval =NEIGH_VAR (&ipv6_stub->nd_tbl->parms, +unsigned long ipv6_interval =NEIGH_VAR (&nd_tbl.parms,DELAY_PROBE_TIME );#else unsigned long ipv6_interval = ~0UL ;
@@ -366,7 +371,7 @@ static int mlx5e_rep_netevent_event(struct notifier_block *nb,case NETEVENT_NEIGH_UPDATE : n = ptr;#if IS_ENABLED (CONFIG_IPV6 ) -if (n->tbl != ipv6_stub->nd_tbl && n->tbl != &arp_tbl) +if (n->tbl != &nd_tbl && n->tbl != &arp_tbl) #else if (n->tbl != &arp_tbl)#endif
@@ -414,7 +419,7 @@ static int mlx5e_rep_netevent_event(struct notifier_block *nb,* done per device delay prob time parameter. */ #if IS_ENABLED (CONFIG_IPV6 ) -if (!p->dev || (p->tbl != ipv6_stub->nd_tbl && p->tbl != &arp_tbl)) +if (!p->dev || (p->tbl != &nd_tbl && p->tbl != &arp_tbl)) #else if (!p->dev || p->tbl != &arp_tbl)#endif
@@ -610,7 +615,6 @@ static int mlx5e_rep_open(struct net_device *dev)struct mlx5e_priv *priv =netdev_priv (dev);struct mlx5e_rep_priv *rpriv = priv->ppriv;struct mlx5_eswitch_rep *rep = rpriv->rep; -struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;int err;mutex_lock (&priv->state_lock);
@@ -618,8 +622,9 @@ static int mlx5e_rep_open(struct net_device *dev)if (err) goto unlock; -if (!mlx5_eswitch_set_vport_state (esw, rep->vport, -MLX5_ESW_VPORT_ADMIN_STATE_UP )) +if (!mlx5_modify_vport_admin_state (priv->mdev, +MLX5_QUERY_VPORT_STATE_IN_OP_MOD_ESW_VPORT , + rep->vport,MLX5_ESW_VPORT_ADMIN_STATE_UP ))netif_carrier_on (dev); unlock:
@@ -632,11 +637,12 @@ static int mlx5e_rep_close(struct net_device *dev)struct mlx5e_priv *priv =netdev_priv (dev);struct mlx5e_rep_priv *rpriv = priv->ppriv;struct mlx5_eswitch_rep *rep = rpriv->rep; -struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;int ret;mutex_lock (&priv->state_lock); - (void )mlx5_eswitch_set_vport_state (esw, rep->vport,MLX5_ESW_VPORT_ADMIN_STATE_DOWN ); +mlx5_modify_vport_admin_state (priv->mdev, +MLX5_QUERY_VPORT_STATE_IN_OP_MOD_ESW_VPORT , + rep->vport,MLX5_ESW_VPORT_ADMIN_STATE_DOWN ); ret =mlx5e_close_locked (dev);mutex_unlock (&priv->state_lock);return ret;
@@ -797,9 +803,9 @@ static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev, MLX5_CQ_PERIOD_MODE_START_FROM_CQE :MLX5_CQ_PERIOD_MODE_START_FROM_EQE ; - params->log_sq_size =MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE ; + params->log_sq_size =MLX5E_REP_PARAMS_LOG_SQ_SIZE ; params->rq_wq_type =MLX5_WQ_TYPE_LINKED_LIST ; - params->log_rq_size =MLX5E_PARAMS_MINIMUM_LOG_RQ_SIZE ; + params->log_rq_size =MLX5E_REP_PARAMS_LOG_RQ_SIZE ; params->rx_am_enabled =MLX5_CAP_GEN (mdev, cq_moderation);mlx5e_set_rx_cq_mode_params (params, cq_period_mode);
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +9 -9
@@ -484,7 +484,7 @@ void mlx5e_tc_update_neigh_used_value(struct mlx5e_neigh_hash_entry *nhe) tbl = &arp_tbl;#if IS_ENABLED (CONFIG_IPV6 ) else if (m_neigh->family == AF_INET6) - tbl = ipv6_stub->nd_tbl; + tbl = &nd_tbl;#endif else return;
@@ -2091,19 +2091,19 @@ int mlx5e_configure_flower(struct mlx5e_priv *priv,if (err != -EAGAIN ) flow->flags |=MLX5E_TC_FLOW_OFFLOADED ; +if (!(flow->flags &MLX5E_TC_FLOW_ESWITCH ) || + !(flow->esw_attr->action &MLX5_FLOW_CONTEXT_ACTION_ENCAP )) +kvfree (parse_attr); + err =rhashtable_insert_fast (&tc->ht, &flow->node, tc->ht_params); -if (err) - goto err_del_rule; +if (err) { +mlx5e_tc_del_flow (priv, flow); +kfree (flow); + } -if (flow->flags &MLX5E_TC_FLOW_ESWITCH && - !(flow->esw_attr->action &MLX5_FLOW_CONTEXT_ACTION_ENCAP )) -kvfree (parse_attr);return err; -err_del_rule: -mlx5e_tc_del_flow (priv, flow); - err_free:kvfree (parse_attr);kfree (flow);
drivers/net/ethernet/mellanox/mlx5/core/vport.c +27 -6
@@ -36,6 +36,9 @@#include <linux/mlx5/vport.h> #include "mlx5_core.h" +/* Mutex to hold while enabling or disabling RoCE */ +static DEFINE_MUTEX (mlx5_roce_en_lock); +static int _mlx5_query_vport_state (struct mlx5_core_dev *mdev,u8 opmod,u16 vport,u32 *out,int outlen) {
@@ -998,17 +1001,35 @@ static int mlx5_nic_vport_update_roce_state(struct mlx5_core_dev *mdev,int mlx5_nic_vport_enable_roce (struct mlx5_core_dev *mdev) { -if (atomic_inc_return (&mdev->roce.roce_en) !=1 ) -return 0 ; -return mlx5_nic_vport_update_roce_state (mdev,MLX5_VPORT_ROCE_ENABLED ); +int err =0 ; + +mutex_lock (&mlx5_roce_en_lock); +if (!mdev->roce.roce_en) + err =mlx5_nic_vport_update_roce_state (mdev,MLX5_VPORT_ROCE_ENABLED ); + +if (!err) + mdev->roce.roce_en++; +mutex_unlock (&mlx5_roce_en_lock); + +return err; }EXPORT_SYMBOL_GPL (mlx5_nic_vport_enable_roce);int mlx5_nic_vport_disable_roce (struct mlx5_core_dev *mdev) { -if (atomic_dec_return (&mdev->roce.roce_en) !=0 ) -return 0 ; -return mlx5_nic_vport_update_roce_state (mdev,MLX5_VPORT_ROCE_DISABLED ); +int err =0 ; + +mutex_lock (&mlx5_roce_en_lock); +if (mdev->roce.roce_en) { + mdev->roce.roce_en--; +if (mdev->roce.roce_en ==0 ) + err =mlx5_nic_vport_update_roce_state (mdev,MLX5_VPORT_ROCE_DISABLED ); + +if (err) + mdev->roce.roce_en++; + } +mutex_unlock (&mlx5_roce_en_lock); +return err; }EXPORT_SYMBOL_GPL (mlx5_nic_vport_disable_roce);
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c +5 -4
@@ -68,10 +68,11 @@/* CPP address to retrieve the data from */ #define NSP_BUFFER 0x10#define NSP_BUFFER_CPP GENMASK_ULL(63, 40) -#define NSP_BUFFER_PCIE GENMASK_ULL(39, 38) -#define NSP_BUFFER_ADDRESS GENMASK_ULL(37, 0) +#define NSP_BUFFER_ADDRESS GENMASK_ULL(39, 0)#define NSP_DFLT_BUFFER 0x18 +#define NSP_DFLT_BUFFER_CPP GENMASK_ULL(63, 40) +#define NSP_DFLT_BUFFER_ADDRESS GENMASK_ULL(39, 0)#define NSP_DFLT_BUFFER_CONFIG 0x20#define NSP_DFLT_BUFFER_SIZE_MB GENMASK_ULL(7, 0)
@@ -412,8 +413,8 @@ static int nfp_nsp_command_buf(struct nfp_nsp *nsp, u16 code, u32 option,if (err <0 )return err; - cpp_id =FIELD_GET (NSP_BUFFER_CPP , reg) <<8 ; - cpp_buf =FIELD_GET (NSP_BUFFER_ADDRESS , reg); + cpp_id =FIELD_GET (NSP_DFLT_BUFFER_CPP , reg) <<8 ; + cpp_buf =FIELD_GET (NSP_DFLT_BUFFER_ADDRESS , reg);if (in_buf && in_size) { err =nfp_cpp_write (cpp, cpp_id, cpp_buf, in_buf, in_size);
drivers/net/ethernet/realtek/r8169.c +2 -2
@@ -8466,12 +8466,12 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out_msi_5; } +pci_set_drvdata (pdev, dev); + rc =register_netdev (dev);if (rc <0 ) goto err_out_cnt_6; -pci_set_drvdata (pdev, dev); -netif_info (tp, probe, dev,"%s at 0x%p, %pM, XID %08x IRQ %d\n" , rtl_chip_infos[chipset].name, ioaddr, dev->dev_addr, (u32)(RTL_R32 (TxConfig) &0x9cf0f8ff ), pdev->irq);
drivers/net/ppp/pptp.c +0 -1
@@ -464,7 +464,6 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr, po->chan.mtu =dst_mtu (&rt->dst);if (!po->chan.mtu) po->chan.mtu =PPP_MRU ; -ip_rt_put (rt); po->chan.mtu -=PPTP_HEADER_OVERHEAD ; po->chan.hdrlen =2 +sizeof (struct pptp_gre_header );
drivers/net/team/team.c +5 -7
@@ -1197,11 +1197,6 @@ static int team_port_add(struct team *team, struct net_device *port_dev) goto err_dev_open; } -netif_addr_lock_bh (dev); -dev_uc_sync_multiple (port_dev, dev); -dev_mc_sync_multiple (port_dev, dev); -netif_addr_unlock_bh (dev); - err =vlan_vids_add_by_dev (port_dev, dev);if (err) { netdev_err(dev, "Failed to add vlan ids to device %s\n",
@@ -1241,6 +1236,11 @@ static int team_port_add(struct team *team, struct net_device *port_dev) goto err_option_port_add; } +netif_addr_lock_bh (dev); +dev_uc_sync_multiple (port_dev, dev); +dev_mc_sync_multiple (port_dev, dev); +netif_addr_unlock_bh (dev); + port->index =-1 ;list_add_tail_rcu (&port->list, &team->port_list);team_port_enable (team, port);
@@ -1265,8 +1265,6 @@ static int team_port_add(struct team *team, struct net_device *port_dev)vlan_vids_del_by_dev (port_dev, dev); err_vids_add: -dev_uc_unsync (port_dev, dev); -dev_mc_unsync (port_dev, dev);dev_close (port_dev); err_dev_open:
drivers/net/usb/lan78xx.c +21 -2
@@ -2863,8 +2863,7 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)if (ret <0 ) {netdev_warn (dev->net,"lan78xx_setup_irq_domain() failed : %d" , ret); -kfree (pdata); -return ret; + goto out1; } dev->net->hard_header_len +=TX_OVERHEAD ;
@@ -2872,14 +2871,32 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)/* Init all registers */ ret =lan78xx_reset (dev); +if (ret) { +netdev_warn (dev->net,"Registers INIT FAILED...." ); + goto out2; + } ret =lan78xx_mdio_init (dev); +if (ret) { +netdev_warn (dev->net,"MDIO INIT FAILED....." ); + goto out2; + } dev->net->flags |=IFF_MULTICAST ; pdata->wol =WAKE_MAGIC ;return ret; + +out2: +lan78xx_remove_irq_domain (dev); + +out1: +netdev_warn (dev->net,"Bind routine FAILED" ); +cancel_work_sync (&pdata->set_multicast); +cancel_work_sync (&pdata->set_vlan); +kfree (pdata); +return ret; }static void lan78xx_unbind (struct lan78xx_net *dev,struct usb_interface *intf)
@@ -2891,6 +2908,8 @@ static void lan78xx_unbind(struct lan78xx_net *dev, struct usb_interface *intf)lan78xx_remove_mdio (dev);if (pdata) { +cancel_work_sync (&pdata->set_multicast); +cancel_work_sync (&pdata->set_vlan);netif_dbg (dev, ifdown, dev->net,"free pdata" );kfree (pdata); pdata =NULL ;
drivers/net/vrf.c +3 -2
@@ -579,12 +579,13 @@ static int vrf_finish_output(struct net *net, struct sock *sk, struct sk_buff *sif (!IS_ERR (neigh)) {sock_confirm_neigh (skb, neigh); ret =neigh_output (neigh, skb); +rcu_read_unlock_bh (); +return ret; }rcu_read_unlock_bh (); err: -if (unlikely (ret <0 )) -vrf_tx_error (skb->dev, skb); +vrf_tx_error (skb->dev, skb);return ret; }
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c +14 -8
@@ -142,15 +142,25 @@ void rt2x00mac_tx(struct ieee80211_hw *hw,if (!rt2x00dev->ops->hw->set_rts_threshold && (tx_info->control.rates[0 ].flags & (IEEE80211_TX_RC_USE_RTS_CTS |IEEE80211_TX_RC_USE_CTS_PROTECT ))) { -if (rt2x00queue_available (queue) <=1 ) - goto exit_fail; +if (rt2x00queue_available (queue) <=1 ) { +/* +* Recheck for full queue under lock to avoid race +* conditions with rt2x00lib_txdone(). +*/ +spin_lock (&queue->tx_lock); +if (rt2x00queue_threshold (queue)) +rt2x00queue_pause_queue (queue); +spin_unlock (&queue->tx_lock); + + goto exit_free_skb; + }if (rt2x00mac_tx_rts_cts (rt2x00dev, queue, skb)) - goto exit_fail; + goto exit_free_skb; }if (unlikely (rt2x00queue_write_tx_frame (queue, skb, control->sta, false))) - goto exit_fail; + goto exit_free_skb;/* * Pausing queue has to be serialized with rt2x00lib_txdone(). Note
@@ -164,10 +174,6 @@ void rt2x00mac_tx(struct ieee80211_hw *hw,return ; - exit_fail: -spin_lock (&queue->tx_lock); -rt2x00queue_pause_queue (queue); -spin_unlock (&queue->tx_lock); exit_free_skb:ieee80211_free_txskb (hw, skb); }
drivers/net/wireless/ti/wl1251/main.c +1 -2
@@ -1200,8 +1200,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,WARN_ON (wl->bss_type !=BSS_TYPE_STA_BSS ); enable = bss_conf->arp_addr_cnt ==1 && bss_conf->assoc; -wl1251_acx_arp_ip_filter (wl, enable, addr); - + ret =wl1251_acx_arp_ip_filter (wl, enable, addr);if (ret <0 ) goto out_sleep; }
drivers/nvme/target/fcloop.c +32 -15
10 lines not on this page · raw message
drivers/pinctrl/intel/pinctrl-baytrail.c +6 -0
Lines of this file are not shown. View the raw message.
drivers/scsi/megaraid/megaraid_sas_base.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/scsi/megaraid/megaraid_sas_fp.c +12 -4
Lines of this file are not shown. View the raw message.
drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +7 -6
Lines of this file are not shown. View the raw message.
drivers/thermal/int340x_thermal/int3400_thermal.c +7 -3
Lines of this file are not shown. View the raw message.
sound/soc/intel/boards/cht_bsw_rt5645.c +7 -0
Lines of this file are not shown. View the raw message.
tools/perf/arch/powerpc/util/sym-handling.c +8 -0
Lines of this file are not shown. View the raw message.
tools/perf/util/evsel.c +45 -2
47 lines not on this page · raw message
tools/testing/selftests/net/msg_zerocopy.c +15 -6
Lines of this file are not shown. View the 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.