Skip to contentSkip to conversation

Linux 3.19.2

DISCUSSION Greg KH 1 participant 2 messages Mar 18, 2015 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 3.19.2 kernel.

All users of the 3.19 kernel series must upgrade.

The updated 3.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.19.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/stable_kernel_rules.txt          |   44 +++
 Makefile                                       |    2 
 arch/arc/include/asm/processor.h               |    9 
 arch/arc/kernel/stacktrace.c                   |    6 
 arch/mips/kvm/trace.h                          |    6 
 arch/powerpc/include/asm/pnv-pci.h             |    2 
 arch/powerpc/platforms/powernv/pci-ioda.c      |    6 
 arch/x86/include/asm/xsave.h                   |   28 --
 arch/x86/kernel/entry_64.S                     |   13 -
 arch/x86/kvm/emulate.c                         |    3 
 drivers/acpi/acpi_lpss.c                       |    5 
 drivers/acpi/video.c                           |   11 
 drivers/clk/clk-gate.c                         |    2 
 drivers/clk/clk.c                              |    4 
 drivers/clk/sunxi/clk-sunxi.c                  |    1 
 drivers/clk/zynq/clkc.c                        |    1 
 drivers/coresight/coresight-etm3x.c            |   10 
 drivers/dma-buf/reservation.c                  |    2 
 drivers/firmware/dmi_scan.c                    |   17 -
 drivers/firmware/efi/libstub/efi-stub-helper.c |    8 
 drivers/firmware/efi/runtime-map.c             |    2 
 drivers/gpu/drm/i915/i915_drv.h                |    1 
 drivers/gpu/drm/i915/i915_gem_tiling.c         |    7 
 drivers/gpu/drm/i915/i915_gem_userptr.c        |   20 +
 drivers/gpu/drm/i915/i915_irq.c                |   22 +
 drivers/gpu/drm/i915/intel_display.c           |    3 
 drivers/gpu/drm/i915/intel_dp.c                |   17 -
 drivers/gpu/drm/i915/intel_fifo_underrun.c     |   18 -
 drivers/gpu/drm/i915/intel_lrc.c               |   20 -
 drivers/gpu/drm/i915/intel_pm.c                |    5 
 drivers/gpu/drm/i915/intel_ringbuffer.c        |   23 +-
 drivers/gpu/drm/i915/intel_sideband.c          |   26 +-
 drivers/gpu/drm/radeon/atombios_dp.c           |    4 
 drivers/gpu/drm/radeon/cik.c                   |   37 +--
 drivers/gpu/drm/radeon/kv_dpm.c                |   17 +
 drivers/gpu/drm/radeon/ni.c                    |    8 
 drivers/gpu/drm/radeon/r600_dpm.c              |    2 
 drivers/gpu/drm/radeon/radeon_atombios.c       |    1 
 drivers/gpu/drm/radeon/radeon_encoders.c       |    3 
 drivers/gpu/drm/radeon/radeon_object.c         |   12 +
 drivers/gpu/drm/tegra/drm.c                    |    2 
 drivers/hid/hid-input.c                        |   17 +
 drivers/hid/wacom_wac.c                        |    6 
 drivers/iio/adc/mcp3422.c                      |   17 -
 drivers/iio/dac/ad5686.c                       |    2 
 drivers/iio/humidity/si7020.c                  |    6 
 drivers/iio/imu/adis16400_core.c               |    3 
 drivers/infiniband/core/ucma.c                 |    3 
 drivers/infiniband/core/umem_odp.c             |    3 
 drivers/infiniband/core/uverbs_cmd.c           |    9 
 drivers/infiniband/hw/mlx4/main.c              |   10 
 drivers/infiniband/hw/mlx4/qp.c                |    6 
 drivers/infiniband/hw/mlx5/main.c              |    2 
 drivers/infiniband/hw/qib/qib.h                |    9 
 drivers/infiniband/hw/qib/qib_eeprom.c         |  181 ----------------
 drivers/infiniband/hw/qib/qib_iba6120.c        |    2 
 drivers/infiniband/hw/qib/qib_iba7220.c        |    2 
 drivers/infiniband/hw/qib/qib_iba7322.c        |    2 
 drivers/infiniband/hw/qib/qib_init.c           |    1 
 drivers/infiniband/hw/qib/qib_sysfs.c          |   24 --
 drivers/infiniband/ulp/iser/iscsi_iser.h       |    4 
 drivers/infiniband/ulp/iser/iser_initiator.c   |   16 -
 drivers/infiniband/ulp/iser/iser_memory.c      |    9 
 drivers/infiniband/ulp/iser/iser_verbs.c       |   25 +-
 drivers/md/dm-io.c                             |    6 
 drivers/md/dm-raid1.c                          |    9 
 drivers/md/dm-snap.c                           |    4 
 drivers/md/dm.c                                |   27 --
 drivers/misc/cxl/cxl.h                         |    1 
 drivers/misc/cxl/irq.c                         |    1 
 drivers/misc/cxl/pci.c                         |   44 +++
 drivers/misc/mei/init.c                        |    2 
 drivers/net/ethernet/broadcom/genet/bcmgenet.c |  122 ++++++++---
 drivers/net/ethernet/broadcom/genet/bcmgenet.h |    2 
 drivers/net/ethernet/realtek/r8169.c           |   18 -
 drivers/net/ethernet/renesas/sh_eth.c          |    3 
 drivers/net/macvtap.c                          |    7 
 drivers/net/phy/phy.c                          |   23 +-
 drivers/net/team/team.c                        |   10 
 drivers/net/usb/plusb.c                        |    5 
 drivers/net/wireless/ath/ath5k/reset.c         |    2 
 drivers/of/of_pci.c                            |    4 
 drivers/pinctrl/freescale/pinctrl-imx.c        |    2 
 drivers/pinctrl/freescale/pinctrl-imx25.c      |  276 ++++++++++++-------------
 drivers/scsi/be2iscsi/be_main.c                |    1 
 drivers/scsi/sg.c                              |    6 
 drivers/scsi/wd719x.c                          |    1 
 drivers/staging/comedi/comedi_compat32.c       |   12 -
 drivers/staging/comedi/drivers/cb_pcidas64.c   |  122 ++++++-----
 drivers/staging/iio/adc/mxs-lradc.c            |  207 +++++++++---------
 drivers/target/target_core_pr.c                |   25 +-
 drivers/target/target_core_sbc.c               |   15 +
 drivers/tty/serial/8250/8250_core.c            |   11 
 drivers/tty/tty_io.c                           |    4 
 drivers/tty/tty_ioctl.c                        |   12 -
 drivers/usb/core/devio.c                       |    2 
 drivers/usb/dwc3/dwc3-omap.c                   |   30 ++
 drivers/usb/gadget/configfs.c                  |    2 
 drivers/usb/host/xhci-pci.c                    |   30 ++
 drivers/usb/host/xhci-plat.c                   |   19 -
 drivers/usb/host/xhci-ring.c                   |   10 
 drivers/usb/host/xhci.h                        |    9 
 drivers/usb/serial/bus.c                       |   13 -
 drivers/usb/serial/cp210x.c                    |    2 
 drivers/usb/serial/ftdi_sio.c                  |   19 +
 drivers/usb/serial/ftdi_sio_ids.h              |   23 ++
 drivers/usb/serial/generic.c                   |    5 
 drivers/usb/serial/mxuport.c                   |    3 
 drivers/usb/serial/usb-serial.c                |    5 
 drivers/usb/storage/unusual_uas.h              |    7 
 fs/autofs4/dev-ioctl.c                         |    8 
 fs/autofs4/root.c                              |    2 
 fs/btrfs/file.c                                |   56 ++---
 fs/btrfs/inode.c                               |    1 
 fs/btrfs/ordered-data.c                        |    7 
 fs/btrfs/tree-log.c                            |    2 
 fs/debugfs/inode.c                             |   34 +--
 fs/ecryptfs/file.c                             |   34 ++-
 fs/gfs2/acl.c                                  |    2 
 fs/nfs/delegation.c                            |    2 
 fs/nfs/dir.c                                   |    6 
 fs/nfsd/nfs4state.c                            |    2 
 fs/nilfs2/btree.c                              |   47 +++-
 fs/proc/generic.c                              |   12 -
 fs/proc/inode.c                                |   21 +
 fs/proc/internal.h                             |    1 
 include/drm/i915_pciids.h                      |    4 
 include/linux/usb/serial.h                     |    3 
 include/net/ipv6.h                             |    2 
 include/target/target_core_base.h              |    2 
 include/trace/events/kmem.h                    |    7 
 kernel/locking/rtmutex.c                       |    3 
 kernel/sched/auto_group.c                      |    6 
 kernel/sched/core.c                            |   11 
 kernel/sysctl.c                                |    3 
 mm/compaction.c                                |    6 
 mm/hugetlb.c                                   |   78 +++++--
 mm/memory-failure.c                            |    2 
 mm/memory.c                                    |    2 
 mm/mmap.c                                      |    4 
 mm/nommu.c                                     |    8 
 mm/page_alloc.c                                |   21 +
 mm/vmstat.c                                    |    2 
 net/compat.c                                   |    9 
 net/core/dev.c                                 |    2 
 net/core/flow.c                                |    2 
 net/core/gen_stats.c                           |   15 +
 net/core/pktgen.c                              |   19 -
 net/core/rtnetlink.c                           |   34 +--
 net/core/skbuff.c                              |    5 
 net/ipv4/ip_fragment.c                         |   11 
 net/ipv4/ip_output.c                           |    3 
 net/ipv4/ping.c                                |   12 -
 net/ipv4/tcp_fastopen.c                        |   32 ++
 net/ipv6/addrconf.c                            |   17 +
 net/ipv6/ip6_output.c                          |    3 
 net/ipv6/output_core.c                         |    5 
 net/ipv6/ping.c                                |    5 
 net/ipv6/route.c                               |    2 
 net/irda/ircomm/ircomm_tty.c                   |    4 
 net/mac80211/mlme.c                            |    4 
 net/mac80211/tx.c                              |    1 
 net/netfilter/xt_recent.c                      |   64 +----
 net/openvswitch/datapath.c                     |   45 +++-
 net/openvswitch/vport.h                        |    2 
 net/sched/ematch.c                             |    1 
 net/sunrpc/backchannel_rqst.c                  |    5 
 net/sunrpc/cache.c                             |    2 
 sound/core/pcm_native.c                        |    2 
 sound/firewire/amdtp.c                         |    3 
 sound/firewire/bebob/bebob.c                   |   20 +
 sound/firewire/bebob/bebob_stream.c            |   16 -
 sound/firewire/dice/dice-stream.c              |   18 +
 sound/firewire/dice/dice.c                     |   16 -
 sound/firewire/fireworks/fireworks.c           |   20 +
 sound/firewire/fireworks/fireworks_stream.c    |   19 -
 sound/firewire/oxfw/oxfw-stream.c              |   11 
 sound/firewire/oxfw/oxfw.c                     |   21 +
 sound/pci/hda/hda_controller.c                 |    5 
 sound/pci/hda/hda_intel.c                      |    2 
 sound/pci/hda/patch_realtek.c                  |    7 
 sound/pci/hda/patch_sigmatel.c                 |   17 +
 sound/soc/codecs/rt5670.c                      |    1 
 sound/soc/omap/omap-pcm.c                      |    2 
 184 files changed, 1664 insertions(+), 1173 deletions(-)

Al Viro (4):
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
debugfs: leave freeing a symlink body until inode eviction
procfs: fix race between symlink removals and traversals
sunrpc: fix braino in ->poll()

Alan Stern (1):
USB: usbfs: don't leak kernel data in siginfo

Aleksander Morgado (1):
xhci: fix reporting of 0-sized URBs in control endpoint

Alex Deucher (5):
drm/radeon: only enable kv/kb dpm interrupts once v3 drm/radeon/dp: Set EDP_CONFIGURATION_SET for bridge chips if necessary drm/radeon: fix voltage setup on hawaii
drm/radeon: use drm_mode_vrefresh() rather than mode->vrefresh drm/radeon: fix 1 RB harvest config setup for TN/RL

Alexander Drozdov (2):
ipv4: ip_check_defrag should correctly check return value of skb_copy_bits
ipv4: ip_check_defrag should not assume that skb_network_offset is zero

Alexander Usyskin (1):
mei: make device disabled on stop unconditionally

Andrew Elble (2):
nfsd: fix clp->cl_revoked list deletion causing softlock in nfsd
GFS2: Fix crash during ACL deletion in acl max entry check in gfs2_set_acl()

Andrey Ryabinin (1):
mm, hugetlb: remove unnecessary lower bound on sysctl handlers"?

Andrey Smirnov (1):
IIO: si7020: Allocate correct amount of memory in devm_iio_device_alloc

Andrzej Pietrasiewicz (1):
usb: gadget: configfs: don't NUL-terminate (sub)compatible ids

Andy Lutomirski (1):
x86/asm/entry/64: Remove a bogus 'ret_from_fork' optimization

Angelo Compagnucci (1):
iio:adc:mcp3422 Fix incorrect scales table

Bard Liao (1):

      ASoC: rt5670: Set RT5670_IRQ_CTRL1 non volatile

Ben Shelton (1):
usb: plusb: Add support for National Instruments host-to-host cable

Brian Norris (1):
stable_kernel_rules: reorganize and update submission options

Catalin Marinas (1):
net: compat: Ignore MSG_CMSG_COMPAT in compat_sys_{send, recv}msg

Chris Wilson (4):
drm/i915: Insert a command barrier on BLT/BSD cache flushes drm/i915: Check obj->vma_list under the struct_mutex drm/i915: Check for driver readyness before handling an underrun interrupt ACPI / video: Load the module even if ACPI is disabled

Christian König (1):
drm/radeon: workaround for CP HW bug on CIK

Chuck Lever (1):

      SUNRPC: Always manipulate rpc_rqst::rq_bc_pa_list under xprt->bc_pa_lock

Dan Carpenter (3):
IB/mlx5: Fix error code in get_port_caps()
efi: Small leak on error in runtime map code
coresight-etm: unlock on error paths in mode_store()

Daniel Borkmann (2):
ipv6: addrconf: add missing validate_link_af handler
rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY

Daniel Vetter (1):
drm/i915: Drop vblank wait from intel_dp_link_down

Darrick J. Wong (1):
dm io: reject unsupported DISCARD requests with EOPNOTSUPP

David Herrmann (1):
HID: input: fix confusion on conflicting mappings

David S. Miller (1):
Revert "r8169: add support for Byte Queue Limits"

David Sterba (1):
btrfs: fix lost return value due to variable shadowing

David Ung (1):
drm/tegra: Use correct relocation target offsets

Eric Dumazet (5):
tcp: make sure skb is not shared before using skb_get()
sock: sock_dequeue_err_skb() needs hard irq safety
net: pktgen: disable xmit_clone on virtual devices
macvtap: make sure neighbour code can push ethernet header
net: do not use rcu in rtnl_dump_ifinfo()

Filipe Manana (2):
Btrfs: fix fsync race leading to ordered extent memory leaks
Btrfs: fix data loss in the fast fsync path

Florian Fainelli (1):
net: bcmgenet: fix software maintained statistics

Geert Uytterhoeven (1):
sh_eth: Fix lost MAC address on kexec

George Cherian (1):
usb: dwc3: dwc3-omap: Fix disable IRQ

Grazvydas Ignotas (1):
mm/memory.c: actually remap enough memory

Greg Kroah-Hartman (2):
Revert "netfilter: xt_recent: relax ip_pkt_list_tot restrictions" Linux 3.19.2

Guenter Roeck (1):
net: phy: Fix verification of EEE support in phy_init_eee

Haggai Eran (1):
IB/core: Properly handle registration of on-demand paging MRs after dereg

Hans de Goede (2):
uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS539
sunxi: clk: Set sun6i-pll1 n_start = 1

