Skip to contentSkip to conversation

Linux 4.9.90

DISCUSSION Greg KH 1 participant 2 messages Mar 25, 2018 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.9.90 kernel.

All users of the 4.9 kernel series must upgrade.

The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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

------------

 Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt |   30 ---
 Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt     |   30 +++
 Documentation/devicetree/bindings/mfd/axp20x.txt                       |    3 
 Makefile                                                               |    2 
 arch/alpha/kernel/console.c                                            |    1 
 arch/arm/boot/dts/aspeed-ast2500-evb.dts                               |    2 
 arch/arm/kernel/ftrace.c                                               |   11 -
 arch/arm/mach-omap2/clockdomains7xx_data.c                             |    2 
 arch/ia64/kernel/module.c                                              |    4 
 arch/powerpc/include/asm/cputable.h                                    |    3 
 arch/powerpc/kvm/book3s_64_mmu_host.c                                  |    5 
 arch/powerpc/kvm/book3s_pr.c                                           |    6 
 arch/x86/boot/compressed/kaslr.c                                       |   11 +
 arch/x86/kernel/i8259.c                                                |    1 
 arch/x86/kernel/smp.c                                                  |    3 
 arch/x86/xen/smp.c                                                     |   49 +++--
 block/blk-mq.c                                                         |    4 
 drivers/acpi/pmic/intel_pmic_xpower.c                                  |   50 ++---
 drivers/acpi/power.c                                                   |   10 +
 drivers/acpi/processor_driver.c                                        |   10 +
 drivers/acpi/processor_throttling.c                                    |   62 ++++--
 drivers/acpi/sleep.c                                                   |    1 
 drivers/acpi/sleep.h                                                   |    1 
 drivers/block/mtip32xx/mtip32xx.c                                      |   36 ++--
 drivers/bluetooth/btqcomsmd.c                                          |    3 
 drivers/bluetooth/hci_ldisc.c                                          |   11 -
 drivers/bluetooth/hci_qca.c                                            |    3 
 drivers/char/ipmi/ipmi_watchdog.c                                      |    8 
 drivers/char/tpm/tpm-interface.c                                       |    5 
 drivers/char/tpm/tpm2-cmd.c                                            |    6 
 drivers/clk/bcm/clk-ns2.c                                              |    2 
 drivers/clk/clk-axi-clkgen.c                                           |   29 ++-
 drivers/clk/clk-si5351.c                                               |    2 
 drivers/clk/clk.c                                                      |   32 ++-
 drivers/cpufreq/sh-cpufreq.c                                           |   45 +++--
 drivers/dma/ti-dma-crossbar.c                                          |   10 +
 drivers/dma/xilinx/zynqmp_dma.c                                        |    3 
 drivers/gpio/gpio-wcove.c                                              |    8 
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c                             |    7 
 drivers/gpu/drm/msm/msm_gem.c                                          |   14 +
 drivers/gpu/drm/nouveau/nouveau_display.c                              |    2 
 drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c                |    3 
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c                               |    5 
 drivers/gpu/drm/tilcdc/tilcdc_regs.h                                   |    2 
 drivers/hsi/clients/ssi_protocol.c                                     |    5 
 drivers/hwtracing/coresight/coresight-tpiu.c                           |   13 +
 drivers/i2c/busses/i2c-scmi.c                                          |    4 
 drivers/iio/accel/st_accel_core.c                                      |    7 
 drivers/iio/common/hid-sensors/hid-sensor-attributes.c                 |    4 
 drivers/iio/pressure/st_pressure_core.c                                |    8 
 drivers/infiniband/core/cma.c                                          |    5 
 drivers/infiniband/core/iwpm_util.c                                    |    1 
 drivers/infiniband/core/ucma.c                                         |    8 
 drivers/infiniband/core/umem.c                                         |    2 
 drivers/infiniband/core/uverbs_cmd.c                                   |   13 +
 drivers/infiniband/hw/hfi1/chip.c                                      |   86 +++++----
 drivers/infiniband/hw/hfi1/hfi.h                                       |    7 
 drivers/infiniband/hw/hfi1/init.c                                      |    2 
 drivers/infiniband/hw/mlx4/main.c                                      |    6 
 drivers/infiniband/hw/mlx5/cq.c                                        |   19 +-
 drivers/infiniband/hw/mlx5/main.c                                      |    5 
 drivers/infiniband/hw/mlx5/qp.c                                        |   24 +-
 drivers/infiniband/hw/mlx5/srq.c                                       |   15 +
 drivers/infiniband/hw/ocrdma/ocrdma_stats.c                            |    2 
 drivers/infiniband/sw/rdmavt/ah.c                                      |    2 
 drivers/infiniband/sw/rxe/rxe_resp.c                                   |    2 
 drivers/infiniband/ulp/ipoib/ipoib_ib.c                                |   13 +
 drivers/infiniband/ulp/ipoib/ipoib_main.c                              |   16 +
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c                         |   11 -
 drivers/infiniband/ulp/isert/ib_isert.c                                |    7 
 drivers/infiniband/ulp/isert/ib_isert.h                                |    1 
 drivers/input/misc/twl4030-pwrbutton.c                                 |    2 
 drivers/input/touchscreen/ar1021_i2c.c                                 |    2 
 drivers/iommu/intel-svm.c                                              |    9 -
 drivers/iommu/omap-iommu.c                                             |   21 ++
 drivers/irqchip/irq-mips-gic.c                                         |   12 -
 drivers/leds/led-core.c                                                |    3 
 drivers/md/raid10.c                                                    |    6 
 drivers/media/dvb-core/dvb_ca_en50221.c                                |   23 ++
 drivers/media/dvb-frontends/si2168.c                                   |    3 
 drivers/media/pci/bt8xx/bt878.c                                        |    3 
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c                  |    4 
 drivers/mfd/palmas.c                                                   |   14 +
 drivers/mmc/core/core.c                                                |    8 
 drivers/mmc/host/omap_hsmmc.c                                          |    4 
 drivers/mmc/host/sdhci-of-esdhc.c                                      |   14 +
 drivers/net/bonding/bond_main.c                                        |    3 
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c                        |    1 
 drivers/net/ethernet/freescale/ucc_geth.c                              |    8 
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c                     |    2 
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c                      |    2 
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c                      |    2 
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c                    |    2 
 drivers/net/ethernet/ibm/ibmvnic.c                                     |   18 ++
 drivers/net/ethernet/intel/e1000e/netdev.c                             |    6 
 drivers/net/ethernet/intel/ixgbevf/ethtool.c                           |    2 
 drivers/net/ethernet/qlogic/qed/qed_vf.c                               |    2 
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c               |    2 
 drivers/net/hyperv/netvsc.c                                            |   16 +
 drivers/net/usb/qmi_wwan.c                                             |    4 
 drivers/net/vxlan.c                                                    |   10 -
 drivers/net/wan/pc300too.c                                             |    1 
 drivers/net/wireless/ath/ath10k/debug.c                                |   16 +
 drivers/net/wireless/ath/ath10k/mac.c                                  |    2 
 drivers/net/wireless/ath/regd.c                                        |   19 +-
 drivers/net/wireless/intel/iwlwifi/iwl-a000.c                          |    6 
 drivers/net/wireless/intel/iwlwifi/iwl-notif-wait.c                    |   10 -
 drivers/net/wireless/intel/iwlwifi/iwl-notif-wait.h                    |   25 ++
 drivers/net/wireless/marvell/libertas/if_spi.c                         |    5 
 drivers/net/wireless/marvell/mwifiex/main.c                            |    4 
 drivers/net/wireless/mediatek/mt7601u/mcu.c                            |   10 -
 drivers/net/wireless/realtek/rtlwifi/pci.c                             |    7 
 drivers/net/wireless/rndis_wlan.c                                      |    4 
 drivers/pinctrl/core.c                                                 |   24 +-
 drivers/pinctrl/pinctrl-rockchip.c                                     |    8 
 drivers/platform/chrome/cros_ec_proto.c                                |    8 
 drivers/platform/chrome/cros_ec_sysfs.c                                |    2 
 drivers/platform/x86/asus-nb-wmi.c                                     |   22 ++
 drivers/platform/x86/asus-wmi.c                                        |   12 +
 drivers/platform/x86/asus-wmi.h                                        |    1 
 drivers/platform/x86/intel-vbtn.c                                      |    4 
 drivers/power/supply/bq24190_charger.c                                 |   10 +
 drivers/power/supply/isp1704_charger.c                                 |    4 
 drivers/power/supply/pda_power.c                                       |   49 +++--
 drivers/ptp/ptp_clock.c                                                |   18 --
 drivers/regulator/anatop-regulator.c                                   |    5 
 drivers/rtc/rtc-cmos.c                                                 |   17 +
 drivers/rtc/rtc-ds1374.c                                               |   10 -
 drivers/scsi/lpfc/lpfc_init.c                                          |    6 
 drivers/scsi/lpfc/lpfc_sli.c                                           |    3 
 drivers/scsi/mac_esp.c                                                 |   33 ++-
 drivers/scsi/virtio_scsi.c                                             |   24 ++
 drivers/soc/fsl/qe/qe.c                                                |   13 +
 drivers/spi/spi-dw-mmio.c                                              |    2 
 drivers/staging/android/ashmem.c                                       |    8 
 drivers/staging/unisys/visorhba/visorhba_main.c                        |    8 
 drivers/staging/wilc1000/linux_mon.c                                   |    2 
 drivers/target/target_core_file.c                                      |   23 +-
 drivers/tty/serial/8250/8250_dw.c                                      |    3 
 drivers/tty/tty_io.c                                                   |    2 
 drivers/usb/gadget/function/f_hid.c                                    |   89 +++++++---
 drivers/video/console/vgacon.c                                         |   34 ++-
 drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c       |    3 
 drivers/video/fbdev/sm501fb.c                                          |    1 
 drivers/video/fbdev/udlfb.c                                            |   14 +
 drivers/watchdog/watchdog_dev.c                                        |    6 
 fs/btrfs/file.c                                                        |    4 
 fs/btrfs/inode.c                                                       |    6 
 fs/btrfs/send.c                                                        |   23 ++
 fs/btrfs/volumes.c                                                     |   12 +
 fs/cifs/netmisc.c                                                      |    6 
 fs/cifs/sess.c                                                         |   22 +-
 fs/cifs/smb2pdu.c                                                      |   15 -
 fs/jbd2/journal.c                                                      |   15 +
 fs/nfs/pagelist.c                                                      |    6 
 fs/nfs/pnfs.c                                                          |   18 +-
 fs/nfsd/nfs4proc.c                                                     |    6 
 fs/nfsd/vfs.c                                                          |   24 ++
 fs/orangefs/waitqueue.c                                                |    9 -
 include/acpi/actbl2.h                                                  |    9 +
 include/linux/mlx5/driver.h                                            |    4 
 include/linux/posix-clock.h                                            |   10 -
 include/soc/fsl/qe/qe.h                                                |    1 
 kernel/irq/manage.c                                                    |    4 
 kernel/time/posix-clock.c                                              |   34 ++-
 mm/memory-failure.c                                                    |    8 
 mm/vmscan.c                                                            |    6 
 mm/vmstat.c                                                            |   20 +-
 net/ipv4/tcp_input.c                                                   |   16 +
 net/ipv6/ip6_vti.c                                                     |   20 ++
 net/ipv6/ndisc.c                                                       |    2 
 net/mac80211/cfg.c                                                     |   30 +--
 net/mac80211/ibss.c                                                    |    6 
 net/mac80211/ieee80211_i.h                                             |   36 ++--
 net/mac80211/mesh.c                                                    |   29 ++-
 net/mac80211/mesh_plink.c                                              |   37 ++--
 net/mac80211/mlme.c                                                    |   14 +
 net/mac80211/rate.c                                                    |    4 
 net/mac80211/sta_info.c                                                |   13 +
 net/mac80211/status.c                                                  |    1 
 net/mac80211/tdls.c                                                    |   29 ++-
 net/mac80211/tx.c                                                      |    5 
 net/mac80211/util.c                                                    |    6 
 net/netfilter/ipvs/ip_vs_ctl.c                                         |   22 +-
 net/netfilter/nf_conntrack_helper.c                                    |   26 ++
 net/netfilter/nft_dynset.c                                             |    5 
 net/netfilter/x_tables.c                                               |    4 
 net/netfilter/xt_CT.c                                                  |   11 +
 net/openvswitch/conntrack.c                                            |   30 +++
 net/sunrpc/xprtrdma/verbs.c                                            |    1 
 net/tipc/node.c                                                        |    2 
 sound/pci/hda/patch_realtek.c                                          |   12 +
 sound/soc/intel/atom/sst/sst_acpi.c                                    |   16 +
 sound/soc/intel/skylake/skl.c                                          |    2 
 sound/soc/sh/rcar/cmd.c                                                |    3 
 tools/perf/tests/kmod-path.c                                           |    2 
 tools/testing/nvdimm/test/nfit.c                                       |   10 +
 197 files changed, 1639 insertions(+), 627 deletions(-)

Abel Vesa (1):
ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER

Adam Borowski (1):
btrfs: fix a bogus warning when converting only data or metadata

Alexey Kardashevskiy (1):
KVM: PPC: Book3S PR: Exit KVM on failed mapping

Alexey Khoroshilov (1):
sm501fb: don't return zero on failure path in sm501fb_start()

Alexey Kodanev (1):
ip6_vti: adjust vti mtu according to mtu of lower device

Anton Vasilyev (1):
RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS

Arnd Bergmann (1):
cros_ec: fix nul-termination for firmware build info

Artemy Kovalyov (1):
IB/umem: Fix use of npages/nmap fields

Balaji Pothunoori (1):
ath10k: handling qos at STA side based on AP WMM enable/disable

Baoquan He (1):
x86/KASLR: Fix kexec kernel boot crash when KASLR randomization fails

Benjamin Coddington (2):
NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete()
nfsd4: permit layoutget of executable-only files

Bernd Faust (1):
e1000e: fix timing for 82579 Gigabit Ethernet controller

Bharat Kumar Reddy Gooty (1):
clk: ns2: Correct SDIO bits

Bharat Potnuri (1):
iser-target: avoid reinitializing rdma contexts for isert commands

Bjorn Helgaas (1):
vgacon: Set VGA struct resource types

Bjørn Mork (1):
qmi_wwan: set FLAG_SEND_ZLP to avoid network initiated disconnect

Boris Pismenny (2):
IB/mlx5: Fix integer overflows in mlx5_ib_create_srq IB/mlx5: Fix out-of-bounds read in create_raw_packet_qp_rq

Brian King (1):
ibmvnic: Disable irq prior to close

Brian Norris (2):
mwifiex: don't leak 'chan_stats' on reset
pinctrl: rockchip: enable clock when reading pin direction register

Christophe JAILLET (1):

      media: bt8xx: Fix err 'bt878_probe()'

Christophe Leroy (1):
net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

Chuck Lever (1):
xprtrdma: Cancel refresh worker during buffer shutdown

Chunming Zhou (1):
drm/amdgpu: fix gpu reset crash

Colin Ian King (1):
iio: hid-sensor: fix return of -EINVAL on invalid values in ret or value

Dan Carpenter (7):
HSI: ssi_protocol: double free in ssip_pn_xmit()
ASoC: Intel: Skylake: Uninitialized variable in probe_codec()
mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR()
netfilter: x_tables: unlock on error in xt_find_table_lock() IB/rdmavt: restore IRQs on error path in rvt_create_ah()
qed: Unlock on error in qed_vf_pf_acquire()
cifs: small underflow in cnvrtDosUnixTm()

Dan Williams (1):
tools/testing/nvdimm: fix nfit_test shutdown crash

Daniel Drake (1):
mmc: avoid removing non-removable hosts during suspend

David Ahern (1):
net: ipv6: send unsolicited NA on admin up

David Gibson (1):
scsi: virtio_scsi: Always try to read VPD pages

David Rientjes (1):
mm, vmstat: suppress pcp stats for unpopulated zones in zoneinfo

Dean Jenkins (2):
Bluetooth: hci_ldisc: Add protocol check to hci_uart_dequeue()
Bluetooth: hci_ldisc: Add protocol check to hci_uart_tx_wakeup()

Deepa Dinamani (1):
time: Change posix clocks ops interfaces to use timespec64

Dmitry Monakhov (1):
tcm_fileio: Prevent information leak for short reads

Dmitry Torokhov (1):
Input: ar1021_i2c - fix too long name in driver's device table

Dong Aisheng (1):
regulator: anatop: set default voltage selector for pcie

Edgar Cherkasov (1):
i2c: i2c-scmi: add a MS HID

Emil Tantilov (1):
ixgbevf: fix size of queue stats length

Emmanuel Grumbach (2):
iwlwifi: split the handler and the wake parts of the notification infra
mac80211: don't parse encrypted management frames in ieee80211_frame_acked

Erez Shitrit (1):
IB/ipoib: Avoid memory leak if the SA returns a different DGID

Eric Dumazet (1):
tcp: remove poll() flakes with FastOpen

Feras Daoud (2):
IB/ipoib: Fix deadlock between ipoib_stop and mcast join flow IB/ipoib: Update broadcast object if PKey value was changed in index 0

Filipe Manana (3):
Btrfs: fix incorrect space accounting after failure to insert inline extent
Btrfs: send, fix file hole not being preserved due to inline extent
Btrfs: fix extent map leak during fallocate error path

Finn Thain (1):
scsi: mac_esp: Replace bogus memory barrier with spinlock

Florian Fainelli (1):
pinctrl: Really force states during suspend/resume

Gao Feng (1):
netfilter: xt_CT: fix refcnt leak on error path

Geert Uytterhoeven (1):
RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo()

Greg Kroah-Hartman (1):

      Linux 4.9.90

Guenter Roeck (1):
watchdog: Fix potential kref imbalance when opening watchdog

Guoqing Jiang (1):
md/raid10: wait up frozen array in handle_write_completed

Gustavo A. R. Silva (1):
media: c8sectpfe: fix potential NULL pointer dereference in c8sectpfe_timer_interrupt

H. Nikolaus Schaller (1):
omapdrm: panel: fix compatible vendor string for td028ttec1

Hans de Goede (6):
x86: i8259: export legacy_pic symbol
rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs
genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs ACPI / PMIC: xpower: Fix power_table addresses
power: supply: bq24190_charger: Add disable-reset device-property ACPI / power: Delay turning off unused power resources after suspend

Jacek Anaszewski (2):
Revert "led: core: Fix brightness setting when setting delay_off=0"
led: core: Clear LED_BLINK_SW flag in led_blink_set()

James Smart (2):
Fix driver usage of 128B WQEs when WQ_CREATE is V1. Fix Express lane queue creation.

Jan Kara (1):
jbd2: Fix lockdep splat with generic/270 test

Jarno Rajahalme (1):
openvswitch: Delete conntrack entry clashing with an expectation.

Jasmin J (1):
media/dvb-core: Race condition when writing to CAM

Jeremy Boone (1):
tpm: fix potential buffer overruns caused by bit glitches on the bus

Jerome Brunet (1):
clk: migrate the count of orphaned clocks at init