Heikki Krogerus (1):
ACPI / LPSS: provide con_id for the clkdev

Hugh Dickins (1):
mm: fix negative nr_isolated counts

Hui Wang (1):
ALSA: hda - One more Dell macine needs DELL1_MIC_NO_PRESENCE quirk

Ian Abbott (2):
staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back
staging: comedi: cb_pcidas64: fix incorrect AI range code handling

Ian Munsie (1):
cxl: Add missing return statement after handling AFU errror

Ignacy Gawędzki (2):
gen_stats.c: Duplicate xstats buffer for later use
ematch: Fix auto-loading of ematch modules.

Ilya Nelkenbaum (1):
IB/core: When marshaling ucma path from user-space, clear unused fields

Imre Deak (1):
drm/i915: avoid processing spurious/shared interrupts in low-power states

Ivan Khoronzhuk (2):
firmware: dmi_scan: Fix dmi_len type
firmware: dmi_scan: Fix dmi scan to handle "End of Table" structure

Jaedon Shin (1):
net: bcmgenet: fix throughtput regression

James Hogan (1):
KVM: MIPS: Fix trace event to save PC directly

Jani Nikula (1):
drm/i915: Dell Chromebook 11 has PWM backlight

Jaroslav Kysela (1):
ALSA: hda: controller code - do not export static functions

Jason Gerecke (1):
HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid

Jiri Kosina (1):
HID: fixup the conflicting keyboard mappings quirk

Jiri Pirko (2):
team: fix possible null pointer dereference in team_handle_frame
team: don't traverse port list using rcu in team_set_mac_address

Jiri Slaby (1):
tty: fix up atime/mtime mess, take four

Johan Hovold (7):
Revert "USB: serial: make bulk_out_size a lower limit"
USB: mxuport: fix null deref when used as a console
net: irda: fix wait_until_sent poll timeout
USB: serial: fix infinite wait_until_sent timeout
TTY: fix tty_wait_until_sent on 64-bit machines
USB: serial: fix potential use-after-free after failed probe
USB: serial: fix tty-device error handling at probe

Johannes Weiner (1):
mm: page_alloc: revert inadvertent !__GFP_FS retry behavior change

Jonathan Cameron (1):
Revert "iio:humidity:si7020: fix pointer to i2c client"

Joonsoo Kim (2):
mm/compaction: fix wrong order check in compact_finished() mm/nommu: fix memory leak

Jouni Malinen (1):
mac80211: Send EAPOL frames at lowest rate

Kristina Martšenko (4):
iio: mxs-lradc: separate touchscreen and buffer virtual channels
iio: mxs-lradc: make ADC reads not disable touchscreen interrupts
iio: mxs-lradc: make ADC reads not unschedule touchscreen conversions
iio: mxs-lradc: only update the buffer when its conversions have finished

Lorenzo Colitti (1):
net: ping: Return EAFNOSUPPORT when appropriate.

Lorenzo Pieralisi (1):
of/pci: Free resources on failure in of_pci_get_host_bridge_resources()

Luciano Coelho (1):
mac80211: notify channel switch at the end of ieee80211_chswitch_post_beacon()

Majd Dibbiny (1):
IB/mlx4: Fix memory leak in __mlx4_ib_modify_qp

Mark Glover (1):
USB: ftdi_sio: add PIDs for Actisense USB devices

Martin KaFai Lau (1):
ipv6: fix ipv6_cow_metrics for non DST_HOST case

Mathias Nyman (2):
xhci: Allocate correct amount of scratchpad buffers
xhci: Workaround for PME stuck issues in Intel xhci

Matthew Thode (1):
net: reject creation of netdev names with colons

Max Mansfield (1):
usb: ftdi_sio: Add jtag quirk support for Cyber Cortex AV boards

Maxime Ripard (1):
usb: XHCI: platform: Move the Marvell quirks after the enabling the clocks

Michal Hocko (1):
vmstat: do not use deferrable delayed work for vmstat_update

Michal Kubeček (1):
udp: only allow UFO for packets from SOCK_DGRAM sockets

Michał Winiarski (1):
drm/i915: Prevent use-after-free in invalidate_range_start callback

Michel Dänzer (2):
drm/radeon: Don't try to enable write-combining without PAT
reservation: Remove shadowing local variable 'ret'

Michiel vd Garde (1):

      USB: serial: cp210x: Adding Seletek device id's

Mikulas Patocka (3):
dm mirror: do not degrade the mirror on discard error
dm: fix a race condition in dm_get_md
dm snapshot: fix a possible invalid memory access on unload

Minh Duc Tran (1):
fixed invalid assignment of 64bit mask to host dma_boundary for scatter gather segment boundary limit.

Miroslav Urbanek (1):
flowcache: Fix kernel panic in flow_cache_flush_task

Mitko Haralanov (1):
IB/qib: Do not write EEPROM

Moshe Lazer (1):
IB/core: Fix deadlock on uverbs modify_qp error flow

Naoya Horiguchi (4):
mm/hugetlb: fix getting refcount 0 page in hugetlb_fault() mm/hugetlb: add migration/hwpoisoned entry check in hugetlb_change_protection mm/hugetlb: add migration entry check in __unmap_hugepage_range
mm: hwpoison: drop lru_add_drain_all() in __soft_offline_page()

Nathan-J. Hirschauer (1):
drm/radeon: enable native backlight control on old macs

Nicholas Bellinger (3):
target: Fix PR_APTPL_BUF_LEN buffer size limitation
target: Add missing WRITE_SAME end-of-device sanity check
target: Check for LBA + sectors wrap-around in sbc_parse_cdb

Ondrej Zary (1):
wd719x: add missing .module to wd719x_template

Or Gerlitz (1):
IB/mlx4: Fix wrong usage of IPv4 protocol for multicast attach/detach

Paolo Bonzini (1):
KVM: emulate: fix CMPXCHG8B on 32-bit hosts

Peter Ujfalusi (1):
ASoC: omap-pcm: Correct dma mask

Peter Zijlstra (1):
sched/autogroup: Fix failure to set cpu.rt_runtime_us

Pravin B Shelar (1):
openvswitch: Fix net exit.

Quentin Casasnovas (2):
x86/fpu/xsaves: Fix improper uses of __ex_table Btrfs:__add_inode_ref: out of bounds memory read when looking for extended ref.

Rasmus Villemoes (2):
iio: imu: adis16400: Fix sign extension
autofs4: Wrong format for printing dentry

Rodrigo Vivi (1):

      drm/i915/bdw: PCI IDs ending in 0xb are ULT.

Roi Dayan (1):
IB/iser: Use correct dma direction when unmapping SGs

Roman Gushchin (2):
mm/mmap.c: fix arithmetic overflow in __vm_enough_memory() mm/nommu.c: fix arithmetic overflow in __vm_enough_memory()

Ryan Grimm (2):
cxl: Use image state defaults for reloading FPGA
cxl: Fix device_node reference counting

Ryusuke Konishi (1):
nilfs2: fix potential memory overrun on inode

Sabrina Dubroca (1):
pktgen: fix UDP checksum computation

Sagi Grimberg (1):
IB/iser: Fix memory regions possible leak

Sebastian Andrzej Siewior (2):
serial: 8250: Revert "tty: serial: 8250_core: read only RX if there is something in the FIFO" locking/rtmutex: Avoid a NULL pointer dereference on deadlock

Sergei Shtylyov (1):
clk-gate: fix bit # check in clk_register_gate()

Sergey Ryazanov (1):
ath5k: fix spontaneus AR5312 freezes

Shobhit Kumar (1):
drm/i915: Correct the IOSF Dev_FN field for IOSF transfers

Soren Brinkmann (1):
clk: zynq: Force CPU_2X clock to be ungated

Srinivas Kandagatla (1):
clk: Fix debugfs clk removal before inited

Stefan Wahren (1):
iio: mxs-lradc: fix iio channel map regression

Takashi Iwai (3):
ALSA: pcm: Don't leave PREPARED state after draining
ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec
ALSA: hda - Disable runtime PM for Panther Point again

Takashi Sakamoto (5):
ALSA: fireworks/bebob/dice/oxfw: add reference-counting for FireWire unit
ALSA: firewire-lib: remove reference counting
ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime
ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely
ALSA: oxfw: fix a condition and return code in start_stream()

Tom O'Rourke (1):
drm/i915: Clamp efficient frequency to valid range

Tony Battersby (1):
sg: fix read() error reporting

Trond Myklebust (2):
NFS: Don't invalidate a submounted dentry in nfs_prime_dcache()
NFSv4: Don't call put_rpccred() under the rcu_read_lock()

Tyler Hicks (1):
eCryptfs: don't pass fs-specific ioctl commands through

Urs Fässler (1):
iio: ad5686: fix optional reference voltage declaration

Uwe Kleine-König (2):
pinctrl: pinctrl-imx: don't use invalid value of conf_reg
pinctrl: imx25: fix numbering for pins

Vineet Gupta (1):
ARC: Fix KSTK_ESP()

Vlad Yasevich (2):
ipv6: Fix fragment id assignment on LE arches.
ipv6: Make __ipv6_select_ident static

Vlastimil Babka (1):
mm: when stealing freepages, also take pages created by splitting buddy page

WANG Cong (1):

      rtnetlink: call ->dellink on failure when ->newlink exists

Wanpeng Li (1):
sched: Fix hrtick_start() on UP

Yinghai Lu (1):
efi/libstub: Fix boundary checking in efi_high_alloc()

author maintainer
#1 lore raw
Documentation/stable_kernel_rules.txt +34 -10
index aee73e78c7d4..02f8331edb8b 100644
@@ -32,18 +32,42 @@ Procedure for submitting patches to the -stable tree:
  - If the patch covers files in net/ or drivers/net please follow netdev stable
    submission guidelines as described in
    Documentation/networking/netdev-FAQ.txt
- - Send the patch, after verifying that it follows the above rules, to
-   [email protected].  You must note the upstream commit ID in the
-   changelog of your submission, as well as the kernel version you wish
-   it to be applied to.
- - To have the patch automatically included in the stable tree, add the tag
+ - Security patches should not be handled (solely) by the -stable review
+   process but should follow the procedures in Documentation/SecurityBugs.
+
+For all other submissions, choose one of the following procedures:
+
+   --- Option 1 ---
+
+   To have the patch automatically included in the stable tree, add the tag
      Cc: [email protected]
    in the sign-off area. Once the patch is merged it will be applied to
    the stable tree without anything else needing to be done by the author
    or subsystem maintainer.
- - If the patch requires other patches as prerequisites which can be
-   cherry-picked, then this can be specified in the following format in
-   the sign-off area:
+
+   --- Option 2 ---
+
+   After the patch has been merged to Linus' tree, send an email to
+   [email protected] containing the subject of the patch, the commit ID,
+   why you think it should be applied, and what kernel version you wish it to
+   be applied to.
+
+   --- Option 3 ---
+
+   Send the patch, after verifying that it follows the above rules, to
+   [email protected].  You must note the upstream commit ID in the
+   changelog of your submission, as well as the kernel version you wish
+   it to be applied to.
+
+Option 1 is probably the easiest and most common. Options 2 and 3 are more
+useful if the patch isn't deemed worthy at the time it is applied to a public
+git tree (for instance, because it deserves more regression testing first).
+Option 3 is especially useful if the patch needs some special handling to apply
+to an older kernel (e.g., if API's have changed in the meantime).
+
+Additionally, some patches submitted via Option 1 may have additional patch
+prerequisites which can be cherry-picked. This can be specified in the following
+format in the sign-off area:
 
      Cc: <[email protected]> # 3.3.x: a1f84a3: sched: Check for idle
      Cc: <[email protected]> # 3.3.x: 1b9508f: sched: Rate-limit newidle
@@ -57,13 +81,13 @@ Procedure for submitting patches to the -stable tree:
      git cherry-pick fd21073
      git cherry-pick <this commit>
 
+Following the submission:
+
  - The sender will receive an ACK when the patch has been accepted into the
    queue, or a NAK if the patch is rejected.  This response might take a few
    days, according to the developer's schedules.
  - If accepted, the patch will be added to the -stable queue, for review by
    other developers and by the relevant subsystem maintainer.
- - Security patches should not be sent to this alias, but instead to the
-   documented [email protected] address.
 
 
 Review cycle:
Makefile +1 -1
index 688777b17869..e49665a2b5ac 100644
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 19
-SUBLEVEL = 1
+SUBLEVEL = 2
 EXTRAVERSION =
 NAME = Diseased Newt
 
arch/arc/include/asm/processor.h +5 -4
index 210fe97464c3..c750af161979 100644
@@ -75,18 +75,19 @@ unsigned long thread_saved_pc(struct task_struct *t);
 #define release_segments(mm)        do { } while (0)
 
 #define KSTK_EIP(tsk)   (task_pt_regs(tsk)->ret)
+#define KSTK_ESP(tsk)   (task_pt_regs(tsk)->sp)
 
 /*
  * Where abouts of Task's sp, fp, blink when it was last seen in kernel mode.
  * Look in process.c for details of kernel stack layout
  */
-#define KSTK_ESP(tsk)   (tsk->thread.ksp)
+#define TSK_K_ESP(tsk)		(tsk->thread.ksp)
 
-#define KSTK_REG(tsk, off)	(*((unsigned int *)(KSTK_ESP(tsk) + \
+#define TSK_K_REG(tsk, off)	(*((unsigned int *)(TSK_K_ESP(tsk) + \
 					sizeof(struct callee_regs) + off)))
 
-#define KSTK_BLINK(tsk) KSTK_REG(tsk, 4)
-#define KSTK_FP(tsk)    KSTK_REG(tsk, 0)
+#define TSK_K_BLINK(tsk)	TSK_K_REG(tsk, 4)
+#define TSK_K_FP(tsk)		TSK_K_REG(tsk, 0)
 
 extern void start_thread(struct pt_regs * regs, unsigned long pc,
 			 unsigned long usp);
arch/arc/kernel/stacktrace.c +3 -3
index 9ce47cfe2303..fb98769b6a98 100644
@@ -64,9 +64,9 @@ static void seed_unwind_frame_info(struct task_struct *tsk,
 
 		frame_info->task = tsk;
 
-		frame_info->regs.r27 = KSTK_FP(tsk);
-		frame_info->regs.r28 = KSTK_ESP(tsk);
-		frame_info->regs.r31 = KSTK_BLINK(tsk);
+		frame_info->regs.r27 = TSK_K_FP(tsk);
+		frame_info->regs.r28 = TSK_K_ESP(tsk);
+		frame_info->regs.r31 = TSK_K_BLINK(tsk);
 		frame_info->regs.r63 = (unsigned int)__switch_to;
 
 		/* In the prologue of __switch_to, first FP is saved on stack
arch/mips/kvm/trace.h +3 -3
index c1388d40663b..bd6437f67dc0 100644
@@ -24,18 +24,18 @@ TRACE_EVENT(kvm_exit,
 	    TP_PROTO(struct kvm_vcpu *vcpu, unsigned int reason),
 	    TP_ARGS(vcpu, reason),
 	    TP_STRUCT__entry(
-			__field(struct kvm_vcpu *, vcpu)
+			__field(unsigned long, pc)
 			__field(unsigned int, reason)
 	    ),
 
 	    TP_fast_assign(
-			__entry->vcpu = vcpu;
+			__entry->pc = vcpu->arch.pc;
 			__entry->reason = reason;
 	    ),
 
 	    TP_printk("[%s]PC: 0x%08lx",
 		      kvm_mips_exit_types_str[__entry->reason],
-		      __entry->vcpu->arch.pc)
+		      __entry->pc)
 );
 
 #endif /* _TRACE_KVM_H */
arch/powerpc/include/asm/pnv-pci.h +1 -1
index f09a22fa1bd7..bfa8f8ac51fa 100644
@@ -19,7 +19,7 @@ int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int hwirq,
 int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num);
 void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num);
 int pnv_cxl_get_irq_count(struct pci_dev *dev);
-struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev);
+struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev);
 
 #ifdef CONFIG_CXL_BASE
 int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs,
arch/powerpc/platforms/powernv/pci-ioda.c +3 -3
index fac88ed8a915..6a9a255d8058 100644
@@ -1460,13 +1460,13 @@ static void set_msi_irq_chip(struct pnv_phb *phb, unsigned int virq)
 
 #ifdef CONFIG_CXL_BASE
 
-struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev)
+struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev)
 {
 	struct pci_controller *hose = pci_bus_to_host(dev->bus);
 
-	return hose->dn;
+	return of_node_get(hose->dn);
 }
-EXPORT_SYMBOL(pnv_pci_to_phb_node);
+EXPORT_SYMBOL(pnv_pci_get_phb_node);
 
 int pnv_phb_to_cxl(struct pci_dev *dev)
 {
arch/x86/include/asm/xsave.h +11 -17
index 5fa9770035dc..c9a6d68b8d62 100644
@@ -82,18 +82,15 @@ static inline int xsave_state_booting(struct xsave_struct *fx, u64 mask)
 	if (boot_cpu_has(X86_FEATURE_XSAVES))
 		asm volatile("1:"XSAVES"\n\t"
 			"2:\n\t"
-			: : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
+			     xstate_fault
+			: "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
 			:   "memory");
 	else
 		asm volatile("1:"XSAVE"\n\t"
 			"2:\n\t"
-			: : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
+			     xstate_fault
+			: "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
 			:   "memory");
-
-	asm volatile(xstate_fault
-		     : "0" (0)
-		     : "memory");
-
 	return err;
 }
 
@@ -112,18 +109,15 @@ static inline int xrstor_state_booting(struct xsave_struct *fx, u64 mask)
 	if (boot_cpu_has(X86_FEATURE_XSAVES))
 		asm volatile("1:"XRSTORS"\n\t"
 			"2:\n\t"
-			: : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
+			     xstate_fault
+			: "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
 			:   "memory");
 	else
 		asm volatile("1:"XRSTOR"\n\t"
 			"2:\n\t"
-			: : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
+			     xstate_fault
+			: "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
 			:   "memory");
-
-	asm volatile(xstate_fault
-		     : "0" (0)
-		     : "memory");
-
 	return err;
 }
 
@@ -149,9 +143,9 @@ static inline int xsave_state(struct xsave_struct *fx, u64 mask)
 	 */
 	alternative_input_2(
 		"1:"XSAVE,
-		"1:"XSAVEOPT,
+		XSAVEOPT,
 		X86_FEATURE_XSAVEOPT,
-		"1:"XSAVES,
+		XSAVES,
 		X86_FEATURE_XSAVES,
 		[fx] "D" (fx), "a" (lmask), "d" (hmask) :
 		"memory");
@@ -178,7 +172,7 @@ static inline int xrstor_state(struct xsave_struct *fx, u64 mask)
 	 */
 	alternative_input(
 		"1: " XRSTOR,
-		"1: " XRSTORS,
+		XRSTORS,
 		X86_FEATURE_XSAVES,
 		"D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
 		: "memory");
arch/x86/kernel/entry_64.S +8 -5
index 9ebaf63ba182..4ee9a2315f80 100644
@@ -334,11 +334,14 @@ ENTRY(ret_from_fork)
 	testl $3, CS-ARGOFFSET(%rsp)		# from kernel_thread?
 	jz   1f
 
-	testl $_TIF_IA32, TI_flags(%rcx)	# 32-bit compat task needs IRET
-	jnz  int_ret_from_sys_call
-
-	RESTORE_TOP_OF_STACK %rdi, -ARGOFFSET
-	jmp ret_from_sys_call			# go to the SYSRET fastpath
+	/*
+	 * By the time we get here, we have no idea whether our pt_regs,
+	 * ti flags, and ti status came from the 64-bit SYSCALL fast path,
+	 * the slow path, or one of the ia32entry paths.
+	 * Use int_ret_from_sys_call to return, since it can safely handle
+	 * all of the above.
+	 */
+	jmp  int_ret_from_sys_call
 
 1:
 	subq $REST_SKIP, %rsp	# leave space for volatiles
arch/x86/kvm/emulate.c +2 -1
index de12c1d379f1..b24c2d84dc20 100644
@@ -4863,7 +4863,8 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
 		if (rc != X86EMUL_CONTINUE)
 			goto done;
 	}
-	ctxt->dst.orig_val = ctxt->dst.val;
+	/* Copy full 64-bit value for CMPXCHG8B.  */
+	ctxt->dst.orig_val64 = ctxt->dst.val64;
 
 special_insn:
 