Jerry Snitselaar (1):
iommu/vt-d: clean up pr_irq if request_threaded_irq fails

Jiri Benc (1):
vxlan: correctly handle ipv6.disable module parameter

Joel Stanley (1):
ARM: dts: aspeed-evb: Add unit name to memory node

Johannes Thumshirn (1):
IB/rxe: Don't clamp residual length to mtu

Johannes Weiner (1):
mm: fix check for reclaimable pages in PF_MEMALLOC reclaim throttling

K. Y. Srinivasan (1):
netvsc: Deal with rescinded channels correctly

Kedareswara rao Appana (1):
dmaengine: zynqmp_dma: Fix race condition in the probe

Keerthy (1):
mfd: palmas: Reset the POWERHOLD mux during power off

Kim Phillips (1):
perf tests kmod-path: Don't fail if compressed modules aren't supported

Kishon Vijay Abraham I (1):
ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP

Krzysztof Opasiak (1):
usb: gadget: f_hid: fix: Move IN request allocation to set_alt()

Kuninori Morimoto (1):
ASoC: rsnd: check src mod pointer for rsnd_mod_id()

Kuppuswamy Sathyanarayanan (2):
gpio: gpio-wcove: fix irq pending status bit width
gpio: gpio-wcove: fix GPIO IRQ status mask

Lars-Peter Clausen (1):
clk: axi-clkgen: Correctly handle nocount bit in recalc_rate()

Leon Romanovsky (2):
RDMA/ucma: Fix access to non-initialized CM_ID object RDMA/ucma: Don't allow join attempts for unsupported AF family

Liad Kaufman (1):
iwlwifi: a000: fix memory offsets and lengths

Liam Breck (1):
power: supply: bq24190_charger: Limit over/under voltage fault logging

Liping Zhang (2):
netfilter: nf_ct_helper: permit cthelpers with different names via nfnetlink
netfilter: nft_dynset: continue to next expr if _OP_ADD succeeded

Logan Gunthorpe (1):
drm/tilcdc: ensure nonatomic iowrite64 is not used

Loic Poulain (2):
Bluetooth: hci_qca: Avoid setup failure on missing rampatch
Bluetooth: btqcomsmd: Fix skb double free corruption

Lv Zheng (1):
ACPICA: iasl: Fix IORT SMMU GSI disassembling

Maarten Maathuis (1):
platform/x86: intel-vbtn: add volume up and down

Mahesh Bandewar (1):
bonding: handle link transition from FAIL to UP correctly

Maksim Salau (1):
video: fbdev: udlfb: Fix buffer on stack

Maor Gottlieb (4):
IB/mlx4: Take write semaphore when changing the vma struct IB/mlx4: Change vma from shared to private IB/mlx5: Take write semaphore when changing the vma struct IB/mlx5: Change vma from shared to private

Marek Vasut (1):
spi: dw: Disable clock after unregistering the host

Mario Kleiner (1):
drm/nouveau/kms: Increase max retries in scanout position queries.

Martin Brandenburg (1):
orangefs: do not wait for timeout if umounting

Michael Mera (1):
ath10k: fix out of bounds access to local buffer

Michael Trimarchi (1):
power: supply: pda_power: move from timer to delayed_work

Mikhail Paulyshka (1):
ALSA: hda - Fix headset microphone detection for ASUS N551 and N751

Ming Lei (1):
mtip32xx: use runtime tag to initialize command header

Mohammed Shafi Shajakhan (2):
ath: Fix updating radar flags for coutry code India
mac80211: Fix possible sband related NULL pointer de-reference

Moni Shoua (1):
IB/mlx5: Set correct SL in completion for RoCE

Moritz Fischer (2):
rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks
rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL

Naoya Horiguchi (1):
mm: hwpoison: call shake_page() after try_to_unmap() for mlocked page

NeilBrown (1):
NFS: don't try to cross a mountpount when there isn't one there.

Nicholas Piggin (1):
powerpc/64s: Remove SAO feature from Power9 DD1

Oleksij Rempel (1):
platform/x86: asus-wmi: try to set als by default

Pan Bian (8):
tipc: check return value of nlmsg_new
wan: pc300too: abort path on failure
qlcnic: fix unchecked return value
mt7601u: check return value of alloc_skb
libertas: check return value of alloc_workqueue
rndis_wlan: add return value validation
staging: wilc1000: fix unchecked return value
power: supply: isp1704: Fix unchecked return value of devm_kzalloc

Paolo Abeni (1):
ipvs: explicitly forbid ipv6 service/dest creation if ipv6 mod is disabled

Parav Pandit (1):
RDMA/cma: Use correct size when writing netlink stats

Paul Burton (1):
irqchip/mips-gic: Separate IPI reservation & usage tracking

Pavel Shilovsky (1):
CIFS: Enable encryption during session setup phase

Peter Ujfalusi (1):
drm/omap: DMM: Check for DMM readiness after successful transaction commit

Peter Zijlstra (1):
block/mq: Cure cpu hotplug lock inversion

Pierre-Louis Bossart (1):
ASoC: Intel: Atom: update Thinkpad 10 quirk

Prakash Kamliya (1):
drm/msm: fix leak in failed get_pages

Rask Ingemann Lambertsen (1):

      dt-bindings: mfd: axp20x: Add "xpowers,master-mode" property for AXP806 PMICs

Robert Lippert (1):
ipmi/watchdog: fix wdog hang on panic waiting for ipmi response

Robert Walker (1):
coresight: Fix disabling of CoreSight TPIU

Ron Economos (1):
media: [RESEND] media: dvb-frontends: Add delay to Si2168 restart

Sahara (1):
pty: cancel pty slave port buf's work in tty_release

Sameer Wadgaonkar (1):
staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y

Santeri Toivonen (1):
platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA

Scott Wood (1):
bnx2x: Align RX buffers

Sebastian Reichel (1):
Input: twl4030-pwrbutton - use correct device for irq request

Sergei Trofimovich (1):
ia64: fix module loading for gcc-5.4

Sergej Sawazki (1):
clk: si5351: Rename internal plls to avoid name collisions

Shaohua Li (1):
md/raid10: skip spare disk as 'first' disk

Shawn Nematbakhsh (1):
platform/chrome: Use proper protocol transfer function

Shrirang Bagul (1):
iio: st_pressure: st_accel: Initialise sensor platform data properly

Stefan Potyra (1):
serial: 8250_dw: Disable clock on error

Stephen Boyd (1):
clk: Don't touch hardware when reparenting during registration

Steve French (1):
SMB3: Validate negotiate request must always be signed

Suman Anna (1):
iommu/omap: Register driver before setting IOMMU ops

Tadeusz Struk (1):
IB/hfi1: Fix softlockup issue

Thomas Gleixner (3):
ACPI/processor: Fix error handling in __acpi_processor_start() ACPI/processor: Replace racy task affinity logic cpufreq/sh: Replace racy task affinity logic

Tiantian Feng (1):
x86/reboot: Turn off KVM when halting a CPU

Timmy Li (1):
net: hns: fix ethtool_get_strings overflow in hns driver

Trond Myklebust (2):
pNFS: Fix use after free issues in pnfs_do_read()
pNFS: Fix a deadlock when coalescing writes and returning the layout

Tsang-Shian Lin (1):
rtlwifi: rtl_pci: Fix the bug when inactiveps is enabled.

Valentin Longchamp (1):
soc/fsl/qe: round brg_freq to 1kHz granularity

Vignesh R (1):
dmaengine: ti-dma-crossbar: Fix event mapping for TPCC_EVT_MUX_60_63

Vitaly Kuznetsov (1):
x86/xen: split xen_smp_prepare_boot_cpu()

Vlad Tsyrklevich (1):
infiniband/uverbs: Fix integer overflows

Yisheng Xie (1):
staging: android: ashmem: Fix possible deadlock in ashmem_ioctl

yangbo lu (1):
mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a

author maintainer
#1 lore raw
Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt deleted +0 -30
deleted file mode 100644
index 7175dc3740ac..000000000000
@@ -1,30 +0,0 @@
-Toppoly TD028TTEC1 Panel
-========================
-
-Required properties:
-- compatible: "toppoly,td028ttec1"
-
-Optional properties:
-- label: a symbolic name for the panel
-
-Required nodes:
-- Video port for DPI input
-
-Example
--------
-
-lcd-panel: td028ttec1@0 {
-	compatible = "toppoly,td028ttec1";
-	reg = <0>;
-	spi-max-frequency = <100000>;
-	spi-cpol;
-	spi-cpha;
-
-	label = "lcd";
-	port {
-		lcd_in: endpoint {
-			remote-endpoint = <&dpi_out>;
-		};
-	};
-};
-
Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt new file +30 -0
new file mode 100644
index 000000000000..ed34253d9fb1
@@ -0,0 +1,30 @@
+Toppoly TD028TTEC1 Panel
+========================
+
+Required properties:
+- compatible: "tpo,td028ttec1"
+
+Optional properties:
+- label: a symbolic name for the panel
+
+Required nodes:
+- Video port for DPI input
+
+Example
+-------
+
+lcd-panel: td028ttec1@0 {
+	compatible = "tpo,td028ttec1";
+	reg = <0>;
+	spi-max-frequency = <100000>;
+	spi-cpol;
+	spi-cpha;
+
+	label = "lcd";
+	port {
+		lcd_in: endpoint {
+			remote-endpoint = <&dpi_out>;
+		};
+	};
+};
+
Documentation/devicetree/bindings/mfd/axp20x.txt +3 -0
index 8f3ad9ab4637..b41d2601c6ba 100644
@@ -28,6 +28,9 @@ Optional properties:
 		  regulator to drive the OTG VBus, rather then as an input pin
 		  which signals whether the board is driving OTG VBus or not.
 
+- x-powers,master-mode: Boolean (axp806 only). Set this when the PMIC is
+			wired for master mode. The default is slave mode.
+
 - <input>-supply: a phandle to the regulator supply node. May be omitted if
 		  inputs are unregulated, such as using the IPSOUT output
 		  from the PMIC.
Makefile +1 -1
index 16dca98900e7..df3b20af0fdb 100644
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 89
+SUBLEVEL = 90
 EXTRAVERSION =
 NAME = Roaring Lionus
 
arch/alpha/kernel/console.c +1 -0
index 6a61deed4a85..ab228ed45945 100644
@@ -20,6 +20,7 @@
 struct pci_controller *pci_vga_hose;
 static struct resource alpha_vga = {
 	.name	= "alpha-vga+",
+	.flags	= IORESOURCE_IO,
 	.start	= 0x3C0,
 	.end	= 0x3DF
 };
arch/arm/boot/dts/aspeed-ast2500-evb.dts +1 -1
index 1b7a5ff0e533..d7774d35e466 100644
@@ -15,7 +15,7 @@
 		bootargs = "console=ttyS4,115200 earlyprintk";
 	};
 
-	memory {
+	memory@80000000 {
 		reg = <0x80000000 0x20000000>;
 	};
 };
arch/arm/kernel/ftrace.c +6 -5
index 3f1759411d51..414e60ed0257 100644
@@ -29,11 +29,6 @@
 #endif
 
 #ifdef CONFIG_DYNAMIC_FTRACE
-#ifdef CONFIG_OLD_MCOUNT
-#define OLD_MCOUNT_ADDR	((unsigned long) mcount)
-#define OLD_FTRACE_ADDR ((unsigned long) ftrace_caller_old)
-
-#define	OLD_NOP		0xe1a00000	/* mov r0, r0 */
 
 static int __ftrace_modify_code(void *data)
 {
@@ -51,6 +46,12 @@ void arch_ftrace_update_code(int command)
 	stop_machine(__ftrace_modify_code, &command, NULL);
 }
 