drivers/acpi/acpi_lpss.c +4 -1
index 7d5880ded78a..e7d257aef9fc 100644
@@ -65,6 +65,7 @@ struct lpss_private_data;
 
 struct lpss_device_desc {
 	unsigned int flags;
+	const char *clk_con_id;
 	unsigned int prv_offset;
 	size_t prv_size_override;
 	void (*setup)(struct lpss_private_data *pdata);
@@ -140,6 +141,7 @@ static struct lpss_device_desc lpt_i2c_dev_desc = {
 
 static struct lpss_device_desc lpt_uart_dev_desc = {
 	.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR,
+	.clk_con_id = "baudclk",
 	.prv_offset = 0x800,
 	.setup = lpss_uart_setup,
 };
@@ -156,6 +158,7 @@ static struct lpss_device_desc byt_pwm_dev_desc = {
 
 static struct lpss_device_desc byt_uart_dev_desc = {
 	.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
+	.clk_con_id = "baudclk",
 	.prv_offset = 0x800,
 	.setup = lpss_uart_setup,
 };
@@ -313,7 +316,7 @@ out:
 		return PTR_ERR(clk);
 
 	pdata->clk = clk;
-	clk_register_clkdev(clk, NULL, devname);
+	clk_register_clkdev(clk, dev_desc->clk_con_id, devname);
 	return 0;
 }
 
drivers/acpi/video.c +11 -0
index 032db459370f..3647ce71154c 100644
@@ -2149,6 +2149,17 @@ EXPORT_SYMBOL(acpi_video_unregister_backlight);
 
 static int __init acpi_video_init(void)
 {
+	/*
+	 * Let the module load even if ACPI is disabled (e.g. due to
+	 * a broken BIOS) so that i915.ko can still be loaded on such
+	 * old systems without an AcpiOpRegion.
+	 *
+	 * acpi_video_register() will report -ENODEV later as well due
+	 * to acpi_disabled when i915.ko tries to register itself afterwards.
+	 */
+	if (acpi_disabled)
+		return 0;
+
 	dmi_check_system(video_dmi_table);
 
 	if (intel_opregion_present())
drivers/clk/clk-gate.c +1 -1
index 51fd87fb7ba6..da00eeb95dad 100644
@@ -128,7 +128,7 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
 	struct clk_init_data init;
 
 	if (clk_gate_flags & CLK_GATE_HIWORD_MASK) {
-		if (bit_idx > 16) {
+		if (bit_idx > 15) {
 			pr_err("gate bit exceeds LOWORD field\n");
 			return ERR_PTR(-EINVAL);
 		}
drivers/clk/clk.c +0 -4
index d48ac71c6c8b..2f14f57507fb 100644
@@ -343,13 +343,9 @@ unlock:
 static void clk_debug_unregister(struct clk *clk)
 {
 	mutex_lock(&clk_debug_lock);
-	if (!clk->dentry)
-		goto out;
-
 	hlist_del_init(&clk->debug_node);
 	debugfs_remove_recursive(clk->dentry);
 	clk->dentry = NULL;
-out:
 	mutex_unlock(&clk_debug_lock);
 }
 
drivers/clk/sunxi/clk-sunxi.c +1 -0
index 570202582dcf..80f5693be6ee 100644
@@ -413,6 +413,7 @@ static struct clk_factors_config sun6i_a31_pll1_config = {
 	.kwidth = 2,
 	.mshift = 0,
 	.mwidth = 2,
+	.n_start = 1,
 };
 
 static struct clk_factors_config sun8i_a23_pll1_config = {
drivers/clk/zynq/clkc.c +1 -0
index 9037bebd69f7..f870aad57711 100644
@@ -303,6 +303,7 @@ static void __init zynq_clk_setup(struct device_node *np)
 	clks[cpu_2x] = clk_register_gate(NULL, clk_output_name[cpu_2x],
 			"cpu_2x_div", CLK_IGNORE_UNUSED, SLCR_ARM_CLK_CTRL,
 			26, 0, &armclk_lock);
+	clk_prepare_enable(clks[cpu_2x]);
 
 	clk = clk_register_fixed_factor(NULL, "cpu_1x_div", "cpu_div", 0, 1,
 			4 + 2 * tmp);
drivers/coresight/coresight-etm3x.c +8 -2
index d9e3ed6aa857..369cac00afaa 100644
@@ -573,7 +573,8 @@ static ssize_t mode_store(struct device *dev,
 	if (drvdata->mode & ETM_MODE_STALL) {
 		if (!(drvdata->etmccr & ETMCCR_FIFOFULL)) {
 			dev_warn(drvdata->dev, "stall mode not supported\n");
-			return -EINVAL;
+			ret = -EINVAL;
+			goto err_unlock;
 		}
 		drvdata->ctrl |= ETMCR_STALL_MODE;
 	 } else
@@ -582,7 +583,8 @@ static ssize_t mode_store(struct device *dev,
 	if (drvdata->mode & ETM_MODE_TIMESTAMP) {
 		if (!(drvdata->etmccer & ETMCCER_TIMESTAMP)) {
 			dev_warn(drvdata->dev, "timestamp not supported\n");
-			return -EINVAL;
+			ret = -EINVAL;
+			goto err_unlock;
 		}
 		drvdata->ctrl |= ETMCR_TIMESTAMP_EN;
 	} else
@@ -595,6 +597,10 @@ static ssize_t mode_store(struct device *dev,
 	spin_unlock(&drvdata->spinlock);
 
 	return size;
+
+err_unlock:
+	spin_unlock(&drvdata->spinlock);
+	return ret;
 }
 static DEVICE_ATTR_RW(mode);
 
drivers/dma-buf/reservation.c +0 -2
index 3c97c8fa8d02..8a37af923094 100644
@@ -402,8 +402,6 @@ reservation_object_test_signaled_single(struct fence *passed_fence)
 	int ret = 1;
 
 	if (!test_bit(FENCE_FLAG_SIGNALED_BIT, &lfence->flags)) {
-		int ret;
-
 		fence = fence_get_rcu(lfence);
 		if (!fence)
 			return -1;
drivers/firmware/dmi_scan.c +9 -8
index c5f7b4e9eb6c..69fac068669f 100644
@@ -78,7 +78,7 @@ static const char * __init dmi_string(const struct dmi_header *dm, u8 s)
  *	We have to be cautious here. We have seen BIOSes with DMI pointers
  *	pointing to completely the wrong place for example
  */
-static void dmi_table(u8 *buf, int len, int num,
+static void dmi_table(u8 *buf, u32 len, int num,
 		      void (*decode)(const struct dmi_header *, void *),
 		      void *private_data)
 {
@@ -93,12 +93,6 @@ static void dmi_table(u8 *buf, int len, int num,
 		const struct dmi_header *dm = (const struct dmi_header *)data;
 
 		/*
-		 * 7.45 End-of-Table (Type 127) [SMBIOS reference spec v3.0.0]
-		 */
-		if (dm->type == DMI_ENTRY_END_OF_TABLE)
-			break;
-
-		/*
 		 *  We want to know the total length (formatted area and
 		 *  strings) before decoding to make sure we won't run off the
 		 *  table in dmi_decode or dmi_string
@@ -108,13 +102,20 @@ static void dmi_table(u8 *buf, int len, int num,
 			data++;
 		if (data - buf < len - 1)
 			decode(dm, private_data);
+
+		/*
+		 * 7.45 End-of-Table (Type 127) [SMBIOS reference spec v3.0.0]
+		 */
+		if (dm->type == DMI_ENTRY_END_OF_TABLE)
+			break;
+
 		data += 2;
 		i++;
 	}
 }
 
 static phys_addr_t dmi_base;
-static u16 dmi_len;
+static u32 dmi_len;
 static u16 dmi_num;
 
 static int __init dmi_walk_early(void (*decode)(const struct dmi_header *,
drivers/firmware/efi/libstub/efi-stub-helper.c +4 -4
index a920fec8fe88..5186eb01945a 100644
@@ -170,12 +170,12 @@ again:
 		start = desc->phys_addr;
 		end = start + desc->num_pages * (1UL << EFI_PAGE_SHIFT);
 
-		if ((start + size) > end || (start + size) > max)
-			continue;
-
-		if (end - size > max)
+		if (end > max)
 			end = max;
 
+		if ((start + size) > end)
+			continue;
+
 		if (round_down(end - size, align) < start)
 			continue;
 
drivers/firmware/efi/runtime-map.c +1 -1
index 018c29a26615..87b8e3b900d2 100644
@@ -191,7 +191,7 @@ int __init efi_runtime_map_init(struct kobject *efi_kobj)
 
 	return 0;
 out_add_entry:
-	for (j = i - 1; j > 0; j--) {
+	for (j = i - 1; j >= 0; j--) {
 		entry = *(map_entries + j);
 		kobject_put(&entry->kobj);
 	}
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 9d7a7155bf02..0936b0f94826 100644
@@ -2160,6 +2160,7 @@ struct drm_i915_cmd_table {
 				 (INTEL_DEVID(dev) & 0xFF00) == 0x0C00)
 #define IS_BDW_ULT(dev)		(IS_BROADWELL(dev) && \
 				 ((INTEL_DEVID(dev) & 0xf) == 0x6 ||	\
+				 (INTEL_DEVID(dev) & 0xf) == 0xb ||	\
 				 (INTEL_DEVID(dev) & 0xf) == 0xe))
 #define IS_BDW_GT3(dev)		(IS_BROADWELL(dev) && \
 				 (INTEL_DEVID(dev) & 0x00F0) == 0x0020)
drivers/gpu/drm/i915/i915_gem_tiling.c +4 -3
index 4727a4e2c87c..ffe9072a1a5f 100644
@@ -335,9 +335,10 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
 		return -EINVAL;
 	}
 
+	mutex_lock(&dev->struct_mutex);
 	if (i915_gem_obj_is_pinned(obj) || obj->framebuffer_references) {
-		drm_gem_object_unreference_unlocked(&obj->base);
-		return -EBUSY;
+		ret = -EBUSY;
+		goto err;
 	}
 
 	if (args->tiling_mode == I915_TILING_NONE) {
@@ -369,7 +370,6 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
 		}
 	}
 
-	mutex_lock(&dev->struct_mutex);
 	if (args->tiling_mode != obj->tiling_mode ||
 	    args->stride != obj->stride) {
 		/* We need to rebind the object if its current allocation
@@ -424,6 +424,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
 		obj->bit_17 = NULL;
 	}
 
+err:
 	drm_gem_object_unreference(&obj->base);
 	mutex_unlock(&dev->struct_mutex);
 
drivers/gpu/drm/i915/i915_gem_userptr.c +18 -2
index d182058383a9..1719078c763a 100644
@@ -113,7 +113,10 @@ restart:
 			continue;
 
 		obj = mo->obj;
-		drm_gem_object_reference(&obj->base);
+
+		if (!kref_get_unless_zero(&obj->base.refcount))
+			continue;
+
 		spin_unlock(&mn->lock);
 
 		cancel_userptr(obj);
@@ -149,7 +152,20 @@ static void i915_gem_userptr_mn_invalidate_range_start(struct mmu_notifier *_mn,
 			it = interval_tree_iter_first(&mn->objects, start, end);
 		if (it != NULL) {
 			obj = container_of(it, struct i915_mmu_object, it)->obj;
-			drm_gem_object_reference(&obj->base);
+
+			/* The mmu_object is released late when destroying the
+			 * GEM object so it is entirely possible to gain a
+			 * reference on an object in the process of being freed
+			 * since our serialisation is via the spinlock and not
+			 * the struct_mutex - and consequently use it after it
+			 * is freed and then double free it.
+			 */
+			if (!kref_get_unless_zero(&obj->base.refcount)) {
+				spin_unlock(&mn->lock);
+				serial = 0;
+				continue;
+			}
+
 			serial = mn->serial;
 		}
 		spin_unlock(&mn->lock);
drivers/gpu/drm/i915/i915_irq.c +22 -0
index b051a238baf9..1464bc1f8943 100644
@@ -1884,6 +1884,9 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)
 	u32 iir, gt_iir, pm_iir;
 	irqreturn_t ret = IRQ_NONE;
 
+	if (!intel_irqs_enabled(dev_priv))
+		return IRQ_NONE;
+
 	while (true) {
 		/* Find, clear, then process each source of interrupt */
 
@@ -1928,6 +1931,9 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)
 	u32 master_ctl, iir;
 	irqreturn_t ret = IRQ_NONE;
 
+	if (!intel_irqs_enabled(dev_priv))
+		return IRQ_NONE;
+
 	for (;;) {
 		master_ctl = I915_READ(GEN8_MASTER_IRQ) & ~GEN8_MASTER_IRQ_CONTROL;
 		iir = I915_READ(VLV_IIR);
@@ -2200,6 +2206,9 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg)
 	u32 de_iir, gt_iir, de_ier, sde_ier = 0;
 	irqreturn_t ret = IRQ_NONE;
 
+	if (!intel_irqs_enabled(dev_priv))
+		return IRQ_NONE;
+
 	/* We get interrupts on unclaimed registers, so check for this before we
 	 * do any I915_{READ,WRITE}. */
 	intel_uncore_check_errors(dev);
@@ -2271,6 +2280,9 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
 	enum pipe pipe;
 	u32 aux_mask = GEN8_AUX_CHANNEL_A;
 
+	if (!intel_irqs_enabled(dev_priv))
+		return IRQ_NONE;
+
 	if (IS_GEN9(dev))
 		aux_mask |=  GEN9_AUX_CHANNEL_B | GEN9_AUX_CHANNEL_C |
 			GEN9_AUX_CHANNEL_D;
@@ -3770,6 +3782,9 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg)
 		I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT |
 		I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT;
 
+	if (!intel_irqs_enabled(dev_priv))
+		return IRQ_NONE;
+
 	iir = I915_READ16(IIR);
 	if (iir == 0)
 		return IRQ_NONE;
@@ -3950,6 +3965,9 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)
 		I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT;
 	int pipe, ret = IRQ_NONE;
 
+	if (!intel_irqs_enabled(dev_priv))
+		return IRQ_NONE;
+
 	iir = I915_READ(IIR);
 	do {
 		bool irq_received = (iir & ~flip_mask) != 0;
@@ -4172,6 +4190,9 @@ static irqreturn_t i965_irq_handler(int irq, void *arg)
 		I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT |
 		I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT;
 
+	if (!intel_irqs_enabled(dev_priv))
+		return IRQ_NONE;
+
 	iir = I915_READ(IIR);
 
 	for (;;) {
@@ -4523,6 +4544,7 @@ void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv)
 {
 	dev_priv->dev->driver->irq_uninstall(dev_priv->dev);
 	dev_priv->pm.irqs_enabled = false;
+	synchronize_irq(dev_priv->dev->irq);
 }
 
 /**
drivers/gpu/drm/i915/intel_display.c +3 -0
index e7a16f119a29..30d4eb300be0 100644
@@ -13019,6 +13019,9 @@ static struct intel_quirk intel_quirks[] = {
 
 	/* HP Chromebook 14 (Celeron 2955U) */
 	{ 0x0a06, 0x103c, 0x21ed, quirk_backlight_present },
+
+	/* Dell Chromebook 11 */
+	{ 0x0a06, 0x1028, 0x0a35, quirk_backlight_present },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
drivers/gpu/drm/i915/intel_dp.c +1 -16
index 5cecc20efa71..9f6c8971855c 100644
@@ -3515,8 +3515,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 	enum port port = intel_dig_port->port;
 	struct drm_device *dev = intel_dig_port->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	struct intel_crtc *intel_crtc =
-		to_intel_crtc(intel_dig_port->base.base.crtc);
 	uint32_t DP = intel_dp->DP;
 
 	if (WARN_ON(HAS_DDI(dev)))
@@ -3541,8 +3539,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 
 	if (HAS_PCH_IBX(dev) &&
 	    I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) {
-		struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
-
 		/* Hardware workaround: leaving our transcoder select
 		 * set to transcoder B while it's off will prevent the
 		 * corresponding HDMI output on transcoder A.
@@ -3553,18 +3549,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 		 */
 		DP &= ~DP_PIPEB_SELECT;
 		I915_WRITE(intel_dp->output_reg, DP);
-
-		/* Changes to enable or select take place the vblank
-		 * after being written.
-		 */
-		if (WARN_ON(crtc == NULL)) {
-			/* We should never try to disable a port without a crtc
-			 * attached. For paranoia keep the code around for a
-			 * bit. */
-			POSTING_READ(intel_dp->output_reg);
-			msleep(50);
-		} else
-			intel_wait_for_vblank(dev, intel_crtc->pipe);
+		POSTING_READ(intel_dp->output_reg);
 	}
 
 	DP &= ~DP_AUDIO_OUTPUT_ENABLE;
drivers/gpu/drm/i915/intel_fifo_underrun.c +7 -11
index 77af512d2d35..b16f2cd15cab 100644
@@ -282,16 +282,6 @@ bool intel_set_cpu_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
 	return ret;
 }
 
-static bool
-__cpu_fifo_underrun_reporting_enabled(struct drm_i915_private *dev_priv,
-				      enum pipe pipe)
-{
-	struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
-	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-
-	return !intel_crtc->cpu_fifo_underrun_disabled;
-}
-
 /**
  * intel_set_pch_fifo_underrun_reporting - set PCH fifo underrun reporting state
  * @dev_priv: i915 device instance
@@ -352,9 +342,15 @@ bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
 void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
 					 enum pipe pipe)
 {
+	struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
+
+	/* We may be called too early in init, thanks BIOS! */
+	if (crtc == NULL)
+		return;
+
 	/* GMCH can't disable fifo underruns, filter them. */
 	if (HAS_GMCH_DISPLAY(dev_priv->dev) &&
-	    !__cpu_fifo_underrun_reporting_enabled(dev_priv, pipe))
+	    to_intel_crtc(crtc)->cpu_fifo_underrun_disabled)
 		return;
 
 	if (intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false))
drivers/gpu/drm/i915/intel_lrc.c +11 -9
index e588376227ea..5ebe805bb627 100644
@@ -1237,15 +1237,17 @@ static int gen8_emit_flush(struct intel_ringbuffer *ringbuf,
 
 	cmd = MI_FLUSH_DW + 1;
 
-	if (ring == &dev_priv->ring[VCS]) {
-		if (invalidate_domains & I915_GEM_GPU_DOMAINS)
-			cmd |= MI_INVALIDATE_TLB | MI_INVALIDATE_BSD |
-				MI_FLUSH_DW_STORE_INDEX |
-				MI_FLUSH_DW_OP_STOREDW;
-	} else {
-		if (invalidate_domains & I915_GEM_DOMAIN_RENDER)
-			cmd |= MI_INVALIDATE_TLB | MI_FLUSH_DW_STORE_INDEX |
-				MI_FLUSH_DW_OP_STOREDW;
+	/* We always require a command barrier so that subsequent
+	 * commands, such as breadcrumb interrupts, are strictly ordered
+	 * wrt the contents of the write cache being flushed to memory
+	 * (and thus being coherent from the CPU).
+	 */
+	cmd |= MI_FLUSH_DW_STORE_INDEX | MI_FLUSH_DW_OP_STOREDW;
+
+	if (invalidate_domains & I915_GEM_GPU_DOMAINS) {
+		cmd |= MI_INVALIDATE_TLB;
+		if (ring == &dev_priv->ring[VCS])
+			cmd |= MI_INVALIDATE_BSD;
 	}
 
 	intel_logical_ring_emit(ringbuf, cmd);
drivers/gpu/drm/i915/intel_pm.c +4 -1
index bf814a64582a..e6d359371971 100644
@@ -4625,7 +4625,10 @@ static void gen6_init_rps_frequencies(struct drm_device *dev)
 					&ddcc_status);
 		if (0 == ret)
 			dev_priv->rps.efficient_freq =
-				(ddcc_status >> 8) & 0xff;
+				clamp_t(u8,
+					((ddcc_status >> 8) & 0xff),
+					dev_priv->rps.min_freq,
+					dev_priv->rps.max_freq);
 	}
 
 	/* Preserve min/max settings in case of re-init */
drivers/gpu/drm/i915/intel_ringbuffer.c +19 -4
index c7bc93d28d84..a335b842b78b 100644
@@ -2178,6 +2178,14 @@ static int gen6_bsd_ring_flush(struct intel_engine_cs *ring,
 	cmd = MI_FLUSH_DW;
 	if (INTEL_INFO(ring->dev)->gen >= 8)
 		cmd += 1;
+
+	/* We always require a command barrier so that subsequent
+	 * commands, such as breadcrumb interrupts, are strictly ordered
+	 * wrt the contents of the write cache being flushed to memory
+	 * (and thus being coherent from the CPU).
+	 */
+	cmd |= MI_FLUSH_DW_STORE_INDEX | MI_FLUSH_DW_OP_STOREDW;
+
 	/*
 	 * Bspec vol 1c.5 - video engine command streamer:
 	 * "If ENABLED, all TLBs will be invalidated once the flush
@@ -2185,8 +2193,8 @@ static int gen6_bsd_ring_flush(struct intel_engine_cs *ring,
 	 * Post-Sync Operation field is a value of 1h or 3h."
 	 */
 	if (invalidate & I915_GEM_GPU_DOMAINS)
-		cmd |= MI_INVALIDATE_TLB | MI_INVALIDATE_BSD |
-			MI_FLUSH_DW_STORE_INDEX | MI_FLUSH_DW_OP_STOREDW;
+		cmd |= MI_INVALIDATE_TLB | MI_INVALIDATE_BSD;
+
 	intel_ring_emit(ring, cmd);
 	intel_ring_emit(ring, I915_GEM_HWS_SCRATCH_ADDR | MI_FLUSH_DW_USE_GTT);
 	if (INTEL_INFO(ring->dev)->gen >= 8) {
@@ -2282,6 +2290,14 @@ static int gen6_ring_flush(struct intel_engine_cs *ring,
 	cmd = MI_FLUSH_DW;
 	if (INTEL_INFO(ring->dev)->gen >= 8)
 		cmd += 1;
+
+	/* We always require a command barrier so that subsequent
+	 * commands, such as breadcrumb interrupts, are strictly ordered
+	 * wrt the contents of the write cache being flushed to memory
+	 * (and thus being coherent from the CPU).
+	 */
+	cmd |= MI_FLUSH_DW_STORE_INDEX | MI_FLUSH_DW_OP_STOREDW;
+
 	/*
 	 * Bspec vol 1c.3 - blitter engine command streamer:
 	 * "If ENABLED, all TLBs will be invalidated once the flush
@@ -2289,8 +2305,7 @@ static int gen6_ring_flush(struct intel_engine_cs *ring,
 	 * Post-Sync Operation field is a value of 1h or 3h."
 	 */
 	if (invalidate & I915_GEM_DOMAIN_RENDER)
-		cmd |= MI_INVALIDATE_TLB | MI_FLUSH_DW_STORE_INDEX |
-			MI_FLUSH_DW_OP_STOREDW;
+		cmd |= MI_INVALIDATE_TLB;
 	intel_ring_emit(ring, cmd);
 	intel_ring_emit(ring, I915_GEM_HWS_SCRATCH_ADDR | MI_FLUSH_DW_USE_GTT);
 	if (INTEL_INFO(ring->dev)->gen >= 8) {
drivers/gpu/drm/i915/intel_sideband.c +13 -13
index 01d841ea3140..731b10a09aa0 100644
@@ -82,7 +82,7 @@ u32 vlv_punit_read(struct drm_i915_private *dev_priv, u8 addr)
 	WARN_ON(!mutex_is_locked(&dev_priv->rps.hw_lock));
 
 	mutex_lock(&dev_priv->dpio_lock);
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_PUNIT,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_PUNIT,
 			SB_CRRDDA_NP, addr, &val);
 	mutex_unlock(&dev_priv->dpio_lock);
 
@@ -94,7 +94,7 @@ void vlv_punit_write(struct drm_i915_private *dev_priv, u8 addr, u32 val)
 	WARN_ON(!mutex_is_locked(&dev_priv->rps.hw_lock));
 
 	mutex_lock(&dev_priv->dpio_lock);
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_PUNIT,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_PUNIT,
 			SB_CRWRDA_NP, addr, &val);
 	mutex_unlock(&dev_priv->dpio_lock);
 }
@@ -103,7 +103,7 @@ u32 vlv_bunit_read(struct drm_i915_private *dev_priv, u32 reg)
 {
 	u32 val = 0;
 
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_BUNIT,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_BUNIT,
 			SB_CRRDDA_NP, reg, &val);
 
 	return val;
@@ -111,7 +111,7 @@ u32 vlv_bunit_read(struct drm_i915_private *dev_priv, u32 reg)
 
 void vlv_bunit_write(struct drm_i915_private *dev_priv, u32 reg, u32 val)
 {
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_BUNIT,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_BUNIT,
 			SB_CRWRDA_NP, reg, &val);
 }
 
@@ -122,7 +122,7 @@ u32 vlv_nc_read(struct drm_i915_private *dev_priv, u8 addr)
 	WARN_ON(!mutex_is_locked(&dev_priv->rps.hw_lock));
 
 	mutex_lock(&dev_priv->dpio_lock);
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_NC,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_NC,
 			SB_CRRDDA_NP, addr, &val);
 	mutex_unlock(&dev_priv->dpio_lock);
 
@@ -132,56 +132,56 @@ u32 vlv_nc_read(struct drm_i915_private *dev_priv, u8 addr)
 u32 vlv_gpio_nc_read(struct drm_i915_private *dev_priv, u32 reg)
 {
 	u32 val = 0;
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPIO_NC,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_GPIO_NC,
 			SB_CRRDDA_NP, reg, &val);
 	return val;
 }
 
 void vlv_gpio_nc_write(struct drm_i915_private *dev_priv, u32 reg, u32 val)
 {
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPIO_NC,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_GPIO_NC,
 			SB_CRWRDA_NP, reg, &val);
 }
 
 u32 vlv_cck_read(struct drm_i915_private *dev_priv, u32 reg)
 {
 	u32 val = 0;
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_CCK,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_CCK,
 			SB_CRRDDA_NP, reg, &val);
 	return val;
 }
 
 void vlv_cck_write(struct drm_i915_private *dev_priv, u32 reg, u32 val)
 {
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_CCK,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_CCK,
 			SB_CRWRDA_NP, reg, &val);
 }
 
 u32 vlv_ccu_read(struct drm_i915_private *dev_priv, u32 reg)
 {
 	u32 val = 0;
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_CCU,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_CCU,
 			SB_CRRDDA_NP, reg, &val);
 	return val;
 }
 
 void vlv_ccu_write(struct drm_i915_private *dev_priv, u32 reg, u32 val)
 {
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_CCU,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_CCU,
 			SB_CRWRDA_NP, reg, &val);
 }
 
 u32 vlv_gps_core_read(struct drm_i915_private *dev_priv, u32 reg)
 {
 	u32 val = 0;
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPS_CORE,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_GPS_CORE,
 			SB_CRRDDA_NP, reg, &val);
 	return val;
 }
 
 void vlv_gps_core_write(struct drm_i915_private *dev_priv, u32 reg, u32 val)
 {
-	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPS_CORE,
+	vlv_sideband_rw(dev_priv, PCI_DEVFN(0, 0), IOSF_PORT_GPS_CORE,
 			SB_CRWRDA_NP, reg, &val);
 }
 