+#ifdef CONFIG_OLD_MCOUNT
+#define OLD_MCOUNT_ADDR	((unsigned long) mcount)
+#define OLD_FTRACE_ADDR ((unsigned long) ftrace_caller_old)
+
+#define	OLD_NOP		0xe1a00000	/* mov r0, r0 */
+
 static unsigned long ftrace_nop_replace(struct dyn_ftrace *rec)
 {
 	return rec->arch.old_mcount ? OLD_NOP : NOP;
arch/arm/mach-omap2/clockdomains7xx_data.c +1 -1
index ef9ed36e8a61..e3416b40e82b 100644
@@ -524,7 +524,7 @@ static struct clockdomain pcie_7xx_clkdm = {
 	.dep_bit	  = DRA7XX_PCIE_STATDEP_SHIFT,
 	.wkdep_srcs	  = pcie_wkup_sleep_deps,
 	.sleepdep_srcs	  = pcie_wkup_sleep_deps,
-	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
+	.flags		  = CLKDM_CAN_SWSUP,
 };
 
 static struct clockdomain atl_7xx_clkdm = {
arch/ia64/kernel/module.c +2 -2
index 6ab0ae7d6535..d1d945c6bd05 100644
@@ -153,7 +153,7 @@ slot (const struct insn *insn)
 static int
 apply_imm64 (struct module *mod, struct insn *insn, uint64_t val)
 {
-	if (slot(insn) != 2) {
+	if (slot(insn) != 1 && slot(insn) != 2) {
 		printk(KERN_ERR "%s: invalid slot number %d for IMM64\n",
 		       mod->name, slot(insn));
 		return 0;
@@ -165,7 +165,7 @@ apply_imm64 (struct module *mod, struct insn *insn, uint64_t val)
 static int
 apply_imm60 (struct module *mod, struct insn *insn, uint64_t val)
 {
-	if (slot(insn) != 2) {
+	if (slot(insn) != 1 && slot(insn) != 2) {
 		printk(KERN_ERR "%s: invalid slot number %d for IMM60\n",
 		       mod->name, slot(insn));
 		return 0;
arch/powerpc/include/asm/cputable.h +2 -1
index ab68d0ee7725..4e54282c29b4 100644
@@ -474,7 +474,8 @@ enum {
 	    CPU_FTR_ICSWX | CPU_FTR_CFAR | CPU_FTR_HVMODE | CPU_FTR_VMX_COPY | \
 	    CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_DAWR | \
 	    CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP | CPU_FTR_ARCH_300)
-#define CPU_FTRS_POWER9_DD1 (CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD1)
+#define CPU_FTRS_POWER9_DD1 ((CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD1) & \
+			     (~CPU_FTR_SAO))
 #define CPU_FTRS_CELL	(CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
 	    CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
 	    CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
arch/powerpc/kvm/book3s_64_mmu_host.c +4 -1
index a587e8f4fd26..4b4e927c4822 100644
@@ -177,12 +177,15 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte,
 	ret = mmu_hash_ops.hpte_insert(hpteg, vpn, hpaddr, rflags, vflags,
 				       hpsize, hpsize, MMU_SEGSIZE_256M);
 
-	if (ret < 0) {
+	if (ret == -1) {
 		/* If we couldn't map a primary PTE, try a secondary */
 		hash = ~hash;
 		vflags ^= HPTE_V_SECONDARY;
 		attempt++;
 		goto map_again;
+	} else if (ret < 0) {
+		r = -EIO;
+		goto out_unlock;
 	} else {
 		trace_kvm_book3s_64_mmu_map(rflags, hpteg,
 					    vpn, hpaddr, orig_pte);
arch/powerpc/kvm/book3s_pr.c +5 -1
index 826c541a12af..e0d88d0890aa 100644
@@ -627,7 +627,11 @@ int kvmppc_handle_pagefault(struct kvm_run *run, struct kvm_vcpu *vcpu,
 			kvmppc_mmu_unmap_page(vcpu, &pte);
 		}
 		/* The guest's PTE is not mapped yet. Map on the host */
-		kvmppc_mmu_map_page(vcpu, &pte, iswrite);
+		if (kvmppc_mmu_map_page(vcpu, &pte, iswrite) == -EIO) {
+			/* Exit KVM if mapping failed */
+			run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
+			return RESUME_HOST;
+		}
 		if (data)
 			vcpu->stat.sp_storage++;
 		else if (vcpu->arch.mmu.is_dcbz32(vcpu) &&
arch/x86/boot/compressed/kaslr.c +9 -2
index 6de58f1bd7ec..eb5ff66b4d7a 100644
@@ -460,10 +460,17 @@ void choose_random_location(unsigned long input,
 			add_identity_map(random_addr, output_size);
 			*output = random_addr;
 		}
+
+		/*
+		 * This loads the identity mapping page table.
+		 * This should only be done if a new physical address
+		 * is found for the kernel, otherwise we should keep
+		 * the old page table to make it be like the "nokaslr"
+		 * case.
+		 */
+		finalize_identity_maps();
 	}
 
-	/* This actually loads the identity pagetable on x86_64. */
-	finalize_identity_maps();
 
 	/* Pick random virtual address starting from LOAD_PHYSICAL_ADDR. */
 	if (IS_ENABLED(CONFIG_X86_64))
arch/x86/kernel/i8259.c +1 -0
index be22f5a2192e..4e3b8a587c88 100644
@@ -418,6 +418,7 @@ struct legacy_pic default_legacy_pic = {
 };
 
 struct legacy_pic *legacy_pic = &default_legacy_pic;
+EXPORT_SYMBOL(legacy_pic);
 
 static int __init i8259A_init_ops(void)
 {
arch/x86/kernel/smp.c +3 -0
index ca699677e288..ea217caa731c 100644
@@ -33,6 +33,7 @@
 #include <asm/mce.h>
 #include <asm/trace/irq_vectors.h>
 #include <asm/kexec.h>
+#include <asm/virtext.h>
 
 /*
  *	Some notes on x86 processor bugs affecting SMP operation:
@@ -162,6 +163,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
 	if (raw_smp_processor_id() == atomic_read(&stopping_cpu))
 		return NMI_HANDLED;
 
+	cpu_emergency_vmxoff();
 	stop_this_cpu(NULL);
 
 	return NMI_HANDLED;
@@ -174,6 +176,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
 asmlinkage __visible void smp_reboot_interrupt(void)
 {
 	ipi_entering_ack_irq();
+	cpu_emergency_vmxoff();
 	stop_this_cpu(NULL);
 	irq_exit();
 }
arch/x86/xen/smp.c +30 -19

77 lines not on this page · raw message

block/blk-mq.c +2 -2
index 10f8f94b7f20..c6572ffc1e87 100644
@@ -2014,15 +2014,15 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
 
 	blk_mq_init_cpu_queues(q, set->nr_hw_queues);
 
-	get_online_cpus();
 	mutex_lock(&all_q_mutex);
+	get_online_cpus();
 
 	list_add_tail(&q->all_q_node, &all_q_list);
 	blk_mq_add_queue_tag_set(set, q);
 	blk_mq_map_swqueue(q, cpu_online_mask);
 
-	mutex_unlock(&all_q_mutex);
 	put_online_cpus();
+	mutex_unlock(&all_q_mutex);
 
 	return q;
 
drivers/acpi/pmic/intel_pmic_xpower.c +25 -25

122 lines not on this page · raw message

drivers/acpi/power.c +10 -0
index 1c2b846c5776..3a6c9b741b23 100644
@@ -864,6 +864,16 @@ void acpi_resume_power_resources(void)
 
 		mutex_unlock(&resource->resource_lock);
 	}
+
+	mutex_unlock(&power_resource_list_lock);
+}
+
+void acpi_turn_off_unused_power_resources(void)
+{
+	struct acpi_power_resource *resource;
+
+	mutex_lock(&power_resource_list_lock);
+
 	list_for_each_entry_reverse(resource, &acpi_power_resource_list, list_node) {
 		int result, state;
 
drivers/acpi/processor_driver.c +9 -1
index 9d5f0c7ed3f7..8697a82bd465 100644
@@ -251,6 +251,9 @@ static int __acpi_processor_start(struct acpi_device *device)
 	if (ACPI_SUCCESS(status))
 		return 0;
 
+	result = -ENODEV;
+	acpi_pss_perf_exit(pr, device);
+
 err_power_exit:
 	acpi_processor_power_exit(pr);
 	return result;
@@ -259,11 +262,16 @@ static int __acpi_processor_start(struct acpi_device *device)
 static int acpi_processor_start(struct device *dev)
 {
 	struct acpi_device *device = ACPI_COMPANION(dev);
+	int ret;
 
 	if (!device)
 		return -ENODEV;
 
-	return __acpi_processor_start(device);
+	/* Protect against concurrent CPU hotplug operations */
+	get_online_cpus();
+	ret = __acpi_processor_start(device);
+	put_online_cpus();
+	return ret;
 }
 
 static int acpi_processor_stop(struct device *dev)
drivers/acpi/processor_throttling.c +36 -26

116 lines not on this page · raw message

drivers/acpi/sleep.c +1 -0
index a4327af676fe..097d630ab886 100644
@@ -474,6 +474,7 @@ static void acpi_pm_start(u32 acpi_state)
  */
 static void acpi_pm_end(void)
 {
+	acpi_turn_off_unused_power_resources();
 	acpi_scan_lock_release();
 	/*
 	 * This is necessary in case acpi_pm_finish() is not called during a
drivers/acpi/sleep.h +1 -0
index a9cc34e663f9..a82ff74faf7a 100644
@@ -6,6 +6,7 @@ extern struct list_head acpi_wakeup_device_list;
 extern struct mutex acpi_device_lock;
 
 extern void acpi_resume_power_resources(void);
+extern void acpi_turn_off_unused_power_resources(void);
 
 static inline acpi_status acpi_set_waking_vector(u32 wakeup_address)
 {
drivers/block/mtip32xx/mtip32xx.c +24 -12
index 3cfd879267b2..b86273fdf48e 100644
@@ -169,6 +169,25 @@ static bool mtip_check_surprise_removal(struct pci_dev *pdev)
 	return false; /* device present */
 }
 
+/* we have to use runtime tag to setup command header */
+static void mtip_init_cmd_header(struct request *rq)
+{
+	struct driver_data *dd = rq->q->queuedata;
+	struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
+	u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64;
+
+	/* Point the command headers at the command tables. */
+	cmd->command_header = dd->port->command_list +
+				(sizeof(struct mtip_cmd_hdr) * rq->tag);
+	cmd->command_header_dma = dd->port->command_list_dma +
+				(sizeof(struct mtip_cmd_hdr) * rq->tag);
+
+	if (host_cap_64)
+		cmd->command_header->ctbau = __force_bit2int cpu_to_le32((cmd->command_dma >> 16) >> 16);
+
+	cmd->command_header->ctba = __force_bit2int cpu_to_le32(cmd->command_dma & 0xFFFFFFFF);
+}
+
 static struct mtip_cmd *mtip_get_int_command(struct driver_data *dd)
 {
 	struct request *rq;
@@ -180,6 +199,9 @@ static struct mtip_cmd *mtip_get_int_command(struct driver_data *dd)
 	if (IS_ERR(rq))
 		return NULL;
 
+	/* Internal cmd isn't submitted via .queue_rq */
+	mtip_init_cmd_header(rq);
+
 	return blk_mq_rq_to_pdu(rq);
 }
 
@@ -3811,6 +3833,8 @@ static int mtip_queue_rq(struct blk_mq_hw_ctx *hctx,
 	struct request *rq = bd->rq;
 	int ret;
 
+	mtip_init_cmd_header(rq);
+
 	if (unlikely(mtip_check_unal_depth(hctx, rq)))
 		return BLK_MQ_RQ_QUEUE_BUSY;
 
@@ -3842,7 +3866,6 @@ static int mtip_init_cmd(void *data, struct request *rq, unsigned int hctx_idx,
 {
 	struct driver_data *dd = data;
 	struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
-	u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64;
 
 	/*
 	 * For flush requests, request_idx starts at the end of the
@@ -3859,17 +3882,6 @@ static int mtip_init_cmd(void *data, struct request *rq, unsigned int hctx_idx,
 
 	memset(cmd->command, 0, CMD_DMA_ALLOC_SZ);
 
-	/* Point the command headers at the command tables. */
-	cmd->command_header = dd->port->command_list +
-				(sizeof(struct mtip_cmd_hdr) * request_idx);
-	cmd->command_header_dma = dd->port->command_list_dma +
-				(sizeof(struct mtip_cmd_hdr) * request_idx);
-
-	if (host_cap_64)
-		cmd->command_header->ctbau = __force_bit2int cpu_to_le32((cmd->command_dma >> 16) >> 16);
-
-	cmd->command_header->ctba = __force_bit2int cpu_to_le32(cmd->command_dma & 0xFFFFFFFF);
-
 	sg_init_table(cmd->sg, MTIP_MAX_SG);
 	return 0;
 }
drivers/bluetooth/btqcomsmd.c +2 -1
index 08c2c93887c1..3aac78a5091b 100644
@@ -85,7 +85,8 @@ static int btqcomsmd_send(struct hci_dev *hdev, struct sk_buff *skb)
 		break;
 	}
 
-	kfree_skb(skb);
+	if (!ret)
+		kfree_skb(skb);
 
 	return ret;
 }
drivers/bluetooth/hci_ldisc.c +8 -3
index 9497c469efd2..2230f9368c21 100644
@@ -113,16 +113,21 @@ static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)
 {
 	struct sk_buff *skb = hu->tx_skb;
 
-	if (!skb)
-		skb = hu->proto->dequeue(hu);
-	else
+	if (!skb) {
+		if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
+			skb = hu->proto->dequeue(hu);
+	} else {
 		hu->tx_skb = NULL;
+	}
 
 	return skb;
 }
 
 int hci_uart_tx_wakeup(struct hci_uart *hu)
 {
+	if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
+		return 0;
+
 	if (test_and_set_bit(HCI_UART_SENDING, &hu->tx_state)) {
 		set_bit(HCI_UART_TX_WAKEUP, &hu->tx_state);
 		return 0;
drivers/bluetooth/hci_qca.c +3 -0
index 6c867fbc56a7..74b2f4a14643 100644
@@ -936,6 +936,9 @@ static int qca_setup(struct hci_uart *hu)
 	if (!ret) {
 		set_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags);
 		qca_debugfs_init(hdev);
+	} else if (ret == -ENOENT) {
+		/* No patch/nvm-config found, run with original fw/config */
+		ret = 0;
 	}
 
 	/* Setup bdaddr */
drivers/char/ipmi/ipmi_watchdog.c +4 -4
index 909311016108..055d2ce378a7 100644
@@ -515,7 +515,7 @@ static void panic_halt_ipmi_heartbeat(void)
 	msg.cmd = IPMI_WDOG_RESET_TIMER;
 	msg.data = NULL;
 	msg.data_len = 0;
-	atomic_add(2, &panic_done_count);
+	atomic_add(1, &panic_done_count);
 	rv = ipmi_request_supply_msgs(watchdog_user,
 				      (struct ipmi_addr *) &addr,
 				      0,
@@ -525,7 +525,7 @@ static void panic_halt_ipmi_heartbeat(void)
 				      &panic_halt_heartbeat_recv_msg,
 				      1);
 	if (rv)
-		atomic_sub(2, &panic_done_count);
+		atomic_sub(1, &panic_done_count);
 }
 
 static struct ipmi_smi_msg panic_halt_smi_msg = {
@@ -549,12 +549,12 @@ static void panic_halt_ipmi_set_timeout(void)
 	/* Wait for the messages to be free. */
 	while (atomic_read(&panic_done_count) != 0)
 		ipmi_poll_interface(watchdog_user);
-	atomic_add(2, &panic_done_count);
+	atomic_add(1, &panic_done_count);
 	rv = i_ipmi_set_timeout(&panic_halt_smi_msg,
 				&panic_halt_recv_msg,
 				&send_heartbeat_now);
 	if (rv) {
-		atomic_sub(2, &panic_done_count);
+		atomic_sub(1, &panic_done_count);
 		printk(KERN_WARNING PFX
 		       "Unable to extend the watchdog timeout.");
 	} else {
drivers/char/tpm/tpm-interface.c +5 -0
index d0ac2d56520f..830d7e30e508 100644
@@ -1078,6 +1078,11 @@ int tpm_get_random(u32 chip_num, u8 *out, size_t max)
 			break;
 
 		recd = be32_to_cpu(tpm_cmd.params.getrandom_out.rng_data_len);
+		if (recd > num_bytes) {
+			total = -EFAULT;
+			break;
+		}
+
 		memcpy(dest, tpm_cmd.params.getrandom_out.rng_data, recd);
 
 		dest += recd;
drivers/char/tpm/tpm2-cmd.c +6 -0
index 17896d654033..a5780ebe15ef 100644
@@ -668,6 +668,11 @@ static int tpm2_unseal_cmd(struct tpm_chip *chip,
 	if (!rc) {
 		data_len = be16_to_cpup(
 			(__be16 *) &buf.data[TPM_HEADER_SIZE + 4]);
+		if (data_len < MIN_KEY_SIZE ||  data_len > MAX_KEY_SIZE + 1) {
+			rc = -EFAULT;
+			goto out;
+		}
+
 		data = &buf.data[TPM_HEADER_SIZE + 6];
 
 		memcpy(payload->key, data, data_len - 1);
@@ -675,6 +680,7 @@ static int tpm2_unseal_cmd(struct tpm_chip *chip,
 		payload->migratable = data[data_len - 1];
 	}
 
+out:
 	tpm_buf_destroy(&buf);
 	return rc;
 }
drivers/clk/bcm/clk-ns2.c +1 -1
index a564e9248814..adc14145861a 100644
@@ -103,7 +103,7 @@ CLK_OF_DECLARE(ns2_genpll_src_clk, "brcm,ns2-genpll-scr",
 
 static const struct iproc_pll_ctrl genpll_sw = {
 	.flags = IPROC_CLK_AON | IPROC_CLK_PLL_SPLIT_STAT_CTRL,
-	.aon = AON_VAL(0x0, 2, 9, 8),
+	.aon = AON_VAL(0x0, 1, 11, 10),
 	.reset = RESET_VAL(0x4, 2, 1),
 	.dig_filter = DF_VAL(0x0, 9, 3, 5, 4, 2, 3),
 	.ndiv_int = REG_VAL(0x8, 4, 10),
drivers/clk/clk-axi-clkgen.c +24 -5
index 5e918e7afaba..95a6e9834392 100644
@@ -40,6 +40,10 @@
 #define MMCM_REG_FILTER1	0x4e
 #define MMCM_REG_FILTER2	0x4f
 
+#define MMCM_CLKOUT_NOCOUNT	BIT(6)
+
+#define MMCM_CLK_DIV_NOCOUNT	BIT(12)
+
 struct axi_clkgen {
 	void __iomem *base;
 	struct clk_hw clk_hw;
@@ -315,12 +319,27 @@ static unsigned long axi_clkgen_recalc_rate(struct clk_hw *clk_hw,
 	unsigned int reg;
 	unsigned long long tmp;
 
-	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLKOUT0_1, &reg);
-	dout = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLKOUT0_2, &reg);
+	if (reg & MMCM_CLKOUT_NOCOUNT) {
+		dout = 1;
+	} else {
+		axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLKOUT0_1, &reg);
+		dout = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	}
+
 	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_DIV, &reg);
-	d = (reg & 0x3f) + ((reg >> 6) & 0x3f);
-	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_FB1, &reg);
-	m = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	if (reg & MMCM_CLK_DIV_NOCOUNT)
+		d = 1;
+	else
+		d = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+
+	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_FB2, &reg);
+	if (reg & MMCM_CLKOUT_NOCOUNT) {
+		m = 1;
+	} else {
+		axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_FB1, &reg);
+		m = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	}
 
 	if (d == 0 || dout == 0)
 		return 0;
drivers/clk/clk-si5351.c +1 -1
index b051db43fae1..136a86094c53 100644
@@ -72,7 +72,7 @@ static const char * const si5351_input_names[] = {
 	"xtal", "clkin"
 };
 static const char * const si5351_pll_names[] = {
-	"plla", "pllb", "vxco"
+	"si5351_plla", "si5351_pllb", "si5351_vxco"
 };
 static const char * const si5351_msynth_names[] = {
 	"ms0", "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms7"
drivers/clk/clk.c +20 -12
index 0fb39fe217d1..0cdb8550729d 100644
@@ -2437,6 +2437,21 @@ static int __clk_core_init(struct clk_core *core)
 		rate = 0;
 	core->rate = core->req_rate = rate;
 
+	/*
+	 * Enable CLK_IS_CRITICAL clocks so newly added critical clocks
+	 * don't get accidentally disabled when walking the orphan tree and
+	 * reparenting clocks
+	 */
+	if (core->flags & CLK_IS_CRITICAL) {
+		unsigned long flags;
+
+		clk_core_prepare(core);
+
+		flags = clk_enable_lock();
+		clk_core_enable(core);
+		clk_enable_unlock(flags);
+	}
+
 	/*
 	 * walk the list of orphan clocks and reparent any that newly finds a
 	 * parent.
@@ -2445,10 +2460,13 @@ static int __clk_core_init(struct clk_core *core)
 		struct clk_core *parent = __clk_init_parent(orphan);
 
 		/*
-		 * we could call __clk_set_parent, but that would result in a
-		 * redundant call to the .set_rate op, if it exists
+		 * We need to use __clk_set_parent_before() and _after() to
+		 * to properly migrate any prepare/enable count of the orphan
+		 * clock. This is important for CLK_IS_CRITICAL clocks, which
+		 * are enabled during init but might not have a parent yet.
 		 */
 		if (parent) {
+			/* update the clk tree topology */
 			__clk_set_parent_before(orphan, parent);
 			__clk_set_parent_after(orphan, parent, NULL);
 			__clk_recalc_accuracies(orphan);
@@ -2467,16 +2485,6 @@ static int __clk_core_init(struct clk_core *core)
 	if (core->ops->init)
 		core->ops->init(core->hw);
 
-	if (core->flags & CLK_IS_CRITICAL) {
-		unsigned long flags;
-
-		clk_core_prepare(core);
-
-		flags = clk_enable_lock();
-		clk_core_enable(core);
-		clk_enable_unlock(flags);
-	}
-
 	kref_init(&core->ref);
 out:
 	clk_prepare_unlock();
drivers/cpufreq/sh-cpufreq.c +27 -18

81 lines not on this page · raw message

drivers/dma/ti-dma-crossbar.c +9 -1
index 43e88d85129e..8c3c588834d2 100644
@@ -54,7 +54,15 @@ struct ti_am335x_xbar_map {
 
 static inline void ti_am335x_xbar_write(void __iomem *iomem, int event, u8 val)
 {
-	writeb_relaxed(val, iomem + event);
+	/*
+	 * TPCC_EVT_MUX_60_63 register layout is different than the
+	 * rest, in the sense, that event 63 is mapped to lowest byte
+	 * and event 60 is mapped to highest, handle it separately.
+	 */
+	if (event >= 60 && event <= 63)
+		writeb_relaxed(val, iomem + (63 - event % 4));
+	else
+		writeb_relaxed(val, iomem + event);
 }
 
 static void ti_am335x_xbar_free(struct device *dev, void *route_data)
drivers/dma/xilinx/zynqmp_dma.c +2 -1
index 6d221e5c72ee..22658057fe27 100644
@@ -933,7 +933,8 @@ static void zynqmp_dma_chan_remove(struct zynqmp_dma_chan *chan)
 	if (!chan)
 		return;
 
-	devm_free_irq(chan->zdev->dev, chan->irq, chan);
+	if (chan->irq)
+		devm_free_irq(chan->zdev->dev, chan->irq, chan);
 	tasklet_kill(&chan->tasklet);
 	list_del(&chan->common.device_node);
 	clk_disable_unprepare(chan->clk_apb);
drivers/gpio/gpio-wcove.c +5 -3
index d0ddba7a9d08..5ef4980f3f14 100644
@@ -51,6 +51,8 @@
 #define GROUP1_NR_IRQS		6
 #define IRQ_MASK_BASE		0x4e19
 #define IRQ_STATUS_BASE		0x4e0b
+#define GPIO_IRQ0_MASK		GENMASK(6, 0)
+#define GPIO_IRQ1_MASK		GENMASK(5, 0)
 #define UPDATE_IRQ_TYPE		BIT(0)
 #define UPDATE_IRQ_MASK		BIT(1)
 
@@ -310,7 +312,7 @@ static irqreturn_t wcove_gpio_irq_handler(int irq, void *data)
 		return IRQ_NONE;
 	}
 
-	pending = p[0] | (p[1] << 8);
+	pending = (p[0] & GPIO_IRQ0_MASK) | ((p[1] & GPIO_IRQ1_MASK) << 7);
 	if (!pending)
 		return IRQ_NONE;
 
@@ -318,7 +320,7 @@ static irqreturn_t wcove_gpio_irq_handler(int irq, void *data)
 	while (pending) {
 		/* One iteration is for all pending bits */
 		for_each_set_bit(gpio, (const unsigned long *)&pending,
-						 GROUP0_NR_IRQS) {
+						 WCOVE_GPIO_NUM) {
 			offset = (gpio > GROUP0_NR_IRQS) ? 1 : 0;
 			mask = (offset == 1) ? BIT(gpio - GROUP0_NR_IRQS) :
 								BIT(gpio);
@@ -334,7 +336,7 @@ static irqreturn_t wcove_gpio_irq_handler(int irq, void *data)
 			break;
 		}
 
-		pending = p[0] | (p[1] << 8);
+		pending = (p[0] & GPIO_IRQ0_MASK) | ((p[1] & GPIO_IRQ1_MASK) << 7);
 	}
 
 	return IRQ_HANDLED;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -3
index 50f18f666d67..d0c3e56ece74 100644
@@ -2237,7 +2237,7 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
 	for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
 		struct amdgpu_ring *ring = adev->rings[i];
 
-		if (!ring)
+		if (!ring || !ring->sched.thread)
 			continue;
 		kthread_park(ring->sched.thread);
 		amd_sched_hw_job_reset(&ring->sched);
@@ -2326,7 +2326,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
 		}
 		for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
 			struct amdgpu_ring *ring = adev->rings[i];
-			if (!ring)
+
+			if (!ring || !ring->sched.thread)
 				continue;
 
 			amd_sched_job_recovery(&ring->sched);
@@ -2335,7 +2336,7 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
 	} else {
 		dev_err(adev->dev, "asic resume failed (%d).\n", r);
 		for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
-			if (adev->rings[i]) {
+			if (adev->rings[i] && adev->rings[i]->sched.thread) {
 				kthread_unpark(adev->rings[i]->sched.thread);
 			}
 		}
drivers/gpu/drm/msm/msm_gem.c +10 -4
index b6ac27e31929..797d1f8340b9 100644
@@ -91,14 +91,17 @@ static struct page **get_pages(struct drm_gem_object *obj)
 			return p;
 		}
 
+		msm_obj->pages = p;
+
 		msm_obj->sgt = drm_prime_pages_to_sg(p, npages);
 		if (IS_ERR(msm_obj->sgt)) {
+			void *ptr = ERR_CAST(msm_obj->sgt);
+
 			dev_err(dev->dev, "failed to allocate sgt\n");
-			return ERR_CAST(msm_obj->sgt);
+			msm_obj->sgt = NULL;
+			return ptr;
 		}
 
-		msm_obj->pages = p;
-
 		/* For non-cached buffers, ensure the new pages are clean
 		 * because display controller, GPU, etc. are not coherent:
 		 */
@@ -121,7 +124,10 @@ static void put_pages(struct drm_gem_object *obj)
 		if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
 			dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
 					msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
-		sg_free_table(msm_obj->sgt);
+
+		if (msm_obj->sgt)
+			sg_free_table(msm_obj->sgt);
+
 		kfree(msm_obj->sgt);
 
 		if (use_pages(obj))
drivers/gpu/drm/nouveau/nouveau_display.c +1 -1
index 2c2b86d68129..6526a3366087 100644
@@ -106,7 +106,7 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
 	};
 	struct nouveau_display *disp = nouveau_display(crtc->dev);
 	struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)];
-	int ret, retry = 1;
+	int ret, retry = 20;
 
 	do {
 		ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args));
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c +3 -0
index e859b3f893f7..6112c32b994f 100644
@@ -456,6 +456,8 @@ static int td028ttec1_panel_remove(struct spi_device *spi)
 }
 
 static const struct of_device_id td028ttec1_of_match[] = {
+	{ .compatible = "omapdss,tpo,td028ttec1", },
+	/* keep to not break older DTB */
 	{ .compatible = "omapdss,toppoly,td028ttec1", },
 	{},
 };
@@ -475,6 +477,7 @@ static struct spi_driver td028ttec1_spi_driver = {
 
 module_spi_driver(td028ttec1_spi_driver);
 
+MODULE_ALIAS("spi:tpo,td028ttec1");
 MODULE_ALIAS("spi:toppoly,td028ttec1");
 MODULE_AUTHOR("H. Nikolaus Schaller <[email protected]>");
 MODULE_DESCRIPTION("Toppoly TD028TTEC1 panel driver");
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +5 -0
index 4b83e9eeab06..7def04049498 100644
@@ -298,7 +298,12 @@ static int dmm_txn_commit(struct dmm_txn *txn, bool wait)
 				msecs_to_jiffies(100))) {
 			dev_err(dmm->dev, "timed out waiting for done\n");
 			ret = -ETIMEDOUT;
+			goto cleanup;
 		}
+
+		/* Check the engine status before continue */
+		ret = wait_status(engine, DMM_PATSTATUS_READY |
+				  DMM_PATSTATUS_VALID | DMM_PATSTATUS_DONE);
 	}
 
 cleanup:
drivers/gpu/drm/tilcdc/tilcdc_regs.h +1 -1
index f57c0d62c76a..19d8dc3cdd40 100644
@@ -124,7 +124,7 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
 	struct tilcdc_drm_private *priv = dev->dev_private;
 	volatile void __iomem *addr = priv->mmio + reg;
 
-#ifdef iowrite64
+#if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
 	iowrite64(data, addr);
 #else
 	__iowmb();
drivers/hsi/clients/ssi_protocol.c +3 -2
index 6031cd146556..802afc98e8bd 100644
@@ -989,7 +989,7 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
 		goto drop;
 	/* Pad to 32-bits - FIXME: Revisit*/
 	if ((skb->len & 3) && skb_pad(skb, 4 - (skb->len & 3)))
-		goto drop;
+		goto inc_dropped;
 
 	/*
 	 * Modem sends Phonet messages over SSI with its own endianess...
@@ -1041,8 +1041,9 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev)
 drop2:
 	hsi_free_msg(msg);
 drop:
-	dev->stats.tx_dropped++;
 	dev_kfree_skb(skb);
+inc_dropped:
+	dev->stats.tx_dropped++;
 
 	return 0;
 }
drivers/hwtracing/coresight/coresight-tpiu.c +10 -3
index 0673baf0f2f5..ff579a7c6d00 100644
@@ -46,8 +46,11 @@
 #define TPIU_ITATBCTR0		0xef8
 
 /** register definition **/
+/* FFSR - 0x300 */
+#define FFSR_FT_STOPPED		BIT(1)
 /* FFCR - 0x304 */
 #define FFCR_FON_MAN		BIT(6)
+#define FFCR_STOP_FI		BIT(12)
 
 /**
  * @base:	memory mapped base address for this component.
@@ -85,10 +88,14 @@ static void tpiu_disable_hw(struct tpiu_drvdata *drvdata)
 {
 	CS_UNLOCK(drvdata->base);
 
-	/* Clear formatter controle reg. */
-	writel_relaxed(0x0, drvdata->base + TPIU_FFCR);
+	/* Clear formatter and stop on flush */
+	writel_relaxed(FFCR_STOP_FI, drvdata->base + TPIU_FFCR);
 	/* Generate manual flush */
-	writel_relaxed(FFCR_FON_MAN, drvdata->base + TPIU_FFCR);
+	writel_relaxed(FFCR_STOP_FI | FFCR_FON_MAN, drvdata->base + TPIU_FFCR);
+	/* Wait for flush to complete */
+	coresight_timeout(drvdata->base, TPIU_FFCR, FFCR_FON_MAN, 0);
+	/* Wait for formatter to stop */
+	coresight_timeout(drvdata->base, TPIU_FFSR, FFSR_FT_STOPPED, 1);
 
 	CS_LOCK(drvdata->base);
 }
drivers/i2c/busses/i2c-scmi.c +4 -0
index dfc98df7b1b6..7aa7b9cb6203 100644
@@ -18,6 +18,9 @@
 #define ACPI_SMBUS_HC_CLASS		"smbus"
 #define ACPI_SMBUS_HC_DEVICE_NAME	"cmi"
 
+/* SMBUS HID definition as supported by Microsoft Windows */
+#define ACPI_SMBUS_MS_HID		"SMB0001"
+
 ACPI_MODULE_NAME("smbus_cmi");
 
 struct smbus_methods_t {
@@ -51,6 +54,7 @@ static const struct smbus_methods_t ibm_smbus_methods = {
 static const struct acpi_device_id acpi_smbus_cmi_ids[] = {
 	{"SMBUS01", (kernel_ulong_t)&smbus_methods},
 	{ACPI_SMBUS_IBM_HID, (kernel_ulong_t)&ibm_smbus_methods},
+	{ACPI_SMBUS_MS_HID, (kernel_ulong_t)&smbus_methods},
 	{"", 0}
 };
 MODULE_DEVICE_TABLE(acpi, acpi_smbus_cmi_ids);
drivers/iio/accel/st_accel_core.c +4 -3
index 3a557e3181ea..fe94415a0bc7 100644
@@ -827,6 +827,8 @@ static const struct iio_trigger_ops st_accel_trigger_ops = {
 int st_accel_common_probe(struct iio_dev *indio_dev)
 {
 	struct st_sensor_data *adata = iio_priv(indio_dev);
+	struct st_sensors_platform_data *pdata =
+		(struct st_sensors_platform_data *)adata->dev->platform_data;
 	int irq = adata->get_irq_data_ready(indio_dev);
 	int err;
 
@@ -853,9 +855,8 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
 					&adata->sensor_settings->fs.fs_avl[0];
 	adata->odr = adata->sensor_settings->odr.odr_avl[0].hz;
 
-	if (!adata->dev->platform_data)
-		adata->dev->platform_data =
-			(struct st_sensors_platform_data *)&default_accel_pdata;
+	if (!pdata)
+		pdata = (struct st_sensors_platform_data *)&default_accel_pdata;
 
 	err = st_sensors_init_sensor(indio_dev, adata->dev->platform_data);
 	if (err < 0)
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +2 -2
index ab646a90e3da..af85db50412e 100644
@@ -215,7 +215,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
 	ret = sensor_hub_set_feature(st->hsdev, st->poll.report_id,
 				     st->poll.index, sizeof(value), &value);
 	if (ret < 0 || value < 0)
-		ret = -EINVAL;
+		return -EINVAL;
 
 	ret = sensor_hub_get_feature(st->hsdev,
 				     st->poll.report_id,
@@ -265,7 +265,7 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
 				     st->sensitivity.index, sizeof(value),
 				     &value);
 	if (ret < 0 || value < 0)
-		ret = -EINVAL;
+		return -EINVAL;
 
 	ret = sensor_hub_get_feature(st->hsdev,
 				     st->sensitivity.report_id,
drivers/iio/pressure/st_pressure_core.c +4 -4
index 44e46c159a7e..bec60299b6ec 100644
@@ -638,6 +638,8 @@ static const struct iio_trigger_ops st_press_trigger_ops = {
 int st_press_common_probe(struct iio_dev *indio_dev)
 {
 	struct st_sensor_data *press_data = iio_priv(indio_dev);
+	struct st_sensors_platform_data *pdata =
+		(struct st_sensors_platform_data *)press_data->dev->platform_data;
 	int irq = press_data->get_irq_data_ready(indio_dev);
 	int err;
 
@@ -673,10 +675,8 @@ int st_press_common_probe(struct iio_dev *indio_dev)
 	press_data->odr = press_data->sensor_settings->odr.odr_avl[0].hz;
 
 	/* Some devices don't support a data ready pin. */
-	if (!press_data->dev->platform_data &&
-				press_data->sensor_settings->drdy_irq.addr)
-		press_data->dev->platform_data =
-			(struct st_sensors_platform_data *)&default_press_pdata;
+	if (!pdata && press_data->sensor_settings->drdy_irq.addr)
+		pdata =	(struct st_sensors_platform_data *)&default_press_pdata;
 
 	err = st_sensors_init_sensor(indio_dev, press_data->dev->platform_data);
 	if (err < 0)
drivers/infiniband/core/cma.c +4 -1
index 30f01613b518..cbe5324c4331 100644
@@ -4039,6 +4039,9 @@ int rdma_join_multicast(struct rdma_cm_id *id, struct sockaddr *addr,
 	struct cma_multicast *mc;
 	int ret;
 
+	if (!id->device)
+		return -EINVAL;
+
 	id_priv = container_of(id, struct rdma_id_private, id);
 	if (!cma_comp(id_priv, RDMA_CM_ADDR_BOUND) &&
 	    !cma_comp(id_priv, RDMA_CM_ADDR_RESOLVED))
@@ -4336,7 +4339,7 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb)
 					  RDMA_NL_RDMA_CM_ATTR_SRC_ADDR))
 				goto out;
 			if (ibnl_put_attr(skb, nlh,
-					  rdma_addr_size(cma_src_addr(id_priv)),
+					  rdma_addr_size(cma_dst_addr(id_priv)),
 					  cma_dst_addr(id_priv),
 					  RDMA_NL_RDMA_CM_ATTR_DST_ADDR))
 				goto out;
drivers/infiniband/core/iwpm_util.c +1 -0
index ade71e7f0131..2fe4c2c921de 100644
@@ -664,6 +664,7 @@ int iwpm_send_mapinfo(u8 nl_client, int iwpm_pid)
 	}
 	skb_num++;
 	spin_lock_irqsave(&iwpm_mapinfo_lock, flags);
+	ret = -EINVAL;
 	for (i = 0; i < IWPM_MAPINFO_HASH_SIZE; i++) {
 		hlist_for_each_entry(map_info, &iwpm_hash_bucket[i],
 				     hlist_node) {
drivers/infiniband/core/ucma.c +7 -1
index 6840d3c5cd64..017a09ceba3f 100644
@@ -1330,7 +1330,7 @@ static ssize_t ucma_process_join(struct ucma_file *file,
 		return -ENOSPC;
 
 	addr = (struct sockaddr *) &cmd->addr;
-	if (!cmd->addr_size || (cmd->addr_size != rdma_addr_size(addr)))
+	if (cmd->addr_size != rdma_addr_size(addr))
 		return -EINVAL;
 
 	if (cmd->join_flags == RDMA_MC_JOIN_FLAG_FULLMEMBER)
@@ -1398,6 +1398,9 @@ static ssize_t ucma_join_ip_multicast(struct ucma_file *file,
 	join_cmd.uid = cmd.uid;
 	join_cmd.id = cmd.id;
 	join_cmd.addr_size = rdma_addr_size((struct sockaddr *) &cmd.addr);
+	if (!join_cmd.addr_size)
+		return -EINVAL;
+
 	join_cmd.join_flags = RDMA_MC_JOIN_FLAG_FULLMEMBER;
 	memcpy(&join_cmd.addr, &cmd.addr, join_cmd.addr_size);
 
@@ -1413,6 +1416,9 @@ static ssize_t ucma_join_multicast(struct ucma_file *file,
 	if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
 		return -EFAULT;
 
+	if (!rdma_addr_size((struct sockaddr *)&cmd.addr))
+		return -EINVAL;
+
 	return ucma_process_join(file, &cmd, out_len);
 }
 
drivers/infiniband/core/umem.c +1 -1
index 8e973a2993a6..e74aa1d60fdb 100644
@@ -357,7 +357,7 @@ int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset,
 		return -EINVAL;
 	}
 
-	ret = sg_pcopy_to_buffer(umem->sg_head.sgl, umem->nmap, dst, length,
+	ret = sg_pcopy_to_buffer(umem->sg_head.sgl, umem->npages, dst, length,
 				 offset + ib_umem_offset(umem));
 
 	if (ret < 0)
drivers/infiniband/core/uverbs_cmd.c +12 -1
index d118ffe0bfb6..4b717cf50d27 100644
@@ -2491,9 +2491,13 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file,
 
 static void *alloc_wr(size_t wr_size, __u32 num_sge)
 {
+	if (num_sge >= (U32_MAX - ALIGN(wr_size, sizeof (struct ib_sge))) /
+		       sizeof (struct ib_sge))
+		return NULL;
+
 	return kmalloc(ALIGN(wr_size, sizeof (struct ib_sge)) +
 			 num_sge * sizeof (struct ib_sge), GFP_KERNEL);
-};
+}
 
 ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file,
 			    struct ib_device *ib_dev,
@@ -2720,6 +2724,13 @@ static struct ib_recv_wr *ib_uverbs_unmarshall_recv(const char __user *buf,
 			goto err;
 		}
 
+		if (user_wr->num_sge >=
+		    (U32_MAX - ALIGN(sizeof *next, sizeof (struct ib_sge))) /
+		    sizeof (struct ib_sge)) {
+			ret = -EINVAL;
+			goto err;
+		}
+
 		next = kmalloc(ALIGN(sizeof *next, sizeof (struct ib_sge)) +
 			       user_wr->num_sge * sizeof (struct ib_sge),
 			       GFP_KERNEL);
drivers/infiniband/hw/hfi1/chip.c +52 -34

173 lines not on this page · raw message

drivers/infiniband/hw/hfi1/hfi.h +4 -3
index cc87fd4e534b..a3279f3d2578 100644
@@ -475,7 +475,7 @@ struct rvt_sge_state;
 #define HFI1_PART_ENFORCE_OUT	0x2
 
 /* how often we check for synthetic counter wrap around */
-#define SYNTH_CNT_TIME 2
+#define SYNTH_CNT_TIME 3
 
 /* Counter flags */
 #define CNTR_NORMAL		0x0 /* Normal counters, just read register */
@@ -929,8 +929,9 @@ struct hfi1_devdata {
 	spinlock_t rcvctrl_lock; /* protect changes to RcvCtrl */
 	/* around rcd and (user ctxts) ctxt_cnt use (intr vs free) */
 	spinlock_t uctxt_lock; /* rcd and user context changes */
-	/* exclusive access to 8051 */
-	spinlock_t dc8051_lock;
+	struct mutex dc8051_lock; /* exclusive access to 8051 */
+	struct workqueue_struct *update_cntr_wq;
+	struct work_struct update_cntr_work;
 	/* exclusive access to 8051 memory */
 	spinlock_t dc8051_memlock;
 	int dc8051_timed_out;	/* remember if the 8051 timed out */
drivers/infiniband/hw/hfi1/init.c +1 -1
index a3dd27b1305d..84a97f3f9299 100644
@@ -1078,11 +1078,11 @@ struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, size_t extra)
 	spin_lock_init(&dd->uctxt_lock);
 	spin_lock_init(&dd->hfi1_diag_trans_lock);
 	spin_lock_init(&dd->sc_init_lock);
-	spin_lock_init(&dd->dc8051_lock);
 	spin_lock_init(&dd->dc8051_memlock);
 	seqlock_init(&dd->sc2vl_lock);
 	spin_lock_init(&dd->sde_map_lock);
 	spin_lock_init(&dd->pio_map_lock);
+	mutex_init(&dd->dc8051_lock);
 	init_waitqueue_head(&dd->event_queue);
 
 	dd->int_counter = alloc_percpu(u64);
drivers/infiniband/hw/mlx4/main.c +4 -2
index c41c8d0a4ac0..19bc1c2186ff 100644
@@ -1168,7 +1168,7 @@ static void mlx4_ib_disassociate_ucontext(struct ib_ucontext *ibcontext)
 	/* need to protect from a race on closing the vma as part of
 	 * mlx4_ib_vma_close().
 	 */
-	down_read(&owning_mm->mmap_sem);
+	down_write(&owning_mm->mmap_sem);
 	for (i = 0; i < HW_BAR_COUNT; i++) {
 		vma = context->hw_bar_info[i].vma;
 		if (!vma)
@@ -1182,11 +1182,13 @@ static void mlx4_ib_disassociate_ucontext(struct ib_ucontext *ibcontext)
 			BUG_ON(1);
 		}
 
+		context->hw_bar_info[i].vma->vm_flags &=
+			~(VM_SHARED | VM_MAYSHARE);
 		/* context going to be destroyed, should not access ops any more */
 		context->hw_bar_info[i].vma->vm_ops = NULL;
 	}
 
-	up_read(&owning_mm->mmap_sem);
+	up_write(&owning_mm->mmap_sem);
 	mmput(owning_mm);
 	put_task_struct(owning_process);
 }
drivers/infiniband/hw/mlx5/cq.c +16 -3
index 9cdcff77b9a8..fc62a7ded734 100644
@@ -172,6 +172,8 @@ static void handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
 	struct mlx5_ib_srq *srq;
 	struct mlx5_ib_wq *wq;
 	u16 wqe_ctr;
+	u8  roce_packet_type;
+	bool vlan_present;
 	u8 g;
 
 	if (qp->ibqp.srq || qp->ibqp.xrcd) {
@@ -223,7 +225,6 @@ static void handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
 		break;
 	}
 	wc->slid	   = be16_to_cpu(cqe->slid);
-	wc->sl		   = (be32_to_cpu(cqe->flags_rqpn) >> 24) & 0xf;
 	wc->src_qp	   = be32_to_cpu(cqe->flags_rqpn) & 0xffffff;
 	wc->dlid_path_bits = cqe->ml_path;
 	g = (be32_to_cpu(cqe->flags_rqpn) >> 28) & 3;
@@ -237,10 +238,22 @@ static void handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
 		wc->pkey_index = 0;
 	}
 
-	if (ll != IB_LINK_LAYER_ETHERNET)
+	if (ll != IB_LINK_LAYER_ETHERNET) {
+		wc->sl = (be32_to_cpu(cqe->flags_rqpn) >> 24) & 0xf;
 		return;
+	}
+
+	vlan_present = cqe->l4_l3_hdr_type & 0x1;
+	roce_packet_type   = (be32_to_cpu(cqe->flags_rqpn) >> 24) & 0x3;
+	if (vlan_present) {
+		wc->vlan_id = (be16_to_cpu(cqe->vlan_info)) & 0xfff;
+		wc->sl = (be16_to_cpu(cqe->vlan_info) >> 13) & 0x7;
+		wc->wc_flags |= IB_WC_WITH_VLAN;
+	} else {
+		wc->sl = 0;
+	}
 
-	switch (wc->sl & 0x3) {
+	switch (roce_packet_type) {
 	case MLX5_CQE_ROCE_L3_HEADER_TYPE_GRH:
 		wc->network_hdr_type = RDMA_NETWORK_IB;
 		break;
drivers/infiniband/hw/mlx5/main.c +3 -2
index 5e29fbd3a5a0..d7da1dca765f 100644
@@ -1313,7 +1313,7 @@ static void mlx5_ib_disassociate_ucontext(struct ib_ucontext *ibcontext)
 	/* need to protect from a race on closing the vma as part of
 	 * mlx5_ib_vma_close.
 	 */
-	down_read(&owning_mm->mmap_sem);
+	down_write(&owning_mm->mmap_sem);
 	list_for_each_entry_safe(vma_private, n, &context->vma_private_list,
 				 list) {
 		vma = vma_private->vma;
@@ -1323,11 +1323,12 @@ static void mlx5_ib_disassociate_ucontext(struct ib_ucontext *ibcontext)
 		/* context going to be destroyed, should
 		 * not access ops any more.
 		 */
+		vma->vm_flags &= ~(VM_SHARED | VM_MAYSHARE);
 		vma->vm_ops = NULL;
 		list_del(&vma_private->list);
 		kfree(vma_private);
 	}
-	up_read(&owning_mm->mmap_sem);
+	up_write(&owning_mm->mmap_sem);
 	mmput(owning_mm);
 	put_task_struct(owning_process);
 }
drivers/infiniband/hw/mlx5/qp.c +17 -7
index fdd156101a72..403df3591d29 100644
@@ -1130,7 +1130,7 @@ static void destroy_raw_packet_qp_sq(struct mlx5_ib_dev *dev,
 	ib_umem_release(sq->ubuffer.umem);
 }
 
-static int get_rq_pas_size(void *qpc)
+static size_t get_rq_pas_size(void *qpc)
 {
 	u32 log_page_size = MLX5_GET(qpc, qpc, log_page_size) + 12;
 	u32 log_rq_stride = MLX5_GET(qpc, qpc, log_rq_stride);
@@ -1146,7 +1146,8 @@ static int get_rq_pas_size(void *qpc)
 }
 
 static int create_raw_packet_qp_rq(struct mlx5_ib_dev *dev,
-				   struct mlx5_ib_rq *rq, void *qpin)
+				   struct mlx5_ib_rq *rq, void *qpin,
+				   size_t qpinlen)
 {
 	struct mlx5_ib_qp *mqp = rq->base.container_mibqp;
 	__be64 *pas;
@@ -1155,9 +1156,12 @@ static int create_raw_packet_qp_rq(struct mlx5_ib_dev *dev,
 	void *rqc;
 	void *wq;
 	void *qpc = MLX5_ADDR_OF(create_qp_in, qpin, qpc);
-	int inlen;
+	size_t rq_pas_size = get_rq_pas_size(qpc);
+	size_t inlen;
 	int err;
-	u32 rq_pas_size = get_rq_pas_size(qpc);
+
+	if (qpinlen < rq_pas_size + MLX5_BYTE_OFF(create_qp_in, pas))
+		return -EINVAL;
 
 	inlen = MLX5_ST_SZ_BYTES(create_rq_in) + rq_pas_size;
 	in = mlx5_vzalloc(inlen);
@@ -1235,7 +1239,7 @@ static void destroy_raw_packet_qp_tir(struct mlx5_ib_dev *dev,
 }
 
 static int create_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
-				u32 *in,
+				u32 *in, size_t inlen,
 				struct ib_pd *pd)
 {
 	struct mlx5_ib_raw_packet_qp *raw_packet_qp = &qp->raw_packet_qp;
@@ -1262,7 +1266,7 @@ static int create_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
 	if (qp->rq.wqe_cnt) {
 		rq->base.container_mibqp = qp;
 
-		err = create_raw_packet_qp_rq(dev, rq, in);
+		err = create_raw_packet_qp_rq(dev, rq, in, inlen);
 		if (err)
 			goto err_destroy_sq;
 
@@ -1753,10 +1757,15 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
 		qp->flags |= MLX5_IB_QP_LSO;
 	}
 
+	if (inlen < 0) {
+		err = -EINVAL;
+		goto err;
+	}
+
 	if (init_attr->qp_type == IB_QPT_RAW_PACKET) {
 		qp->raw_packet_qp.sq.ubuffer.buf_addr = ucmd.sq_buf_addr;
 		raw_packet_qp_copy_info(qp, &qp->raw_packet_qp);
-		err = create_raw_packet_qp(dev, qp, in, pd);
+		err = create_raw_packet_qp(dev, qp, in, inlen, pd);
 	} else {
 		err = mlx5_core_create_qp(dev->mdev, &base->mqp, in, inlen);
 	}
@@ -1796,6 +1805,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
 	else if (qp->create_type == MLX5_QP_KERNEL)
 		destroy_qp_kernel(dev, qp);
 
+err:
 	kvfree(in);
 	return err;
 }
drivers/infiniband/hw/mlx5/srq.c +9 -6
index d61fd2c727c0..5c1dbe2f8757 100644
@@ -243,8 +243,8 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
 {
 	struct mlx5_ib_dev *dev = to_mdev(pd->device);
 	struct mlx5_ib_srq *srq;
-	int desc_size;
-	int buf_size;
+	size_t desc_size;
+	size_t buf_size;
 	int err;
 	struct mlx5_srq_attr in = {0};
 	__u32 max_srq_wqes = 1 << MLX5_CAP_GEN(dev->mdev, log_max_srq_sz);
@@ -268,15 +268,18 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
 
 	desc_size = sizeof(struct mlx5_wqe_srq_next_seg) +
 		    srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg);
+	if (desc_size == 0 || srq->msrq.max_gs > desc_size)
+		return ERR_PTR(-EINVAL);
 	desc_size = roundup_pow_of_two(desc_size);
-	desc_size = max_t(int, 32, desc_size);
+	desc_size = max_t(size_t, 32, desc_size);
+	if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg))
+		return ERR_PTR(-EINVAL);
 	srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) /
 		sizeof(struct mlx5_wqe_data_seg);
 	srq->msrq.wqe_shift = ilog2(desc_size);
 	buf_size = srq->msrq.max * desc_size;
-	mlx5_ib_dbg(dev, "desc_size 0x%x, req wr 0x%x, srq size 0x%x, max_gs 0x%x, max_avail_gather 0x%x\n",
-		    desc_size, init_attr->attr.max_wr, srq->msrq.max, srq->msrq.max_gs,
-		    srq->msrq.max_avail_gather);
+	if (buf_size < desc_size)
+		return ERR_PTR(-EINVAL);
 	in.type = init_attr->srq_type;
 
 	if (pd->uobject)
drivers/infiniband/hw/ocrdma/ocrdma_stats.c +1 -1
index 8bef09a8c49f..265943069b35 100644
@@ -836,7 +836,7 @@ void ocrdma_add_port_stats(struct ocrdma_dev *dev)
 
 	dev->reset_stats.type = OCRDMA_RESET_STATS;
 	dev->reset_stats.dev = dev;
-	if (!debugfs_create_file("reset_stats", S_IRUSR, dev->dir,
+	if (!debugfs_create_file("reset_stats", 0200, dev->dir,
 				&dev->reset_stats, &ocrdma_dbg_ops))
 		goto err;
 
drivers/infiniband/sw/rdmavt/ah.c +1 -1
index 16c446142c2a..b0f09fb45c72 100644
@@ -119,7 +119,7 @@ struct ib_ah *rvt_create_ah(struct ib_pd *pd,
 
 	spin_lock_irqsave(&dev->n_ahs_lock, flags);
 	if (dev->n_ahs_allocated == dev->dparms.props.max_ah) {
-		spin_unlock(&dev->n_ahs_lock);
+		spin_unlock_irqrestore(&dev->n_ahs_lock, flags);
 		kfree(ah);
 		return ERR_PTR(-ENOMEM);
 	}
drivers/infiniband/sw/rxe/rxe_resp.c +0 -2
index 8c0ddd7165ae..0d25dc84d294 100644
@@ -471,8 +471,6 @@ static enum resp_states check_rkey(struct rxe_qp *qp,
 				state = RESPST_ERR_LENGTH;
 				goto err;
 			}
-
-			qp->resp.resid = mtu;
 		} else {
 			if (pktlen != resid) {
 				state = RESPST_ERR_LENGTH;
drivers/infiniband/ulp/ipoib/ipoib_ib.c +13 -0
index 335bd2c9e16e..34122c96522b 100644
@@ -974,6 +974,19 @@ static inline int update_parent_pkey(struct ipoib_dev_priv *priv)
 		 */
 		priv->dev->broadcast[8] = priv->pkey >> 8;
 		priv->dev->broadcast[9] = priv->pkey & 0xff;
+
+		/*
+		 * Update the broadcast address in the priv->broadcast object,
+		 * in case it already exists, otherwise no one will do that.
+		 */
+		if (priv->broadcast) {
+			spin_lock_irq(&priv->lock);
+			memcpy(priv->broadcast->mcmember.mgid.raw,
+			       priv->dev->broadcast + 4,
+			sizeof(union ib_gid));
+			spin_unlock_irq(&priv->lock);
+		}
+
 		return 0;
 	}
 
drivers/infiniband/ulp/ipoib/ipoib_main.c +16 -0
index e37e918cb935..0df7d4504c06 100644
@@ -799,6 +799,22 @@ static void path_rec_completion(int status,
 	spin_lock_irqsave(&priv->lock, flags);
 
 	if (!IS_ERR_OR_NULL(ah)) {
+		/*
+		 * pathrec.dgid is used as the database key from the LLADDR,
+		 * it must remain unchanged even if the SA returns a different
+		 * GID to use in the AH.
+		 */
+		if (memcmp(pathrec->dgid.raw, path->pathrec.dgid.raw,
+			   sizeof(union ib_gid))) {
+			ipoib_dbg(
+				priv,
+				"%s got PathRec for gid %pI6 while asked for %pI6\n",
+				dev->name, pathrec->dgid.raw,
+				path->pathrec.dgid.raw);
+			memcpy(pathrec->dgid.raw, path->pathrec.dgid.raw,
+			       sizeof(union ib_gid));
+		}
+
 		path->pathrec = *pathrec;
 
 		old_ah   = path->ah;
drivers/infiniband/ulp/ipoib/ipoib_multicast.c +5 -6
index 6b6826f3e446..8f79caedf905 100644
@@ -487,6 +487,9 @@ static int ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast)
 	    !test_bit(IPOIB_FLAG_OPER_UP, &priv->flags))
 		return -EINVAL;
 
+	init_completion(&mcast->done);
+	set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
+
 	ipoib_dbg_mcast(priv, "joining MGID %pI6\n", mcast->mcmember.mgid.raw);
 
 	rec.mgid     = mcast->mcmember.mgid;
@@ -645,8 +648,6 @@ void ipoib_mcast_join_task(struct work_struct *work)
 			if (mcast->backoff == 1 ||
 			    time_after_eq(jiffies, mcast->delay_until)) {
 				/* Found the next unjoined group */
-				init_completion(&mcast->done);
-				set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
 				if (ipoib_mcast_join(dev, mcast)) {
 					spin_unlock_irq(&priv->lock);
 					return;
@@ -666,11 +667,9 @@ void ipoib_mcast_join_task(struct work_struct *work)
 		queue_delayed_work(priv->wq, &priv->mcast_task,
 				   delay_until - jiffies);
 	}
-	if (mcast) {
-		init_completion(&mcast->done);
-		set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
+	if (mcast)
 		ipoib_mcast_join(dev, mcast);
-	}
+
 	spin_unlock_irq(&priv->lock);
 }
 
drivers/infiniband/ulp/isert/ib_isert.c +7 -0
index 0983470929bd..b879d21b7548 100644
@@ -2098,6 +2098,9 @@ isert_rdma_rw_ctx_post(struct isert_cmd *cmd, struct isert_conn *conn,
 	u32 rkey, offset;
 	int ret;
 
+	if (cmd->ctx_init_done)
+		goto rdma_ctx_post;
+
 	if (dir == DMA_FROM_DEVICE) {
 		addr = cmd->write_va;
 		rkey = cmd->write_stag;
@@ -2125,11 +2128,15 @@ isert_rdma_rw_ctx_post(struct isert_cmd *cmd, struct isert_conn *conn,
 				se_cmd->t_data_sg, se_cmd->t_data_nents,
 				offset, addr, rkey, dir);
 	}
+
 	if (ret < 0) {
 		isert_err("Cmd: %p failed to prepare RDMA res\n", cmd);
 		return ret;
 	}
 
+	cmd->ctx_init_done = true;
+
+rdma_ctx_post:
 	ret = rdma_rw_ctx_post(&cmd->rw, conn->qp, port_num, cqe, chain_wr);
 	if (ret < 0)
 		isert_err("Cmd: %p failed to post RDMA res\n", cmd);
drivers/infiniband/ulp/isert/ib_isert.h +1 -0
index c02ada57d7f5..85bd19753d55 100644
@@ -124,6 +124,7 @@ struct isert_cmd {
 	struct rdma_rw_ctx	rw;
 	struct work_struct	comp_work;
 	struct scatterlist	sg;
+	bool			ctx_init_done;
 };
 
 static inline struct isert_cmd *tx_desc_to_cmd(struct iser_tx_desc *desc)
drivers/input/misc/twl4030-pwrbutton.c +1 -1
index 603fc2fadf05..12b20840fb74 100644
@@ -70,7 +70,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
 	pwr->phys = "twl4030_pwrbutton/input0";
 	pwr->dev.parent = &pdev->dev;
 
-	err = devm_request_threaded_irq(&pwr->dev, irq, NULL, powerbutton_irq,
+	err = devm_request_threaded_irq(&pdev->dev, irq, NULL, powerbutton_irq,
 			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
 			IRQF_ONESHOT,
 			"twl4030_pwrbutton", pwr);
drivers/input/touchscreen/ar1021_i2c.c +1 -1
index 71b5a634cf6d..e7bb155911d0 100644
@@ -152,7 +152,7 @@ static int __maybe_unused ar1021_i2c_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(ar1021_i2c_pm, ar1021_i2c_suspend, ar1021_i2c_resume);
 
 static const struct i2c_device_id ar1021_i2c_id[] = {
-	{ "MICROCHIP_AR1021_I2C", 0 },
+	{ "ar1021", 0 },
 	{ },
 };
 MODULE_DEVICE_TABLE(i2c, ar1021_i2c_id);
drivers/iommu/intel-svm.c +6 -3
index cb72e0011310..3a1c40684213 100644
@@ -127,6 +127,7 @@ int intel_svm_enable_prq(struct intel_iommu *iommu)
 		pr_err("IOMMU: %s: Failed to request IRQ for page request queue\n",
 		       iommu->name);
 		dmar_free_hwirq(irq);
+		iommu->pr_irq = 0;
 		goto err;
 	}
 	dmar_writeq(iommu->reg + DMAR_PQH_REG, 0ULL);
@@ -142,9 +143,11 @@ int intel_svm_finish_prq(struct intel_iommu *iommu)
 	dmar_writeq(iommu->reg + DMAR_PQT_REG, 0ULL);
 	dmar_writeq(iommu->reg + DMAR_PQA_REG, 0ULL);
 
-	free_irq(iommu->pr_irq, iommu);
-	dmar_free_hwirq(iommu->pr_irq);
-	iommu->pr_irq = 0;
+	if (iommu->pr_irq) {
+		free_irq(iommu->pr_irq, iommu);
+		dmar_free_hwirq(iommu->pr_irq);
+		iommu->pr_irq = 0;
+	}
 
 	free_pages((unsigned long)iommu->prq, PRQ_ORDER);
 	iommu->prq = NULL;
drivers/iommu/omap-iommu.c +18 -3
index e2583cce2cc1..54556713c8d1 100644
@@ -1299,6 +1299,7 @@ static int __init omap_iommu_init(void)
 	const unsigned long flags = SLAB_HWCACHE_ALIGN;
 	size_t align = 1 << 10; /* L2 pagetable alignement */
 	struct device_node *np;
+	int ret;
 
 	np = of_find_matching_node(NULL, omap_iommu_of_match);
 	if (!np)
@@ -1312,11 +1313,25 @@ static int __init omap_iommu_init(void)
 		return -ENOMEM;
 	iopte_cachep = p;
 
-	bus_set_iommu(&platform_bus_type, &omap_iommu_ops);
-
 	omap_iommu_debugfs_init();
 
-	return platform_driver_register(&omap_iommu_driver);
+	ret = platform_driver_register(&omap_iommu_driver);
+	if (ret) {
+		pr_err("%s: failed to register driver\n", __func__);
+		goto fail_driver;
+	}
+
+	ret = bus_set_iommu(&platform_bus_type, &omap_iommu_ops);
+	if (ret)
+		goto fail_bus;
+
+	return 0;
+
+fail_bus:
+	platform_driver_unregister(&omap_iommu_driver);
+fail_driver:
+	kmem_cache_destroy(iopte_cachep);
+	return ret;
 }
 subsys_initcall(omap_iommu_init);
 /* must be ready before omap3isp is probed */
drivers/irqchip/irq-mips-gic.c +7 -5
index d74374f25392..abf696b49dd7 100644
@@ -55,6 +55,7 @@ static unsigned int gic_cpu_pin;
 static unsigned int timer_cpu_pin;
 static struct irq_chip gic_level_irq_controller, gic_edge_irq_controller;
 DECLARE_BITMAP(ipi_resrv, GIC_MAX_INTRS);
+DECLARE_BITMAP(ipi_available, GIC_MAX_INTRS);
 
 static void __gic_irq_dispatch(void);
 
@@ -746,17 +747,17 @@ static int gic_irq_domain_alloc(struct irq_domain *d, unsigned int virq,
 
 		return gic_setup_dev_chip(d, virq, spec->hwirq);
 	} else {
-		base_hwirq = find_first_bit(ipi_resrv, gic_shared_intrs);
+		base_hwirq = find_first_bit(ipi_available, gic_shared_intrs);
 		if (base_hwirq == gic_shared_intrs) {
 			return -ENOMEM;
 		}
 
 		/* check that we have enough space */
 		for (i = base_hwirq; i < nr_irqs; i++) {
-			if (!test_bit(i, ipi_resrv))
+			if (!test_bit(i, ipi_available))
 				return -EBUSY;
 		}
-		bitmap_clear(ipi_resrv, base_hwirq, nr_irqs);
+		bitmap_clear(ipi_available, base_hwirq, nr_irqs);
 
 		/* map the hwirq for each cpu consecutively */
 		i = 0;
@@ -787,7 +788,7 @@ static int gic_irq_domain_alloc(struct irq_domain *d, unsigned int virq,
 
 	return 0;
 error:
-	bitmap_set(ipi_resrv, base_hwirq, nr_irqs);
+	bitmap_set(ipi_available, base_hwirq, nr_irqs);
 	return ret;
 }
 
@@ -802,7 +803,7 @@ void gic_irq_domain_free(struct irq_domain *d, unsigned int virq,
 		return;
 
 	base_hwirq = GIC_HWIRQ_TO_SHARED(irqd_to_hwirq(data));
-	bitmap_set(ipi_resrv, base_hwirq, nr_irqs);
+	bitmap_set(ipi_available, base_hwirq, nr_irqs);
 }
 
 int gic_irq_domain_match(struct irq_domain *d, struct device_node *node,
@@ -1066,6 +1067,7 @@ static void __init __gic_init(unsigned long gic_base_addr,
 			   2 * gic_vpes);
 	}
 
+	bitmap_copy(ipi_available, ipi_resrv, GIC_MAX_INTRS);
 	gic_basic_init();
 }
 
drivers/leds/led-core.c +2 -1
index d70d4a5273b8..454ed4dc6ec1 100644
@@ -186,8 +186,9 @@ void led_blink_set(struct led_classdev *led_cdev,
 		   unsigned long *delay_on,
 		   unsigned long *delay_off)
 {
-	led_stop_software_blink(led_cdev);
+	del_timer_sync(&led_cdev->blink_timer);
 
+	led_cdev->flags &= ~LED_BLINK_SW;
 	led_cdev->flags &= ~LED_BLINK_ONESHOT;
 	led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP;
 
drivers/md/raid10.c +6 -0
index b19b551bb34b..18a4271bf569 100644
@@ -2704,6 +2704,11 @@ static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio)
 			list_add(&r10_bio->retry_list, &conf->bio_end_io_list);
 			conf->nr_queued++;
 			spin_unlock_irq(&conf->device_lock);
+			/*
+			 * In case freeze_array() is waiting for condition
+			 * nr_pending == nr_queued + extra to be true.
+			 */
+			wake_up(&conf->wait_barrier);
 			md_wakeup_thread(conf->mddev->thread);
 		} else {
 			if (test_bit(R10BIO_WriteError,
@@ -4084,6 +4089,7 @@ static int raid10_start_reshape(struct mddev *mddev)
 				diff = 0;
 			if (first || diff < min_offset_diff)
 				min_offset_diff = diff;
+			first = 0;
 		}
 	}
 
drivers/media/dvb-core/dvb_ca_en50221.c +23 -0
index b5b5b195ea7f..42ce88ceac66 100644
@@ -779,6 +779,29 @@ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, u8 * b
 		goto exit;
 	}
 
+	/*
+	 * It may need some time for the CAM to settle down, or there might
+	 * be a race condition between the CAM, writing HC and our last
+	 * check for DA. This happens, if the CAM asserts DA, just after
+	 * checking DA before we are setting HC. In this case it might be
+	 * a bug in the CAM to keep the FR bit, the lower layer/HW
+	 * communication requires a longer timeout or the CAM needs more
+	 * time internally. But this happens in reality!
+	 * We need to read the status from the HW again and do the same
+	 * we did for the previous check for DA
+	 */
+	status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_STATUS);
+	if (status < 0)
+		goto exit;
+
+	if (status & (STATUSREG_DA | STATUSREG_RE)) {
+		if (status & STATUSREG_DA)
+			dvb_ca_en50221_thread_wakeup(ca);
+
+		status = -EAGAIN;
+		goto exit;
+	}
+
 	/* send the amount of data */
 	if ((status = ca->pub->write_cam_control(ca->pub, slot, CTRLIF_SIZE_HIGH, bytes_write >> 8)) != 0)
 		goto exit;
drivers/media/dvb-frontends/si2168.c +3 -0
index 20b4a659e2e4..0fe69f79a24d 100644
@@ -14,6 +14,8 @@
  *    GNU General Public License for more details.
  */
 
+#include <linux/delay.h>
+
 #include "si2168_priv.h"
 
 static const struct dvb_frontend_ops si2168_ops;
@@ -378,6 +380,7 @@ static int si2168_init(struct dvb_frontend *fe)
 		if (ret)
 			goto err;
 
+		udelay(100);
 		memcpy(cmd.args, "\x85", 1);
 		cmd.wlen = 1;
 		cmd.rlen = 1;
drivers/media/pci/bt8xx/bt878.c +1 -2
index 8aa726651630..90fcccc05b56 100644
@@ -422,8 +422,7 @@ static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
 	       bt878_num);
 	if (bt878_num >= BT878_MAX) {
 		printk(KERN_ERR "bt878: Too many devices inserted\n");
-		result = -ENOMEM;
-		goto fail0;
+		return -ENOMEM;
 	}
 	if (pci_enable_device(dev))
 		return -EIO;
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +3 -1
index 30c148b9d65e..06e2cfd09855 100644
@@ -83,7 +83,7 @@ static void c8sectpfe_timer_interrupt(unsigned long ac8sectpfei)
 static void channel_swdemux_tsklet(unsigned long data)
 {
 	struct channel_info *channel = (struct channel_info *)data;
-	struct c8sectpfei *fei = channel->fei;
+	struct c8sectpfei *fei;
 	unsigned long wp, rp;
 	int pos, num_packets, n, size;
 	u8 *buf;
@@ -91,6 +91,8 @@ static void channel_swdemux_tsklet(unsigned long data)
 	if (unlikely(!channel || !channel->irec))
 		return;
 
+	fei = channel->fei;
+
 	wp = readl(channel->irec + DMA_PRDS_BUSWP_TP(0));
 	rp = readl(channel->irec + DMA_PRDS_BUSRP_TP(0));
 
drivers/mfd/palmas.c +14 -0
index 8f8bacb67a15..a6b5259ffbdd 100644
@@ -430,6 +430,20 @@ static void palmas_power_off(void)
 {
 	unsigned int addr;
 	int ret, slave;
+	struct device_node *np = palmas_dev->dev->of_node;
+
+	if (of_property_read_bool(np, "ti,palmas-override-powerhold")) {
+		addr = PALMAS_BASE_TO_REG(PALMAS_PU_PD_OD_BASE,
+					  PALMAS_PRIMARY_SECONDARY_PAD2);
+		slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE);
+
+		ret = regmap_update_bits(palmas_dev->regmap[slave], addr,
+				PALMAS_PRIMARY_SECONDARY_PAD2_GPIO_7_MASK, 0);
+		if (ret)
+			dev_err(palmas_dev->dev,
+				"Unable to write PRIMARY_SECONDARY_PAD2 %d\n",
+				ret);
+	}
 
 	if (!palmas_dev)
 		return;
drivers/mmc/core/core.c +8 -0
index 2553d903a82b..cff5829790c9 100644
@@ -2974,6 +2974,14 @@ static int mmc_pm_notify(struct notifier_block *notify_block,
 		if (!err)
 			break;
 
+		if (!mmc_card_is_removable(host)) {
+			dev_warn(mmc_dev(host),
+				 "pre_suspend failed for non-removable host: "
+				 "%d\n", err);
+			/* Avoid removing non-removable hosts */
+			break;
+		}
+
 		/* Calling bus_ops->remove() with a claimed host can deadlock */
 		host->bus_ops->remove(host);
 		mmc_claim_host(host);
drivers/mmc/host/omap_hsmmc.c +2 -2
index 5f2f24a7360d..a082aa330f47 100644
@@ -1762,8 +1762,8 @@ static int omap_hsmmc_configure_wake_irq(struct omap_hsmmc_host *host)
 	 */
 	if (host->pdata->controller_flags & OMAP_HSMMC_SWAKEUP_MISSING) {
 		struct pinctrl *p = devm_pinctrl_get(host->dev);
-		if (!p) {
-			ret = -ENODEV;
+		if (IS_ERR(p)) {
+			ret = PTR_ERR(p);
 			goto err_free_irq;
 		}
 		if (IS_ERR(pinctrl_lookup_state(p, PINCTRL_STATE_DEFAULT))) {
drivers/mmc/host/sdhci-of-esdhc.c +14 -0
index 3c27401cf7fe..a51d636c2312 100644
@@ -432,6 +432,20 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
 	if (esdhc->vendor_ver < VENDOR_V_23)
 		pre_div = 2;
 
+	/*
+	 * Limit SD clock to 167MHz for ls1046a according to its datasheet
+	 */
+	if (clock > 167000000 &&
+	    of_find_compatible_node(NULL, NULL, "fsl,ls1046a-esdhc"))
+		clock = 167000000;
+
+	/*
+	 * Limit SD clock to 125MHz for ls1012a according to its datasheet
+	 */
+	if (clock > 125000000 &&
+	    of_find_compatible_node(NULL, NULL, "fsl,ls1012a-esdhc"))
+		clock = 125000000;
+
 	/* Workaround to reduce the clock frequency for p1010 esdhc */
 	if (of_find_compatible_node(NULL, NULL, "fsl,p1010-esdhc")) {
 		if (clock > 20000000)
drivers/net/bonding/bond_main.c +2 -1
index c3f3096b24ae..4907c9b57565 100644
@@ -2067,6 +2067,7 @@ static int bond_miimon_inspect(struct bonding *bond)
 					    (bond->params.downdelay - slave->delay) *
 					    bond->params.miimon,
 					    slave->dev->name);
+				commit++;
 				continue;
 			}
 
@@ -2104,7 +2105,7 @@ static int bond_miimon_inspect(struct bonding *bond)
 					    (bond->params.updelay - slave->delay) *
 					    bond->params.miimon,
 					    slave->dev->name);
-
+				commit++;
 				continue;
 			}
 
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +1 -0
index 596f88b693ef..ca6c4718000f 100644
@@ -2026,6 +2026,7 @@ static void bnx2x_set_rx_buf_size(struct bnx2x *bp)
 				  ETH_OVREHEAD +
 				  mtu +
 				  BNX2X_FW_RX_ALIGN_END;
+		fp->rx_buf_size = SKB_DATA_ALIGN(fp->rx_buf_size);
 		/* Note : rx_buf_size doesn't take into account NET_SKB_PAD */
 		if (fp->rx_buf_size + NET_SKB_PAD <= PAGE_SIZE)
 			fp->rx_frag_size = fp->rx_buf_size + NET_SKB_PAD;
drivers/net/ethernet/freescale/ucc_geth.c +3 -5
index f76d33279454..ef9bc26ebc1a 100644
@@ -2594,11 +2594,10 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
 		} else if (ugeth->ug_info->uf_info.bd_mem_part ==
 			   MEM_PART_MURAM) {
 			out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].bd_ring_base,
-				 (u32) immrbar_virt_to_phys(ugeth->
-							    p_tx_bd_ring[i]));
+				 (u32)qe_muram_dma(ugeth->p_tx_bd_ring[i]));
 			out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].
 				 last_bd_completed_address,