drivers/gpu/drm/radeon/atombios_dp.c +1 -3
index db42a670f995..5bf825dfaa09 100644
@@ -623,10 +623,8 @@ static int radeon_dp_link_train_init(struct radeon_dp_link_train_info *dp_info)
 		drm_dp_dpcd_writeb(dp_info->aux,
 				   DP_DOWNSPREAD_CTRL, 0);
 
-	if ((dp_info->connector->connector_type == DRM_MODE_CONNECTOR_eDP) &&
-	    (dig->panel_mode == DP_PANEL_MODE_INTERNAL_DP2_MODE)) {
+	if (dig->panel_mode == DP_PANEL_MODE_INTERNAL_DP2_MODE)
 		drm_dp_dpcd_writeb(dp_info->aux, DP_EDP_CONFIGURATION_SET, 1);
-	}
 
 	/* set the lane count on the sink */
 	tmp = dp_info->dp_lane_count;
drivers/gpu/drm/radeon/cik.c +15 -22
index 64fdae558d36..de9a56205f0a 100644
@@ -3904,7 +3904,21 @@ void cik_fence_gfx_ring_emit(struct radeon_device *rdev,
 	struct radeon_ring *ring = &rdev->ring[fence->ring];
 	u64 addr = rdev->fence_drv[fence->ring].gpu_addr;
 
-	/* EVENT_WRITE_EOP - flush caches, send int */
+	/* Workaround for cache flush problems. First send a dummy EOP
+	 * event down the pipe with seq one below.
+	 */
+	radeon_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
+	radeon_ring_write(ring, (EOP_TCL1_ACTION_EN |
+				 EOP_TC_ACTION_EN |
+				 EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
+				 EVENT_INDEX(5)));
+	radeon_ring_write(ring, addr & 0xfffffffc);
+	radeon_ring_write(ring, (upper_32_bits(addr) & 0xffff) |
+				DATA_SEL(1) | INT_SEL(0));
+	radeon_ring_write(ring, fence->seq - 1);
+	radeon_ring_write(ring, 0);
+
+	/* Then send the real EOP event down the pipe. */
 	radeon_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
 	radeon_ring_write(ring, (EOP_TCL1_ACTION_EN |
 				 EOP_TC_ACTION_EN |
@@ -7334,7 +7348,6 @@ int cik_irq_set(struct radeon_device *rdev)
 	u32 hpd1, hpd2, hpd3, hpd4, hpd5, hpd6;
 	u32 grbm_int_cntl = 0;
 	u32 dma_cntl, dma_cntl1;
-	u32 thermal_int;
 
 	if (!rdev->irq.installed) {
 		WARN(1, "Can't enable IRQ/MSI because no handler is installed\n");
@@ -7364,13 +7377,6 @@ int cik_irq_set(struct radeon_device *rdev)
 
 	cp_m1p0 = RREG32(CP_ME1_PIPE0_INT_CNTL) & ~TIME_STAMP_INT_ENABLE;
 
-	if (rdev->flags & RADEON_IS_IGP)
-		thermal_int = RREG32_SMC(CG_THERMAL_INT_CTRL) &
-			~(THERM_INTH_MASK | THERM_INTL_MASK);
-	else
-		thermal_int = RREG32_SMC(CG_THERMAL_INT) &
-			~(THERM_INT_MASK_HIGH | THERM_INT_MASK_LOW);
-
 	/* enable CP interrupts on all rings */
 	if (atomic_read(&rdev->irq.ring_int[RADEON_RING_TYPE_GFX_INDEX])) {
 		DRM_DEBUG("cik_irq_set: sw int gfx\n");
@@ -7474,14 +7480,6 @@ int cik_irq_set(struct radeon_device *rdev)
 		hpd6 |= DC_HPDx_INT_EN;
 	}
 
-	if (rdev->irq.dpm_thermal) {
-		DRM_DEBUG("dpm thermal\n");
-		if (rdev->flags & RADEON_IS_IGP)
-			thermal_int |= THERM_INTH_MASK | THERM_INTL_MASK;
-		else
-			thermal_int |= THERM_INT_MASK_HIGH | THERM_INT_MASK_LOW;
-	}
-
 	WREG32(CP_INT_CNTL_RING0, cp_int_cntl);
 
 	WREG32(SDMA0_CNTL + SDMA0_REGISTER_OFFSET, dma_cntl);
@@ -7528,11 +7526,6 @@ int cik_irq_set(struct radeon_device *rdev)
 	WREG32(DC_HPD5_INT_CONTROL, hpd5);
 	WREG32(DC_HPD6_INT_CONTROL, hpd6);
 
-	if (rdev->flags & RADEON_IS_IGP)
-		WREG32_SMC(CG_THERMAL_INT_CTRL, thermal_int);
-	else
-		WREG32_SMC(CG_THERMAL_INT, thermal_int);
-
 	return 0;
 }
 
drivers/gpu/drm/radeon/kv_dpm.c +15 -2
index e3e9c10cfba9..85a109e1e56b 100644
@@ -1169,6 +1169,19 @@ void kv_dpm_enable_bapm(struct radeon_device *rdev, bool enable)
 	}
 }
 
+static void kv_enable_thermal_int(struct radeon_device *rdev, bool enable)
+{
+	u32 thermal_int;
+
+	thermal_int = RREG32_SMC(CG_THERMAL_INT_CTRL);
+	if (enable)
+		thermal_int |= THERM_INTH_MASK | THERM_INTL_MASK;
+	else
+		thermal_int &= ~(THERM_INTH_MASK | THERM_INTL_MASK);
+	WREG32_SMC(CG_THERMAL_INT_CTRL, thermal_int);
+
+}
+
 int kv_dpm_enable(struct radeon_device *rdev)
 {
 	struct kv_power_info *pi = kv_get_pi(rdev);
@@ -1280,8 +1293,7 @@ int kv_dpm_late_enable(struct radeon_device *rdev)
 			DRM_ERROR("kv_set_thermal_temperature_range failed\n");
 			return ret;
 		}
-		rdev->irq.dpm_thermal = true;
-		radeon_irq_set(rdev);
+		kv_enable_thermal_int(rdev, true);
 	}
 
 	/* powerdown unused blocks for now */
@@ -1312,6 +1324,7 @@ void kv_dpm_disable(struct radeon_device *rdev)
 	kv_stop_dpm(rdev);
 	kv_enable_ulv(rdev, false);
 	kv_reset_am(rdev);
+	kv_enable_thermal_int(rdev, false);
 
 	kv_update_current_ps(rdev, rdev->pm.dpm.boot_ps);
 }
drivers/gpu/drm/radeon/ni.c +4 -4
index aea48c89b241..88b2c36f8e1f 100644
@@ -1085,12 +1085,12 @@ static void cayman_gpu_init(struct radeon_device *rdev)
 
 	if ((rdev->config.cayman.max_backends_per_se == 1) &&
 	    (rdev->flags & RADEON_IS_IGP)) {
-		if ((disabled_rb_mask & 3) == 1) {
-			/* RB0 disabled, RB1 enabled */
-			tmp = 0x11111111;
-		} else {
+		if ((disabled_rb_mask & 3) == 2) {
 			/* RB1 disabled, RB0 enabled */
 			tmp = 0x00000000;
+		} else {
+			/* RB0 disabled, RB1 enabled */
+			tmp = 0x11111111;
 		}
 	} else {
 		tmp = gb_addr_config & NUM_PIPES_MASK;
drivers/gpu/drm/radeon/r600_dpm.c +1 -1
index 843b65f46ece..fa2154493cf1 100644
@@ -188,7 +188,7 @@ u32 r600_dpm_get_vrefresh(struct radeon_device *rdev)
 		list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
 			radeon_crtc = to_radeon_crtc(crtc);
 			if (crtc->enabled && radeon_crtc->enabled && radeon_crtc->hw_mode.clock) {
-				vrefresh = radeon_crtc->hw_mode.vrefresh;
+				vrefresh = drm_mode_vrefresh(&radeon_crtc->hw_mode);
 				break;
 			}
 		}
drivers/gpu/drm/radeon/radeon_atombios.c +1 -0
index dbc94f300297..fc1b3f34cf18 100644
@@ -3289,6 +3289,7 @@ int radeon_atom_get_voltage_evv(struct radeon_device *rdev,
 
 	args.in.ucVoltageType = VOLTAGE_TYPE_VDDC;
 	args.in.ucVoltageMode = ATOM_GET_VOLTAGE_EVV_VOLTAGE;
+	args.in.usVoltageLevel = cpu_to_le16(virtual_voltage_id);
 	args.in.ulSCLKFreq =
 		cpu_to_le32(rdev->pm.dpm.dyn_state.vddc_dependency_on_sclk.entries[entry_id].clk);
 
drivers/gpu/drm/radeon/radeon_encoders.c +3 -0
index 6b670b0bc47b..3a297037cc17 100644
@@ -179,9 +179,12 @@ static void radeon_encoder_add_backlight(struct radeon_encoder *radeon_encoder,
 		    (rdev->pdev->subsystem_vendor == 0x1734) &&
 		    (rdev->pdev->subsystem_device == 0x1107))
 			use_bl = false;
+/* Older PPC macs use on-GPU backlight controller */
+#ifndef CONFIG_PPC_PMAC
 		/* disable native backlight control on older asics */
 		else if (rdev->family < CHIP_R600)
 			use_bl = false;
+#endif
 		else
 			use_bl = true;
 	}
drivers/gpu/drm/radeon/radeon_object.c +12 -0
index 86fc56434b28..040d2847f8e8 100644
@@ -238,6 +238,18 @@ int radeon_bo_create(struct radeon_device *rdev,
 	 * See https://bugs.freedesktop.org/show_bug.cgi?id=84627
 	 */
 	bo->flags &= ~RADEON_GEM_GTT_WC;
+#elif defined(CONFIG_X86) && !defined(CONFIG_X86_PAT)
+	/* Don't try to enable write-combining when it can't work, or things
+	 * may be slow
+	 * See https://bugs.freedesktop.org/show_bug.cgi?id=88758
+	 */
+
+#warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \
+	 thanks to write-combining
+
+	DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
+		      "better performance thanks to write-combining\n");
+	bo->flags &= ~RADEON_GEM_GTT_WC;
 #endif
 
 	radeon_ttm_placement_from_domain(bo, domain);
drivers/gpu/drm/tegra/drm.c +1 -1
index d4f827593dfa..d8c9fb713ebb 100644
@@ -190,7 +190,7 @@ static int host1x_reloc_copy_from_user(struct host1x_reloc *dest,
 	if (err < 0)
 		return err;
 
-	err = get_user(dest->target.offset, &src->cmdbuf.offset);
+	err = get_user(dest->target.offset, &src->target.offset);
 	if (err < 0)
 		return err;
 
drivers/hid/hid-input.c +17 -0
index 9505605b6e22..294d3aea132e 100644
@@ -1104,6 +1104,23 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
 		return;
 	}
 
+	/*
+	 * Ignore reports for absolute data if the data didn't change. This is
+	 * not only an optimization but also fixes 'dead' key reports. Some
+	 * RollOver implementations for localized keys (like BACKSLASH/PIPE; HID
+	 * 0x31 and 0x32) report multiple keys, even though a localized keyboard
+	 * can only have one of them physically available. The 'dead' keys
+	 * report constant 0. As all map to the same keycode, they'd confuse
+	 * the input layer. If we filter the 'dead' keys on the HID level, we
+	 * skip the keycode translation and only forward real events.
+	 */
+	if (!(field->flags & (HID_MAIN_ITEM_RELATIVE |
+	                      HID_MAIN_ITEM_BUFFERED_BYTE)) &&
+			      (field->flags & HID_MAIN_ITEM_VARIABLE) &&
+	    usage->usage_index < field->maxusage &&
+	    value == field->value[usage->usage_index])
+		return;
+
 	/* report the usage code as scancode if the key status has changed */
 	if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
 		input_event(input, EV_MSC, MSC_SCAN, usage->hid);
drivers/hid/wacom_wac.c +6 -0
index ac7447c7b82e..e7f35857462c 100644
@@ -760,6 +760,12 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
 			input_report_key(input, BTN_7, (data[4] & 0x40));  /* Left   */
 			input_report_key(input, BTN_8, (data[4] & 0x80));  /* Down   */
 			input_report_key(input, BTN_0, (data[3] & 0x01));  /* Center */
+
+			if (data[4] | (data[3] & 0x01)) {
+				input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
+			} else {
+				input_report_abs(input, ABS_MISC, 0);
+			}
 		} else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
 			int i;
 
drivers/iio/adc/mcp3422.c +4 -13
index 51672256072b..b96c636470ef 100644
@@ -58,20 +58,11 @@
 		.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ), \
 	}
 
-/* LSB is in nV to eliminate floating point */
-static const u32 rates_to_lsb[] = {1000000, 250000, 62500, 15625};
-
-/*
- *  scales calculated as:
- *  rates_to_lsb[sample_rate] / (1 << pga);
- *  pga is 1 for 0, 2
- */
-
 static const int mcp3422_scales[4][4] = {
-	{ 1000000, 250000, 62500, 15625 },
-	{ 500000 , 125000, 31250, 7812 },
-	{ 250000 , 62500 , 15625, 3906 },
-	{ 125000 , 31250 , 7812 , 1953 } };
+	{ 1000000, 500000, 250000, 125000 },
+	{ 250000 , 125000, 62500 , 31250  },
+	{ 62500  , 31250 , 15625 , 7812   },
+	{ 15625  , 7812  , 3906  , 1953   } };
 
 /* Constant msleep times for data acquisitions */
 static const int mcp3422_read_times[4] = {
drivers/iio/dac/ad5686.c +1 -1
index f57562aa396f..15c73e20272d 100644
@@ -322,7 +322,7 @@ static int ad5686_probe(struct spi_device *spi)
 	st = iio_priv(indio_dev);
 	spi_set_drvdata(spi, indio_dev);
 
-	st->reg = devm_regulator_get(&spi->dev, "vcc");
+	st->reg = devm_regulator_get_optional(&spi->dev, "vcc");
 	if (!IS_ERR(st->reg)) {
 		ret = regulator_enable(st->reg);
 		if (ret)
drivers/iio/humidity/si7020.c +3 -3
index b54164677b89..fa3b809aff5e 100644
@@ -45,12 +45,12 @@ static int si7020_read_raw(struct iio_dev *indio_dev,
 			   struct iio_chan_spec const *chan, int *val,
 			   int *val2, long mask)
 {
-	struct i2c_client *client = iio_priv(indio_dev);
+	struct i2c_client **client = iio_priv(indio_dev);
 	int ret;
 
 	switch (mask) {
 	case IIO_CHAN_INFO_RAW:
-		ret = i2c_smbus_read_word_data(client,
+		ret = i2c_smbus_read_word_data(*client,
 					       chan->type == IIO_TEMP ?
 					       SI7020CMD_TEMP_HOLD :
 					       SI7020CMD_RH_HOLD);
@@ -126,7 +126,7 @@ static int si7020_probe(struct i2c_client *client,
 	/* Wait the maximum power-up time after software reset. */
 	msleep(15);
 
-	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*client));
+	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
 	if (!indio_dev)
 		return -ENOMEM;
 
drivers/iio/imu/adis16400_core.c +2 -1
index b70873de04ea..fa795dcd5f75 100644
@@ -26,6 +26,7 @@
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/debugfs.h>
+#include <linux/bitops.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
@@ -414,7 +415,7 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
 		mutex_unlock(&indio_dev->mlock);
 		if (ret)
 			return ret;
-		val16 = ((val16 & 0xFFF) << 4) >> 4;
+		val16 = sign_extend32(val16, 11);
 		*val = val16;
 		return IIO_VAL_INT;
 	case IIO_CHAN_INFO_OFFSET:
drivers/infiniband/core/ucma.c +3 -0
index 56a4b7ca7ee3..45d67e9228d7 100644
@@ -1124,6 +1124,9 @@ static int ucma_set_ib_path(struct ucma_context *ctx,
 	if (!optlen)
 		return -EINVAL;
 
+	memset(&sa_path, 0, sizeof(sa_path));
+	sa_path.vlan_id = 0xffff;
+
 	ib_sa_unpack_path(path_data->path_rec, &sa_path);
 	ret = rdma_set_ib_paths(ctx->cm_id, &sa_path, 1);
 	if (ret)
drivers/infiniband/core/umem_odp.c +2 -1
index 6095872549e7..8b8cc6fa0ab0 100644
@@ -294,7 +294,8 @@ int ib_umem_odp_get(struct ib_ucontext *context, struct ib_umem *umem)
 	if (likely(ib_umem_start(umem) != ib_umem_end(umem)))
 		rbt_ib_umem_insert(&umem->odp_data->interval_tree,
 				   &context->umem_tree);
-	if (likely(!atomic_read(&context->notifier_count)))
+	if (likely(!atomic_read(&context->notifier_count)) ||
+	    context->odp_mrs_count == 1)
 		umem->odp_data->mn_counters_active = true;
 	else
 		list_add(&umem->odp_data->no_private_counters,
drivers/infiniband/core/uverbs_cmd.c +5 -4
index b7943ff16ed3..6c52e72f8d2c 100644
@@ -2091,20 +2091,21 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file,
 	if (qp->real_qp == qp) {
 		ret = ib_resolve_eth_l2_attrs(qp, attr, &cmd.attr_mask);
 		if (ret)
-			goto out;
+			goto release_qp;
 		ret = qp->device->modify_qp(qp, attr,
 			modify_qp_mask(qp->qp_type, cmd.attr_mask), &udata);
 	} else {
 		ret = ib_modify_qp(qp, attr, modify_qp_mask(qp->qp_type, cmd.attr_mask));
 	}
 
-	put_qp_read(qp);
-
 	if (ret)
-		goto out;
+		goto release_qp;
 
 	ret = in_len;
 
+release_qp:
+	put_qp_read(qp);
+
 out:
 	kfree(attr);
 
drivers/infiniband/hw/mlx4/main.c +5 -5
index 9117b7a2d5f8..0b280b1c98df 100644
@@ -1222,8 +1222,7 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
 	struct mlx4_ib_qp *mqp = to_mqp(ibqp);
 	u64 reg_id;
 	struct mlx4_ib_steering *ib_steering = NULL;
-	enum mlx4_protocol prot = (gid->raw[1] == 0x0e) ?
-		MLX4_PROT_IB_IPV4 : MLX4_PROT_IB_IPV6;
+	enum mlx4_protocol prot = MLX4_PROT_IB_IPV6;
 
 	if (mdev->dev->caps.steering_mode ==
 	    MLX4_STEERING_MODE_DEVICE_MANAGED) {
@@ -1236,8 +1235,10 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
 				    !!(mqp->flags &
 				       MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK),
 				    prot, &reg_id);
-	if (err)
+	if (err) {
+		pr_err("multicast attach op failed, err %d\n", err);
 		goto err_malloc;
+	}
 
 	err = add_gid_entry(ibqp, gid);
 	if (err)
@@ -1285,8 +1286,7 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
 	struct net_device *ndev;
 	struct mlx4_ib_gid_entry *ge;
 	u64 reg_id = 0;
-	enum mlx4_protocol prot = (gid->raw[1] == 0x0e) ?
-		MLX4_PROT_IB_IPV4 : MLX4_PROT_IB_IPV6;
+	enum mlx4_protocol prot =  MLX4_PROT_IB_IPV6;
 
 	if (mdev->dev->caps.steering_mode ==
 	    MLX4_STEERING_MODE_DEVICE_MANAGED) {
drivers/infiniband/hw/mlx4/qp.c +4 -2
index cf000b7ad64f..c880329b4d64 100644
@@ -1674,8 +1674,10 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
 			    qp->mlx4_ib_qp_type == MLX4_IB_QPT_PROXY_GSI ||
 			    qp->mlx4_ib_qp_type == MLX4_IB_QPT_TUN_GSI) {
 				err = handle_eth_ud_smac_index(dev, qp, (u8 *)attr->smac, context);
-				if (err)
-					return -EINVAL;
+				if (err) {
+					err = -EINVAL;
+					goto out;
+				}
 				if (qp->mlx4_ib_qp_type == MLX4_IB_QPT_PROXY_GSI)
 					dev->qp1_proxy[qp->port - 1] = qp;
 			}
drivers/infiniband/hw/mlx5/main.c +1 -1
index 03bf81211a54..b1eda4a602a8 100644
@@ -997,7 +997,7 @@ static int get_port_caps(struct mlx5_ib_dev *dev)
 	struct ib_device_attr *dprops = NULL;
 	struct ib_port_attr *pprops = NULL;
 	struct mlx5_general_caps *gen;
-	int err = 0;
+	int err = -ENOMEM;
 	int port;
 
 	gen = &dev->mdev->caps.gen;
drivers/infiniband/hw/qib/qib.h +1 -8
index c00ae093b6f8..b218254ee41b 100644
@@ -1082,12 +1082,6 @@ struct qib_devdata {
 	/* control high-level access to EEPROM */
 	struct mutex eep_lock;
 	uint64_t traffic_wds;
-	/* active time is kept in seconds, but logged in hours */
-	atomic_t active_time;
-	/* Below are nominal shadow of EEPROM, new since last EEPROM update */
-	uint8_t eep_st_errs[QIB_EEP_LOG_CNT];
-	uint8_t eep_st_new_errs[QIB_EEP_LOG_CNT];
-	uint16_t eep_hrs;
 	/*
 	 * masks for which bits of errs, hwerrs that cause
 	 * each of the counters to increment.
@@ -1309,8 +1303,7 @@ int qib_twsi_blk_rd(struct qib_devdata *dd, int dev, int addr, void *buffer,
 int qib_twsi_blk_wr(struct qib_devdata *dd, int dev, int addr,
 		    const void *buffer, int len);
 void qib_get_eeprom_info(struct qib_devdata *);
-int qib_update_eeprom_log(struct qib_devdata *dd);
-void qib_inc_eeprom_err(struct qib_devdata *dd, u32 eidx, u32 incr);
+#define qib_inc_eeprom_err(dd, eidx, incr)
 void qib_dump_lookup_output_queue(struct qib_devdata *);
 void qib_force_pio_avail_update(struct qib_devdata *);
 void qib_clear_symerror_on_linkup(unsigned long opaque);
drivers/infiniband/hw/qib/qib_eeprom.c +0 -181

190 lines not on this page · raw message

drivers/infiniband/hw/qib/qib_iba6120.c +0 -2
index d68266ac7619..f7f49a6c34b0 100644
@@ -2681,8 +2681,6 @@ static void qib_get_6120_faststats(unsigned long opaque)
 	spin_lock_irqsave(&dd->eep_st_lock, flags);
 	traffic_wds -= dd->traffic_wds;
 	dd->traffic_wds += traffic_wds;
-	if (traffic_wds  >= QIB_TRAFFIC_ACTIVE_THRESHOLD)
-		atomic_add(5, &dd->active_time); /* S/B #define */
 	spin_unlock_irqrestore(&dd->eep_st_lock, flags);
 
 	qib_chk_6120_errormask(dd);
drivers/infiniband/hw/qib/qib_iba7220.c +0 -2
index 7dec89fdc124..f5fa106e1992 100644
@@ -3297,8 +3297,6 @@ static void qib_get_7220_faststats(unsigned long opaque)
 	spin_lock_irqsave(&dd->eep_st_lock, flags);
 	traffic_wds -= dd->traffic_wds;
 	dd->traffic_wds += traffic_wds;
-	if (traffic_wds  >= QIB_TRAFFIC_ACTIVE_THRESHOLD)
-		atomic_add(5, &dd->active_time); /* S/B #define */
 	spin_unlock_irqrestore(&dd->eep_st_lock, flags);
 done:
 	mod_timer(&dd->stats_timer, jiffies + HZ * ACTIVITY_TIMER);
drivers/infiniband/hw/qib/qib_iba7322.c +0 -2
index a7eb32517a04..23ca2aca1ad6 100644
@@ -5178,8 +5178,6 @@ static void qib_get_7322_faststats(unsigned long opaque)
 		spin_lock_irqsave(&ppd->dd->eep_st_lock, flags);
 		traffic_wds -= ppd->dd->traffic_wds;
 		ppd->dd->traffic_wds += traffic_wds;
-		if (traffic_wds >= QIB_TRAFFIC_ACTIVE_THRESHOLD)
-			atomic_add(ACTIVITY_TIMER, &ppd->dd->active_time);
 		spin_unlock_irqrestore(&ppd->dd->eep_st_lock, flags);
 		if (ppd->cpspec->qdr_dfe_on && (ppd->link_speed_active &
 						QIB_IB_QDR) &&
drivers/infiniband/hw/qib/qib_init.c +0 -1
index 729da39c49ed..738269b46d83 100644
@@ -931,7 +931,6 @@ static void qib_shutdown_device(struct qib_devdata *dd)
 		qib_free_pportdata(ppd);
 	}
 
-	qib_update_eeprom_log(dd);
 }
 
 /**
drivers/infiniband/hw/qib/qib_sysfs.c +0 -24
index 3c8e4e3caca6..b9ccbda7817d 100644
@@ -611,28 +611,6 @@ bail:
 	return ret < 0 ? ret : count;
 }
 
-static ssize_t show_logged_errs(struct device *device,
-				struct device_attribute *attr, char *buf)
-{
-	struct qib_ibdev *dev =
-		container_of(device, struct qib_ibdev, ibdev.dev);
-	struct qib_devdata *dd = dd_from_dev(dev);
-	int idx, count;
-
-	/* force consistency with actual EEPROM */
-	if (qib_update_eeprom_log(dd) != 0)
-		return -ENXIO;
-
-	count = 0;
-	for (idx = 0; idx < QIB_EEP_LOG_CNT; ++idx) {
-		count += scnprintf(buf + count, PAGE_SIZE - count, "%d%c",
-				   dd->eep_st_errs[idx],
-				   idx == (QIB_EEP_LOG_CNT - 1) ? '\n' : ' ');
-	}
-
-	return count;
-}
-
 /*
  * Dump tempsense regs. in decimal, to ease shell-scripts.
  */
@@ -679,7 +657,6 @@ static DEVICE_ATTR(nctxts, S_IRUGO, show_nctxts, NULL);
 static DEVICE_ATTR(nfreectxts, S_IRUGO, show_nfreectxts, NULL);
 static DEVICE_ATTR(serial, S_IRUGO, show_serial, NULL);
 static DEVICE_ATTR(boardversion, S_IRUGO, show_boardversion, NULL);
-static DEVICE_ATTR(logged_errors, S_IRUGO, show_logged_errs, NULL);
 static DEVICE_ATTR(tempsense, S_IRUGO, show_tempsense, NULL);
 static DEVICE_ATTR(localbus_info, S_IRUGO, show_localbus_info, NULL);
 static DEVICE_ATTR(chip_reset, S_IWUSR, NULL, store_chip_reset);
@@ -693,7 +670,6 @@ static struct device_attribute *qib_attributes[] = {
 	&dev_attr_nfreectxts,
 	&dev_attr_serial,
 	&dev_attr_boardversion,
-	&dev_attr_logged_errors,
 	&dev_attr_tempsense,
 	&dev_attr_localbus_info,
 	&dev_attr_chip_reset,
drivers/infiniband/ulp/iser/iscsi_iser.h +3 -1
index 5ce26817e7e1..b47aea1094b2 100644
@@ -654,7 +654,9 @@ int iser_dma_map_task_data(struct iscsi_iser_task *iser_task,
 			   enum dma_data_direction dma_dir);
 
 void iser_dma_unmap_task_data(struct iscsi_iser_task *iser_task,
-			      struct iser_data_buf *data);
+			      struct iser_data_buf *data,
+			      enum dma_data_direction dir);
+
 int  iser_initialize_task_headers(struct iscsi_task *task,
 			struct iser_tx_desc *tx_desc);
 int iser_alloc_rx_descriptors(struct iser_conn *iser_conn,
drivers/infiniband/ulp/iser/iser_initiator.c +8 -8
index 3821633f1065..20e859a6f1a6 100644
@@ -320,9 +320,6 @@ void iser_free_rx_descriptors(struct iser_conn *iser_conn)
 	struct ib_conn *ib_conn = &iser_conn->ib_conn;
 	struct iser_device *device = ib_conn->device;
 
-	if (!iser_conn->rx_descs)
-		goto free_login_buf;
-
 	if (device->iser_free_rdma_reg_res)
 		device->iser_free_rdma_reg_res(ib_conn);
 
@@ -334,7 +331,6 @@ void iser_free_rx_descriptors(struct iser_conn *iser_conn)
 	/* make sure we never redo any unmapping */
 	iser_conn->rx_descs = NULL;
 
-free_login_buf:
 	iser_free_login_buf(iser_conn);
 }
 
@@ -714,19 +710,23 @@ void iser_task_rdma_finalize(struct iscsi_iser_task *iser_task)
 		device->iser_unreg_rdma_mem(iser_task, ISER_DIR_IN);
 		if (is_rdma_data_aligned)
 			iser_dma_unmap_task_data(iser_task,
-						 &iser_task->data[ISER_DIR_IN]);
+						 &iser_task->data[ISER_DIR_IN],
+						 DMA_FROM_DEVICE);
 		if (prot_count && is_rdma_prot_aligned)
 			iser_dma_unmap_task_data(iser_task,
-						 &iser_task->prot[ISER_DIR_IN]);
+						 &iser_task->prot[ISER_DIR_IN],
+						 DMA_FROM_DEVICE);
 	}
 
 	if (iser_task->dir[ISER_DIR_OUT]) {
 		device->iser_unreg_rdma_mem(iser_task, ISER_DIR_OUT);
 		if (is_rdma_data_aligned)
 			iser_dma_unmap_task_data(iser_task,
-						 &iser_task->data[ISER_DIR_OUT]);
+						 &iser_task->data[ISER_DIR_OUT],
+						 DMA_TO_DEVICE);
 		if (prot_count && is_rdma_prot_aligned)
 			iser_dma_unmap_task_data(iser_task,
-						 &iser_task->prot[ISER_DIR_OUT]);
+						 &iser_task->prot[ISER_DIR_OUT],
+						 DMA_TO_DEVICE);
 	}
 }