-				 (u32) immrbar_virt_to_phys(endOfRing));
+				 (u32)qe_muram_dma(endOfRing));
 		}
 	}
 
@@ -2844,8 +2843,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
 		} else if (ugeth->ug_info->uf_info.bd_mem_part ==
 			   MEM_PART_MURAM) {
 			out_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr,
-				 (u32) immrbar_virt_to_phys(ugeth->
-							    p_rx_bd_ring[i]));
+				 (u32)qe_muram_dma(ugeth->p_rx_bd_ring[i]));
 		}
 		/* rest of fields handled by QE */
 	}
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c +1 -1
index 02a03bccde7b..34b5e699a1d5 100644
@@ -671,7 +671,7 @@ static void hns_gmac_get_strings(u32 stringset, u8 *data)
 
 static int hns_gmac_get_sset_count(int stringset)
 {
-	if (stringset == ETH_SS_STATS)
+	if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
 		return ARRAY_SIZE(g_gmac_stats_string);
 
 	return 0;
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c +1 -1
index 6ea872287307..4ecb809785f9 100644
@@ -422,7 +422,7 @@ void hns_ppe_update_stats(struct hns_ppe_cb *ppe_cb)
 
 int hns_ppe_get_sset_count(int stringset)
 {
-	if (stringset == ETH_SS_STATS)
+	if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
 		return ETH_PPE_STATIC_NUM;
 	return 0;
 }
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c +1 -1
index f3be9ac47bfb..fbbbbffd58dc 100644
@@ -798,7 +798,7 @@ void hns_rcb_get_stats(struct hnae_queue *queue, u64 *data)
  */
 int hns_rcb_get_ring_sset_count(int stringset)
 {
-	if (stringset == ETH_SS_STATS)
+	if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
 		return HNS_RING_STATIC_REG_NUM;
 
 	return 0;
drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c +1 -1
index 8f4f0e8da984..d1c868c800f9 100644
@@ -776,7 +776,7 @@ static void hns_xgmac_get_strings(u32 stringset, u8 *data)
  */
 static int hns_xgmac_get_sset_count(int stringset)
 {
-	if (stringset == ETH_SS_STATS)
+	if (stringset == ETH_SS_STATS || stringset == ETH_SS_PRIV_FLAGS)
 		return ARRAY_SIZE(g_xgmac_stats_string);
 
 	return 0;
drivers/net/ethernet/ibm/ibmvnic.c +18 -0
index 7c6c1468628b..49094c965697 100644
@@ -511,6 +511,23 @@ static int ibmvnic_open(struct net_device *netdev)
 	return -ENOMEM;
 }
 
+static void disable_sub_crqs(struct ibmvnic_adapter *adapter)
+{
+	int i;
+
+	if (adapter->tx_scrq) {
+		for (i = 0; i < adapter->req_tx_queues; i++)
+			if (adapter->tx_scrq[i])
+				disable_irq(adapter->tx_scrq[i]->irq);
+	}
+
+	if (adapter->rx_scrq) {
+		for (i = 0; i < adapter->req_rx_queues; i++)
+			if (adapter->rx_scrq[i])
+				disable_irq(adapter->rx_scrq[i]->irq);
+	}
+}
+
 static int ibmvnic_close(struct net_device *netdev)
 {
 	struct ibmvnic_adapter *adapter = netdev_priv(netdev);
@@ -519,6 +536,7 @@ static int ibmvnic_close(struct net_device *netdev)
 	int i;
 
 	adapter->closing = true;
+	disable_sub_crqs(adapter);
 
 	for (i = 0; i < adapter->req_rx_queues; i++)
 		napi_disable(&adapter->napi[i]);
drivers/net/ethernet/intel/e1000e/netdev.c +6 -0
index 0feddf3393f9..528a926dd979 100644
@@ -3528,6 +3528,12 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
 
 	switch (hw->mac.type) {
 	case e1000_pch2lan:
+		/* Stable 96MHz frequency */
+		incperiod = INCPERIOD_96MHz;
+		incvalue = INCVALUE_96MHz;
+		shift = INCVALUE_SHIFT_96MHz;
+		adapter->cc.shift = shift + INCPERIOD_SHIFT_96MHz;
+		break;
 	case e1000_pch_lpt:
 		if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI) {
 			/* Stable 96MHz frequency */
drivers/net/ethernet/intel/ixgbevf/ethtool.c +1 -1
index 508e72c5f1c2..d665de8849a2 100644
@@ -80,7 +80,7 @@ static struct ixgbe_stats ixgbevf_gstrings_stats[] = {
 #define IXGBEVF_QUEUE_STATS_LEN ( \
 	(((struct ixgbevf_adapter *)netdev_priv(netdev))->num_tx_queues + \
 	 ((struct ixgbevf_adapter *)netdev_priv(netdev))->num_rx_queues) * \
-	 (sizeof(struct ixgbe_stats) / sizeof(u64)))
+	 (sizeof(struct ixgbevf_stats) / sizeof(u64)))
 #define IXGBEVF_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbevf_gstrings_stats)
 
 #define IXGBEVF_STATS_LEN (IXGBEVF_GLOBAL_STATS_LEN + IXGBEVF_QUEUE_STATS_LEN)
drivers/net/ethernet/qlogic/qed/qed_vf.c +1 -1
index abf5bf11f865..0645124a887b 100644
@@ -204,7 +204,7 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
 		/* send acquire request */
 		rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
 		if (rc)
-			return rc;
+			goto exit;
 
 		/* copy acquire response from buffer to p_hwfn */
 		memcpy(&p_iov->acquire_resp, resp, sizeof(p_iov->acquire_resp));
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +2 -0
index d7107055ec60..2f656f395f39 100644
@@ -128,6 +128,8 @@ static int qlcnic_sriov_virtid_fn(struct qlcnic_adapter *adapter, int vf_id)
 		return 0;
 
 	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV);
+	if (!pos)
+		return 0;
 	pci_read_config_word(dev, pos + PCI_SRIOV_VF_OFFSET, &offset);
 	pci_read_config_word(dev, pos + PCI_SRIOV_VF_STRIDE, &stride);
 
drivers/net/hyperv/netvsc.c +16 -0
index c2ac39a940f7..14f58b60d1b5 100644
@@ -151,6 +151,13 @@ static void netvsc_destroy_buf(struct hv_device *device)
 				       sizeof(struct nvsp_message),
 				       (unsigned long)revoke_packet,
 				       VM_PKT_DATA_INBAND, 0);
+		/* If the failure is because the channel is rescinded;
+		 * ignore the failure since we cannot send on a rescinded
+		 * channel. This would allow us to properly cleanup
+		 * even when the channel is rescinded.
+		 */
+		if (device->channel->rescind)
+			ret = 0;
 		/*
 		 * If we failed here, we might as well return and
 		 * have a leak rather than continue and a bugchk
@@ -211,6 +218,15 @@ static void netvsc_destroy_buf(struct hv_device *device)
 				       sizeof(struct nvsp_message),
 				       (unsigned long)revoke_packet,
 				       VM_PKT_DATA_INBAND, 0);
+
+		/* If the failure is because the channel is rescinded;
+		 * ignore the failure since we cannot send on a rescinded
+		 * channel. This would allow us to properly cleanup
+		 * even when the channel is rescinded.
+		 */
+		if (device->channel->rescind)
+			ret = 0;
+
 		/* If we failed here, we might as well return and
 		 * have a leak rather than continue and a bugchk
 		 */
drivers/net/usb/qmi_wwan.c +2 -2
index a30d6a6dbd95..973e90fb4a24 100644
@@ -531,7 +531,7 @@ static int qmi_wwan_resume(struct usb_interface *intf)
 
 static const struct driver_info	qmi_wwan_info = {
 	.description	= "WWAN/QMI device",
-	.flags		= FLAG_WWAN,
+	.flags		= FLAG_WWAN | FLAG_SEND_ZLP,
 	.bind		= qmi_wwan_bind,
 	.unbind		= qmi_wwan_unbind,
 	.manage_power	= qmi_wwan_manage_power,
@@ -540,7 +540,7 @@ static const struct driver_info	qmi_wwan_info = {
 
 static const struct driver_info	qmi_wwan_info_quirk_dtr = {
 	.description	= "WWAN/QMI device",
-	.flags		= FLAG_WWAN,
+	.flags		= FLAG_WWAN | FLAG_SEND_ZLP,
 	.bind		= qmi_wwan_bind,
 	.unbind		= qmi_wwan_unbind,
 	.manage_power	= qmi_wwan_manage_power,
drivers/net/vxlan.c +7 -3
index 50570d779b01..0f5dfb8a545d 100644
@@ -2816,17 +2816,21 @@ static int __vxlan_sock_add(struct vxlan_dev *vxlan, bool ipv6)
 
 static int vxlan_sock_add(struct vxlan_dev *vxlan)
 {
-	bool ipv6 = vxlan->flags & VXLAN_F_IPV6;
 	bool metadata = vxlan->flags & VXLAN_F_COLLECT_METADATA;
+	bool ipv6 = vxlan->flags & VXLAN_F_IPV6 || metadata;
+	bool ipv4 = !ipv6 || metadata;
 	int ret = 0;
 
 	RCU_INIT_POINTER(vxlan->vn4_sock, NULL);
 #if IS_ENABLED(CONFIG_IPV6)
 	RCU_INIT_POINTER(vxlan->vn6_sock, NULL);
-	if (ipv6 || metadata)
+	if (ipv6) {
 		ret = __vxlan_sock_add(vxlan, true);
+		if (ret < 0 && ret != -EAFNOSUPPORT)
+			ipv4 = false;
+	}
 #endif
-	if (!ret && (!ipv6 || metadata))
+	if (ipv4)
 		ret = __vxlan_sock_add(vxlan, false);
 	if (ret < 0)
 		vxlan_sock_release(vxlan);
drivers/net/wan/pc300too.c +1 -0
index db363856e0b5..2b064998915f 100644
@@ -347,6 +347,7 @@ static int pc300_pci_init_one(struct pci_dev *pdev,
 	    card->rambase == NULL) {
 		pr_err("ioremap() failed\n");
 		pc300_pci_remove_one(pdev);
+		return -ENOMEM;
 	}
 
 	/* PLX PCI 9050 workaround for local configuration register read bug */
drivers/net/wireless/ath/ath10k/debug.c +10 -6
index 6aa2b93497dd..0dadc6044dba 100644
@@ -624,17 +624,21 @@ static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
 					      size_t count, loff_t *ppos)
 {
 	struct ath10k *ar = file->private_data;
-	char buf[32];
+	char buf[32] = {0};
+	ssize_t rc;
 	int ret;
 
-	simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
+	/* filter partial writes and invalid commands */
+	if (*ppos != 0 || count >= sizeof(buf) || count == 0)
+		return -EINVAL;
 
-	/* make sure that buf is null terminated */
-	buf[sizeof(buf) - 1] = 0;
+	rc = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
+	if (rc < 0)
+		return rc;
 
 	/* drop the possible '\n' from the end */
-	if (buf[count - 1] == '\n')
-		buf[count - 1] = 0;
+	if (buf[*ppos - 1] == '\n')
+		buf[*ppos - 1] = '\0';
 
 	mutex_lock(&ar->conf_mutex);
 
drivers/net/wireless/ath/ath10k/mac.c +1 -1
index 1e6e63dbd61c..a497bf31953d 100644
@@ -2505,7 +2505,7 @@ static void ath10k_peer_assoc_h_qos(struct ath10k *ar,
 		}
 		break;
 	case WMI_VDEV_TYPE_STA:
-		if (vif->bss_conf.qos)
+		if (sta->wme)
 			arg->peer_flags |= arvif->ar->wmi.peer_flags->qos;
 		break;
 	case WMI_VDEV_TYPE_IBSS:
drivers/net/wireless/ath/regd.c +12 -7
index f8506037736f..404fc306cb2a 100644
@@ -254,8 +254,12 @@ bool ath_is_49ghz_allowed(u16 regdomain)
 EXPORT_SYMBOL(ath_is_49ghz_allowed);
 
 /* Frequency is one where radar detection is required */
-static bool ath_is_radar_freq(u16 center_freq)
+static bool ath_is_radar_freq(u16 center_freq,
+			      struct ath_regulatory *reg)
+
 {
+	if (reg->country_code == CTRY_INDIA)
+		return (center_freq >= 5500 && center_freq <= 5700);
 	return (center_freq >= 5260 && center_freq <= 5700);
 }
 
@@ -306,7 +310,7 @@ __ath_reg_apply_beaconing_flags(struct wiphy *wiphy,
 				enum nl80211_reg_initiator initiator,
 				struct ieee80211_channel *ch)
 {
-	if (ath_is_radar_freq(ch->center_freq) ||
+	if (ath_is_radar_freq(ch->center_freq, reg) ||
 	    (ch->flags & IEEE80211_CHAN_RADAR))
 		return;
 
@@ -395,8 +399,9 @@ ath_reg_apply_ir_flags(struct wiphy *wiphy,
 	}
 }
 
-/* Always apply Radar/DFS rules on freq range 5260 MHz - 5700 MHz */
-static void ath_reg_apply_radar_flags(struct wiphy *wiphy)
+/* Always apply Radar/DFS rules on freq range 5500 MHz - 5700 MHz */
+static void ath_reg_apply_radar_flags(struct wiphy *wiphy,
+				      struct ath_regulatory *reg)
 {
 	struct ieee80211_supported_band *sband;
 	struct ieee80211_channel *ch;
@@ -409,7 +414,7 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy)
 
 	for (i = 0; i < sband->n_channels; i++) {
 		ch = &sband->channels[i];
-		if (!ath_is_radar_freq(ch->center_freq))
+		if (!ath_is_radar_freq(ch->center_freq, reg))
 			continue;
 		/* We always enable radar detection/DFS on this
 		 * frequency range. Additionally we also apply on
@@ -505,7 +510,7 @@ void ath_reg_notifier_apply(struct wiphy *wiphy,
 	struct ath_common *common = container_of(reg, struct ath_common,
 						 regulatory);
 	/* We always apply this */
-	ath_reg_apply_radar_flags(wiphy);
+	ath_reg_apply_radar_flags(wiphy, reg);
 
 	/*
 	 * This would happen when we have sent a custom regulatory request
@@ -653,7 +658,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
 	}
 
 	wiphy_apply_custom_regulatory(wiphy, regd);
-	ath_reg_apply_radar_flags(wiphy);
+	ath_reg_apply_radar_flags(wiphy, reg);
 	ath_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg);
 	return 0;
 }
drivers/net/wireless/intel/iwlwifi/iwl-a000.c +3 -3
index ea1618525878..e267377edbe7 100644
@@ -65,12 +65,12 @@
 #define IWL_A000_TX_POWER_VERSION	0xffff /* meaningless */
 
 /* Memory offsets and lengths */
-#define IWL_A000_DCCM_OFFSET		0x800000
-#define IWL_A000_DCCM_LEN		0x18000
+#define IWL_A000_DCCM_OFFSET		0x800000 /* LMAC1 */
+#define IWL_A000_DCCM_LEN		0x10000 /* LMAC1 */
 #define IWL_A000_DCCM2_OFFSET		0x880000
 #define IWL_A000_DCCM2_LEN		0x8000
 #define IWL_A000_SMEM_OFFSET		0x400000
-#define IWL_A000_SMEM_LEN		0x68000
+#define IWL_A000_SMEM_LEN		0xD0000
 
 #define IWL_A000_FW_PRE "iwlwifi-Qu-a0-jf-b0-"
 #define IWL_A000_MODULE_FIRMWARE(api) \
drivers/net/wireless/intel/iwlwifi/iwl-notif-wait.c +4 -6
index 88f260db3744..68412ff2112e 100644
@@ -76,8 +76,8 @@ void iwl_notification_wait_init(struct iwl_notif_wait_data *notif_wait)
 }
 IWL_EXPORT_SYMBOL(iwl_notification_wait_init);
 
-void iwl_notification_wait_notify(struct iwl_notif_wait_data *notif_wait,
-				  struct iwl_rx_packet *pkt)
+bool iwl_notification_wait(struct iwl_notif_wait_data *notif_wait,
+			   struct iwl_rx_packet *pkt)
 {
 	bool triggered = false;
 
@@ -118,13 +118,11 @@ void iwl_notification_wait_notify(struct iwl_notif_wait_data *notif_wait,
 			}
 		}
 		spin_unlock(&notif_wait->notif_wait_lock);
-
 	}
 
-	if (triggered)
-		wake_up_all(&notif_wait->notif_waitq);
+	return triggered;
 }
-IWL_EXPORT_SYMBOL(iwl_notification_wait_notify);
+IWL_EXPORT_SYMBOL(iwl_notification_wait);
 
 void iwl_abort_notification_waits(struct iwl_notif_wait_data *notif_wait)
 {
drivers/net/wireless/intel/iwlwifi/iwl-notif-wait.h +20 -5
index 0f9995ed71cd..368884be4e7c 100644
@@ -6,7 +6,7 @@
  * GPL LICENSE SUMMARY
  *
  * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
- * Copyright(c) 2015 Intel Deutschland GmbH
+ * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -32,6 +32,7 @@
  * BSD LICENSE
  *
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -89,10 +90,10 @@ struct iwl_notif_wait_data {
  *
  * This structure is not used directly, to wait for a
  * notification declare it on the stack, and call
- * iwlagn_init_notification_wait() with appropriate
+ * iwl_init_notification_wait() with appropriate
  * parameters. Then do whatever will cause the ucode
  * to notify the driver, and to wait for that then
- * call iwlagn_wait_notification().
+ * call iwl_wait_notification().
  *
  * Each notification is one-shot. If at some point we
  * need to support multi-shot notifications (which
@@ -114,10 +115,24 @@ struct iwl_notification_wait {
 
 /* caller functions */
 void iwl_notification_wait_init(struct iwl_notif_wait_data *notif_data);
-void iwl_notification_wait_notify(struct iwl_notif_wait_data *notif_data,
-				  struct iwl_rx_packet *pkt);
+bool iwl_notification_wait(struct iwl_notif_wait_data *notif_data,
+			   struct iwl_rx_packet *pkt);
 void iwl_abort_notification_waits(struct iwl_notif_wait_data *notif_data);
 
+static inline void
+iwl_notification_notify(struct iwl_notif_wait_data *notif_data)
+{
+	wake_up_all(&notif_data->notif_waitq);
+}
+
+static inline void
+iwl_notification_wait_notify(struct iwl_notif_wait_data *notif_data,
+			     struct iwl_rx_packet *pkt)
+{
+	if (iwl_notification_wait(notif_data, pkt))
+		iwl_notification_notify(notif_data);
+}
+
 /* user functions */
 void __acquires(wait_entry)
 iwl_init_notification_wait(struct iwl_notif_wait_data *notif_data,
drivers/net/wireless/marvell/libertas/if_spi.c +5 -0
index c3a53cd6988e..7b4955cc38db 100644
@@ -1181,6 +1181,10 @@ static int if_spi_probe(struct spi_device *spi)
 
 	/* Initialize interrupt handling stuff. */
 	card->workqueue = alloc_workqueue("libertas_spi", WQ_MEM_RECLAIM, 0);
+	if (!card->workqueue) {
+		err = -ENOMEM;
+		goto remove_card;
+	}
 	INIT_WORK(&card->packet_work, if_spi_host_to_card_worker);
 	INIT_WORK(&card->resume_work, if_spi_resume_worker);
 
@@ -1209,6 +1213,7 @@ static int if_spi_probe(struct spi_device *spi)
 	free_irq(spi->irq, card);
 terminate_workqueue:
 	destroy_workqueue(card->workqueue);
+remove_card:
 	lbs_remove_card(priv); /* will call free_netdev */
 free_card:
 	free_if_spi_card(card);
drivers/net/wireless/marvell/mwifiex/main.c +3 -1
index 2478ccd6f2d9..1e36f11831a9 100644
@@ -146,7 +146,6 @@ static int mwifiex_unregister(struct mwifiex_adapter *adapter)
 
 	kfree(adapter->regd);
 
-	vfree(adapter->chan_stats);
 	kfree(adapter);
 	return 0;
 }
@@ -636,6 +635,7 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
 	goto done;
 
 err_add_intf:
+	vfree(adapter->chan_stats);
 	wiphy_unregister(adapter->wiphy);
 	wiphy_free(adapter->wiphy);
 err_init_fw:
@@ -1429,6 +1429,7 @@ mwifiex_shutdown_sw(struct mwifiex_adapter *adapter, struct semaphore *sem)
 			mwifiex_del_virtual_intf(adapter->wiphy, &priv->wdev);
 		rtnl_unlock();
 	}
+	vfree(adapter->chan_stats);
 
 	up(sem);
 exit_sem_err:
@@ -1729,6 +1730,7 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
 			mwifiex_del_virtual_intf(adapter->wiphy, &priv->wdev);
 		rtnl_unlock();
 	}
+	vfree(adapter->chan_stats);
 
 	wiphy_unregister(adapter->wiphy);
 	wiphy_free(adapter->wiphy);
drivers/net/wireless/mediatek/mt7601u/mcu.c +8 -2
index dbdfb3f5c507..a9f5f398b2f8 100644
@@ -66,8 +66,10 @@ mt7601u_mcu_msg_alloc(struct mt7601u_dev *dev, const void *data, int len)
 	WARN_ON(len % 4); /* if length is not divisible by 4 we need to pad */
 
 	skb = alloc_skb(len + MT_DMA_HDR_LEN + 4, GFP_KERNEL);
-	skb_reserve(skb, MT_DMA_HDR_LEN);
-	memcpy(skb_put(skb, len), data, len);
+	if (skb) {
+		skb_reserve(skb, MT_DMA_HDR_LEN);
+		memcpy(skb_put(skb, len), data, len);
+	}
 
 	return skb;
 }
@@ -170,6 +172,8 @@ static int mt7601u_mcu_function_select(struct mt7601u_dev *dev,
 	};
 
 	skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg));
+	if (!skb)
+		return -ENOMEM;
 	return mt7601u_mcu_msg_send(dev, skb, CMD_FUN_SET_OP, func == 5);
 }
 
@@ -205,6 +209,8 @@ mt7601u_mcu_calibrate(struct mt7601u_dev *dev, enum mcu_calibrate cal, u32 val)
 	};
 
 	skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg));