drivers/infiniband/ulp/iser/iser_memory.c +6 -3
index abce9339333f..341040bf0984 100644
@@ -332,12 +332,13 @@ int iser_dma_map_task_data(struct iscsi_iser_task *iser_task,
 }
 
 void iser_dma_unmap_task_data(struct iscsi_iser_task *iser_task,
-			      struct iser_data_buf *data)
+			      struct iser_data_buf *data,
+			      enum dma_data_direction dir)
 {
 	struct ib_device *dev;
 
 	dev = iser_task->iser_conn->ib_conn.device->ib_device;
-	ib_dma_unmap_sg(dev, data->buf, data->size, DMA_FROM_DEVICE);
+	ib_dma_unmap_sg(dev, data->buf, data->size, dir);
 }
 
 static int fall_to_bounce_buf(struct iscsi_iser_task *iser_task,
@@ -357,7 +358,9 @@ static int fall_to_bounce_buf(struct iscsi_iser_task *iser_task,
 		iser_data_buf_dump(mem, ibdev);
 
 	/* unmap the command data before accessing it */
-	iser_dma_unmap_task_data(iser_task, mem);
+	iser_dma_unmap_task_data(iser_task, mem,
+				 (cmd_dir == ISER_DIR_OUT) ?
+				 DMA_TO_DEVICE : DMA_FROM_DEVICE);
 
 	/* allocate copy buf, if we are writing, copy the */
 	/* unaligned scatterlist, dma map the copy        */
drivers/infiniband/ulp/iser/iser_verbs.c +14 -11
index 695a2704bd43..f3e21abc20a6 100644
@@ -600,16 +600,16 @@ void iser_release_work(struct work_struct *work)
 /**
  * iser_free_ib_conn_res - release IB related resources
  * @iser_conn: iser connection struct
- * @destroy_device: indicator if we need to try to release
- *     the iser device (only iscsi shutdown and DEVICE_REMOVAL
- *     will use this.
+ * @destroy: indicator if we need to try to release the
+ *     iser device and memory regoins pool (only iscsi
+ *     shutdown and DEVICE_REMOVAL will use this).
  *
  * This routine is called with the iser state mutex held
  * so the cm_id removal is out of here. It is Safe to
  * be invoked multiple times.
  */
 static void iser_free_ib_conn_res(struct iser_conn *iser_conn,
-				  bool destroy_device)
+				  bool destroy)
 {
 	struct ib_conn *ib_conn = &iser_conn->ib_conn;
 	struct iser_device *device = ib_conn->device;
@@ -617,17 +617,20 @@ static void iser_free_ib_conn_res(struct iser_conn *iser_conn,
 	iser_info("freeing conn %p cma_id %p qp %p\n",
 		  iser_conn, ib_conn->cma_id, ib_conn->qp);
 
-	iser_free_rx_descriptors(iser_conn);
-
 	if (ib_conn->qp != NULL) {
 		ib_conn->comp->active_qps--;
 		rdma_destroy_qp(ib_conn->cma_id);
 		ib_conn->qp = NULL;
 	}
 
-	if (destroy_device && device != NULL) {
-		iser_device_try_release(device);
-		ib_conn->device = NULL;
+	if (destroy) {
+		if (iser_conn->rx_descs)
+			iser_free_rx_descriptors(iser_conn);
+
+		if (device != NULL) {
+			iser_device_try_release(device);
+			ib_conn->device = NULL;
+		}
 	}
 }
 
@@ -840,7 +843,7 @@ static void iser_disconnected_handler(struct rdma_cm_id *cma_id)
 }
 
 static void iser_cleanup_handler(struct rdma_cm_id *cma_id,
-				 bool destroy_device)
+				 bool destroy)
 {
 	struct iser_conn *iser_conn = (struct iser_conn *)cma_id->context;
 
@@ -850,7 +853,7 @@ static void iser_cleanup_handler(struct rdma_cm_id *cma_id,
 	 * and flush errors.
 	 */
 	iser_disconnected_handler(cma_id);
-	iser_free_ib_conn_res(iser_conn, destroy_device);
+	iser_free_ib_conn_res(iser_conn, destroy);
 	complete(&iser_conn->ib_completion);
 };
 
drivers/md/dm-io.c +6 -0
index c09359db3a90..37de0173b6d2 100644
@@ -290,6 +290,12 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
 	unsigned short logical_block_size = queue_logical_block_size(q);
 	sector_t num_sectors;
 
+	/* Reject unsupported discard requests */
+	if ((rw & REQ_DISCARD) && !blk_queue_discard(q)) {
+		dec_count(io, region, -EOPNOTSUPP);
+		return;
+	}
+
 	/*
 	 * where->count may be zero if rw holds a flush and we need to
 	 * send a zero-sized flush.
drivers/md/dm-raid1.c +9 -0
index 7dfdb5c746d6..089d62751f7f 100644
@@ -604,6 +604,15 @@ static void write_callback(unsigned long error, void *context)
 		return;
 	}
 
+	/*
+	 * If the bio is discard, return an error, but do not
+	 * degrade the array.
+	 */
+	if (bio->bi_rw & REQ_DISCARD) {
+		bio_endio(bio, -EOPNOTSUPP);
+		return;
+	}
+
 	for (i = 0; i < ms->nr_mirrors; i++)
 		if (test_bit(i, &error))
 			fail_mirror(ms->mirror + i, DM_RAID1_WRITE_ERROR);
drivers/md/dm-snap.c +2 -2
index 864b03f47727..8b204ae216ab 100644
@@ -1432,8 +1432,6 @@ out:
 		full_bio->bi_private = pe->full_bio_private;
 		atomic_inc(&full_bio->bi_remaining);
 	}
-	free_pending_exception(pe);
-
 	increment_pending_exceptions_done_count();
 
 	up_write(&s->lock);
@@ -1450,6 +1448,8 @@ out:
 	}
 
 	retry_origin_bios(s, origin_bios);
+
+	free_pending_exception(pe);
 }
 
 static void commit_callback(void *context, int success)
drivers/md/dm.c +10 -17
index 2caf5b374649..64b10e006f9c 100644
@@ -2462,7 +2462,7 @@ int dm_setup_md_queue(struct mapped_device *md)
 	return 0;
 }
 
-static struct mapped_device *dm_find_md(dev_t dev)
+struct mapped_device *dm_get_md(dev_t dev)
 {
 	struct mapped_device *md;
 	unsigned minor = MINOR(dev);
@@ -2473,12 +2473,15 @@ static struct mapped_device *dm_find_md(dev_t dev)
 	spin_lock(&_minor_lock);
 
 	md = idr_find(&_minor_idr, minor);
-	if (md && (md == MINOR_ALLOCED ||
-		   (MINOR(disk_devt(dm_disk(md))) != minor) ||
-		   dm_deleting_md(md) ||
-		   test_bit(DMF_FREEING, &md->flags))) {
-		md = NULL;
-		goto out;
+	if (md) {
+		if ((md == MINOR_ALLOCED ||
+		     (MINOR(disk_devt(dm_disk(md))) != minor) ||
+		     dm_deleting_md(md) ||
+		     test_bit(DMF_FREEING, &md->flags))) {
+			md = NULL;
+			goto out;
+		}
+		dm_get(md);
 	}
 
 out:
@@ -2486,16 +2489,6 @@ out:
 
 	return md;
 }
-
-struct mapped_device *dm_get_md(dev_t dev)
-{
-	struct mapped_device *md = dm_find_md(dev);
-
-	if (md)
-		dm_get(md);
-
-	return md;
-}
 EXPORT_SYMBOL_GPL(dm_get_md);
 
 void *dm_get_mdptr(struct mapped_device *md)
drivers/misc/cxl/cxl.h +1 -0
index 28078f8894a5..f3856c3eb63b 100644
@@ -481,6 +481,7 @@ void cxl_release_one_irq(struct cxl *adapter, int hwirq);
 int cxl_alloc_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter, unsigned int num);
 void cxl_release_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter);
 int cxl_setup_irq(struct cxl *adapter, unsigned int hwirq, unsigned int virq);
+int cxl_update_image_control(struct cxl *adapter);
 
 /* common == phyp + powernv */
 struct cxl_process_element_common {
drivers/misc/cxl/irq.c +1 -0
index c294925f73ee..bfbe3c8ae7d6 100644
@@ -167,6 +167,7 @@ static irqreturn_t cxl_irq(int irq, void *data, struct cxl_irq_info *irq_info)
 		}
 
 		cxl_ack_irq(ctx, CXL_PSL_TFC_An_A, 0);
+		return IRQ_HANDLED;
 	}
 	if (dsisr & CXL_PSL_DSISR_An_OC)
 		pr_devel("CXL interrupt: OS Context Warning\n");
drivers/misc/cxl/pci.c +41 -3

68 lines not on this page · raw message

drivers/misc/mei/init.c +2 -0
index 9306219d5675..6ad049a08e4d 100644
@@ -341,6 +341,8 @@ void mei_stop(struct mei_device *dev)
 
 	dev->dev_state = MEI_DEV_POWER_DOWN;
 	mei_reset(dev);
+	/* move device to disabled state unconditionally */
+	dev->dev_state = MEI_DEV_DISABLED;
 
 	mutex_unlock(&dev->device_lock);
 
drivers/net/ethernet/broadcom/genet/bcmgenet.c +92 -30

267 lines not on this page · raw message

drivers/net/ethernet/broadcom/genet/bcmgenet.h +2 -0
index b36ddec0cc0a..0d370d168aee 100644
@@ -520,6 +520,7 @@ struct bcmgenet_hw_params {
 
 struct bcmgenet_tx_ring {
 	spinlock_t	lock;		/* ring lock */
+	struct napi_struct napi;	/* NAPI per tx queue */
 	unsigned int	index;		/* ring index */
 	unsigned int	queue;		/* queue index */
 	struct enet_cb	*cbs;		/* tx ring buffer control block*/
@@ -534,6 +535,7 @@ struct bcmgenet_tx_ring {
 			   struct bcmgenet_tx_ring *);
 	void (*int_disable)(struct bcmgenet_priv *priv,
 			    struct bcmgenet_tx_ring *);
+	struct bcmgenet_priv *priv;
 };
 
 /* device context */
drivers/net/ethernet/realtek/r8169.c +4 -14
index 14a1c5cec3a5..2e2cf80e7135 100644
@@ -5067,8 +5067,6 @@ static void rtl_hw_reset(struct rtl8169_private *tp)
 	RTL_W8(ChipCmd, CmdReset);
 
 	rtl_udelay_loop_wait_low(tp, &rtl_chipcmd_cond, 100, 100);
-
-	netdev_reset_queue(tp->dev);
 }
 
 static void rtl_request_uncached_firmware(struct rtl8169_private *tp)
@@ -7089,8 +7087,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
 
 	txd->opts2 = cpu_to_le32(opts[1]);
 
-	netdev_sent_queue(dev, skb->len);
-
 	skb_tx_timestamp(skb);
 
 	/* Force memory writes to complete before releasing descriptor */
@@ -7192,7 +7188,6 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
 static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
 {
 	unsigned int dirty_tx, tx_left;
-	unsigned int bytes_compl = 0, pkts_compl = 0;
 
 	dirty_tx = tp->dirty_tx;
 	smp_rmb();
@@ -7216,8 +7211,10 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
 		rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb,
 				     tp->TxDescArray + entry);
 		if (status & LastFrag) {
-			pkts_compl++;
-			bytes_compl += tx_skb->skb->len;
+			u64_stats_update_begin(&tp->tx_stats.syncp);
+			tp->tx_stats.packets++;
+			tp->tx_stats.bytes += tx_skb->skb->len;
+			u64_stats_update_end(&tp->tx_stats.syncp);
 			dev_kfree_skb_any(tx_skb->skb);
 			tx_skb->skb = NULL;
 		}
@@ -7226,13 +7223,6 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
 	}
 
 	if (tp->dirty_tx != dirty_tx) {
-		netdev_completed_queue(tp->dev, pkts_compl, bytes_compl);
-
-		u64_stats_update_begin(&tp->tx_stats.syncp);
-		tp->tx_stats.packets += pkts_compl;
-		tp->tx_stats.bytes += bytes_compl;
-		u64_stats_update_end(&tp->tx_stats.syncp);
-
 		tp->dirty_tx = dirty_tx;
 		/* Sync with rtl8169_start_xmit:
 		 * - publish dirty_tx ring index (write barrier)
drivers/net/ethernet/renesas/sh_eth.c +3 -0
index 04283fe0e6a7..20f54d5f8409 100644
@@ -1392,6 +1392,9 @@ static void sh_eth_dev_exit(struct net_device *ndev)
 	msleep(2); /* max frame time at 10 Mbps < 1250 us */
 	sh_eth_get_stats(ndev);
 	sh_eth_reset(ndev);
+
+	/* Set MAC address again */
+	update_mac_address(ndev);
 }
 
 /* free Tx skb function */
drivers/net/macvtap.c +5 -2
index 919f4fccc322..4d050ee0f872 100644
@@ -654,11 +654,14 @@ static void macvtap_skb_to_vnet_hdr(struct macvtap_queue *q,
 	} /* else everything is zero */
 }
 
+/* Neighbour code has some assumptions on HH_DATA_MOD alignment */
+#define MACVTAP_RESERVE HH_DATA_OFF(ETH_HLEN)
+
 /* Get packet from user space buffer */
 static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
 				struct iov_iter *from, int noblock)
 {
-	int good_linear = SKB_MAX_HEAD(NET_IP_ALIGN);
+	int good_linear = SKB_MAX_HEAD(MACVTAP_RESERVE);
 	struct sk_buff *skb;
 	struct macvlan_dev *vlan;
 	unsigned long total_len = iov_iter_count(from);
@@ -722,7 +725,7 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
 			linear = macvtap16_to_cpu(q, vnet_hdr.hdr_len);
 	}
 
-	skb = macvtap_alloc_skb(&q->sk, NET_IP_ALIGN, copylen,
+	skb = macvtap_alloc_skb(&q->sk, MACVTAP_RESERVE, copylen,
 				linear, noblock, &err);
 	if (!skb)
 		goto err;
drivers/net/phy/phy.c +20 -3
index 767cd110f496..dc1f6f07326a 100644
@@ -236,6 +236,25 @@ static inline unsigned int phy_find_valid(unsigned int idx, u32 features)
 }
 
 /**
+ * phy_check_valid - check if there is a valid PHY setting which matches
+ *		     speed, duplex, and feature mask
+ * @speed: speed to match
+ * @duplex: duplex to match
+ * @features: A mask of the valid settings
+ *
+ * Description: Returns true if there is a valid setting, false otherwise.
+ */
+static inline bool phy_check_valid(int speed, int duplex, u32 features)
+{
+	unsigned int idx;
+
+	idx = phy_find_valid(phy_find_setting(speed, duplex), features);
+
+	return settings[idx].speed == speed && settings[idx].duplex == duplex &&
+		(settings[idx].setting & features);
+}
+
+/**
  * phy_sanitize_settings - make sure the PHY is set to supported speed and duplex
  * @phydev: the target phy_device struct
  *
@@ -1042,7 +1061,6 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
 		int eee_lp, eee_cap, eee_adv;
 		u32 lp, cap, adv;
 		int status;
-		unsigned int idx;
 
 		/* Read phy status to properly get the right settings */
 		status = phy_read_status(phydev);
@@ -1074,8 +1092,7 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
 
 		adv = mmd_eee_adv_to_ethtool_adv_t(eee_adv);
 		lp = mmd_eee_adv_to_ethtool_adv_t(eee_lp);
-		idx = phy_find_setting(phydev->speed, phydev->duplex);
-		if (!(lp & adv & settings[idx].setting))
+		if (!phy_check_valid(phydev->speed, phydev->duplex, lp & adv))
 			goto eee_exit_err;
 
 		if (clk_stop_enable) {
drivers/net/team/team.c +4 -6
index f7ff493f1e73..2c087efed473 100644
@@ -42,9 +42,7 @@
 
 static struct team_port *team_port_get_rcu(const struct net_device *dev)
 {
-	struct team_port *port = rcu_dereference(dev->rx_handler_data);
-
-	return team_port_exists(dev) ? port : NULL;
+	return rcu_dereference(dev->rx_handler_data);
 }
 
 static struct team_port *team_port_get_rtnl(const struct net_device *dev)
@@ -1738,11 +1736,11 @@ static int team_set_mac_address(struct net_device *dev, void *p)
 	if (dev->type == ARPHRD_ETHER && !is_valid_ether_addr(addr->sa_data))
 		return -EADDRNOTAVAIL;
 	memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
-	rcu_read_lock();
-	list_for_each_entry_rcu(port, &team->port_list, list)
+	mutex_lock(&team->lock);
+	list_for_each_entry(port, &team->port_list, list)
 		if (team->ops.port_change_dev_addr)
 			team->ops.port_change_dev_addr(team, port);
-	rcu_read_unlock();
+	mutex_unlock(&team->lock);
 	return 0;
 }
 