+	if (!skb)
+		return -ENOMEM;
 	return mt7601u_mcu_msg_send(dev, skb, CMD_CALIBRATION_OP, true);
 }
 
drivers/net/wireless/realtek/rtlwifi/pci.c +7 -0
index 75ffeaa54ed8..e15b462d096b 100644
@@ -1572,7 +1572,14 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
 				dev_kfree_skb_irq(skb);
 				ring->idx = (ring->idx + 1) % ring->entries;
 			}
+
+			if (rtlpriv->use_new_trx_flow) {
+				rtlpci->tx_ring[i].cur_tx_rp = 0;
+				rtlpci->tx_ring[i].cur_tx_wp = 0;
+			}
+
 			ring->idx = 0;
+			ring->entries = rtlpci->txringcount[i];
 		}
 	}
 	spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags);
drivers/net/wireless/rndis_wlan.c +4 -0
index 603c90470225..15b2350d9f45 100644
@@ -3427,6 +3427,10 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf)
 
 	/* because rndis_command() sleeps we need to use workqueue */
 	priv->workqueue = create_singlethread_workqueue("rndis_wlan");
+	if (!priv->workqueue) {
+		wiphy_free(wiphy);
+		return -ENOMEM;
+	}
 	INIT_WORK(&priv->work, rndis_wlan_worker);
 	INIT_DELAYED_WORK(&priv->dev_poller_work, rndis_device_poller);
 	INIT_DELAYED_WORK(&priv->scan_work, rndis_get_scan_results);