drivers/net/usb/plusb.c +5 -0
index 3d18bb0eee85..1bfe0fcaccf5 100644
@@ -134,6 +134,11 @@ static const struct usb_device_id	products [] = {
 }, {
 	USB_DEVICE(0x050d, 0x258a),     /* Belkin F5U258/F5U279 (PL-25A1) */
 	.driver_info =  (unsigned long) &prolific_info,
+}, {
+	USB_DEVICE(0x3923, 0x7825),     /* National Instruments USB
+					 * Host-to-Host Cable
+					 */
+	.driver_info =  (unsigned long) &prolific_info,
 },
 
 	{ },		// END
drivers/net/wireless/ath/ath5k/reset.c +1 -1
index a3399c4f13a9..b9b651ea9851 100644
@@ -478,7 +478,7 @@ ath5k_hw_wisoc_reset(struct ath5k_hw *ah, u32 flags)
 	regval = ioread32(reg);
 	iowrite32(regval | val, reg);
 	regval = ioread32(reg);
-	usleep_range(100, 150);
+	udelay(100);	/* NB: should be atomic */
 
 	/* Bring BB/MAC out of reset */
 	iowrite32(regval & ~val, reg);
drivers/of/of_pci.c +4 -0
index 88471d3d98cd..60dc36c865b5 100644
@@ -140,6 +140,7 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
 			unsigned char busno, unsigned char bus_max,
 			struct list_head *resources, resource_size_t *io_base)
 {
+	struct pci_host_bridge_window *window;
 	struct resource *res;
 	struct resource *bus_range;
 	struct of_pci_range range;
@@ -225,7 +226,10 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
 conversion_failed:
 	kfree(res);
 parse_failed:
+	list_for_each_entry(window, resources, list)
+		kfree(window->res);
 	pci_free_resource_list(resources);
+	kfree(bus_range);
 	return err;
 }
 EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources);
drivers/pinctrl/freescale/pinctrl-imx.c +1 -1
index 52f2b9404fe0..448f10986c28 100644
@@ -437,7 +437,7 @@ static void imx_pinconf_dbg_show(struct pinctrl_dev *pctldev,
 	const struct imx_pin_reg *pin_reg = &info->pin_regs[pin_id];
 	unsigned long config;
 
-	if (!pin_reg || !pin_reg->conf_reg) {
+	if (!pin_reg || pin_reg->conf_reg == -1) {
 		seq_printf(s, "N/A");
 		return;
 	}
drivers/pinctrl/freescale/pinctrl-imx25.c +137 -139

287 lines not on this page · raw message

drivers/scsi/be2iscsi/be_main.c +0 -1
index f3193406776c..9cc047bc763b 100644
@@ -586,7 +586,6 @@ static struct beiscsi_hba *beiscsi_hba_alloc(struct pci_dev *pcidev)
 			"beiscsi_hba_alloc - iscsi_host_alloc failed\n");
 		return NULL;
 	}
-	shost->dma_boundary = pcidev->dma_mask;
 	shost->max_id = BE2_MAX_SESSIONS;
 	shost->max_channel = 0;
 	shost->max_cmd_len = BEISCSI_MAX_CMD_LEN;
drivers/scsi/sg.c +3 -3
index 763bffe23517..dbf8e777d850 100644
@@ -546,7 +546,7 @@ static ssize_t
 sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp)
 {
 	sg_io_hdr_t *hp = &srp->header;
-	int err = 0;
+	int err = 0, err2;
 	int len;
 
 	if (count < SZ_SG_IO_HDR) {
@@ -575,8 +575,8 @@ sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp)
 		goto err_out;
 	}
 err_out:
-	err = sg_finish_rem_req(srp);
-	return (0 == err) ? count : err;
+	err2 = sg_finish_rem_req(srp);
+	return err ? : err2 ? : count;
 }
 
 static ssize_t
drivers/scsi/wd719x.c +1 -0
index 7702664d7ed3..289ad016d925 100644
@@ -870,6 +870,7 @@ fail_free_params:
 }
 
 static struct scsi_host_template wd719x_template = {
+	.module				= THIS_MODULE,
 	.name				= "Western Digital 719x",
 	.queuecommand			= wd719x_queuecommand,
 	.eh_abort_handler		= wd719x_abort,
drivers/staging/comedi/comedi_compat32.c +10 -2
index 5a4c74f703b3..03a2d0784419 100644
@@ -262,7 +262,7 @@ static int compat_cmd(struct file *file, unsigned long arg)
 {
 	struct comedi_cmd __user *cmd;
 	struct comedi32_cmd_struct __user *cmd32;
-	int rc;
+	int rc, err;
 
 	cmd32 = compat_ptr(arg);
 	cmd = compat_alloc_user_space(sizeof(*cmd));
@@ -271,7 +271,15 @@ static int compat_cmd(struct file *file, unsigned long arg)
 	if (rc)
 		return rc;
 
-	return translated_ioctl(file, COMEDI_CMD, (unsigned long)cmd);
+	rc = translated_ioctl(file, COMEDI_CMD, (unsigned long)cmd);
+	if (rc == -EAGAIN) {
+		/* Special case: copy cmd back to user. */
+		err = put_compat_cmd(cmd32, cmd);
+		if (err)
+			rc = err;
+	}
+
+	return rc;
 }
 
 /* Handle 32-bit COMEDI_CMDTEST ioctl. */
drivers/staging/comedi/drivers/cb_pcidas64.c +75 -47

321 lines not on this page · raw message

drivers/staging/iio/adc/mxs-lradc.c +105 -102

63 lines not on this page · raw message

drivers/target/target_core_pr.c +13 -12
index 283cf786ef98..2de6fb8cee8d 100644

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

drivers/target/target_core_sbc.c +14 -1
index cd4bed7b2757..36b471389169 100644

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

drivers/tty/serial/8250/8250_core.c +5 -6
index 11c66856ba2f..ea1a8dabd5dc 100644

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

drivers/tty/tty_io.c +2 -2
index 51f066aa375e..2bb4dfc02873 100644

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

drivers/tty/tty_ioctl.c +9 -3
index 1787fa4d9448..552076b25091 100644

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

drivers/usb/core/devio.c +2 -0
index 0b59731c3021..e500243803d8 100644

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

drivers/usb/dwc3/dwc3-omap.c +28 -2
index 172d64e585b6..52e0c4e5e48e 100644

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

drivers/usb/gadget/configfs.c +0 -2
index 75648145dc1b..c42765b3a060 100644

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

drivers/usb/host/xhci-pci.c +30 -0
index 7f76c8a12f89..fd53c9ebd662 100644

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

drivers/usb/host/xhci-plat.c +9 -10
index 08d402b15482..0e11d61408ff 100644

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

drivers/usb/host/xhci-ring.c +8 -2
index e692e769c50c..2a924d500d8a 100644

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

drivers/usb/host/xhci.h +7 -2
index cc7c5bb7cbcf..ab09b1ae5f83 100644

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

drivers/usb/serial/bus.c +11 -2
index 9374bd2aba20..6f91eb9ae81a 100644

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

drivers/usb/serial/cp210x.c +2 -0
index f40c856ff758..84ce2d74894c 100644

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

drivers/usb/serial/ftdi_sio.c +19 -0
index 1ebb351b9e9a..3086dec0ef53 100644

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

drivers/usb/serial/ftdi_sio_ids.h +23 -0
index e52409c9be99..56b1b55c4751 100644

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

drivers/usb/serial/generic.c +3 -2
index ccf1df7c4b80..54e170dd3dad 100644

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

drivers/usb/serial/mxuport.c +2 -1
index ab1d690274ae..460a40669967 100644

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

drivers/usb/serial/usb-serial.c +3 -2
index 475723c006f9..19842370a07f 100644

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

drivers/usb/storage/unusual_uas.h +7 -0
index dbc00e56c7f5..82570425fdfe 100644

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

fs/autofs4/dev-ioctl.c +6 -2
index aaf96cb25452..ac7d921ed984 100644

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

fs/autofs4/root.c +1 -1
index dbb5b7212ce1..7ba355b8d4ac 100644

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

fs/btrfs/file.c +28 -28

56 lines not on this page · raw message

fs/btrfs/inode.c +0 -1
index 8bf326affb94..35911f057a77 100644

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

fs/btrfs/ordered-data.c +2 -5
index 534544e08f76..157cc54fc634 100644

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

fs/btrfs/tree-log.c +1 -1
index f78e9dc5d574..069ab24badaa 100644

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

fs/debugfs/inode.c +17 -17
index 05f2960ed7c3..6f0ce531e221 100644

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

fs/ecryptfs/file.c +30 -4
index 6f4e659f508f..6058c7c996d6 100644

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

fs/gfs2/acl.c +1 -1
index 3088e2a38e30..7b3143064af1 100644

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

fs/nfs/delegation.c +1 -1
index 7f3f60641344..4030b558b07e 100644

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

fs/nfs/dir.c +6 -0
index 9b0c55cb2a2e..4ad7fff9ccaf 100644

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

fs/nfsd/nfs4state.c +1 -1
index c06a1ba80d73..1685b82a9ccd 100644

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

fs/nilfs2/btree.c +44 -3

47 lines not on this page · raw message

fs/proc/generic.c +0 -12
index 7fea13229f33..b502bba0f9fd 100644

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

fs/proc/inode.c +21 -0
index 8420a2f80811..3b0f8384ab21 100644

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

fs/proc/internal.h +1 -0
index 6fcdba573e0f..c835b94c0cd3 100644

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

include/drm/i915_pciids.h +2 -2
index 180ad0e6de21..d016dc57f007 100644

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

include/linux/usb/serial.h +1 -2
index 9bb547c7bce7..704a1ab8240c 100644

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

include/net/ipv6.h +0 -2
index 6e416f6d3e3c..fde3b593c3f2 100644

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

include/target/target_core_base.h +1 -1
index 4a8795a87b9e..672150b6aaf5 100644

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

include/trace/events/kmem.h +4 -3
index aece1346ceb7..4ad10baecd4d 100644

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

kernel/locking/rtmutex.c +2 -1
index 7c98873a3077..41d53e515914 100644

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

kernel/sched/auto_group.c +1 -5
index 8a2e230fb86a..eae160dd669d 100644

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

kernel/sched/core.c +11 -0
index 5eab11d4b747..44dfc8b46bd0 100644

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

kernel/sysctl.c +0 -3
index 137c7f69b264..88ea2d6e0031 100644

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

mm/compaction.c +4 -2
index 546e571e9d60..91357ff6d3a8 100644

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

mm/hugetlb.c +59 -19

78 lines not on this page · raw message

mm/memory-failure.c +0 -2
index feb803bf3443..20c29ddff17b 100644

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

mm/memory.c +1 -1
index 2c3536cc6c63..6aa7822bb64d 100644

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

mm/mmap.c +2 -2
index 7f684d5a8087..e5cc3ca1d869 100644

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

mm/nommu.c +3 -5
index 28bd8c4dff6f..ae5baae8e212 100644

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

mm/page_alloc.c +13 -8
index 8e20f9c2fa5a..8bbef06de720 100644

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

mm/vmstat.c +1 -1
index 1284f89fca08..cdac77398880 100644

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

net/compat.c +0 -9
index 3236b4167a32..94d3d5e97883 100644

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

net/core/dev.c +1 -1
index 7fe82929f509..4ff46f8054d4 100644

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

net/core/flow.c +1 -1
index a0348fde1fdf..1033725be40b 100644

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

net/core/gen_stats.c +14 -1
index 0c08062d1796..1e2f46a69d50 100644

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

net/core/pktgen.c +11 -8
index da934fc3faa8..352d183ecba3 100644

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

net/core/rtnetlink.c +17 -17
index 446cbaf81185..76ec6c52e3a3 100644

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

net/core/skbuff.c +3 -2
index 395c15b82087..62c67bebcaf5 100644

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

net/ipv4/ip_fragment.c +7 -4
index e5b6d0ddcb58..145a50c4d566 100644

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

net/ipv4/ip_output.c +2 -1
index c373c0708d97..2e2f687ef8a2 100644

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

net/ipv4/ping.c +10 -2
index 2a3720fb5a5f..0ae28f517a9b 100644

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

net/ipv4/tcp_fastopen.c +24 -8
index 815c85e3b1e0..c73077280ad4 100644

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

net/ipv6/addrconf.c +17 -0
index f7c8bbeb27b7..dac94195a4b9 100644

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

net/ipv6/ip6_output.c +2 -1
index d28f2a2efb32..3f5aa9959076 100644

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

net/ipv6/output_core.c +3 -2
index 54520a0bd5e3..74581f706c4d 100644

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

net/ipv6/ping.c +3 -2
index 2d3148378a1f..fe7e3e403499 100644

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

net/ipv6/route.c +1 -1
index 495965358d22..1528d8404cd2 100644

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

net/irda/ircomm/ircomm_tty.c +3 -1
index 40695b9751c1..4efe486baee6 100644

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

net/mac80211/mlme.c +2 -2
index 837a406a9dd6..bf4b84ff1c70 100644

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

net/mac80211/tx.c +1 -0
index 058686a721a1..097821b1c9ca 100644

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

net/netfilter/xt_recent.c +17 -47

64 lines not on this page · raw message

net/openvswitch/datapath.c +43 -2

45 lines not on this page · raw message

net/openvswitch/vport.h +2 -0
index 99c8e71d9e6c..8a057d7a86b6 100644

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

net/sched/ematch.c +1 -0
index 6742200b1307..fbb7ebfc58c6 100644

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

net/sunrpc/backchannel_rqst.c +4 -1
index 651f49ab601f..9dd0ea8db463 100644

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

net/sunrpc/cache.c +1 -1
index 33fb105d4352..5199bb1a017e 100644

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

sound/core/pcm_native.c +2 -0
index 095d9572ad2b..64d9863d6565 100644

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

sound/firewire/amdtp.c +1 -2
index 0d580186ef1a..911341b2a897 100644

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

sound/firewire/bebob/bebob.c +16 -4
index fc19c99654aa..611b7dae7ee5 100644

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

sound/firewire/bebob/bebob_stream.c +4 -12
index 0ebcabfdc7ce..98e4fc8121a1 100644

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

sound/firewire/dice/dice-stream.c +12 -6
index fa9cf761b610..07dbd01d7a6b 100644

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

sound/firewire/dice/dice.c +11 -5
index 90d8f40ff727..70a111d7f428 100644

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

sound/firewire/fireworks/fireworks.c +14 -6
index 3e2ed8e82cbc..2682e7e3e5c9 100644

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

sound/firewire/fireworks/fireworks_stream.c +10 -9
index 4f440e163667..c55db1bddc80 100644

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

sound/firewire/oxfw/oxfw-stream.c +7 -4
index bda845afb470..e6757cd85724 100644

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

sound/firewire/oxfw/oxfw.c +14 -7
index 60e5cad0531a..8c6ce019f437 100644

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

sound/pci/hda/hda_controller.c +0 -5
index 0cfc9c8c4b4e..c2aa3cd844e5 100644

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

sound/pci/hda/hda_intel.c +1 -1
index d426a0bd6a5f..84bed149a41a 100644

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

sound/pci/hda/patch_realtek.c +7 -0
index 0c993f7f9181..d3e2fc700c5d 100644

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

sound/pci/hda/patch_sigmatel.c +16 -1
index 6d36c5b78805..87eff3173ce9 100644

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

sound/soc/codecs/rt5670.c +0 -1
index 1e574c85b9c8..f4b869c638cc 100644

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

sound/soc/omap/omap-pcm.c +1 -1
index f4b05bc23e4b..1343ecbf0bd5 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.