drivers/pinctrl/core.c +17 -7
index fb38e208f32d..735d8f7f9d71 100644
@@ -992,19 +992,16 @@ struct pinctrl_state *pinctrl_lookup_state(struct pinctrl *p,
 EXPORT_SYMBOL_GPL(pinctrl_lookup_state);
 
 /**
- * pinctrl_select_state() - select/activate/program a pinctrl state to HW
+ * pinctrl_commit_state() - select/activate/program a pinctrl state to HW
  * @p: the pinctrl handle for the device that requests configuration
  * @state: the state handle to select/activate/program
  */
-int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state)
+static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
 {
 	struct pinctrl_setting *setting, *setting2;
 	struct pinctrl_state *old_state = p->state;
 	int ret;
 
-	if (p->state == state)
-		return 0;
-
 	if (p->state) {
 		/*
 		 * For each pinmux setting in the old state, forget SW's record
@@ -1068,6 +1065,19 @@ int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state)
 
 	return ret;
 }
+
+/**
+ * pinctrl_select_state() - select/activate/program a pinctrl state to HW
+ * @p: the pinctrl handle for the device that requests configuration
+ * @state: the state handle to select/activate/program
+ */
+int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state)
+{
+	if (p->state == state)
+		return 0;
+
+	return pinctrl_commit_state(p, state);
+}
 EXPORT_SYMBOL_GPL(pinctrl_select_state);
 
 static void devm_pinctrl_release(struct device *dev, void *res)
@@ -1236,7 +1246,7 @@ void pinctrl_unregister_map(struct pinctrl_map const *map)
 int pinctrl_force_sleep(struct pinctrl_dev *pctldev)
 {
 	if (!IS_ERR(pctldev->p) && !IS_ERR(pctldev->hog_sleep))
-		return pinctrl_select_state(pctldev->p, pctldev->hog_sleep);
+		return pinctrl_commit_state(pctldev->p, pctldev->hog_sleep);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(pinctrl_force_sleep);
@@ -1248,7 +1258,7 @@ EXPORT_SYMBOL_GPL(pinctrl_force_sleep);
 int pinctrl_force_default(struct pinctrl_dev *pctldev)
 {
 	if (!IS_ERR(pctldev->p) && !IS_ERR(pctldev->hog_default))
-		return pinctrl_select_state(pctldev->p, pctldev->hog_default);
+		return pinctrl_commit_state(pctldev->p, pctldev->hog_default);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(pinctrl_force_default);
drivers/pinctrl/pinctrl-rockchip.c +8 -0
index 49bf7dcb7ed8..f826793e972c 100644
@@ -1278,8 +1278,16 @@ static int rockchip_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
 {
 	struct rockchip_pin_bank *bank = gpiochip_get_data(chip);
 	u32 data;
+	int ret;
 
+	ret = clk_enable(bank->clk);
+	if (ret < 0) {
+		dev_err(bank->drvdata->dev,
+			"failed to enable clock for bank %s\n", bank->name);
+		return ret;
+	}
 	data = readl_relaxed(bank->reg_base + GPIO_SWPORT_DDR);
+	clk_disable(bank->clk);
 
 	return !(data & BIT(offset));
 }
drivers/platform/chrome/cros_ec_proto.c +5 -3
index 04053fe1e980..cfa3e850c49f 100644
@@ -60,12 +60,14 @@ static int send_command(struct cros_ec_device *ec_dev,
 			struct cros_ec_command *msg)
 {
 	int ret;
+	int (*xfer_fxn)(struct cros_ec_device *ec, struct cros_ec_command *msg);
 
 	if (ec_dev->proto_version > 2)
-		ret = ec_dev->pkt_xfer(ec_dev, msg);
+		xfer_fxn = ec_dev->pkt_xfer;
 	else
-		ret = ec_dev->cmd_xfer(ec_dev, msg);
+		xfer_fxn = ec_dev->cmd_xfer;
 
+	ret = (*xfer_fxn)(ec_dev, msg);
 	if (msg->result == EC_RES_IN_PROGRESS) {
 		int i;
 		struct cros_ec_command *status_msg;
@@ -88,7 +90,7 @@ static int send_command(struct cros_ec_device *ec_dev,
 		for (i = 0; i < EC_COMMAND_RETRIES; i++) {
 			usleep_range(10000, 11000);
 
-			ret = ec_dev->cmd_xfer(ec_dev, status_msg);
+			ret = (*xfer_fxn)(ec_dev, status_msg);
 			if (ret < 0)
 				break;
 
drivers/platform/chrome/cros_ec_sysfs.c +1 -1
index f3baf9973989..24f1630a8b3f 100644
@@ -187,7 +187,7 @@ static ssize_t show_ec_version(struct device *dev,
 		count += scnprintf(buf + count, PAGE_SIZE - count,
 				   "Build info:    EC error %d\n", msg->result);
 	else {
-		msg->data[sizeof(msg->data) - 1] = '\0';
+		msg->data[EC_HOST_PARAM_SIZE - 1] = '\0';
 		count += scnprintf(buf + count, PAGE_SIZE - count,
 				   "Build info:    %s\n", msg->data);
 	}
drivers/platform/x86/asus-nb-wmi.c +22 -0
index 6eb2837f6b89..687cc5b922ee 100644
@@ -120,6 +120,10 @@ static struct quirk_entry quirk_asus_x550lb = {
 	.xusb2pr = 0x01D9,
 };
 
+static struct quirk_entry quirk_asus_ux330uak = {
+	.wmi_force_als_set = true,
+};
+
 static int dmi_matched(const struct dmi_system_id *dmi)
 {
 	quirks = dmi->driver_data;
@@ -150,6 +154,15 @@ static const struct dmi_system_id asus_quirks[] = {
 		 */
 		.driver_data = &quirk_asus_wapf4,
 	},
+	{
+		.callback = dmi_matched,
+		.ident = "ASUSTeK COMPUTER INC. X302UA",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "X302UA"),
+		},
+		.driver_data = &quirk_asus_wapf4,
+	},
 	{
 		.callback = dmi_matched,
 		.ident = "ASUSTeK COMPUTER INC. X401U",
@@ -411,6 +424,15 @@ static const struct dmi_system_id asus_quirks[] = {
 		},
 		.driver_data = &quirk_asus_ux303ub,
 	},
+	{
+		.callback = dmi_matched,
+		.ident = "ASUSTeK COMPUTER INC. UX330UAK",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "UX330UAK"),
+		},
+		.driver_data = &quirk_asus_ux330uak,
+	},
 	{
 		.callback = dmi_matched,
 		.ident = "ASUSTeK COMPUTER INC. X550LB",
drivers/platform/x86/asus-wmi.c +12 -0
index 8499d3ae4257..8a1bfd489c26 100644
@@ -1108,6 +1108,15 @@ static void asus_wmi_set_xusb2pr(struct asus_wmi *asus)
 			orig_ports_available, ports_available);
 }
 
+/*
+ * Some devices dont support or have borcken get_als method
+ * but still support set method.
+ */
+static void asus_wmi_set_als(void)
+{
+	asus_wmi_set_devstate(ASUS_WMI_DEVID_ALS_ENABLE, 1, NULL);
+}
+
 /*
  * Hwmon device
  */
@@ -2120,6 +2129,9 @@ static int asus_wmi_add(struct platform_device *pdev)
 			goto fail_rfkill;
 	}
 
+	if (asus->driver->quirks->wmi_force_als_set)
+		asus_wmi_set_als();
+
 	/* Some Asus desktop boards export an acpi-video backlight interface,
 	   stop this from showing up */
 	chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
drivers/platform/x86/asus-wmi.h +1 -0
index fdff626c3b51..5db052d1de1e 100644
@@ -45,6 +45,7 @@ struct quirk_entry {
 	bool store_backlight_power;
 	bool wmi_backlight_power;
 	bool wmi_backlight_native;
+	bool wmi_force_als_set;
 	int wapf;
 	/*
 	 * For machines with AMD graphic chips, it will send out WMI event
drivers/platform/x86/intel-vbtn.c +4 -0
index 78080763df51..a74340dff530 100644
@@ -37,6 +37,10 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
 static const struct key_entry intel_vbtn_keymap[] = {
 	{ KE_IGNORE, 0xC0, { KEY_POWER } },	/* power key press */
 	{ KE_KEY, 0xC1, { KEY_POWER } },	/* power key release */
+	{ KE_KEY, 0xC4, { KEY_VOLUMEUP } },		/* volume-up key press */
+	{ KE_IGNORE, 0xC5, { KEY_VOLUMEUP } },		/* volume-up key release */
+	{ KE_KEY, 0xC6, { KEY_VOLUMEDOWN } },		/* volume-down key press */
+	{ KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } },	/* volume-down key release */
 	{ KE_END },
 };
 
drivers/power/supply/bq24190_charger.c +9 -1
index 50171fd3cc6d..8ed2782d1bb1 100644
@@ -506,6 +506,9 @@ static int bq24190_register_reset(struct bq24190_dev_info *bdi)
 	int ret, limit = 100;
 	u8 v;
 
+	if (device_property_read_bool(bdi->dev, "disable-reset"))
+		return 0;
+
 	/* Reset the registers */
 	ret = bq24190_write_mask(bdi, BQ24190_REG_POC,
 			BQ24190_REG_POC_RESET_MASK,
@@ -1184,8 +1187,13 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
 		}
 	} while (f_reg && ++i < 2);
 
+	/* ignore over/under voltage fault after disconnect */
+	if (f_reg == (1 << BQ24190_REG_F_CHRG_FAULT_SHIFT) &&
+	    !(ss_reg & BQ24190_REG_SS_PG_STAT_MASK))
+		f_reg = 0;
+
 	if (f_reg != bdi->f_reg) {
-		dev_info(bdi->dev,
+		dev_warn(bdi->dev,
 			"Fault: boost %d, charge %d, battery %d, ntc %d\n",
 			!!(f_reg & BQ24190_REG_F_BOOST_FAULT_MASK),
 			!!(f_reg & BQ24190_REG_F_CHRG_FAULT_MASK),
drivers/power/supply/isp1704_charger.c +4 -0
index 4cd6899b961e..95af5f305838 100644
@@ -418,6 +418,10 @@ static int isp1704_charger_probe(struct platform_device *pdev)
 
 		pdata = devm_kzalloc(&pdev->dev,
 			sizeof(struct isp1704_charger_data), GFP_KERNEL);
+		if (!pdata) {
+			ret = -ENOMEM;
+			goto fail0;
+		}
 		pdata->enable_gpio = gpio;
 
 		dev_info(&pdev->dev, "init gpio %d\n", pdata->enable_gpio);
drivers/power/supply/pda_power.c +27 -22

109 lines not on this page · raw message

drivers/ptp/ptp_clock.c +7 -11
index 86280b7e41f3..2aa5b37cc6d2 100644
@@ -97,30 +97,26 @@ static s32 scaled_ppm_to_ppb(long ppm)
 
 /* posix clock implementation */
 
-static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp)
+static int ptp_clock_getres(struct posix_clock *pc, struct timespec64 *tp)
 {
 	tp->tv_sec = 0;
 	tp->tv_nsec = 1;
 	return 0;
 }
 
-static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp)
+static int ptp_clock_settime(struct posix_clock *pc, const struct timespec64 *tp)
 {
 	struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
-	struct timespec64 ts = timespec_to_timespec64(*tp);
 
-	return  ptp->info->settime64(ptp->info, &ts);
+	return  ptp->info->settime64(ptp->info, tp);
 }
 
-static int ptp_clock_gettime(struct posix_clock *pc, struct timespec *tp)
+static int ptp_clock_gettime(struct posix_clock *pc, struct timespec64 *tp)
 {
 	struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
-	struct timespec64 ts;
 	int err;
 
-	err = ptp->info->gettime64(ptp->info, &ts);
-	if (!err)
-		*tp = timespec64_to_timespec(ts);
+	err = ptp->info->gettime64(ptp->info, tp);
 	return err;
 }
 
@@ -133,7 +129,7 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct timex *tx)
 	ops = ptp->info;
 
 	if (tx->modes & ADJ_SETOFFSET) {
-		struct timespec ts;
+		struct timespec64 ts;
 		ktime_t kt;
 		s64 delta;
 
@@ -146,7 +142,7 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct timex *tx)
 		if ((unsigned long) ts.tv_nsec >= NSEC_PER_SEC)
 			return -EINVAL;
 
-		kt = timespec_to_ktime(ts);
+		kt = timespec64_to_ktime(ts);
 		delta = ktime_to_ns(kt);
 		err = ops->adjtime(ops, delta);
 	} else if (tx->modes & ADJ_FREQUENCY) {
drivers/regulator/anatop-regulator.c +5 -0
index 3a6d0290c54c..c5e272ea4372 100644
@@ -296,6 +296,11 @@ static int anatop_regulator_probe(struct platform_device *pdev)
 		if (!sreg->sel && !strcmp(sreg->name, "vddpu"))
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-cmos.c +13 -4
index 7030d7cd3861..c554e529fc4e 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-ds1374.c +8 -2
index 3b3049c8c9e0..c0eb113588ff 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/lpfc/lpfc_init.c +5 -1
index f7e3f27bb5c5..e9ea8f4ea2c9 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/lpfc/lpfc_sli.c +3 -0
index 8f1df76a77b6..0902ed204ba8 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mac_esp.c +23 -10
index 14c0334f41e4..26c67c42985c 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/virtio_scsi.c +24 -0
index c680d7641311..8f4adc1d9588 100644

Lines of this file are not shown. View the raw message.

drivers/soc/fsl/qe/qe.c +13 -0
index 2707a827261b..5482302d3d9e 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-dw-mmio.c +1 -1
index 447497e9124c..d25cc4037e23 100644

Lines of this file are not shown. View the raw message.

drivers/staging/android/ashmem.c +3 -5
index db100154f85c..6d690e5fa9bb 100644

Lines of this file are not shown. View the raw message.

drivers/staging/unisys/visorhba/visorhba_main.c +7 -1
index 5a7a87efed27..28b5392153a8 100644

Lines of this file are not shown. View the raw message.

drivers/staging/wilc1000/linux_mon.c +2 -0
index 242f82f4d24f..d8ab4cb11289 100644

Lines of this file are not shown. View the raw message.

drivers/target/target_core_file.c +17 -6
index 97928b42ad62..57a3d3936364 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/8250/8250_dw.c +2 -1
index 459d726f9d59..3eb01a719d22 100644

Lines of this file are not shown. View the raw message.

drivers/tty/tty_io.c +2 -0
index 8d9f9a803b42..fb9bada5f1d5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_hid.c +67 -22

89 lines not on this page · raw message

drivers/video/console/vgacon.c +26 -8
index 11576611a974..dda1c4b3a229 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c +3 -0
index b529a8c2b652..3984716096aa 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/sm501fb.c +1 -0
index d0a4e2f79a57..d215faacce04 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/udlfb.c +12 -2
index 53326badfb61..2add8def83be 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/watchdog_dev.c +4 -2
index 32930a073a12..977fe74e5abe 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/file.c +3 -1
index 3286a6e47ff0..c95ff096cd24 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/inode.c +4 -2
index d196ce4be31c..ffd5831ca15c 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/send.c +21 -2
index 9a47b5598df7..d040afc966fe 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/volumes.c +9 -3
index 5900508ca6ed..4730ba2cc049 100644

Lines of this file are not shown. View the raw message.

fs/cifs/netmisc.c +3 -3
index abae6dd2c6b9..cc88f4f0325e 100644

Lines of this file are not shown. View the raw message.

fs/cifs/sess.c +10 -12
index 538d9b55699a..c3db2a882aee 100644

Lines of this file are not shown. View the raw message.

fs/cifs/smb2pdu.c +5 -10
index 94c4c1901222..7c26286a525d 100644

Lines of this file are not shown. View the raw message.

fs/jbd2/journal.c +14 -1
index 7d4b557f1962..047c8ef620fe 100644

Lines of this file are not shown. View the raw message.

fs/nfs/pagelist.c +4 -2
index 3d17fc82b9fe..892c88542ebd 100644

Lines of this file are not shown. View the raw message.

fs/nfs/pnfs.c +13 -5
index b8e44746f761..0e008db16b16 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4proc.c +3 -3
index 022d95886d66..eef0caf6e67d 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/vfs.c +20 -4
index b829cc9a9b39..8f0b19a3ca81 100644

Lines of this file are not shown. View the raw message.

fs/orangefs/waitqueue.c +8 -1
index f61b00887481..cbca58ba008a 100644

Lines of this file are not shown. View the raw message.

include/acpi/actbl2.h +9 -0
index c93dbadfc71d..db7d15b6a580 100644

Lines of this file are not shown. View the raw message.

include/linux/mlx5/driver.h +2 -2
index 6a620e01b040..7751d72a6a40 100644

Lines of this file are not shown. View the raw message.

include/linux/posix-clock.h +5 -5
index 34c4498b800f..83b22ae9ae12 100644

Lines of this file are not shown. View the raw message.

include/soc/fsl/qe/qe.h +1 -0
index 70339d7958c0..0cd4c11479b1 100644

Lines of this file are not shown. View the raw message.

kernel/irq/manage.c +3 -1
index ea41820ab12e..ed18aa4dceab 100644

Lines of this file are not shown. View the raw message.

kernel/time/posix-clock.c +24 -10
index 9cff0ab82b63..e24008c098c6 100644

Lines of this file are not shown. View the raw message.

mm/memory-failure.c +8 -0
index 5aa71a82ca73..851efb004857 100644

Lines of this file are not shown. View the raw message.

mm/vmscan.c +4 -2
index 4365de74bdb0..cdd5c3b5c357 100644

Lines of this file are not shown. View the raw message.

mm/vmstat.c +13 -7
index 3863b5d6d598..68b3193e4493 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_input.c +9 -7
index 2f107e46355c..b5f264ae3bff 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ip6_vti.c +20 -0
index 912333586de6..345efeb887ef 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ndisc.c +2 -0
index d8e671457d10..41c22cb33424 100644

Lines of this file are not shown. View the raw message.

net/mac80211/cfg.c +17 -13
index dee60428c78c..efa2a2fcae72 100644

Lines of this file are not shown. View the raw message.

net/mac80211/ibss.c +5 -1
index 62d13eabe17f..d31818e7d10c 100644

Lines of this file are not shown. View the raw message.

net/mac80211/ieee80211_i.h +21 -15
index 03dbc6bd8598..7fd544d970d9 100644

Lines of this file are not shown. View the raw message.

net/mac80211/mesh.c +20 -9
index b4b3fe078868..b2a27263d6ff 100644

Lines of this file are not shown. View the raw message.

net/mac80211/mesh_plink.c +26 -11
index fcba70e57073..2d3c4695e75b 100644

Lines of this file are not shown. View the raw message.

net/mac80211/mlme.c +12 -2
index 1118c61f835d..fdab4f1390d2 100644

Lines of this file are not shown. View the raw message.

net/mac80211/rate.c +3 -1
index 206698bc93f4..dbceb42c2a8e 100644

Lines of this file are not shown. View the raw message.

net/mac80211/sta_info.c +9 -4
index 348700b424ea..1ecf3d07d1f5 100644

Lines of this file are not shown. View the raw message.

net/mac80211/status.c +1 -0
index ad37b4e58c2f..72fe9bc7a1f9 100644

Lines of this file are not shown. View the raw message.

net/mac80211/tdls.c +19 -10
index afca7d103684..f20dcf1b1830 100644

Lines of this file are not shown. View the raw message.

net/mac80211/tx.c +4 -1
index 1ffd1e145c13..84582998f65f 100644

Lines of this file are not shown. View the raw message.

net/mac80211/util.c +3 -3
index 545c79a42a77..a2756096b94a 100644

Lines of this file are not shown. View the raw message.

net/netfilter/ipvs/ip_vs_ctl.c +17 -5
index 2155c2498aed..74d119512d96 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nf_conntrack_helper.c +21 -5
index 6dc44d9b4190..92e69af41656 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nft_dynset.c +2 -3
index 31ca94793aa9..b9dd4e960426 100644

Lines of this file are not shown. View the raw message.

net/netfilter/x_tables.c +3 -1
index ac26b71d900e..7ad1a863587a 100644

Lines of this file are not shown. View the raw message.

net/netfilter/xt_CT.c +9 -2
index 6669e68d589e..00ef8243d48d 100644

Lines of this file are not shown. View the raw message.

net/openvswitch/conntrack.c +29 -1
index b28e45b691de..466393936db9 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprtrdma/verbs.c +1 -0
index 69502fa68a3c..1a2b1f61ed26 100644

Lines of this file are not shown. View the raw message.

net/tipc/node.c +2 -0
index 5b3e1ea37b6d..db8fbc076e1a 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +10 -2
index cd427ea8861d..dae0021f39c3 100644

Lines of this file are not shown. View the raw message.

sound/soc/intel/atom/sst/sst_acpi.c +15 -1
index 0bfa68862460..cd16b431d1bd 100644

Lines of this file are not shown. View the raw message.

sound/soc/intel/skylake/skl.c +1 -1
index 06fa5e85dd0e..3e526fbd267e 100644

Lines of this file are not shown. View the raw message.

sound/soc/sh/rcar/cmd.c +3 -0
index 7d92a24b7cfa..98835e9d1d7d 100644

Lines of this file are not shown. View the raw message.

tools/perf/tests/kmod-path.c +2 -0
index 76f41f249944..6cd9e5107f77 100644

Lines of this file are not shown. View the raw message.

tools/testing/nvdimm/test/nfit.c +9 -1
index 71620fa95953..d025eafc09c2 100644

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.