4.2.1-stable review
Greg Kroah-Hartman
maintainercover 4.2.1-stable review
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.2.1-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.2.1-rc1
Kees Cook <[email protected]>
fs: create and use seq_show_option for escaping
Tang Chen <[email protected]>
memory-hotplug: add hot-added memory ranges to memblock before allocate node_data for a node.
Ryan Ding <[email protected]>
ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio
Mikulas Patocka <[email protected]>
hpfs: update ctime and mtime on directory modification
Eric W. Biederman <[email protected]>
fs: Set the size of empty dirs to 0.
Joe Thornber <[email protected]>
dm cache: fix leaking of deferred bio prison cells
Mikulas Patocka <[email protected]>
dm stats: report precise_timestamps and histogram in @stats_list output
Grant Likely <[email protected]>
drivercore: Fix unregistration path of platform devices
Jiang Liu <[email protected]>
ACPI, PCI: Penalize legacy IRQ used by ACPI SCI
Heiko Stuebner <[email protected]>
ARM: dts: rockchip: fix rk3288 watchdog irq
Caesar Wang <[email protected]>
ARM: rockchip: fix the CPU soft reset
Vignesh R <[email protected]>
ARM: OMAP2+: DRA7: clockdomain: change l4per2_7xx_clkdm to SW_WKUP
Hyungwon Hwang <[email protected]>
ARM: dts: fix clock-frequency of display timing0 for exynos3250-rinato
Benjamin Cama <[email protected]>
ARM: orion5x: fix legacy orion5x IRQ numbers
Sudeep Holla <[email protected]>
ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary
David Daney <[email protected]>
of/address: Don't loop forever in of_find_matching_node_by_address().
Thierry Reding <[email protected]>
soc/tegra: pmc: Avoid usage of uninitialized variable
Xie XiuQi <[email protected]>
x86/mce: Reenable CMCI banks when swiching back to interrupt mode
Kishon Vijay Abraham I <[email protected]>
regulator: pbias: Fix broken pbias disable functionality
Sudip Mukherjee <[email protected]>
auxdisplay: ks0108: fix refcount
Ricardo Ribalda Delgado <[email protected]>
spi/spi-xilinx: Fix mixed poll/irq mode
Ricardo Ribalda Delgado <[email protected]>
spi/spi-xilinx: Fix spurious IRQ ACK on irq mode
Peter Chen <[email protected]>
Doc: ABI: testing: configfs-usb-gadget-sourcesink
Peter Chen <[email protected]>
Doc: ABI: testing: configfs-usb-gadget-loopback
Masahiro Yamada <[email protected]>
devres: fix devres_get()
Max Filippov <[email protected]>
xtensa: fix kernel register spilling
Max Filippov <[email protected]>
xtensa: fix threadptr reload on return to userspace
Paul Mackerras <[email protected]>
KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTE
Gautham R. Shenoy <[email protected]>
KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set
Xiao Guangrong <[email protected]>
KVM: MMU: fix validation of mmio page fault
Ellen Wang <[email protected]>
HID: cp2112: fix I2C_SMBUS_BYTE write
Ellen Wang <[email protected]>
HID: cp2112: fix byte order in SMBUS operations
Don Zickus <[email protected]>
HID: usbhid: Fix the check for HID_RESET_PENDING in hid_io_error
Andrey Ryabinin <[email protected]>
crypto: ghash-clmulni: specify context size for ghash async algorithm
Leonidas Da Silva Barbosa <[email protected]>
crypto: vmx - Fixing GHASH Key issue on little endian
Leonidas Da Silva Barbosa <[email protected]>
crypto: vmx - Fixing AES-CTR counter bug
Robert Baldyga <[email protected]>
serial: samsung: fix DMA for FIFO smaller than cache line size
Marek Szyprowski <[email protected]>
serial: samsung: fix DMA mode enter condition for small FIFO sizes
Adam Lee <[email protected]>
serial: 8250_pci: Add support for Pericom PI7C9X795[1248]
Maciej S. Szmigiero <[email protected]>
serial: 8250: bind to ALi Fast Infrared Controller (ALI5123)
Maciej S. Szmigiero <[email protected]>
serial: 8250: don't bind to SMSC IrCC IR port
Charles Keepax <[email protected]>
ASoC: arizona: Poll for FLL clock OK rather than use interrupts
Nikesh Oswal <[email protected]>
ASoC: arizona: Fix gain settings of FLL in free-run mode
Axel Lin <[email protected]>
ASoC: adav80x: Remove .read_flag_mask setting from adav80x_regmap_config
Vaishali Thakkar <[email protected]>
ASoC: samsung: Remove redundant arndale_audio_remove
Oder Chiou <[email protected]>
ASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platform
John Lin <[email protected]>
ASoC: rt5640: fix line out no sound issue
Johannes Thumshirn <[email protected]>
tty: serial: men_z135_uart.c: Fix race between IRQ and set_termios()
Peter Chen <[email protected]>
usb: host: ehci-sys: delete useless bus_to_hcd conversion
Peter Chen <[email protected]>
usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth
Kishon Vijay Abraham I <[email protected]>
usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes
Peter Chen <[email protected]>
doc: usb: gadget-testing: using the updated testusb.c
Dan Carpenter <[email protected]>
usb: gadget: m66592-udc: forever loop in set_feature()
David Jeffery <[email protected]>
xfs: return errors from partial I/O failures to files
Jan Kara <[email protected]>
xfs: Fix file type directory corruption for btree directories
Jan Kara <[email protected]>
xfs: Fix xfs_attr_leafblock definition
Darrick J. Wong <[email protected]>
libxfs: readahead of dir3 data blocks should use the read verifier
Michał Pecio <[email protected]>
USB: pl2303: fix baud-rate divisor calculations
Matthijs Kooijman <[email protected]>
USB: ftdi_sio: Added custom PID for CustomWare products
David Ward <[email protected]>
USB: qcserial: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module
Philipp Hachtmann <[email protected]>
USB: symbolserial: Use usb_get_serial_port_data
Michael van der Westhuizen <[email protected]>
spi: dw: Allow interface drivers to limit data I/O to word sizes
Sebastian Reichel <[email protected]>
spi: omap2-mcspi: add runtime PM to set_cs()
Sifan Naeem <[email protected]>
spi: img-spfi: fix kbuild test robot warning
Sifan Naeem <[email protected]>
spi: img-spfi: fix multiple calls to request gpio
Sifan Naeem <[email protected]>
spi: img-spfi: check for timeout error before proceeding
Koji Matsuoka <[email protected]>
spi: sh-msiof: Fix FIFO size to 64 word from 256 word
Nadav Haklai <[email protected]>
spi: orion: On a38x, implement "50MHZ SPI AC timing" Erratum No. FE-9144572
Lars Persson <[email protected]>
spi: Fix regression in spi-bitbang-txrx.h
Martin Sperl <[email protected]>
spi: bcm2835: set up spi-mode before asserting cs-gpio
Sebastian Andrzej Siewior <[email protected]>
tty: serial: 8250_omap: do not use RX DMA if pause is not supported
Masahiro Yamada <[email protected]>
serial: 8250_uniphier: call clk_disable_unprepare() on failure path
Zhang Rui <[email protected]>
PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI
Mark Rustad <[email protected]>
PCI: Add VPD function 0 quirk for Intel Ethernet devices
Mark Rustad <[email protected]>
PCI: Add dev_flags bit to access VPD through function 0
Bjorn Helgaas <[email protected]>
PCI: Fix TI816X class code quirk
Georgi Djakov <[email protected]>
clk: qcom: Fix MSM8916 prng clock enable bit
Stephen Boyd <[email protected]>
clk: qcom: Set CLK_SET_RATE_PARENT on ce1 clocks
Robert Jarzmik <[email protected]>
clk: pxa: fix core frequency reporting unit
Dan Carpenter <[email protected]>
clk: versatile: off by one in clk_sp810_timerclken_of_get()
Damien.Horsley <[email protected]>
clk: pistachio: correct critical clock list
Zdenko Pulitika <[email protected]>
clk: pistachio: Fix PLL rate calculation in integer mode
Zdenko Pulitika <[email protected]>
clk: pistachio: Fix override of clk-pll settings from boot loader
Zdenko Pulitika <[email protected]>
clk: pistachio: Fix 32bit integer overflows
Marek Szyprowski <[email protected]>
clk: s5pv210: add missing call to samsung_clk_of_add_provider()
Krzysztof Kozlowski <[email protected]>
clk: exynos4: Fix wrong clock for Exynos4x12 ADC
Heiko Stuebner <[email protected]>
clk: rockchip: rk3288: add CLK_SET_RATE_PARENT to sclk_mac
Colin Ian King <[email protected]>
PM / clk: don't return int on __pm_clk_enable()
David Kershner <[email protected]>
staging: unisys: Allow visorbus to autoload
Ian Abbott <[email protected]>
staging: comedi: usbduxsigma: don't clobber ao_timer in command test
Ian Abbott <[email protected]>
staging: comedi: usbduxsigma: don't clobber ai_timer in command test
Ian Abbott <[email protected]>
staging: comedi: adl_pci7x3x: fix digital output on PCI-7230
Mateusz Kulikowski <[email protected]>
staging: rtl8192e: Fix log spamming in rtl8192_hard_data_xmit
Jan H. Schönherr <[email protected]>
sched: Fix cpu_active_mask/cpu_online_mask race
Hartmut Knaack <[email protected]>
iio:accel:mma8452: fix _get_hp_filter_index
Lars-Peter Clausen <[email protected]>
iio: adis16480: Fix scale factors
Lars-Peter Clausen <[email protected]>
iio: Add inverse unit conversion macros
Lars-Peter Clausen <[email protected]>
iio: adis16400: Fix adis16448 gyroscope scale
Cristina Opriceana <[email protected]>
iio: industrialio-buffer: Fix iio_buffer_poll return value
Cristina Opriceana <[email protected]>
iio: event: Remove negative error code from iio_event_poll
Markus Pargmann <[email protected]>
iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required
Martin Schwidefsky <[email protected]>
s390/setup: fix novx parameter
Takashi Iwai <[email protected]>
drm/i915: Fix CSR MMIO address check
Chris Wilson <[email protected]>
drm/i915: Limit the number of loops for reading a split 64bit register
Chris Wilson <[email protected]>
drm/i915: Always mark the object as dirty when used by the GPU
Gaurav K Singh <[email protected]>
drm/i915: Allow DSI dual link to be configured on any pipe
Jonathon Jongsma <[email protected]>
drm/qxl: validate monitors config modes
Lukas Wunner <[email protected]>
drm/i915: Preserve SSC earlier
Alex Deucher <[email protected]>
drm/amdgpu: fix typo in dce10 watermark setup
Alex Deucher <[email protected]>
drm/amdgpu: fix typo in dce11 watermark setup
Alex Deucher <[email protected]>
drm/amdgpu: fix IH ring allocation for bus addresses (v2)
Alex Deucher <[email protected]>
drm/amdgpu: Don't link train DisplayPort on HPD until we get the dpcd
Jammy Zhou <[email protected]>
drm/amdgpu: fix one warning message
Alex Deucher <[email protected]>
drm/radeon: fix HDMI quantization_range for pre-DCE5 asics
Alex Deucher <[email protected]>
drm/radeon/native: Send out the full AUX address
Alex Deucher <[email protected]>
drm/amdgpu/atom: Send out the full AUX address
Ville Syrjälä <[email protected]>
drm/radeon/atom: Send out the full AUX address
Ville Syrjälä <[email protected]>
drm/i915: Check DP link status on long hpd too
Imre Deak <[email protected]>
drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6
Stephen Chandler Paul <[email protected]>
DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd
-------------
Diffstat:
.../ABI/testing/configfs-usb-gadget-loopback | 2 +- .../ABI/testing/configfs-usb-gadget-sourcesink | 2 +- Documentation/device-mapper/statistics.txt | 4 ++ Documentation/usb/gadget-testing.txt | 7 +- Makefile | 4 +- arch/arm/Kconfig | 1 + arch/arm/boot/dts/exynos3250-rinato.dts | 2 +- arch/arm/boot/dts/rk3288.dtsi | 2 +- arch/arm/mach-bcm/bcm63xx_smp.c | 2 +- arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- arch/arm/mach-orion5x/include/mach/irqs.h | 64 ++++++++--------- arch/arm/mach-orion5x/irq.c | 4 +- arch/arm/mach-rockchip/platsmp.c | 40 ++++++----- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 18 +++-- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 + arch/s390/kernel/setup.c | 15 ++-- arch/x86/crypto/ghash-clmulni-intel_glue.c | 1 + arch/x86/kernel/acpi/boot.c | 1 + arch/x86/kernel/cpu/mcheck/mce_intel.c | 41 ++++++----- arch/x86/kvm/mmu.c | 45 ------------ arch/xtensa/include/asm/traps.h | 29 +++++--- arch/xtensa/kernel/entry.S | 7 +- drivers/acpi/acpi_pnp.c | 1 + drivers/acpi/pci_link.c | 16 +++++ drivers/ata/ahci.c | 13 +--- drivers/ata/pata_jmicron.c | 12 ---- drivers/auxdisplay/ks0108.c | 1 + drivers/base/devres.c | 4 +- drivers/base/platform.c | 8 +-- drivers/base/power/clock_ops.c | 4 +- drivers/clk/pistachio/clk-pistachio.c | 19 +++-- drivers/clk/pistachio/clk-pll.c | 77 +++++++++++++++----- drivers/clk/pistachio/clk.h | 14 ++-- drivers/clk/pxa/clk-pxa25x.c | 2 +- drivers/clk/pxa/clk-pxa27x.c | 2 +- drivers/clk/pxa/clk-pxa3xx.c | 2 +- drivers/clk/qcom/gcc-apq8084.c | 1 + drivers/clk/qcom/gcc-msm8916.c | 2 +- drivers/clk/qcom/gcc-msm8974.c | 1 + drivers/clk/rockchip/clk-rk3288.c | 2 +- drivers/clk/samsung/clk-exynos4.c | 2 + drivers/clk/samsung/clk-s5pv210.c | 2 + drivers/clk/versatile/clk-sp810.c | 4 +- drivers/crypto/vmx/aes_ctr.c | 8 ++- drivers/crypto/vmx/aesp8-ppc.pl | 34 ++++----- drivers/crypto/vmx/ghashp8-ppc.pl | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 5 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 20 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 15 ++-- drivers/gpu/drm/i915/i915_drv.h | 10 +-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/intel_csr.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 29 +++++--- drivers/gpu/drm/i915/intel_dp.c | 11 ++- drivers/gpu/drm/i915/intel_dsi.c | 9 ++- drivers/gpu/drm/qxl/qxl_display.c | 66 ++++++++++------- drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/radeon/atombios_dp.c | 5 +- drivers/gpu/drm/radeon/radeon_audio.c | 16 +++-- drivers/gpu/drm/radeon/radeon_connectors.c | 5 ++ drivers/gpu/drm/radeon/radeon_dp_auxch.c | 4 +- drivers/hid/hid-cp2112.c | 10 +-- drivers/hid/usbhid/hid-core.c | 2 +- drivers/iio/accel/mma8452.c | 2 +- drivers/iio/gyro/Kconfig | 3 +- drivers/iio/imu/adis16400_core.c | 2 +- drivers/iio/imu/adis16480.c | 39 ++++++++-- drivers/iio/industrialio-buffer.c | 2 +- drivers/iio/industrialio-event.c | 2 +- drivers/md/dm-cache-target.c | 4 ++ drivers/md/dm-stats.c | 14 +++- drivers/of/address.c | 6 +- drivers/pci/access.c | 61 +++++++++++++++- drivers/pci/quirks.c | 30 +++++++- drivers/regulator/pbias-regulator.c | 5 ++ drivers/soc/tegra/pmc.c | 4 +- drivers/spi/spi-bcm2835.c | 28 ++++++-- drivers/spi/spi-bitbang-txrx.h | 4 +- drivers/spi/spi-dw-mmio.c | 3 + drivers/spi/spi-dw.c | 4 +- drivers/spi/spi-dw.h | 35 +++++++++ drivers/spi/spi-img-spfi.c | 59 ++++++++++++---- drivers/spi/spi-omap2-mcspi.c | 10 +++ drivers/spi/spi-orion.c | 54 +++++++++++++- drivers/spi/spi-sh-msiof.c | 15 ++-- drivers/spi/spi-xilinx.c | 20 ++++-- drivers/staging/comedi/drivers/adl_pci7x3x.c | 16 ++++- drivers/staging/comedi/drivers/usbduxsigma.c | 70 ++++++++---------- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 +- drivers/staging/unisys/visorbus/visorchipset.c | 3 + drivers/tty/serial/8250/8250_omap.c | 14 +++- drivers/tty/serial/8250/8250_pci.c | 82 ++++++++++++++++------ drivers/tty/serial/8250/8250_pnp.c | 11 +++ drivers/tty/serial/8250/8250_uniphier.c | 1 + drivers/tty/serial/men_z135_uart.c | 9 ++- drivers/tty/serial/samsung.c | 47 ++++++++----- drivers/tty/serial/samsung.h | 1 + drivers/usb/dwc3/ep0.c | 12 +++- drivers/usb/gadget/function/f_uac2.c | 31 +++++++- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/host/ehci-sysfs.c | 8 +-- drivers/usb/serial/ftdi_sio.c | 4 ++ drivers/usb/serial/ftdi_sio_ids.h | 8 +++ drivers/usb/serial/pl2303.c | 35 ++++++--- drivers/usb/serial/qcserial.c | 1 + drivers/usb/serial/symbolserial.c | 6 +- fs/ceph/super.c | 2 +- fs/cifs/cifsfs.c | 6 +- fs/ext4/super.c | 4 +- fs/gfs2/super.c | 6 +- fs/hfs/super.c | 4 +- fs/hfsplus/options.c | 4 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hpfs/namei.c | 25 ++++++- fs/libfs.c | 2 +- fs/ocfs2/file.c | 28 ++++---- fs/ocfs2/super.c | 4 +- fs/overlayfs/super.c | 6 +- fs/reiserfs/super.c | 8 ++- fs/xfs/libxfs/xfs_da_format.h | 11 ++- fs/xfs/libxfs/xfs_dir2_data.c | 3 +- fs/xfs/libxfs/xfs_dir2_node.c | 10 ++- fs/xfs/xfs_aops.c | 3 +- fs/xfs/xfs_super.c | 4 +- include/linux/acpi.h | 2 +- include/linux/iio/iio.h | 17 +++++ include/linux/pci.h | 2 + include/linux/seq_file.h | 35 +++++++++ include/uapi/linux/dm-ioctl.h | 4 +- kernel/cgroup.c | 7 +- kernel/sched/core.c | 8 +++ mm/memory_hotplug.c | 10 ++- net/ceph/ceph_common.c | 7 +- security/selinux/hooks.c | 2 +- sound/soc/codecs/adav80x.c | 1 - sound/soc/codecs/arizona.c | 49 ++++++------- sound/soc/codecs/arizona.h | 1 - sound/soc/codecs/rt5640.c | 40 ++++++++++- sound/soc/codecs/rt5645.c | 7 ++ sound/soc/samsung/arndale_rt5631.c | 10 --- 144 files changed, 1255 insertions(+), 604 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 9/120 drm/amdgpu: Dont link train DisplayPort on HPD until we get the dpcd
4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit a887adadb7b9ef9eb4ee48e4ad575aefcfd1db14 upstream.
This is a port of:
DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd to amdgpu.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +5 -0
@@ -75,6 +75,11 @@ void amdgpu_connector_hotplug(struct drmif (!amdgpu_display_hpd_sense (adev, amdgpu_connector->hpd.hpd)) {drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); }else if (amdgpu_atombios_dp_needs_link_train (amdgpu_connector)) { +/* Don't try to start link training before we +* have the dpcd */ +if (!amdgpu_atombios_dp_get_dpcd (amdgpu_connector)) +return ; +/* set it to OFF so that drm_helper_connector_dpms() * won't return immediately since the current state * is ON at this point.
Greg Kroah-Hartman
maintainerPATCH 13/120 drm/i915: Preserve SSC earlier
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <[email protected]>
commit 69f92f67b68ab7028ffe15f0eea76b59f8859383 upstream.
Commit 92122789b2d6 ("drm/i915: preserve SSC if previously set v3") added code to intel_modeset_gem_init to override the SSC status read from VBT with the SSC status set by BIOS.
However, intel_modeset_gem_init is invoked *after* intel_modeset_init, which calls intel_setup_outputs, which *modifies* SSC status by way of intel_init_pch_refclk. So unlike advertised, intel_modeset_gem_init doesn't preserve the SSC status set by BIOS but whatever intel_init_pch_refclk decided on.
This is a problem on dual gpu laptops such as the MacBook Pro which require either a handler to switch DDC lines, or the discrete gpu to proxy DDC/AUX communication: Both the handler and the discrete gpu may initialize after the i915 driver, and consequently, an LVDS connector may initially seem disconnected and the SSC therefore is disabled by intel_init_pch_refclk, but on reprobe the connector may turn out to be connected and the SSC must then be enabled.
Due to 92122789b2d6 however, the SSC is not enabled on reprobe since it is assumed BIOS disabled it while in fact it was disabled by intel_init_pch_refclk.
Also, because the SSC status is preserved so late, the preserved value only ever gets used on resume but not on panel initialization:intel_modeset_init calls intel_init_display which indirectly calls intel_panel_use_ssc via multiple subroutines, *before* the BIOS value overrides the VBT value in intel_modeset_gem_init (intel_panel_use_ssc is the sole user of dev_priv->vbt.lvds_use_ssc).
Fix this by moving the code introduced by 92122789b2d6 from intel_modeset_gem_init to intel_modeset_init before the invocation of intel_setup_outputs and intel_init_display.
Add a DRM_DEBUG_KMS as suggested way back by Jani:
http://lists.freedesktop.org/archives/intel-gfx/2014-June/046666.html
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115
[MBP 6,2 2010 intel ILK + nvidia GT216 pre-retina]
[MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina]
--- drivers/gpu/drm/i915/intel_display.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_display.c +18 -11
@@ -14665,6 +14665,24 @@ void intel_modeset_init(struct drm_devicif (INTEL_INFO (dev)->num_pipes ==0 )return ; +/* +* There may be no VBT; and if the BIOS enabled SSC we can +* just keep using it to avoid unnecessary flicker. Whereas if the +* BIOS isn't using it, don't assume it will work even if the VBT +* indicates as much. +*/ +if (HAS_PCH_IBX (dev) ||HAS_PCH_CPT (dev)) { +bool bios_lvds_use_ssc = !!(I915_READ (PCH_DREF_CONTROL ) & +DREF_SSC1_ENABLE ); + +if (dev_priv->vbt.lvds_use_ssc != bios_lvds_use_ssc) { +DRM_DEBUG_KMS ("SSC %sabled by BIOS, overriding VBT which says %sabled\n" , + bios_lvds_use_ssc ?"en" :"dis" , + dev_priv->vbt.lvds_use_ssc ?"en" :"dis" ); + dev_priv->vbt.lvds_use_ssc = bios_lvds_use_ssc; + } + } +intel_init_display (dev);intel_init_audio (dev);
@@ -15160,7 +15178,6 @@ void intel_modeset_setup_hw_state(structvoid intel_modeset_gem_init (struct drm_device *dev) { -struct drm_i915_private *dev_priv = dev->dev_private;struct drm_crtc *c;struct drm_i915_gem_object *obj;int ret;
@@ -15169,16 +15186,6 @@ void intel_modeset_gem_init(struct drm_dintel_init_gt_powersave (dev);mutex_unlock (&dev->struct_mutex); -/* -* There may be no VBT; and if the BIOS enabled SSC we can -* just keep using it to avoid unnecessary flicker. Whereas if the -* BIOS isn't using it, don't assume it will work even if the VBT -* indicates as much. -*/ -if (HAS_PCH_IBX (dev) ||HAS_PCH_CPT (dev)) - dev_priv->vbt.lvds_use_ssc = !!(I915_READ (PCH_DREF_CONTROL ) & -DREF_SSC1_ENABLE ); -intel_modeset_init_hw (dev);intel_setup_overlay (dev);
Greg Kroah-Hartman
maintainerPATCH 14/120 drm/qxl: validate monitors config modes
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonathon Jongsma <[email protected]>
commit bd3e1c7c6de9f5f70d97cdb6c817151c0477c5e3 upstream.
Due to some recent changes in drm_helper_probe_single_connector_modes_merge_bits(), old custom modes were not being pruned properly. In current kernels, drm_mode_validate_basic() is called to sanity-check each mode in the list. If the sanity-check passes, the mode's status gets set to to MODE_OK. In older kernels this check was not done, so old custom modes would still have a status of MODE_UNVERIFIED at this point, and would therefore be pruned later in the function.
As a result of this new behavior, the list of modes for a device always includes every custom mode ever configured for the device, with the largest one listed first. Since desktop environments usually choose the first preferred mode when a hotplug event is emitted, this had the result of making it very difficult for the user to reduce the size of the display.
The qxl driver did implement the mode_valid connector function, but it was empty. In order to restore the old behavior where old custom modes are pruned, we implement a proper mode_valid function for the qxl driver. This function now checks each mode against the last configured custom mode and the list of standard modes. If the mode doesn't match any of these, its status is set to MODE_BAD so that it will be pruned as expected.
--- drivers/gpu/drm/qxl/qxl_display.c | 66 +++++++++++++++++++++++--------------- drivers/gpu/drm/qxl/qxl_drv.h | 2 + 2 files changed, 42 insertions(+), 26 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +40 -26
@@ -160,9 +160,35 @@ static int qxl_add_monitors_config_modes *pwidth = head->width; *pheight = head->height;drm_mode_probed_add (connector, mode); +/* remember the last custom size for mode validation */ + qdev->monitors_config_width = mode->hdisplay; + qdev->monitors_config_height = mode->vdisplay;return 1 ; } +static struct mode_size { +int w; +int h; +} common_modes[] = { + {640 ,480 }, + {720 ,480 }, + {800 ,600 }, + {848 ,480 }, + {1024 ,768 }, + {1152 ,768 }, + {1280 ,720 }, + {1280 ,800 }, + {1280 ,854 }, + {1280 ,960 }, + {1280 ,1024 }, + {1440 ,900 }, + {1400 ,1050 }, + {1680 ,1050 }, + {1600 ,1200 }, + {1920 ,1080 }, + {1920 ,1200 } +}; +static int qxl_add_common_modes (struct drm_connector *connector,unsigned pwidth,unsigned pheight)
@@ -170,29 +196,6 @@ static int qxl_add_common_modes(struct dstruct drm_device *dev = connector->dev;struct drm_display_mode *mode =NULL ;int i; -struct mode_size { -int w; -int h; - } common_modes[] = { - {640 ,480 }, - {720 ,480 }, - {800 ,600 }, - {848 ,480 }, - {1024 ,768 }, - {1152 ,768 }, - {1280 ,720 }, - {1280 ,800 }, - {1280 ,854 }, - {1280 ,960 }, - {1280 ,1024 }, - {1440 ,900 }, - {1400 ,1050 }, - {1680 ,1050 }, - {1600 ,1200 }, - {1920 ,1080 }, - {1920 ,1200 } - }; -for (i =0 ; i <ARRAY_SIZE (common_modes); i++) { mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h,60 , false, false, false);
@@ -823,11 +826,22 @@ static int qxl_conn_get_modes(struct drmstatic int qxl_conn_mode_valid (struct drm_connector *connector,struct drm_display_mode *mode) { +struct drm_device *ddev = connector->dev; +struct qxl_device *qdev = ddev->dev_private; +int i; +/* TODO: is this called for user defined modes? (xrandr --add-mode) * TODO: check that the mode fits in the framebuffer */ -DRM_DEBUG ("%s: %dx%d status=%d\n" , mode->name, mode->hdisplay, - mode->vdisplay, mode->status); -return MODE_OK ; + +if (qdev->monitors_config_width == mode->hdisplay && + qdev->monitors_config_height == mode->vdisplay) +return MODE_OK ; + +for (i =0 ; i <ARRAY_SIZE (common_modes); i++) { +if (common_modes[i].w == mode->hdisplay && common_modes[i].h == mode->vdisplay) +return MODE_OK ; + } +return MODE_BAD ; }static struct drm_encoder *qxl_best_encoder (struct drm_connector *connector)
drivers/gpu/drm/qxl/qxl_drv.h +2 -0
@@ -325,6 +325,8 @@ struct qxl_device {struct work_struct fb_work;struct drm_property *hotplug_mode_update_property; +int monitors_config_width; +int monitors_config_height; };/* forward declaration for QXL_INFO_IO */
Greg Kroah-Hartman
maintainerPATCH 25/120 iio: adis16480: Fix scale factors
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <[email protected]>
commit 7abad1063deb0f77d275c61f58863ec319c58c5c upstream.
The different devices support by the adis16480 driver have slightly different scales for the gyroscope and accelerometer channels.
--- drivers/iio/imu/adis16480.c | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-)
drivers/iio/imu/adis16480.c +33 -6
@@ -110,6 +110,10 @@struct adis16480_chip_info {unsigned int num_channels;const struct iio_chan_spec *channels; +unsigned int gyro_max_val; +unsigned int gyro_max_scale; +unsigned int accel_max_val; +unsigned int accel_max_scale; };struct adis16480 {
@@ -497,19 +501,21 @@ static int adis16480_set_filter_freq(strstatic int adis16480_read_raw (struct iio_dev *indio_dev,const struct iio_chan_spec *chan,int *val,int *val2,long info) { +struct adis16480 *st =iio_priv (indio_dev); +switch (info) {case IIO_CHAN_INFO_RAW :return adis_single_conversion (indio_dev, chan,0 , val);case IIO_CHAN_INFO_SCALE :switch (chan->type) {case IIO_ANGL_VEL : - *val =0 ; - *val2 =IIO_DEGREE_TO_RAD (20000 );/* 0.02 degree/sec */ -return IIO_VAL_INT_PLUS_MICRO ; + *val = st->chip_info->gyro_max_scale; + *val2 = st->chip_info->gyro_max_val; +return IIO_VAL_FRACTIONAL ;case IIO_ACCEL : - *val =0 ; - *val2 =IIO_G_TO_M_S_2 (800 );/* 0.8 mg */ -return IIO_VAL_INT_PLUS_MICRO ; + *val = st->chip_info->accel_max_scale; + *val2 = st->chip_info->accel_max_val; +return IIO_VAL_FRACTIONAL ;case IIO_MAGN : *val =0 ; *val2 =100 ;/* 0.0001 gauss */
@@ -674,18 +680,39 @@ static const struct adis16480_chip_info [ADIS16375 ] = { .channels = adis16485_channels, .num_channels =ARRAY_SIZE (adis16485_channels), +/* +* storing the value in rad/degree and the scale in degree +* gives us the result in rad and better precession than +* storing the scale directly in rad. +*/ + .gyro_max_val =IIO_RAD_TO_DEGREE (22887 ), + .gyro_max_scale =300 , + .accel_max_val =IIO_M_S_2_TO_G (21973 ), + .accel_max_scale =18 , }, [ADIS16480 ] = { .channels = adis16480_channels, .num_channels =ARRAY_SIZE (adis16480_channels), + .gyro_max_val =IIO_RAD_TO_DEGREE (22500 ), + .gyro_max_scale =450 , + .accel_max_val =IIO_M_S_2_TO_G (12500 ), + .accel_max_scale =5 , }, [ADIS16485 ] = { .channels = adis16485_channels, .num_channels =ARRAY_SIZE (adis16485_channels), + .gyro_max_val =IIO_RAD_TO_DEGREE (22500 ), + .gyro_max_scale =450 , + .accel_max_val =IIO_M_S_2_TO_G (20000 ), + .accel_max_scale =5 , }, [ADIS16488 ] = { .channels = adis16480_channels, .num_channels =ARRAY_SIZE (adis16480_channels), + .gyro_max_val =IIO_RAD_TO_DEGREE (22500 ), + .gyro_max_scale =450 , + .accel_max_val =IIO_M_S_2_TO_G (22500 ), + .accel_max_scale =18 , }, };
Greg Kroah-Hartman
maintainerPATCH 30/120 staging: comedi: usbduxsigma: dont clobber ai_timer in command test
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Abbott <[email protected]>
commit 423b24c37dd5794a674c74b0ed56392003a69891 upstream.
devpriv->ai_timer is used while an asynchronous command is running on the AI subdevice. It also gets modified by the subdevice's cmdtest handler for checking new asynchronous commands (usbduxsigma_ai_cmdtest()), which is not correct as it's allowed to check new commands while an old command is still running. Fix it by moving the code which sets up devpriv->ai_timer and devpriv->ai_interval into the subdevice's cmd handler, usbduxsigma_ai_cmd().
Note that the removed code in usbduxsigma_ai_cmdtest() checked that devpriv->ai_timer did not end up less than than 1, but that could not happen because cmd->scan_begin_arg had already been checked to be at least the minimum required value (at least when cmd->scan_begin_src == TRIG_TIMER, which had also been checked to be the case).
--- drivers/staging/comedi/drivers/usbduxsigma.c | 37 +++++++++++---------------- 1 file changed, 16 insertions(+), 21 deletions(-)
drivers/staging/comedi/drivers/usbduxsigma.c +16 -21
@@ -550,27 +550,6 @@ static int usbduxsigma_ai_cmdtest(structif (err)return 3 ; -/* Step 4: fix up any arguments */ - -if (high_speed) { -/* -* every 2 channels get a time window of 125us. Thus, if we -* sample all 16 channels we need 1ms. If we sample only one -* channel we need only 125us -*/ - devpriv->ai_interval = interval; - devpriv->ai_timer = cmd->scan_begin_arg / (125000 * interval); - }else { -/* interval always 1ms */ - devpriv->ai_interval =1 ; - devpriv->ai_timer = cmd->scan_begin_arg /1000000 ; - } -if (devpriv->ai_timer <1 ) - err |= -EINVAL ; - -if (err) -return 4 ; -return 0 ; }
@@ -668,6 +647,22 @@ static int usbduxsigma_ai_cmd(struct comdown (&devpriv->sem); +if (devpriv->high_speed) { +/* +* every 2 channels get a time window of 125us. Thus, if we +* sample all 16 channels we need 1ms. If we sample only one +* channel we need only 125us +*/ +unsigned int interval =usbduxsigma_chans_to_interval (len); + + devpriv->ai_interval = interval; + devpriv->ai_timer = cmd->scan_begin_arg / (125000 * interval); + }else { +/* interval always 1ms */ + devpriv->ai_interval =1 ; + devpriv->ai_timer = cmd->scan_begin_arg /1000000 ; + } +for (i =0 ; i < len; i++) {unsigned int chan =CR_CHAN (cmd->chanlist[i]);
Greg Kroah-Hartman
maintainerPATCH 32/120 staging: unisys: Allow visorbus to autoload
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Kershner <[email protected]>
commit 1fc07f99134ba0b8d4099322ea0753137ea7ed3b upstream.
We inadvertently remove the MODULE_DEVICE_TABLE line for visorbus, this patch adds it back in.
--- drivers/staging/unisys/visorbus/visorchipset.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/staging/unisys/visorbus/visorchipset.c +3 -0
@@ -2381,6 +2381,9 @@ static struct acpi_driver unisys_acpi_dr .remove = visorchipset_exit, }, }; + +MODULE_DEVICE_TABLE (acpi, unisys_device_ids); +static __init uint32_t visorutil_spar_detect (void ) {unsigned int eax, ebx, ecx, edx;
Greg Kroah-Hartman
maintainerPATCH 33/120 PM / clk: dont return int on __pm_clk_enable()
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Colin Ian King <[email protected]>
commit f4745a92781b872455f32feb01d1dce92aefcb6c upstream.
Static analysis by cppcheck found an issue that was recently introduced by commit 471f7707b6f0b1 ("PM / clock_ops: make __pm_clk_enable more generic") where a return status in ret was not being initialised and garbage being returned when ce->status >= PCE_STATUS_ERROR.
The fact that ret is not being checked by the caller and that ret is only used internally __pm_clk_enable() to check if clk_enable() was OK means we can ignore returning it instead turn __pm_clk_enable() into function with a void return.
--- drivers/base/power/clock_ops.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/base/power/clock_ops.c +1 -3
@@ -38,7 +38,7 @@ struct pm_clock_entry {* @dev: The device for the given clock * @ce: PM clock entry corresponding to the clock. */ -static inline int __pm_clk_enable (struct device *dev,struct pm_clock_entry *ce) +static inline void __pm_clk_enable (struct device *dev,struct pm_clock_entry *ce) {int ret;
@@ -50,8 +50,6 @@ static inline int __pm_clk_enable(structdev_err (dev,"%s: failed to enable clk %p, error %d\n" , __func__, ce->clk, ret); } - -return ret; }/**
Greg Kroah-Hartman
maintainerPATCH 35/120 clk: exynos4: Fix wrong clock for Exynos4x12 ADC
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit e323d56eb06b266b77c2b430cb5f1977ba549e03 upstream.
The TSADC gate clock was used in Exynos4x12 DTSI for exynos-adc driver. However TSADC is present only on Exynos4210 so on Trats2 board (with Exynos4412 SoC) the exynos-adc driver could not be probed:
ERROR: could not get clock /adc@126C0000:adc(0) exynos-adc 126c0000.adc: failed getting clock, err = -2
exynos-adc: probe of 126c0000.adc failed with error -2
Instead on Exynos4x12 SoCs the main clock used by Analog to Digital Converter is located in different register and it is named in datasheet as PCLK_ADC. Regardless of the name the purpose of this PCLK_ADC clock is the same as purpose of TSADC from Exynos4210.
The patch adds gate clock for Exynos4x12 using the proper register so backward compatibility is preserved. This fixes the probe of exynos-adc driver on Exynos4x12 boards and allows accessing sensors connected to it on Trats2 board (ntc,ncp15wb473 AP and battery thermistors).
--- drivers/clk/samsung/clk-exynos4.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/samsung/clk-exynos4.c +2 -0
@@ -86,6 +86,7 @@#define DIV_PERIL4 0xc560#define DIV_PERIL5 0xc564#define E4X12_DIV_CAM1 0xc568 +#define E4X12_GATE_BUS_FSYS1 0xc744#define GATE_SCLK_CAM 0xc820#define GATE_IP_CAM 0xc920#define GATE_IP_TV 0xc924
@@ -1097,6 +1098,7 @@ static struct samsung_gate_clock exynos4 0),GATE (CLK_PPMUIMAGE ,"ppmuimage" ,"aclk200" ,E4X12_GATE_IP_IMAGE ,9 ,0 ,0 ), +GATE (CLK_TSADC ,"tsadc" ,"aclk133" ,E4X12_GATE_BUS_FSYS1 ,16 ,0 ,0 ),GATE (CLK_MIPI_HSI ,"mipi_hsi" ,"aclk133" ,GATE_IP_FSYS ,10 ,0 ,0 ),GATE (CLK_CHIPID ,"chipid" ,"aclk100" ,E4X12_GATE_IP_PERIR ,0 ,0 ,0 ), GATE(CLK_SYSREG, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1,
Greg Kroah-Hartman
maintainerPATCH 43/120 clk: qcom: Set CLK_SET_RATE_PARENT on ce1 clocks
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Boyd <[email protected]>
commit d7a304e9d018c99dda80f4c16ec0fe817b5be4a1 upstream.
The other ce clocks have the flag set, but ce1 doesn't, so clk_set_rate() doesn't propagate up the tree to the ce1_src_clk. Set the flag as this is supported.
--- drivers/clk/qcom/gcc-apq8084.c | 1 + drivers/clk/qcom/gcc-msm8974.c | 1 + 2 files changed, 2 insertions(+)
drivers/clk/qcom/gcc-apq8084.c +1 -0
@@ -2105,6 +2105,7 @@ static struct clk_branch gcc_ce1_clk = { "ce1_clk_src", }, .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, .ops = &clk_branch2_ops, }, },
drivers/clk/qcom/gcc-msm8974.c +1 -0
@@ -1783,6 +1783,7 @@ static struct clk_branch gcc_ce1_clk = { "ce1_clk_src", }, .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, .ops = &clk_branch2_ops, }, },
Greg Kroah-Hartman
maintainerPATCH 48/120 PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Rui <[email protected]>
commit 91f15fb30c77d4a0d0d9b97e5cec647650853145 upstream.
On multi-function JMicron SATA/PATA/AHCI devices, the PATA controller at function 1 doesn't work if it is powered on before the SATA controller at function 0. The result is that PATA doesn't work after resume, and we print messages like this:
pata_jmicron 0000:02:00.1: Refused to change power state, currently in D3 irq 17: nobody cared (try booting with the "irqpoll" option)
Async resume was introduced in v3.15 by 76569faa62c4 ("PM / sleep:
Asynchronous threads for resume_noirq"). Prior to that, we powered on the functions in order, so this problem shouldn't happen.
e6b7e41cdd8c ("ata: Disabling the async PM for JMicron chip 363/361") solved the problem for JMicron 361 and 363 devices. With async suspend disabled, we always power on function 0 before function 1.
Barto then reported the same problem with a JMicron 368 (see comment #57 in the bugzilla).
Rather than extending the blacklist piecemeal, disable async suspend for all JMicron multi-function SATA/PATA/AHCI devices.
This quirk could stay in the ahci and pata_jmicron drivers, but it's likely the problem will occur even if pata_jmicron isn't loaded until after the suspend/resume. Making it a PCI quirk ensures that we'll preserve the power-on order even if the drivers aren't loaded.
--- drivers/ata/ahci.c | 13 +------------ drivers/ata/pata_jmicron.c | 12 ------------ drivers/pci/quirks.c | 12 ++++++++++++ 3 files changed, 13 insertions(+), 24 deletions(-)
drivers/ata/ahci.c +1 -12
@@ -351,6 +351,7 @@ static const struct pci_device_id ahci_p/* JMicron 362B and 362C have an AHCI function with IDE class code */ { PCI_VDEVICE(JMICRON, 0x2362), board_ahci_ign_iferr }, { PCI_VDEVICE(JMICRON, 0x236f), board_ahci_ign_iferr }, +/* May need to update quirk_jmicron_async_suspend() for additions */ /* ATI */ { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */
@@ -1451,18 +1452,6 @@ static int ahci_init_one(struct pci_develse if (pdev->vendor ==0x177d && pdev->device ==0xa01c ) ahci_pci_bar =AHCI_PCI_BAR_CAVIUM ; -/* -* The JMicron chip 361/363 contains one SATA controller and one -* PATA controller,for powering on these both controllers, we must -* follow the sequence one by one, otherwise one of them can not be -* powered on successfully, so here we disable the async suspend -* method for these chips. -*/ -if (pdev->vendor ==PCI_VENDOR_ID_JMICRON && - (pdev->device ==PCI_DEVICE_ID_JMICRON_JMB363 || - pdev->device ==PCI_DEVICE_ID_JMICRON_JMB361 )) -device_disable_async_suspend (&pdev->dev); -/* acquire resources */ rc =pcim_enable_device (pdev);if (rc)
drivers/ata/pata_jmicron.c +0 -12
@@ -143,18 +143,6 @@ static int jmicron_init_one (struct pci_ };const struct ata_port_info *ppi[] = { &info,NULL }; -/* -* The JMicron chip 361/363 contains one SATA controller and one -* PATA controller,for powering on these both controllers, we must -* follow the sequence one by one, otherwise one of them can not be -* powered on successfully, so here we disable the async suspend -* method for these chips. -*/ -if (pdev->vendor ==PCI_VENDOR_ID_JMICRON && - (pdev->device ==PCI_DEVICE_ID_JMICRON_JMB363 || - pdev->device ==PCI_DEVICE_ID_JMICRON_JMB361 )) -device_disable_async_suspend (&pdev->dev); -return ata_pci_bmdma_init_one (pdev, ppi, &jmicron_sht,NULL ,0 ); }
drivers/pci/quirks.c +12 -0
@@ -1569,6 +1569,18 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDO#endif +static void quirk_jmicron_async_suspend (struct pci_dev *dev) +{ +if (dev->multifunction) { +device_disable_async_suspend (&dev->dev); +dev_info (&dev->dev,"async suspend disabled to avoid multi-function power-on ordering issue\n" ); + } +} +DECLARE_PCI_FIXUP_CLASS_FINAL (PCI_VENDOR_ID_JMICRON ,PCI_ANY_ID ,PCI_CLASS_STORAGE_IDE ,8 , quirk_jmicron_async_suspend); +DECLARE_PCI_FIXUP_CLASS_FINAL (PCI_VENDOR_ID_JMICRON ,PCI_ANY_ID ,PCI_CLASS_STORAGE_SATA_AHCI ,0 , quirk_jmicron_async_suspend); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_JMICRON ,0x2362 , quirk_jmicron_async_suspend); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_JMICRON ,0x236f , quirk_jmicron_async_suspend); +#ifdef CONFIG_X86_IO_APIC static void quirk_alder_ioapic (struct pci_dev *pdev) {
Greg Kroah-Hartman
maintainerPATCH 49/120 serial: 8250_uniphier: call clk_disable_unprepare() on failure path
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
commit e70e69bf205e6d1f742f1cf1935b155417c9e29a upstream.
If serial8250_register_8250_port() fails, disable and unprepare the clock before exiting.
--- drivers/tty/serial/8250/8250_uniphier.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/8250/8250_uniphier.c +1 -0
@@ -218,6 +218,7 @@ static int uniphier_uart_probe(struct pl ret =serial8250_register_8250_port (&up);if (ret <0 ) {dev_err (dev,"failed to register 8250 port\n" ); +clk_disable_unprepare (priv->clk);return ret; }
Greg Kroah-Hartman
maintainerPATCH 50/120 tty: serial: 8250_omap: do not use RX DMA if pause is not supported
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <[email protected]>
commit 830acf9e3044d4644f91b4418ef35a2094089946 upstream.
The 8250-omap driver requires the DMA-engine driver to support the pause command in order to properly turn off programmed RX transfer before the driver stars manually reading from the FIFO.
The lacking support of the requirement has been discovered recently. In order to stay safe here we disable RX-DMA completly on probe. The rx_dma_broken assignment on probe could be removed once we working pause function in omap-dma.
--- drivers/tty/serial/8250/8250_omap.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/tty/serial/8250/8250_omap.c +13 -1
@@ -100,6 +100,7 @@ struct omap8250_priv {struct work_struct qos_work;struct uart_8250_dma omap8250_dma;spinlock_t rx_dma_lock; +bool rx_dma_broken; };static u32 uart_read (struct uart_8250_port *up,u32 reg)
@@ -754,6 +755,7 @@ static void omap_8250_rx_dma_flush(strucstruct omap8250_priv *priv = p->port.private_data;struct uart_8250_dma *dma = p->dma;unsigned long flags; +int ret;spin_lock_irqsave (&priv->rx_dma_lock, flags);
@@ -762,7 +764,9 @@ static void omap_8250_rx_dma_flush(strucreturn ; } -dmaengine_pause (dma->rxchan); + ret =dmaengine_pause (dma->rxchan); +if (WARN_ON_ONCE (ret)) + priv->rx_dma_broken = true;spin_unlock_irqrestore (&priv->rx_dma_lock, flags);
@@ -806,6 +810,9 @@ static int omap_8250_rx_dma(struct uart_break ; } +if (priv->rx_dma_broken) +return -EINVAL ; +spin_lock_irqsave (&priv->rx_dma_lock, flags);if (dma->rx_running)
@@ -1180,6 +1187,11 @@ static int omap8250_probe(struct platforif (of_machine_is_compatible ("ti,am33xx" )) priv->habit |=OMAP_DMA_TX_KICK ; +/* +* pause is currently not supported atleast on omap-sdma +* and edma on most earlier kernels. +*/ + priv->rx_dma_broken = true; } }#endif
Greg Kroah-Hartman
maintainerPATCH 53/120 spi: orion: On a38x, implement "50MHZ SPI AC timing" Erratum No. FE-9144572
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nadav Haklai <[email protected]>
commit 38d6211e8565af5855385825a4fdc7261eb3740e upstream.
Description:
On Armada 38x, the device SPI interface supports frequencies of up to 50 MHz. However, due to this erratum, when the device core clock is 250 MHz and the SPI interfaces is configured for 50MHz SPI clock and CPOL=CPHA=1, there might occur data corruption on reads from the SPI device.
Workaround:
Work in one of the following configurations:
1. Set CPOL=CPHA=0 in "SPI Interface Configuration Register".
2. Set TMISO_SAMPLE value to 0x2 in "SPI Timing Parameters 1 Register" before setting the interface.
[[email protected]}: port to v4.2-rc, use is_errata_50mhz_ac instead of using a new ARMADA_380_SPI spi type.
--- drivers/spi/spi-orion.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-)
drivers/spi/spi-orion.c +53 -1
@@ -41,6 +41,11 @@#define ORION_SPI_DATA_OUT_REG 0x08#define ORION_SPI_DATA_IN_REG 0x0c#define ORION_SPI_INT_CAUSE_REG 0x10 +#define ORION_SPI_TIMING_PARAMS_REG 0x18 + +#define ORION_SPI_TMISO_SAMPLE_MASK (0x3 << 6) +#define ORION_SPI_TMISO_SAMPLE_1 (1 << 6) +#define ORION_SPI_TMISO_SAMPLE_2 (2 << 6)#define ORION_SPI_MODE_CPOL (1 << 11)#define ORION_SPI_MODE_CPHA (1 << 12)
@@ -70,6 +75,7 @@ struct orion_spi_dev {unsigned int min_divisor;unsigned int max_divisor;u32 prescale_mask; +bool is_errata_50mhz_ac; };struct orion_spi {
@@ -195,6 +201,41 @@ orion_spi_mode_set(struct spi_device *spwritel (reg,spi_reg (orion_spi,ORION_SPI_IF_CONFIG_REG )); } +static void +orion_spi_50mhz_ac_timing_erratum (struct spi_device *spi,unsigned int speed) +{ +u32 reg; +struct orion_spi *orion_spi; + + orion_spi =spi_master_get_devdata (spi->master); + +/* +* Erratum description: (Erratum NO. FE-9144572) The device +* SPI interface supports frequencies of up to 50 MHz. +* However, due to this erratum, when the device core clock is +* 250 MHz and the SPI interfaces is configured for 50MHz SPI +* clock and CPOL=CPHA=1 there might occur data corruption on +* reads from the SPI device. +* Erratum Workaround: +* Work in one of the following configurations: +* 1. Set CPOL=CPHA=0 in "SPI Interface Configuration +* Register". +* 2. Set TMISO_SAMPLE value to 0x2 in "SPI Timing Parameters 1 +* Register" before setting the interface. +*/ + reg =readl (spi_reg (orion_spi,ORION_SPI_TIMING_PARAMS_REG )); + reg &= ~ORION_SPI_TMISO_SAMPLE_MASK ; + +if (clk_get_rate (orion_spi->clk) ==250000000 && + speed ==50000000 && spi->mode &SPI_CPOL && + spi->mode &SPI_CPHA ) + reg |=ORION_SPI_TMISO_SAMPLE_2 ; +else + reg |=ORION_SPI_TMISO_SAMPLE_1 ;/* This is the default value */ + +writel (reg,spi_reg (orion_spi,ORION_SPI_TIMING_PARAMS_REG )); +} +/* * called only when no transfer is active on the bus */
@@ -216,6 +257,9 @@ orion_spi_setup_transfer(struct spi_deviorion_spi_mode_set (spi); +if (orion_spi->devdata->is_errata_50mhz_ac) +orion_spi_50mhz_ac_timing_erratum (spi, speed); + rc =orion_spi_baudrate_set (spi, speed);if (rc)return rc;
@@ -413,6 +457,14 @@ static const struct orion_spi_dev armada .prescale_mask = ARMADA_SPI_CLK_PRESCALE_MASK, }; +static const struct orion_spi_dev armada_380_spi_dev_data = { + .typ =ARMADA_SPI , + .max_hz =50000000 , + .max_divisor =1920 , + .prescale_mask =ARMADA_SPI_CLK_PRESCALE_MASK , + .is_errata_50mhz_ac = true, +}; +static const struct of_device_id orion_spi_of_match_table[] = { { .compatible ="marvell,orion-spi" ,
@@ -428,7 +480,7 @@ static const struct of_device_id orion_s }, { .compatible = "marvell,armada-380-spi", - .data = &armada_xp_spi_dev_data, + .data = &armada_380_spi_dev_data, }, { .compatible = "marvell,armada-390-spi",
Greg Kroah-Hartman
maintainerPATCH 64/120 libxfs: readahead of dir3 data blocks should use the read verifier
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Darrick J. Wong" <[email protected]>
commit 2f123bce18943fff819bc10f8868ffb9149fc622 upstream.
In the dir3 data block readahead function, use the regular read verifier to check the block's CRC and spot-check the block contents instead of directly calling only the spot-checking routine. This prevents corrupted directory data blocks from being read into the kernel, which can lead to garbage ls output and directory loops (if say one of the entries contains slashes and other junk).
--- fs/xfs/libxfs/xfs_dir2_data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/libxfs/xfs_dir2_data.c +2 -1
@@ -252,7 +252,8 @@ xfs_dir3_data_reada_verify(return ;case cpu_to_be32 (XFS_DIR2_DATA_MAGIC ):case cpu_to_be32 (XFS_DIR3_DATA_MAGIC ): -xfs_dir3_data_verify (bp); + bp->b_ops = &xfs_dir3_data_buf_ops; + bp->b_ops->verify_read (bp);return ;default :xfs_buf_ioerror (bp, -EFSCORRUPTED );
Greg Kroah-Hartman
maintainerPATCH 66/120 xfs: Fix file type directory corruption for btree directories
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <[email protected]>
commit 037542345a82aaaa228ec280fe6ddff1568d169f upstream.
Users have occasionally reported that file type for some directory entries is wrong. This mostly happened after updating libraries some libraries. After some debugging the problem was traced down to xfs_dir2_node_replace(). The function uses args->filetype as a file type to store in the replaced directory entry however it also calls xfs_da3_node_lookup_int() which will store file type of the current directory entry in args->filetype. Thus we fail to change file type of a directory entry to a proper type.
Fix the problem by storing new file type in a local variable before calling xfs_da3_node_lookup_int().
--- fs/xfs/libxfs/xfs_dir2_node.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
fs/xfs/libxfs/xfs_dir2_node.c +9 -1
@@ -2132,6 +2132,7 @@ xfs_dir2_node_replace(int error;/* error return value */ int i;/* btree level */ xfs_ino_t inum;/* new inode number */ +int ftype;/* new file type */ xfs_dir2_leaf_t *leaf;/* leaf structure */ xfs_dir2_leaf_entry_t *lep;/* leaf entry being changed */ int rval;/* internal return value */
@@ -2145,7 +2146,14 @@ xfs_dir2_node_replace( state =xfs_da_state_alloc (); state->args = args; state->mp = args->dp->i_mount; + +/* +* We have to save new inode number and ftype since +* xfs_da3_node_lookup_int() is going to overwrite them +*/ inum = args->inumber; + ftype = args->filetype; +/* * Lookup the entry to change in the btree. */
@@ -2183,7 +2191,7 @@ xfs_dir2_node_replace(* Fill in the new inode number and log the entry. */ dep->inumber =cpu_to_be64 (inum); - args->dp->d_ops->data_put_ftype (dep, args->filetype); + args->dp->d_ops->data_put_ftype (dep, ftype);xfs_dir2_data_log_entry (args, state->extrablk.bp, dep); rval =0 ; }
Greg Kroah-Hartman
maintainerPATCH 70/120 usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kishon Vijay Abraham I <[email protected]>
commit b2fb5b1a0f50d3ebc12342c8d8dead245e9c9d4e upstream.
DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and the size of bounce buffer is 512 bytes. However if the host initiates OUT transfers of size more than 512 bytes (and non max packet aligned), the driver throws a WARN dump but still programs the TRB to receive more than 512 bytes. This will cause bounce buffer to overflow and corrupt the adjacent memory locations which can be fatal.
Fix it by programming the TRB to receive a maximum of DWC3_EP0_BOUNCE_SIZE
(512) bytes.
--- drivers/usb/dwc3/ep0.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/usb/dwc3/ep0.c +10 -2
@@ -820,6 +820,11 @@ static void dwc3_ep0_complete_data(strucunsigned maxp = ep0->endpoint.maxpacket; transfer_size += (maxp - (transfer_size % maxp)); + +/* Maximum of DWC3_EP0_BOUNCE_SIZE can only be received */ +if (transfer_size >DWC3_EP0_BOUNCE_SIZE ) + transfer_size =DWC3_EP0_BOUNCE_SIZE ; + transferred =min_t (u32, ur->length, transfer_size - length);memcpy (ur->buf, dwc->ep0_bounce, transferred);
@@ -941,11 +946,14 @@ static void __dwc3_ep0_do_control_data(sreturn ; } -WARN_ON (req->request.length >DWC3_EP0_BOUNCE_SIZE ); - maxpacket = dep->endpoint.maxpacket; transfer_size =roundup (req->request.length, maxpacket); +if (transfer_size >DWC3_EP0_BOUNCE_SIZE ) { +dev_WARN (dwc->dev,"bounce buf can't handle req len\n" ); + transfer_size =DWC3_EP0_BOUNCE_SIZE ; + } + dwc->ep0_bounced = true;/*
Greg Kroah-Hartman
maintainerPATCH 73/120 tty: serial: men_z135_uart.c: Fix race between IRQ and set_termios()
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Thumshirn <[email protected]>
commit 8117e347406278fd399b077add4e638cd017ae2d upstream.
Fix panic caused by a race between men_z135_intr() and men_z135_set_termios().
men_z135_intr() and men_z135_set_termios() both hold the struct uart_port::lock spinlock, but men_z135_intr() does a spin_lock_irqsave() and men_z135_set_termios() does a normal spin_lock(), which can lead to a deadlock when an interrupt is called while the lock is being helt by men_z135_set_termios().
This was discovered using a insmod, hardware looppback send/receive, rmmod stress test.
--- drivers/tty/serial/men_z135_uart.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/tty/serial/men_z135_uart.c +4 -5
@@ -392,7 +392,6 @@ static irqreturn_t men_z135_intr(int irqstruct men_z135_port *uart = (struct men_z135_port *)data;struct uart_port *port = &uart->port;bool handled = false; -unsigned long flags;int irq_id; uart->stat_reg =ioread32 (port->membase +MEN_Z135_STAT_REG );
@@ -401,7 +400,7 @@ static irqreturn_t men_z135_intr(int irqif (!irq_id) goto out; -spin_lock_irqsave (&port->lock, flags); +spin_lock (&port->lock);/* It's save to write to IIR[7:6] RXC[9:8] */ iowrite8 (irq_id, port->membase +MEN_Z135_STAT_REG );
@@ -427,7 +426,7 @@ static irqreturn_t men_z135_intr(int irq handled = true; } -spin_unlock_irqrestore (&port->lock, flags); +spin_unlock (&port->lock); out:return IRQ_RETVAL (handled); }
@@ -717,7 +716,7 @@ static void men_z135_set_termios(struct baud =uart_get_baud_rate (port, termios, old,0 , uart_freq /16 ); -spin_lock (&port->lock); +spin_lock_irq (&port->lock);if (tty_termios_baud_rate (termios))tty_termios_encode_baud_rate (termios, baud, baud);
@@ -725,7 +724,7 @@ static void men_z135_set_termios(structiowrite32 (bd_reg, port->membase +MEN_Z135_BAUD_REG );uart_update_timeout (port, termios->c_cflag, baud); -spin_unlock (&port->lock); +spin_unlock_irq (&port->lock); }static const char *men_z135_type (struct uart_port *port)
Greg Kroah-Hartman
maintainerPATCH 75/120 ASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platform
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oder Chiou <[email protected]>
commit c1713485f9fc06e1f4de9800b43f6486f2527379 upstream.
--- sound/soc/codecs/rt5645.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/codecs/rt5645.c +7 -0
@@ -3232,6 +3232,13 @@ static struct dmi_system_id dmi_platform DMI_MATCH(DMI_PRODUCT_NAME, "Strago"), }, }, + { + .ident = "Google Celes", + .callback = strago_quirk_cb, + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "Celes"), + }, + }, { } };
Greg Kroah-Hartman
maintainerPATCH 76/120 ASoC: samsung: Remove redundant arndale_audio_remove
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vaishali Thakkar <[email protected]>
commit 14a500fe1396934c6b3ed8f009459a4723da7862 upstream.
There is no use of snd_soc_unregister_card in remove function as devm_snd_soc_register_card in probe function automatically handles it. So, remove use of snd_soc_unregister_card and with this change remove arndale_audio_remove as it is now redundant.
--- sound/soc/samsung/arndale_rt5631.c | 10 ---------- 1 file changed, 10 deletions(-)
sound/soc/samsung/arndale_rt5631.c +0 -10
@@ -116,15 +116,6 @@ static int arndale_audio_probe(struct plreturn ret; } -static int arndale_audio_remove (struct platform_device *pdev) -{ -struct snd_soc_card *card =platform_get_drvdata (pdev); - -snd_soc_unregister_card (card); - -return 0 ; -} -static const struct of_device_id samsung_arndale_rt5631_of_match[]__maybe_unused = { { .compatible ="samsung,arndale-rt5631" , }, { .compatible ="samsung,arndale-alc5631" , },
@@ -139,7 +130,6 @@ static struct platform_driver arndale_au .of_match_table = of_match_ptr(samsung_arndale_rt5631_of_match), }, .probe = arndale_audio_probe, - .remove = arndale_audio_remove, };module_platform_driver (arndale_audio_driver);
Greg Kroah-Hartman
maintainerPATCH 77/120 ASoC: adav80x: Remove .read_flag_mask setting from adav80x_regmap_config
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Axel Lin <[email protected]>
commit 9d8352864907f0ad76124c5b28f65b5a382d7d7c upstream.
Don't set .read_flag_mask for adav803, it's for adav801 only.
--- sound/soc/codecs/adav80x.c | 1 - 1 file changed, 1 deletion(-)
sound/soc/codecs/adav80x.c +0 -1
@@ -865,7 +865,6 @@ const struct regmap_config adav80x_regma .val_bits = 8, .pad_bits = 1, .reg_bits = 7, - .read_flag_mask = 0x01, .max_register = ADAV80X_PLL_OUTE,
Greg Kroah-Hartman
maintainerPATCH 79/120 ASoC: arizona: Poll for FLL clock OK rather than use interrupts
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Keepax <[email protected]>
commit 0e7659712836ca59b4735bc5cc94de38698a5e01 upstream.
The extcon driver takes the DAPM mutex from within the interrupt thread in several places, which makes it possible to get into a situation where the interrupt thread is blocked waiting on the DAPM mutex whilst a DAPM sequence is running which is attempting to configure the FLL. In this case the FLL completion can't be completed as as the IRQ handler is ONE_SHOT, which cause the FLL lock to use the full time out (250mS) and report that the process timed out.
It is not really practical to make the extcon driver not take the DAPM mutex from within the interrupt thread, at least not without extensive modification. So this patch fixes the issue by switching the wait for the FLL lock to polling. A few fast polls are done first as the FLL should lock quickly for a good quality reference clock, (indeed it hits on the first poll on my system) and it will poll every 20mS after that until it times out.
--- sound/soc/codecs/arizona.c | 47 ++++++++++++++++++--------------------------- sound/soc/codecs/arizona.h | 1 2 files changed, 19 insertions(+), 29 deletions(-)
sound/soc/codecs/arizona.c +19 -28
@@ -1756,17 +1756,6 @@ int arizona_init_dai(struct arizona_priv }EXPORT_SYMBOL_GPL (arizona_init_dai); -static irqreturn_t arizona_fll_clock_ok (int irq,void *data) -{ -struct arizona_fll *fll = data; - -arizona_fll_dbg (fll,"clock OK\n" ); - -complete (&fll->ok); - -return IRQ_HANDLED ; -} - static struct { unsigned int min; unsigned int max;
@@ -2048,10 +2037,11 @@ static int arizona_is_enabled_fll(structstatic int arizona_enable_fll (struct arizona_fll *fll) {struct arizona *arizona = fll->arizona; -unsigned long time_left;bool use_sync = false;int already_enabled =arizona_is_enabled_fll (fll);struct arizona_fll_cfg cfg; +int i; +unsigned int val;if (already_enabled <0 )return already_enabled;
@@ -2110,9 +2100,6 @@ static int arizona_enable_fll(struct ariif (!already_enabled)pm_runtime_get (arizona->dev); -/* Clear any pending completions */ -try_wait_for_completion (&fll->ok); -regmap_update_bits_async (arizona->regmap, fll->base +1 ,ARIZONA_FLL1_ENA ,ARIZONA_FLL1_ENA );if (use_sync)
@@ -2124,10 +2111,24 @@ static int arizona_enable_fll(struct ariregmap_update_bits_async (arizona->regmap, fll->base +1 ,ARIZONA_FLL1_FREERUN ,0 ); - time_left =wait_for_completion_timeout (&fll->ok, -msecs_to_jiffies (250 )); -if (time_left ==0 ) +arizona_fll_dbg (fll,"Waiting for FLL lock...\n" ); + val =0 ; +for (i =0 ; i <15 ; i++) { +if (i <5 ) +usleep_range (200 ,400 ); +else +msleep (20 ); + +regmap_read (arizona->regmap, +ARIZONA_INTERRUPT_RAW_STATUS_5 , + &val); +if (val & (ARIZONA_FLL1_CLOCK_OK_STS << (fll->id -1 ))) +break ; + } +if (i ==15 )arizona_fll_warn (fll,"Timed out waiting for lock\n" ); +else +arizona_fll_dbg (fll,"FLL locked (%d polls)\n" , i);return 0 ; }
@@ -2212,11 +2213,8 @@ EXPORT_SYMBOL_GPL(arizona_set_fll);int arizona_init_fll (struct arizona *arizona,int id,int base,int lock_irq,int ok_irq,struct arizona_fll *fll) { -int ret;unsigned int val; -init_completion (&fll->ok); - fll->id = id; fll->base = base; fll->arizona = arizona;
@@ -2238,13 +2236,6 @@ int arizona_init_fll(struct arizona *arisnprintf (fll->clock_ok_name,sizeof (fll->clock_ok_name),"FLL%d clock OK" , id); - ret =arizona_request_irq (arizona, ok_irq, fll->clock_ok_name, - arizona_fll_clock_ok, fll); -if (ret !=0 ) { -dev_err (arizona->dev,"Failed to get FLL%d clock OK IRQ: %d\n" , - id, ret); - } -regmap_update_bits (arizona->regmap, fll->base +1 ,ARIZONA_FLL1_FREERUN ,0 );
sound/soc/codecs/arizona.h +0 -1
@@ -242,7 +242,6 @@ struct arizona_fll {int id;unsigned int base;unsigned int vco_mult; -struct completion ok;unsigned int fout;int sync_src;
Greg Kroah-Hartman
maintainerPATCH 82/120 serial: 8250_pci: Add support for Pericom PI7C9X795[1248]
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adam Lee <[email protected]>
commit 89c043a6cb2d4525d48a38ed78d5f0f5672338b3 upstream.
Pericom PI7C9X795[1248] are Uno/Dual/Quad/Octal UART devices, this patch enables them, also defines PCI_VENDOR_ID_PERICOM here.
--- drivers/tty/serial/8250/8250_pci.c | 82 +++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 21 deletions(-)
drivers/tty/serial/8250/8250_pci.c +61 -21
@@ -2017,6 +2017,12 @@ pci_wch_ch38x_setup(struct serial_privat#define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250#define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470 +#define PCI_VENDOR_ID_PERICOM 0x12D8 +#define PCI_DEVICE_ID_PERICOM_PI7C9X7951 0x7951 +#define PCI_DEVICE_ID_PERICOM_PI7C9X7952 0x7952 +#define PCI_DEVICE_ID_PERICOM_PI7C9X7954 0x7954 +#define PCI_DEVICE_ID_PERICOM_PI7C9X7958 0x7958 +/* Unknown vendors/cards - this should not be in linux/pci_ids.h */ #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584#define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
@@ -2331,27 +2337,12 @@ static struct pci_serial_quirk pci_seria* Pericom */ { - .vendor = 0x12d8, - .device = 0x7952, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .setup = pci_pericom_setup, - }, - { - .vendor = 0x12d8, - .device = 0x7954, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .setup = pci_pericom_setup, - }, - { - .vendor = 0x12d8, - .device = 0x7958, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .setup = pci_pericom_setup, + .vendor = PCI_VENDOR_ID_PERICOM, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .setup = pci_pericom_setup, }, -/* * PLX */
@@ -3056,6 +3047,10 @@ enum pci_board_num_t { pbn_fintek_8, pbn_fintek_12, pbn_wch384_4, + pbn_pericom_PI7C9X7951, + pbn_pericom_PI7C9X7952, + pbn_pericom_PI7C9X7954, + pbn_pericom_PI7C9X7958, };/*
@@ -3881,7 +3876,6 @@ static struct pciserial_board pci_boards .base_baud = 115200, .first_offset = 0x40, }, - [pbn_wch384_4] = { .flags = FL_BASE0, .num_ports = 4,
@@ -3889,6 +3883,33 @@ static struct pciserial_board pci_boards .uart_offset = 8, .first_offset = 0xC0, }, +/* +* Pericom PI7C9X795[1248] Uno/Dual/Quad/Octal UART +*/ + [pbn_pericom_PI7C9X7951] = { + .flags = FL_BASE0, + .num_ports = 1, + .base_baud = 921600, + .uart_offset = 0x8, + }, + [pbn_pericom_PI7C9X7952] = { + .flags = FL_BASE0, + .num_ports = 2, + .base_baud = 921600, + .uart_offset = 0x8, + }, + [pbn_pericom_PI7C9X7954] = { + .flags = FL_BASE0, + .num_ports = 4, + .base_baud = 921600, + .uart_offset = 0x8, + }, + [pbn_pericom_PI7C9X7958] = { + .flags = FL_BASE0, + .num_ports = 8, + .base_baud = 921600, + .uart_offset = 0x8, + }, };static const struct pci_device_id blacklist[] = {
@@ -5154,6 +5175,25 @@ static struct pci_device_id serial_pci_t0 , 0, pbn_exar_XR17V8358 },/* +* Pericom PI7C9X795[1248] Uno/Dual/Quad/Octal UART +*/ + { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7951, +PCI_ANY_ID ,PCI_ANY_ID , +0 , + 0, pbn_pericom_PI7C9X7951 }, + { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7952, +PCI_ANY_ID ,PCI_ANY_ID , +0 , + 0, pbn_pericom_PI7C9X7952 }, + { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7954, +PCI_ANY_ID ,PCI_ANY_ID , +0 , + 0, pbn_pericom_PI7C9X7954 }, + { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7958, +PCI_ANY_ID ,PCI_ANY_ID , +0 , + 0, pbn_pericom_PI7C9X7958 }, +/* * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke) */ { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560,
Greg Kroah-Hartman
maintainerPATCH 83/120 serial: samsung: fix DMA mode enter condition for small FIFO sizes
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
commit 81ccb2a69f76b88295a1da9fc9484df715fe3bfa upstream.
Due to some of serial ports can have FIFO size smaller than cache line size, and because of need to align DMA buffer address to cache line size, it's necessary to calculate minimum number of bytes for which we want to start DMA transaction to be at least cache line size. The simplest way to meet this requirement is to get maximum of cache line size and FIFO size.
--- drivers/tty/serial/samsung.c | 13 +++++++++++-- drivers/tty/serial/samsung.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-)
drivers/tty/serial/samsung.c +11 -2
@@ -342,7 +342,8 @@ static void s3c24xx_serial_start_next_txreturn ; } -if (!ourport->dma || !ourport->dma->tx_chan || count < port->fifosize) +if (!ourport->dma || !ourport->dma->tx_chan || + count < ourport->min_dma_size)s3c24xx_serial_start_tx_pio (ourport);else s3c24xx_serial_start_tx_dma (ourport, count);
@@ -742,7 +743,8 @@ static irqreturn_t s3c24xx_serial_tx_cha count =CIRC_CNT_TO_END (xmit->head, xmit->tail,UART_XMIT_SIZE ); -if (ourport->dma && ourport->dma->tx_chan && count >= port->fifosize) { +if (ourport->dma && ourport->dma->tx_chan && + count >= ourport->min_dma_size) {s3c24xx_serial_start_tx_dma (ourport, count); goto out; }
@@ -1838,6 +1840,13 @@ static int s3c24xx_serial_probe(struct pelse if (ourport->info->fifosize) ourport->port.fifosize = ourport->info->fifosize; +/* +* DMA transfers must be aligned at least to cache line size, +* so find minimal transfer size suitable for DMA mode +*/ + ourport->min_dma_size =max_t (int, ourport->port.fifosize, +dma_get_cache_alignment ()); + probe_index++;dbg ("%s: initialising port %p...\n" , __func__, ourport);
drivers/tty/serial/samsung.h +1 -0
@@ -82,6 +82,7 @@ struct s3c24xx_uart_port {unsigned char tx_claimed;unsigned int pm_level;unsigned long baudclk_rate; +unsigned int min_dma_size;unsigned int rx_irq;unsigned int tx_irq;
Greg Kroah-Hartman
maintainerPATCH 86/120 crypto: vmx - Fixing GHASH Key issue on little endian
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leonidas Da Silva Barbosa <[email protected]>
commit 3c5f0ed78e976be705218cad62acf6a68e9d121e upstream.
GHASH table algorithm is using a big endian key. In little endian machines key will be LE ordered. After a lxvd2x instruction key is loaded as it is, LE/BE order, in first case it'll generate a wrong table resulting in wrong hashes from the algorithm.
Bug affects only LE machines.
In order to fix it we do a swap for loaded key.
--- drivers/crypto/vmx/ghashp8-ppc.pl | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/crypto/vmx/ghashp8-ppc.pl +6 -0
@@ -61,6 +61,12 @@ $code=<<___; mtspr 256,r0 li r10,0x30 lvx_u $H,0,r4 # load H + le?xor r7,r7,r7 + le?addi r7,r7,0x8 # need a vperm start with 08 + le?lvsr 5,0,r7 + le?vspltisb 6,0x0f + le?vxor 5,5,6 # set a b-endian mask + le?vperm $H,$H,$H,5 vspltisb $xC2,-16 # 0xf0 vspltisb $t0,1 # one
Greg Kroah-Hartman
maintainerPATCH 87/120 crypto: ghash-clmulni: specify context size for ghash async algorithm
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Ryabinin <[email protected]>
commit 71c6da846be478a61556717ef1ee1cea91f5d6a8 upstream.
Currently context size (cra_ctxsize) doesn't specified for ghash_async_alg. Which means it's zero. Thus crypto_create_tfm() doesn't allocate needed space for ghash_async_ctx, so any read/write to ctx (e.g. in ghash_async_init_tfm()) is not valid.
--- arch/x86/crypto/ghash-clmulni-intel_glue.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/crypto/ghash-clmulni-intel_glue.c +1 -0
@@ -294,6 +294,7 @@ static struct ahash_alg ghash_async_alg .cra_name = "ghash", .cra_driver_name = "ghash-clmulni", .cra_priority = 400, + .cra_ctxsize = sizeof(struct ghash_async_ctx), .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC, .cra_blocksize = GHASH_BLOCK_SIZE, .cra_type = &crypto_ahash_type,
Greg Kroah-Hartman
maintainerPATCH 88/120 HID: usbhid: Fix the check for HID_RESET_PENDING in hid_io_error
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Don Zickus <[email protected]>
commit 3af4e5a95184d6d3c1c6a065f163faa174a96a1d upstream.
It was reported that after 10-20 reboots, a usb keyboard plugged into a docking station would not work unless it was replugged in.
Using usbmon, it turns out the interrupt URBs were streaming with callback errors of -71 for some reason. The hid-core.c::hid_io_error was supposed to retry and then reset, but the reset wasn't really happening.
The check for HID_NO_BANDWIDTH was inverted. Fix was simple.
Tested by reporter and locally by me by unplugging a keyboard halfway until I could recreate a stream of errors but no disconnect.
--- drivers/hid/usbhid/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/usbhid/hid-core.c +1 -1
@@ -164,7 +164,7 @@ static void hid_io_error(struct hid_deviif (time_after (jiffies, usbhid->stop_retry)) {/* Retries failed, so do a port reset unless we lack bandwidth*/ -if (test_bit (HID_NO_BANDWIDTH , &usbhid->iofl) +if (!test_bit (HID_NO_BANDWIDTH , &usbhid->iofl) && !test_and_set_bit (HID_RESET_PENDING , &usbhid->iofl)) {schedule_work (&usbhid->reset_work);
Greg Kroah-Hartman
maintainerPATCH 89/120 HID: cp2112: fix byte order in SMBUS operations
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ellen Wang <[email protected]>
commit 29e2d6d1f6f61ba2b5cc9d9867e01d8c31a6c4f7 upstream.
Change all occurrences of be16 to le16 in cp2112_xfer(), because SMBUS words are little endian, not big endian.
--- drivers/hid/hid-cp2112.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hid/hid-cp2112.c +4 -4
@@ -537,7 +537,7 @@ static int cp2112_xfer(struct i2c_adaptestruct cp2112_device *dev = (struct cp2112_device *)adap->algo_data;struct hid_device *hdev = dev->hdev;u8 buf[64 ]; -__be16 word; +__le16 word;ssize_t count;size_t read_length =0 ;unsigned int retries;
@@ -569,7 +569,7 @@ static int cp2112_xfer(struct i2c_adaptebreak ;case I2C_SMBUS_WORD_DATA : read_length =2 ; - word =cpu_to_be16 (data->word); + word =cpu_to_le16 (data->word);if (I2C_SMBUS_READ == read_write) count = cp2112_write_read_req(buf, addr, read_length,
@@ -582,7 +582,7 @@ static int cp2112_xfer(struct i2c_adapte size =I2C_SMBUS_WORD_DATA ; read_write =I2C_SMBUS_READ ; read_length =2 ; - word =cpu_to_be16 (data->word); + word =cpu_to_le16 (data->word); count =cp2112_write_read_req (buf, addr, read_length, command, (u8 *)&word,2 );
@@ -675,7 +675,7 @@ static int cp2112_xfer(struct i2c_adapte data->byte = buf[0 ];break ;case I2C_SMBUS_WORD_DATA : - data->word =be16_to_cpup ((__be16 *)buf); + data->word =le16_to_cpup ((__le16 *)buf);break ;case I2C_SMBUS_BLOCK_DATA :if (read_length >I2C_SMBUS_BLOCK_MAX ) {
Greg Kroah-Hartman
maintainerPATCH 91/120 KVM: MMU: fix validation of mmio page fault
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiao Guangrong <[email protected]>
commit 6f691251c0350ac52a007c54bf3ef62e9d8cdc5e upstream.
We got the bug that qemu complained with "KVM: unknown exit, hardware reason 31" and KVM shown these info:
[84245.284948] EPT: Misconfiguration. [84245.285056] EPT: GPA: 0xfeda848 [84245.285154] ept_misconfig_inspect_spte: spte 0x5eaef50107 level 4 [84245.285344] ept_misconfig_inspect_spte: spte 0x5f5fadc107 level 3 [84245.285532] ept_misconfig_inspect_spte: spte 0x5141d18107 level 2 [84245.285723] ept_misconfig_inspect_spte: spte 0x52e40dad77 level 1
This is because we got a mmio #PF and the handler see the mmio spte becomes normal (points to the ram page)
However, this is valid after introducing fast mmio spte invalidation which increases the generation-number instead of zapping mmio sptes, a example is as follows:
1. QEMU drops mmio region by adding a new memslot
2. invalidate all mmio sptes
3.
VCPU 0 VCPU 1
access the invalid mmio spte
access the region originally was MMIO before set the spte to the normal ram map
mmio #PF
check the spte and see it becomes normal ram mapping !!!
This patch fixes the bug just by dropping the check in mmio handler, it's good for backport. Full check will be introduced in later patches
--- arch/x86/kvm/mmu.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-)
arch/x86/kvm/mmu.c +0 -45
@@ -357,12 +357,6 @@ static u64 __get_spte_lockless(u64 *spte { return ACCESS_ONCE(*sptep); } - -static bool __check_direct_spte_mmio_pf(u64 spte) -{ - /* It is valid if the spte is zapped. */ - return spte == 0ull; -} #else union split_spte { struct {
@@ -478,23 +472,6 @@ retry: return spte.spte; } - -static bool __check_direct_spte_mmio_pf (u64 spte) -{ -union split_spte sspte = (union split_spte )spte; -u32 high_mmio_mask = shadow_mmio_mask >>32 ; - -/* It is valid if the spte is zapped. */ -if (spte ==0ull ) -return true; - -/* It is valid if the spte is being zapped. */ -if (sspte.spte_low ==0ull && - (sspte.spte_high & high_mmio_mask) == high_mmio_mask) -return true; - -return false; -}#endif static bool spte_is_locklessly_modifiable (u64 spte)
@@ -3299,21 +3276,6 @@ static bool quickly_check_mmio_pf(structreturn vcpu_match_mmio_gva (vcpu, addr); } - -/* -* On direct hosts, the last spte is only allows two states -* for mmio page fault: -* - It is the mmio spte -* - It is zapped or it is being zapped. -* -* This function completely checks the spte when the last spte -* is not the mmio spte. -*/ -static bool check_direct_spte_mmio_pf (u64 spte) -{ -return __check_direct_spte_mmio_pf (spte); -} -static u64 walk_shadow_page_get_mmio_spte (struct kvm_vcpu *vcpu,u64 addr) {struct kvm_shadow_walk_iterator iterator;
@@ -3356,13 +3318,6 @@ int handle_mmio_page_fault_common(struct }/* -* It's ok if the gva is remapped by other cpus on shadow guest, -* it's a BUG if the gfn is not a mmio page. -*/ -if (direct && !check_direct_spte_mmio_pf (spte)) -return RET_MMIO_PF_BUG ; - -/* * If the page table is zapped by other cpus, let CPU fault again on * the address. */
Greg Kroah-Hartman
maintainerPATCH 93/120 KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTE
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Mackerras <[email protected]>
commit 1e5bf454f58731e360e504253e85bae7aaa2d298 upstream.
The reference (R) and change (C) bits in a HPT entry can be set by hardware at any time up until the HPTE is invalidated and the TLB invalidation sequence has completed. This means that when removing a HPTE, we need to read the HPTE after the invalidation sequence has completed in order to obtain reliable values of R and C. The code in kvmppc_do_h_remove() used to do this. However, commit 6f22bd3265fb ("KVM: PPC: Book3S HV: Make HTAB code LE host aware") removed the read after invalidation as a side effect of other changes. This restores the read of the HPTE after invalidation.
The user-visible effect of this bug would be that when migrating a guest, there is a small probability that a page modified by the guest and then unmapped by the guest might not get re-transmitted and thus the destination might end up with a stale copy of the page.
--- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
arch/powerpc/kvm/book3s_hv_rm_mmu.c +12 -6
@@ -421,14 +421,20 @@ long kvmppc_do_h_remove(struct kvm *kvm, rev =real_vmalloc_addr (&kvm->arch.revmap[pte_index]); v = pte & ~HPTE_V_HVLOCK ;if (v &HPTE_V_VALID ) { -u64 pte1; - - pte1 =be64_to_cpu (hpte[1 ]); hpte[0 ] &= ~cpu_to_be64 (HPTE_V_VALID ); - rb =compute_tlbie_rb (v, pte1, pte_index); + rb =compute_tlbie_rb (v,be64_to_cpu (hpte[1 ]), pte_index);do_tlbies (kvm, &rb,1 ,global_invalidates (kvm, flags), true); -/* Read PTE low word after tlbie to get final R/C values */ -remove_revmap_chain (kvm, pte_index, rev, v, pte1); +/* +* The reference (R) and change (C) bits in a HPT +* entry can be set by hardware at any time up until +* the HPTE is invalidated and the TLB invalidation +* sequence has completed. This means that when +* removing a HPTE, we need to re-read the HPTE after +* the invalidation sequence has completed in order to +* obtain reliable values of R and C. +*/ +remove_revmap_chain (kvm, pte_index, rev, v, +be64_to_cpu (hpte[1 ])); } r = rev->guest_rpte & ~HPTE_GR_RESERVED ;note_hpte_modification (kvm, rev);
Greg Kroah-Hartman
maintainerPATCH 98/120 Doc: ABI: testing: configfs-usb-gadget-sourcesink
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <[email protected]>
commit 4bc58eb16bb2352854b9c664cc36c1c68d2bfbb7 upstream.
Fix the name of attribute
--- Documentation/ABI/testing/configfs-usb-gadget-sourcesink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/ABI/testing/configfs-usb-gadget-sourcesink +1 -1
@@ -9,4 +9,4 @@ Description: isoc_maxpacket - 0 - 1023 (fs), 0 - 1024 (hs/ss) isoc_mult - 0..2 (hs/ss only) isoc_maxburst - 0..15 (ss only) - qlen - buffer length + buflen - buffer length
Greg Kroah-Hartman
maintainerPATCH 112/120 ACPI, PCI: Penalize legacy IRQ used by ACPI SCI
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiang Liu <[email protected]>
commit 5d0ddfebb93069061880fc57ee4ba7246bd1e1ee upstream.
Nick Meier reported a regression with HyperV that "
After rebooting the VM, the following messages are logged in syslog when trying to load the tulip driver:
tulip: Linux Tulip drivers version 1.1.15 (Feb 27, 2007)
tulip: 0000:00:0a.0: PCI INT A: failed to register GSI
tulip: Cannot enable tulip board #0, aborting
tulip: probe of 0000:00:0a.0 failed with error -16 Errors occur in 3.19.0 kernel
Works in 3.17 kernel.
"
According to the ACPI dump file posted by Nick at
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1440072
The ACPI MADT table includes an interrupt source overridden entry for ACPI SCI:
[236h 0566 1] Subtable Type : 02 <Interrupt Source Override> [237h 0567 1] Length : 0A [238h 0568 1] Bus : 00 [239h 0569 1] Source : 09 [23Ah 0570 4] Interrupt : 00000009 [23Eh 0574 2] Flags (decoded below) : 000D
Polarity : 1
Trigger Mode : 3
And in DSDT table, we have _PRT method to define PCI interrupts, which eventually goes to:
Name (PRSA, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared, )
{3,4,5,7,9,10,11,12,14,15}
})
Name (PRSB, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared, )
{3,4,5,7,9,10,11,12,14,15}
})
Name (PRSC, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared, )
{3,4,5,7,9,10,11,12,14,15}
})
Name (PRSD, ResourceTemplate ()
{
IRQ (Level, ActiveLow, Shared, )
{3,4,5,7,9,10,11,12,14,15}
})According to the MADT and DSDT tables, IRQ 9 may be used for:
1) ACPI SCI in level, high mode
2) PCI legacy IRQ in level, low mode
So there's a conflict in polarity setting for IRQ 9.
Prior to commit cd68f6bd53cf ("x86, irq, acpi: Get rid of special handling of GSI for ACPI SCI"), ACPI SCI is handled specially and there's no check for conflicts between ACPI SCI and PCI legagy IRQ. And it seems that the HyperV hypervisor doesn't make use of the polarity configuration in IOAPIC entry, so it just works.
Commit cd68f6bd53cf gets rid of the specially handling of ACPI SCI, and then the pin attribute checking code discloses the conflicts between ACPI SCI and PCI legacy IRQ on HyperV virtual machine, and rejects the request to assign IRQ9 to PCI devices.
So penalize legacy IRQ used by ACPI SCI and mark it unusable if ACPI SCI attributes conflict with PCI IRQ attributes.
Please refer to following links for more information:
https://bugzilla.kernel.org/show_bug.cgi?id=101301
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1440072
--- arch/x86/kernel/acpi/boot.c | 1 + drivers/acpi/pci_link.c | 16 ++++++++++++++++ include/linux/acpi.h | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-)
arch/x86/kernel/acpi/boot.c +1 -0
@@ -445,6 +445,7 @@ static void __init acpi_sci_ioapic_setup polarity = acpi_sci_flags &ACPI_MADT_POLARITY_MASK ;mp_override_legacy_irq (bus_irq, polarity, trigger, gsi); +acpi_penalize_sci_irq (bus_irq, trigger, polarity);/* * stash over-ride to indicate we've been here
drivers/acpi/pci_link.c +16 -0
@@ -826,6 +826,22 @@ void acpi_penalize_isa_irq(int irq, int }/* +* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict with +* PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be use for +* PCI IRQs. +*/ +void acpi_penalize_sci_irq (int irq,int trigger,int polarity) +{ +if (irq >=0 && irq <ARRAY_SIZE (acpi_irq_penalty)) { +if (trigger !=ACPI_MADT_TRIGGER_LEVEL || + polarity !=ACPI_MADT_POLARITY_ACTIVE_LOW ) + acpi_irq_penalty[irq] +=PIRQ_PENALTY_ISA_ALWAYS ; +else + acpi_irq_penalty[irq] +=PIRQ_PENALTY_PCI_USING ; + } +} + +/* * Over-ride default table to reserve additional IRQs for use by ISA * e.g. acpi_irq_isa=5 * Useful for telling ACPI how not to interfere with your ISA sound card.
include/linux/acpi.h +1 -1
@@ -221,7 +221,7 @@ struct pci_dev;int acpi_pci_irq_enable (struct pci_dev *dev);void acpi_penalize_isa_irq (int irq,int active); - +void acpi_penalize_sci_irq (int irq,int trigger,int polarity);void acpi_pci_irq_disable (struct pci_dev *dev);extern int ec_read (u8 addr,u8 *val);
Greg Kroah-Hartman
maintainerPATCH 118/120 ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryan Ding <[email protected]>
commit aa1057b3dec478b20c77bad07442318ae36d893c upstream.
ocfs2_file_write_iter() is usng the wrong return value ('written'). This will cause ocfs2_rw_unlock() be called both in write_iter & end_io, triggering a BUG_ON.
This issue was introduced by commit 7da839c47589 ("ocfs2: use __generic_file_write_iter()").
Orabug: 21612107
--- fs/ocfs2/file.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
fs/ocfs2/file.c +14 -14
@@ -2372,6 +2372,20 @@ relock:/* buffered aio wouldn't have proper lock coverage today */ BUG_ON (written == -EIOCBQUEUED && !(iocb->ki_flags &IOCB_DIRECT )); +/* +* deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io +* function pointer which is called when o_direct io completes so that +* it can unlock our rw lock. +* Unfortunately there are error cases which call end_io and others +* that don't. so we don't have to unlock the rw_lock if either an +* async dio is going to do it in the future or an end_io after an +* error has already done it. +*/ +if ((written == -EIOCBQUEUED ) || (!ocfs2_iocb_is_rw_locked (iocb))) { + rw_level =-1 ; + unaligned_dio =0 ; + } +if (unlikely (written <=0 )) goto no_sync;
@@ -2396,20 +2410,6 @@ relock: } no_sync: -/* -* deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io -* function pointer which is called when o_direct io completes so that -* it can unlock our rw lock. -* Unfortunately there are error cases which call end_io and others -* that don't. so we don't have to unlock the rw_lock if either an -* async dio is going to do it in the future or an end_io after an -* error has already done it. -*/ -if ((ret == -EIOCBQUEUED ) || (!ocfs2_iocb_is_rw_locked (iocb))) { - rw_level =-1 ; - unaligned_dio =0 ; - } -if (unaligned_dio) {ocfs2_iocb_clear_unaligned_aio (iocb);mutex_unlock (&OCFS2_I (inode)->ip_unaligned_aio);
Greg Kroah-Hartman
maintainerPATCH 120/120 fs: create and use seq_show_option for escaping
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
commit a068acf2ee77693e0bf39d6e07139ba704f461c3 upstream.
Many file systems that implement the show_options hook fail to correctly escape their output which could lead to unescaped characters (e.g. new lines) leaking into /proc/mounts and /proc/[pid]/mountinfo files. This could lead to confusion, spoofed entries (resulting in things like systemd issuing false d-bus "mount" notifications), and who knows what else. This looks like it would only be the root user stepping on themselves, but it's possible weird things could happen in containers or in other situations with delegated mount privileges.
Here's an example using overlay with setuid fusermount trusting the contents of /proc/mounts (via the /etc/mtab symlink). Imagine the use of "sudo" is something more sneaky:
$ BASE="ovl" $ MNT="$BASE/mnt" $ LOW="$BASE/lower" $ UP="$BASE/upper" $ WORK="$BASE/work/ 0 0 none /proc fuse.pwn user_id=1000" $ mkdir -p "$LOW" "$UP" "$WORK" $ sudo mount -t overlay -o "lowerdir=$LOW,upperdir=$UP,workdir=$WORK" none /mnt $ cat /proc/mounts none /root/ovl/mnt overlay rw,relatime,lowerdir=ovl/lower,upperdir=ovl/upper,workdir=ovl/work/ 0 0 none /proc fuse.pwn user_id=1000 0 0 $ fusermount -u /proc $ cat /proc/mounts cat: /proc/mounts: No such file or directory
This fixes the problem by adding new seq_show_option and seq_show_option_n helpers, and updating the vulnerable show_option handlers to use them as needed. Some, like SELinux, need to be open coded due to unusual existing escape mechanisms.
--- fs/ceph/super.c | 2 +- fs/cifs/cifsfs.c | 6 +++--- fs/ext4/super.c | 4 ++-- fs/gfs2/super.c | 6 +++--- fs/hfs/super.c | 4 ++-- fs/hfsplus/options.c | 4 ++-- fs/hostfs/hostfs_kern.c | 2 +- fs/ocfs2/super.c | 4 ++-- fs/overlayfs/super.c | 6 +++--- fs/reiserfs/super.c | 8 +++++--- fs/xfs/xfs_super.c | 4 ++-- include/linux/seq_file.h | 35 +++++++++++++++++++++++++++++++++++ kernel/cgroup.c | 7 ++++--- net/ceph/ceph_common.c | 7 +++++-- security/selinux/hooks.c | 2 +- 15 files changed, 71 insertions(+), 30 deletions(-)
fs/ceph/super.c +1 -1
@@ -479,7 +479,7 @@ static int ceph_show_options(struct seq_if (fsopt->max_readdir_bytes !=CEPH_MAX_READDIR_BYTES_DEFAULT )seq_printf (m,",readdir_max_bytes=%d" , fsopt->max_readdir_bytes);if (strcmp (fsopt->snapdir_name,CEPH_SNAPDIRNAME_DEFAULT )) -seq_printf (m,",snapdirname=%s" , fsopt->snapdir_name); +seq_show_option (m,"snapdirname" , fsopt->snapdir_name);return 0 ; }
fs/cifs/cifsfs.c +3 -3
@@ -394,17 +394,17 @@ cifs_show_options(struct seq_file *s, ststruct sockaddr *srcaddr; srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; -seq_printf (s,",vers=%s" , tcon->ses->server->vals->version_string); +seq_show_option (s,"vers" , tcon->ses->server->vals->version_string);cifs_show_security (s, tcon->ses);cifs_show_cache_flavor (s, cifs_sb);if (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_MULTIUSER )seq_puts (s,",multiuser" );else if (tcon->ses->user_name) -seq_printf (s,",username=%s" , tcon->ses->user_name); +seq_show_option (s,"username" , tcon->ses->user_name);if (tcon->ses->domainName) -seq_printf (s,",domain=%s" , tcon->ses->domainName); +seq_show_option (s,"domain" , tcon->ses->domainName);if (srcaddr->sa_family !=AF_UNSPEC ) {struct sockaddr_in *saddr4;
fs/ext4/super.c +2 -2
@@ -1763,10 +1763,10 @@ static inline void ext4_show_quota_optio }if (sbi->s_qf_names[USRQUOTA ]) -seq_printf (seq,",usrjquota=%s" , sbi->s_qf_names[USRQUOTA ]); +seq_show_option (seq,"usrjquota" , sbi->s_qf_names[USRQUOTA ]);if (sbi->s_qf_names[GRPQUOTA ]) -seq_printf (seq,",grpjquota=%s" , sbi->s_qf_names[GRPQUOTA ]); +seq_show_option (seq,"grpjquota" , sbi->s_qf_names[GRPQUOTA ]);#endif }
fs/gfs2/super.c +3 -3
@@ -1334,11 +1334,11 @@ static int gfs2_show_options(struct seq_if (is_ancestor (root, sdp->sd_master_dir))seq_puts (s,",meta" );if (args->ar_lockproto[0 ]) -seq_printf (s,",lockproto=%s" , args->ar_lockproto); +seq_show_option (s,"lockproto" , args->ar_lockproto);if (args->ar_locktable[0 ]) -seq_printf (s,",locktable=%s" , args->ar_locktable); +seq_show_option (s,"locktable" , args->ar_locktable);if (args->ar_hostdata[0 ]) -seq_printf (s,",hostdata=%s" , args->ar_hostdata); +seq_show_option (s,"hostdata" , args->ar_hostdata);if (args->ar_spectator)seq_puts (s,",spectator" );if (args->ar_localflocks)
fs/hfs/super.c +2 -2
@@ -136,9 +136,9 @@ static int hfs_show_options(struct seq_fstruct hfs_sb_info *sbi =HFS_SB (root->d_sb);if (sbi->s_creator !=cpu_to_be32 (0x3f3f3f3f )) -seq_printf (seq,",creator=%.4s" , (char *)&sbi->s_creator); +seq_show_option_n (seq,"creator" , (char *)&sbi->s_creator,4 );if (sbi->s_type !=cpu_to_be32 (0x3f3f3f3f )) -seq_printf (seq,",type=%.4s" , (char *)&sbi->s_type); +seq_show_option_n (seq,"type" , (char *)&sbi->s_type,4 );seq_printf (seq,",uid=%u,gid=%u" ,from_kuid_munged (&init_user_ns, sbi->s_uid),from_kgid_munged (&init_user_ns, sbi->s_gid));
fs/hfsplus/options.c +2 -2
@@ -218,9 +218,9 @@ int hfsplus_show_options(struct seq_filestruct hfsplus_sb_info *sbi =HFSPLUS_SB (root->d_sb);if (sbi->creator !=HFSPLUS_DEF_CR_TYPE ) -seq_printf (seq,",creator=%.4s" , (char *)&sbi->creator); +seq_show_option_n (seq,"creator" , (char *)&sbi->creator,4 );if (sbi->type !=HFSPLUS_DEF_CR_TYPE ) -seq_printf (seq,",type=%.4s" , (char *)&sbi->type); +seq_show_option_n (seq,"type" , (char *)&sbi->type,4 );seq_printf (seq,",umask=%o,uid=%u,gid=%u" , sbi->umask,from_kuid_munged (&init_user_ns, sbi->uid),from_kgid_munged (&init_user_ns, sbi->gid));
fs/hostfs/hostfs_kern.c +1 -1
@@ -260,7 +260,7 @@ static int hostfs_show_options(struct sesize_t offset =strlen (root_ino) +1 ;if (strlen (root_path) > offset) -seq_printf (seq,",%s" , root_path + offset); +seq_show_option (seq, root_path + offset,NULL );if (append)seq_puts (seq,",append" );
fs/ocfs2/super.c +2 -2
@@ -1550,8 +1550,8 @@ static int ocfs2_show_options(struct seqseq_printf (s,",localflocks," );if (osb->osb_cluster_stack[0 ]) -seq_printf (s,",cluster_stack=%.*s" ,OCFS2_STACK_LABEL_LEN , - osb->osb_cluster_stack); +seq_show_option_n (s,"cluster_stack" , osb->osb_cluster_stack, +OCFS2_STACK_LABEL_LEN );if (opts &OCFS2_MOUNT_USRQUOTA )seq_printf (s,",usrquota" );if (opts &OCFS2_MOUNT_GRPQUOTA )
fs/overlayfs/super.c +3 -3
@@ -588,10 +588,10 @@ static int ovl_show_options(struct seq_fstruct super_block *sb = dentry->d_sb;struct ovl_fs *ufs = sb->s_fs_info; -seq_printf (m,",lowerdir=%s" , ufs->config.lowerdir); +seq_show_option (m,"lowerdir" , ufs->config.lowerdir);if (ufs->config.upperdir) { -seq_printf (m,",upperdir=%s" , ufs->config.upperdir); -seq_printf (m,",workdir=%s" , ufs->config.workdir); +seq_show_option (m,"upperdir" , ufs->config.upperdir); +seq_show_option (m,"workdir" , ufs->config.workdir); }return 0 ; }
fs/reiserfs/super.c +5 -3
@@ -714,18 +714,20 @@ static int reiserfs_show_options(structseq_puts (seq,",acl" );if (REISERFS_SB (s)->s_jdev) -seq_printf (seq,",jdev=%s" ,REISERFS_SB (s)->s_jdev); +seq_show_option (seq,"jdev" ,REISERFS_SB (s)->s_jdev);if (journal->j_max_commit_age != journal->j_default_max_commit_age)seq_printf (seq,",commit=%d" , journal->j_max_commit_age);#ifdef CONFIG_QUOTA if (REISERFS_SB (s)->s_qf_names[USRQUOTA ]) -seq_printf (seq,",usrjquota=%s" ,REISERFS_SB (s)->s_qf_names[USRQUOTA ]); +seq_show_option (seq,"usrjquota" , +REISERFS_SB (s)->s_qf_names[USRQUOTA ]);else if (opts & (1 <<REISERFS_USRQUOTA ))seq_puts (seq,",usrquota" );if (REISERFS_SB (s)->s_qf_names[GRPQUOTA ]) -seq_printf (seq,",grpjquota=%s" ,REISERFS_SB (s)->s_qf_names[GRPQUOTA ]); +seq_show_option (seq,"grpjquota" , +REISERFS_SB (s)->s_qf_names[GRPQUOTA ]);else if (opts & (1 <<REISERFS_GRPQUOTA ))seq_puts (seq,",grpquota" );if (REISERFS_SB (s)->s_jquota_fmt) {
fs/xfs/xfs_super.c +2 -2
@@ -511,9 +511,9 @@ xfs_showargs(seq_printf (m,"," MNTOPT_LOGBSIZE "=%dk" , mp->m_logbsize >>10 );if (mp->m_logname) -seq_printf (m,"," MNTOPT_LOGDEV "=%s" , mp->m_logname); +seq_show_option (m,MNTOPT_LOGDEV , mp->m_logname);if (mp->m_rtname) -seq_printf (m,"," MNTOPT_RTDEV "=%s" , mp->m_rtname); +seq_show_option (m,MNTOPT_RTDEV , mp->m_rtname);if (mp->m_dalign >0 ) seq_printf(m, "," MNTOPT_SUNIT "=%d",
include/linux/seq_file.h +35 -0
@@ -149,6 +149,41 @@ static inline struct user_namespace *seq#endif } +/** +* seq_show_options - display mount options with appropriate escapes. +* @m: the seq_file handle +* @name: the mount option name +* @value: the mount option name's value, can be NULL +*/ +static inline void seq_show_option (struct seq_file *m,const char *name, +const char *value) +{ +seq_putc (m,',' ); +seq_escape (m, name,",= \t\n\\" ); +if (value) { +seq_putc (m,'=' ); +seq_escape (m, value,", \t\n\\" ); + } +} + +/** +* seq_show_option_n - display mount options with appropriate escapes +* where @value must be a specific length. +* @m: the seq_file handle +* @name: the mount option name +* @value: the mount option name's value, cannot be NULL +* @length: the length of @value to display +* +* This is a macro since this uses "length" to define the size of the +* stack buffer. +*/ +#define seq_show_option_n (m, name, value, length) { \ + char val_buf[length + 1]; \ + strncpy(val_buf, value, length); \ + val_buf[length] = '\0'; \ + seq_show_option(m, name, val_buf); \ +} +#define SEQ_START_TOKEN ((void *)1)/* * Helpers for iteration over list_head-s in seq_files
kernel/cgroup.c +4 -3
@@ -1334,7 +1334,7 @@ static int cgroup_show_options(struct sefor_each_subsys (ss, ssid)if (root->subsys_mask & (1 << ssid)) -seq_printf (seq,",%s" , ss->name); +seq_show_option (seq, ss->name,NULL );if (root->flags &CGRP_ROOT_NOPREFIX )seq_puts (seq,",noprefix" );if (root->flags &CGRP_ROOT_XATTR )
@@ -1342,13 +1342,14 @@ static int cgroup_show_options(struct sespin_lock (&release_agent_path_lock);if (strlen (root->release_agent_path)) -seq_printf (seq,",release_agent=%s" , root->release_agent_path); +seq_show_option (seq,"release_agent" , + root->release_agent_path);spin_unlock (&release_agent_path_lock);if (test_bit (CGRP_CPUSET_CLONE_CHILDREN , &root->cgrp.flags))seq_puts (seq,",clone_children" );if (strlen (root->name)) -seq_printf (seq,",name=%s" , root->name); +seq_show_option (seq,"name" , root->name);return 0 ; }
net/ceph/ceph_common.c +5 -2
@@ -517,8 +517,11 @@ int ceph_print_client_options(struct seqstruct ceph_options *opt = client->options;size_t pos = m->count; -if (opt->name) -seq_printf (m,"name=%s," , opt->name); +if (opt->name) { +seq_puts (m,"name=" ); +seq_escape (m, opt->name,", \t\n\\" ); +seq_putc (m,',' ); + }if (opt->key)seq_puts (m,"secret=<hidden>," );
security/selinux/hooks.c +1 -1
@@ -1100,7 +1100,7 @@ static void selinux_write_opts(struct seseq_puts (m, prefix);if (has_comma)seq_putc (m,'\"' ); -seq_puts (m, opts->mnt_opts[i]); +seq_escape (m, opts->mnt_opts[i],"\"\n\\" );if (has_comma)seq_putc (m,'\"' ); }
Greg Kroah-Hartman
maintainerPATCH 1/120 DRM - radeon: Dont link train DisplayPort on HPD until we get the dpcd
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Chandler Paul <[email protected]>
commit 924f92bf12bfbef3662619e3ed24a1cea7c1cbcd upstream.
Most of the time this isn't an issue since hotplugging an adaptor will trigger a crtc mode change which in turn, causes the driver to probe every DisplayPort for a dpcd. However, in cases where hotplugging doesn't cause a mode change (specifically when one unplugs a monitor from a DisplayPort connector, then plugs that same monitor back in seconds later on the same port without any other monitors connected), we never probe for the dpcd before starting the initial link training. What happens from there looks like this:
- GPU has only one monitor connected. It's connected via DisplayPort, and does not go through an adaptor of any sort.
- User unplugs DisplayPort connector from GPU.
- Change in HPD is detected by the driver, we probe every DisplayPort for a possible connection.
- Probe the port the user originally had the monitor connected on for it's dpcd. This fails, and we clear the first (and only the first) byte of the dpcd to indicate we no longer have a dpcd for this port.
- User plugs the previously disconnected monitor back into the same DisplayPort.
- radeon_connector_hotplug() is called before everyone else, and tries to handle the link training. Since only the first byte of the dpcd is zeroed, the driver is able to complete link training but does so against the wrong dpcd, causing it to initialize the link with the wrong settings.
- Display stays blank (usually), dpcd is probed after the initial link training, and the driver prints no obvious messages to the log.
In theory, since only one byte of the dpcd is chopped off (specifically, the byte that contains the revision information for DisplayPort), it's not entirely impossible that this bug may not show on certain monitors. For instance, the only reason this bug was visible on my ASUS PB238 monitor was due to the fact that this monitor using the enhanced framing symbol sequence, the flag for which is ignored if the radeon driver thinks that the DisplayPort version is below 1.1.
--- drivers/gpu/drm/radeon/radeon_connectors.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/radeon/radeon_connectors.c +5 -0
@@ -95,6 +95,11 @@ void radeon_connector_hotplug(struct drmif (!radeon_hpd_sense (rdev, radeon_connector->hpd.hpd)) {drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); }else if (radeon_dp_needs_link_train (radeon_connector)) { +/* Don't try to start link training before we +* have the dpcd */ +if (!radeon_dp_getdpcd (radeon_connector)) +return ; +/* set it to OFF so that drm_helper_connector_dpms() * won't return immediately since the current state * is ON at this point.
Greg Kroah-Hartman
maintainerPATCH 11/120 drm/amdgpu: fix typo in dce11 watermark setup
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit 99a092383794e07d60644b449a01656da112eb1f upstream.
Using the wrong watermwark value for the secondary watermark. Copy paste typo. Noticed by Mykola.
--- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
@@ -1329,7 +1329,7 @@ static void dce_v11_0_program_watermarks tmp =REG_SET_FIELD (wm_mask,DPG_WATERMARK_MASK_CONTROL ,URGENCY_WATERMARK_MASK ,2 );WREG32 (mmDPG_WATERMARK_MASK_CONTROL + amdgpu_crtc->crtc_offset, tmp); tmp =RREG32 (mmDPG_PIPE_URGENCY_CONTROL + amdgpu_crtc->crtc_offset); - tmp =REG_SET_FIELD (tmp,DPG_PIPE_URGENCY_CONTROL ,URGENCY_LOW_WATERMARK , latency_watermark_a); + tmp =REG_SET_FIELD (tmp,DPG_PIPE_URGENCY_CONTROL ,URGENCY_LOW_WATERMARK , latency_watermark_b); tmp =REG_SET_FIELD (tmp,DPG_PIPE_URGENCY_CONTROL ,URGENCY_HIGH_WATERMARK , line_time);WREG32 (mmDPG_PIPE_URGENCY_CONTROL + amdgpu_crtc->crtc_offset, tmp);/* restore original selection */
Greg Kroah-Hartman
maintainerPATCH 12/120 drm/amdgpu: fix typo in dce10 watermark setup
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit be9fd2e978939ab3e59ee4164fa0893e70359557 upstream.
Using the wrong watermwark value for the secondary watermark. Copy paste typo. Noticed by Mykola.
--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
@@ -1331,7 +1331,7 @@ static void dce_v10_0_program_watermarks tmp =REG_SET_FIELD (wm_mask,DPG_WATERMARK_MASK_CONTROL ,URGENCY_WATERMARK_MASK ,2 );WREG32 (mmDPG_WATERMARK_MASK_CONTROL + amdgpu_crtc->crtc_offset, tmp); tmp =RREG32 (mmDPG_PIPE_URGENCY_CONTROL + amdgpu_crtc->crtc_offset); - tmp =REG_SET_FIELD (tmp,DPG_PIPE_URGENCY_CONTROL ,URGENCY_LOW_WATERMARK , latency_watermark_a); + tmp =REG_SET_FIELD (tmp,DPG_PIPE_URGENCY_CONTROL ,URGENCY_LOW_WATERMARK , latency_watermark_b); tmp =REG_SET_FIELD (tmp,DPG_PIPE_URGENCY_CONTROL ,URGENCY_HIGH_WATERMARK , line_time);WREG32 (mmDPG_PIPE_URGENCY_CONTROL + amdgpu_crtc->crtc_offset, tmp);/* restore original selection */
Greg Kroah-Hartman
maintainerPATCH 2/120 drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Imre Deak <[email protected]>
commit 54875571bbfde00fc63741715c531cbb5246c3b2 upstream.
commit da2bc1b9db3351addd293e5b82757efe1f77ed1d
Author: Imre Deak <[email protected]> Date: Thu Oct 23 19:23:26 2014 +0300
drm/i915: add poweroff_late handler
introduced a regression on old platforms during hibernation. A workaround was added in
commit ab3be73fa7b43f4c3648ce29b5fd649ea54d3adb
Author: Imre Deak <[email protected]> Date: Mon Mar 2 13:04:41 2015 +0200
drm/i915: gen4: work around hang during hibernation
using an explicit blacklist for the GENs/BIOS vendors where the issue was reported. Later there we had reports of the same failure on platforms not on this list.
To my best knowledge the correct thing to do is still to put the device to PCI D3 state during hibernation, see [1] and [2] for the reasons. This also aligns with our future plans to unify more the runtime and system suspend/resume paths. Since an exact blacklist seems to be impractical (multiple GENs and BIOS vendors are affected) apply the workaround on everything pre GEN6.
[1] http://lists.freedesktop.org/archives/intel-gfx/2015-February/060710.html
[2] https://lkml.org/lkml/2015/6/22/274
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95061
--- drivers/gpu/drm/i915/i915_drv.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +9 -6
@@ -683,15 +683,18 @@ static int i915_drm_suspend_late(structpci_disable_device (drm_dev->pdev);/* -* During hibernation on some GEN4 platforms the BIOS may try to access +* During hibernation on some platforms the BIOS may try to access * the device even though it's already in D3 and hang the machine. So * leave the device in D0 on those platforms and hope the BIOS will -* power down the device properly. Platforms where this was seen: -* Lenovo Thinkpad X301, X61s +* power down the device properly. The issue was seen on multiple old +* GENs with different BIOS vendors, so having an explicit blacklist +* is inpractical; apply the workaround on everything pre GEN6. The +* platforms where the issue was seen: +* Lenovo Thinkpad X301, X61s, X60, T60, X41 +* Fujitsu FSC S7110 +* Acer Aspire 1830T */ -if (!(hibernation && - drm_dev->pdev->subsystem_vendor ==PCI_VENDOR_ID_LENOVO && -INTEL_INFO (dev_priv)->gen ==4 )) +if (!(hibernation &&INTEL_INFO (dev_priv)->gen <6 ))pci_set_power_state (drm_dev->pdev, PCI_D3hot);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 7/120 drm/radeon: fix HDMI quantization_range for pre-DCE5 asics
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit 86b7709d48f0df8796bddd7e1ce45c6fb7a7c6ec upstream.
Support for output_csc is only available on DCE5 and newer so don't mess with the HDMI quantization_range on pre-DCE5 asics.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=83226
--- drivers/gpu/drm/radeon/radeon_audio.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/radeon/radeon_audio.c +9 -7
@@ -522,13 +522,15 @@ static int radeon_audio_set_avi_packet(sreturn err; } -if (drm_rgb_quant_range_selectable (radeon_connector_edid (connector))) { -if (radeon_encoder->output_csc ==RADEON_OUTPUT_CSC_TVRGB ) - frame.quantization_range =HDMI_QUANTIZATION_RANGE_LIMITED ; -else - frame.quantization_range =HDMI_QUANTIZATION_RANGE_FULL ; - }else { - frame.quantization_range =HDMI_QUANTIZATION_RANGE_DEFAULT ; +if (radeon_encoder->output_csc !=RADEON_OUTPUT_CSC_BYPASS ) { +if (drm_rgb_quant_range_selectable (radeon_connector_edid (connector))) { +if (radeon_encoder->output_csc ==RADEON_OUTPUT_CSC_TVRGB ) + frame.quantization_range =HDMI_QUANTIZATION_RANGE_LIMITED ; +else + frame.quantization_range =HDMI_QUANTIZATION_RANGE_FULL ; + }else { + frame.quantization_range =HDMI_QUANTIZATION_RANGE_DEFAULT ; + } } err =hdmi_avi_infoframe_pack (&frame, buffer,sizeof (buffer));
Greg Kroah-Hartman
maintainerPATCH 26/120 iio:accel:mma8452: fix _get_hp_filter_index
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hartmut Knaack <[email protected]>
commit 001fceb9c64a39aebb85d31134182d39c1628a21 upstream.
To iterate through the available frequencies of mma8452_hp_filter_cutoff[], the array size of a row of that table needs to be provided to _get_int_plus_micros_index().
--- drivers/iio/accel/mma8452.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/mma8452.c +1 -1
@@ -229,7 +229,7 @@ static int mma8452_get_hp_filter_index(sint i =mma8452_get_odr_index (data);return mma8452_get_int_plus_micros_index (mma8452_hp_filter_cutoff[i], -ARRAY_SIZE (mma8452_scales[0 ]), val, val2); +ARRAY_SIZE (mma8452_hp_filter_cutoff[0 ]), val, val2); }static int mma8452_read_hp_filter (struct mma8452_data *data,int *hz,int *uHz)
Greg Kroah-Hartman
maintainerPATCH 28/120 staging: rtl8192e: Fix log spamming in rtl8192_hard_data_xmit
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mateusz Kulikowski <[email protected]>
commit 435009bba4d0449b611bc24ae5c9636ac5b2a00e upstream.
This patch fixes issue generated by commit ca93dcba3a92 ("staging: rtl8192e: Remove assert() macro")
One negation was missed in conversion, therefore
asserted message was always printed.
For 1MB file downloaded via http, ~500 messages
were generated.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +2 -2
@@ -1826,8 +1826,8 @@ void rtl8192_hard_data_xmit(struct sk_bureturn ; } -if (queue_index !=TXCMD_QUEUE ) -netdev_warn (dev,"%s(): queue index != TXCMD_QUEUE\n" , +if (queue_index ==TXCMD_QUEUE ) +netdev_warn (dev,"%s(): queue index == TXCMD_QUEUE\n" , __func__);memcpy ((unsigned char *)(skb->cb), &dev,sizeof (dev));
Greg Kroah-Hartman
maintainerPATCH 29/120 staging: comedi: adl_pci7x3x: fix digital output on PCI-7230
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Abbott <[email protected]>
commit ad83dbd974feb2e2a8cc071a1d28782bd4d2c70e upstream.
The "adl_pci7x3x" driver replaced the "adl_pci7230" and "adl_pci7432" drivers in commits 8f567c373c4b ("staging: comedi: new adl_pci7x3x driver") and 657f77d173d3 ("staging: comedi: remove adl_pci7230 and adl_pci7432 drivers"). Although the new driver code agrees with the user manuals for the respective boards, digital outputs stopped working on the PCI-7230. This has 16 digital output channels and the previous adl_pci7230 driver shifted the 16 bit output state left by 16 bits before writing to the hardware register. The new adl_pci7x3x driver doesn't do that. Fix it in adl_pci7x3x_do_insn_bits() by checking for the special case of the subdevice having only 16 channels and duplicating the 16 bit output state into both halves of the 32-bit register. That should work both for what the board actually does and for what the user manual says it should do.
--- drivers/staging/comedi/drivers/adl_pci7x3x.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/adl_pci7x3x.c +14 -2
@@ -120,8 +120,20 @@ static int adl_pci7x3x_do_insn_bits(stru {unsigned long reg = (unsigned long )s->private; -if (comedi_dio_update_state (s, data)) -outl (s->state, dev->iobase + reg); +if (comedi_dio_update_state (s, data)) { +unsigned int val = s->state; + +if (s->n_chan ==16 ) { +/* +* It seems the PCI-7230 needs the 16-bit DO state +* to be shifted left by 16 bits before being written +* to the 32-bit register. Set the value in both +* halves of the register to be sure. +*/ + val |= val <<16 ; + } +outl (val, dev->iobase + reg); + } data[1 ] = s->state;
Greg Kroah-Hartman
maintainerPATCH 31/120 staging: comedi: usbduxsigma: dont clobber ao_timer in command test
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Abbott <[email protected]>
commit c04a1f17803e0d3eeada586ca34a6b436959bc20 upstream.
devpriv->ao_timer is used while an asynchronous command is running on the AO subdevice. It also gets modified by the subdevice's cmdtest handler for checking new asynchronous commands, usbduxsigma_ao_cmdtest(), which is not correct as it's allowed to check new commands while an old command is still running. Fix it by moving the code which sets up devpriv->ao_timer into the subdevice's cmd handler, usbduxsigma_ao_cmd().
Note that the removed code in usbduxsigma_ao_cmdtest() checked that devpriv->ao_timer did not end up less that 1, but that could not happen due because cmd->scan_begin_arg or cmd->convert_arg had already been range-checked.
Also note that we tested the high_speed variable in the old code, but that is currently always 0 and means that we always use "scan" timing (cmd->scan_begin_src == TRIG_TIMER and cmd->convert_src == TRIG_NOW) and never "convert" (individual sample) timing (cmd->scan_begin_src == TRIG_FOLLOW and cmd->convert_src == TRIG_TIMER). The moved code tests cmd->convert_src instead to decide whether "scan" or "convert" timing is being used, although currently only "scan" timing is supported.
--- drivers/staging/comedi/drivers/usbduxsigma.c | 33 +++++++++++---------------- 1 file changed, 14 insertions(+), 19 deletions(-)
drivers/staging/comedi/drivers/usbduxsigma.c +14 -19
@@ -912,25 +912,6 @@ static int usbduxsigma_ao_cmdtest(structif (err)return 3 ; -/* Step 4: fix up any arguments */ - -/* we count in timer steps */ -if (high_speed) { -/* timing of the conversion itself: every 125 us */ - devpriv->ao_timer = cmd->convert_arg /125000 ; - }else { -/* -* timing of the scan: every 1ms -* we get all channels at once -*/ - devpriv->ao_timer = cmd->scan_begin_arg /1000000 ; - } -if (devpriv->ao_timer <1 ) - err |= -EINVAL ; - -if (err) -return 4 ; -return 0 ; }
@@ -943,6 +924,20 @@ static int usbduxsigma_ao_cmd(struct comdown (&devpriv->sem); +if (cmd->convert_src ==TRIG_TIMER ) { +/* +* timing of the conversion itself: every 125 us +* at high speed (not used yet) +*/ + devpriv->ao_timer = cmd->convert_arg /125000 ; + }else { +/* +* timing of the scan: every 1ms +* we get all channels at once +*/ + devpriv->ao_timer = cmd->scan_begin_arg /1000000 ; + } + devpriv->ao_counter = devpriv->ao_timer;if (cmd->start_src ==TRIG_NOW ) {
Greg Kroah-Hartman
maintainerPATCH 34/120 clk: rockchip: rk3288: add CLK_SET_RATE_PARENT to sclk_mac
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <[email protected]>
commit 4791eb61dbe8100ccac59fecfac9d93a15db1447 upstream.
The dwmac ethernet controller on the rk3288 supports phys connected via rgmii and rmii. With rgmii phys it is expected that the mac clock is provided externally while with rmii phys the clock can be external but also generated from the plls. In the later case it of course needs be at 50MHz, which gets set from the dwmac_rk driver.
As most devices use a rgmii phy it never surfaced so far that the mac clk mux, doesn't go up one lever to the pll clock in the rmii case with internal clock generation, as it is missing the CLK_SET_RATE_PARENT flag, and thus will not set the correct frequency in most cases.
--- drivers/clk/rockchip/clk-rk3288.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/rockchip/clk-rk3288.c +1 -1
@@ -578,7 +578,7 @@ static struct rockchip_clk_branch rk3288COMPOSITE (0 ,"mac_pll_src" , mux_pll_src_npll_cpll_gpll_p,0 ,RK3288_CLKSEL_CON (21 ),0 ,2 ,MFLAGS ,8 ,5 ,DFLAGS ,RK3288_CLKGATE_CON (2 ),5 ,GFLAGS ), -MUX (SCLK_MAC ,"mac_clk" , mux_mac_p,0 , +MUX (SCLK_MAC ,"mac_clk" , mux_mac_p,CLK_SET_RATE_PARENT ,RK3288_CLKSEL_CON (21 ),4 ,1 ,MFLAGS ),GATE (SCLK_MACREF_OUT ,"sclk_macref_out" ,"mac_clk" ,0 , RK3288_CLKGATE_CON(5), 3, GFLAGS),
Greg Kroah-Hartman
maintainerPATCH 36/120 clk: s5pv210: add missing call to samsung_clk_of_add_provider()
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
commit ba30011577330b7e29ecb5916d89c6db9fbc5b3d upstream.
Commit d5e136a21b2028fb1f45143ea7112d5869bfc6c7 ("clk: samsung: Register clk provider only after registering its all clocks", merged to v3.17-rc1) modified a way that driver registers registers to core framework. This change has not been applied to s5pv210 clocks driver, which has been merged in parallel to that commit. This patch adds a missing call to samsung_clk_of_add_provider(), so the driver is operational again.
--- drivers/clk/samsung/clk-s5pv210.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/samsung/clk-s5pv210.c +2 -0
@@ -828,6 +828,8 @@ static void __init __s5pv210_clk_init(sts5pv210_clk_sleep_init (); +samsung_clk_of_add_provider (np, ctx); + pr_info("%s clocks: mout_apll = %ld, mout_mpll = %ld\n" "\tmout_epll = %ld, mout_vpll = %ld\n", is_s5p6442 ? "S5P6442" : "S5PV210",
Greg Kroah-Hartman
maintainerPATCH 37/120 clk: pistachio: Fix 32bit integer overflows
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zdenko Pulitika <[email protected]>
commit 093affb009a3d87848e51217cd1a06ce1135633f upstream.
This commit fixes 32bit integer overflows throughout the pll driver (i.e. wherever the result of integer multiplication may exceed the range of u32).
One of the functions affected by this problem is .recalc_rate. It returns incorrect rate for some pll settings (not for all though) which in turn results in the incorrect rate setup of pll's child clocks.
--- drivers/clk/pistachio/clk-pll.c | 26 ++++++++++++-------------- drivers/clk/pistachio/clk.h | 14 +++++++------- 2 files changed, 19 insertions(+), 21 deletions(-)
drivers/clk/pistachio/clk-pll.c +12 -14
@@ -88,12 +88,10 @@ static inline void pll_lock(struct pistacpu_relax (); } -static inline u32 do_div_round_closest (u64 dividend,u32 divisor) +static inline u64 do_div_round_closest (u64 dividend,u64 divisor) { dividend += divisor /2 ; -do_div (dividend, divisor); - -return dividend; +return div64_u64 (dividend, divisor); }static inline struct pistachio_clk_pll *to_pistachio_pll (struct clk_hw *hw)
@@ -173,7 +171,7 @@ static int pll_gf40lp_frac_set_rate(strustruct pistachio_clk_pll *pll =to_pistachio_pll (hw);struct pistachio_pll_rate_table *params;int enabled =pll_gf40lp_frac_is_enabled (hw); -u32 val, vco, old_postdiv1, old_postdiv2; +u64 val, vco, old_postdiv1, old_postdiv2;const char *name =__clk_get_name (hw->clk);if (rate <MIN_OUTPUT_FRAC || rate >MAX_OUTPUT_FRAC )
@@ -183,17 +181,17 @@ static int pll_gf40lp_frac_set_rate(struif (!params || !params->refdiv)return -EINVAL ; - vco = params->fref * params->fbdiv / params->refdiv; + vco =div64_u64 (params->fref * params->fbdiv, params->refdiv);if (vco <MIN_VCO_FRAC_FRAC || vco >MAX_VCO_FRAC_FRAC ) -pr_warn ("%s: VCO %u is out of range %lu..%lu\n" , name, vco, +pr_warn ("%s: VCO %llu is out of range %lu..%lu\n" , name, vco,MIN_VCO_FRAC_FRAC ,MAX_VCO_FRAC_FRAC ); - val = params->fref / params->refdiv; + val =div64_u64 (params->fref, params->refdiv);if (val <MIN_PFD ) -pr_warn ("%s: PFD %u is too low (min %lu)\n" , +pr_warn ("%s: PFD %llu is too low (min %lu)\n" , name, val,MIN_PFD );if (val > vco /16 ) -pr_warn ("%s: PFD %u is too high (max %u)\n" , +pr_warn ("%s: PFD %llu is too high (max %llu)\n" , name, val, vco /16 ); val =pll_readl (pll,PLL_CTRL1 );
@@ -237,8 +235,7 @@ static unsigned long pll_gf40lp_frac_rec unsigned long parent_rate) {struct pistachio_clk_pll *pll =to_pistachio_pll (hw); -u32 val, prediv, fbdiv, frac, postdiv1, postdiv2; -u64 rate = parent_rate; +u64 val, prediv, fbdiv, frac, postdiv1, postdiv2, rate; val =pll_readl (pll,PLL_CTRL1 ); prediv = (val >>PLL_CTRL1_REFDIV_SHIFT ) &PLL_CTRL1_REFDIV_MASK ;
@@ -251,6 +248,7 @@ static unsigned long pll_gf40lp_frac_recPLL_FRAC_CTRL2_POSTDIV2_MASK ; frac = (val >>PLL_FRAC_CTRL2_FRAC_SHIFT ) &PLL_FRAC_CTRL2_FRAC_MASK ; + rate = parent_rate; rate *= (fbdiv <<24 ) + frac; rate =do_div_round_closest (rate, (prediv * postdiv1 * postdiv2) <<24 );
@@ -325,12 +323,12 @@ static int pll_gf40lp_laint_set_rate(strif (!params || !params->refdiv)return -EINVAL ; - vco = params->fref * params->fbdiv / params->refdiv; + vco =div_u64 (params->fref * params->fbdiv, params->refdiv);if (vco <MIN_VCO_LA || vco >MAX_VCO_LA )pr_warn ("%s: VCO %u is out of range %lu..%lu\n" , name, vco,MIN_VCO_LA ,MAX_VCO_LA ); - val = params->fref / params->refdiv; + val =div_u64 (params->fref, params->refdiv);if (val <MIN_PFD )pr_warn ("%s: PFD %u is too low (min %lu)\n" , name, val,MIN_PFD );
drivers/clk/pistachio/clk.h +7 -7
@@ -95,13 +95,13 @@ struct pistachio_fixed_factor { }struct pistachio_pll_rate_table { -unsigned long fref; -unsigned long fout; -unsigned int refdiv; -unsigned int fbdiv; -unsigned int postdiv1; -unsigned int postdiv2; -unsigned int frac; +unsigned long long fref; +unsigned long long fout; +unsigned long long refdiv; +unsigned long long fbdiv; +unsigned long long postdiv1; +unsigned long long postdiv2; +unsigned long long frac; };enum pistachio_pll_type {
Greg Kroah-Hartman
maintainerPATCH 38/120 clk: pistachio: Fix override of clk-pll settings from boot loader
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zdenko Pulitika <[email protected]>
commit e53f21c761d141bbcbce06e9ddab3b4e0a828f2c upstream.
PLL enable callbacks are overriding PLL mode (int/frac) and Noise reduction (on/off) settings set by the boot loader which results in the incorrect clock rate.
PLL mode and noise reduction are defined by the DSMPD and DACPD bits of the PLL control register. PLL .enable() callbacks enable PLL by deasserting all power-down bits of the PLL control register, including DSMPD and DACPD bits, which is not necessary since these bits don't actually enable/disable PLL.
This commit fixes the problem by removing DSMPD and DACPD bits from the "PLL enable" mask.
--- drivers/clk/pistachio/clk-pll.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/pistachio/clk-pll.c +2 -3
@@ -134,8 +134,7 @@ static int pll_gf40lp_frac_enable(structu32 val; val =pll_readl (pll,PLL_CTRL3 ); - val &= ~(PLL_FRAC_CTRL3_PD |PLL_FRAC_CTRL3_DACPD | -PLL_FRAC_CTRL3_DSMPD |PLL_FRAC_CTRL3_FOUTPOSTDIVPD | + val &= ~(PLL_FRAC_CTRL3_PD |PLL_FRAC_CTRL3_FOUTPOSTDIVPD |PLL_FRAC_CTRL3_FOUT4PHASEPD |PLL_FRAC_CTRL3_FOUTVCOPD );pll_writel (pll, val,PLL_CTRL3 );
@@ -277,7 +276,7 @@ static int pll_gf40lp_laint_enable(strucu32 val; val =pll_readl (pll,PLL_CTRL1 ); - val &= ~(PLL_INT_CTRL1_PD |PLL_INT_CTRL1_DSMPD | + val &= ~(PLL_INT_CTRL1_PD |PLL_INT_CTRL1_FOUTPOSTDIVPD |PLL_INT_CTRL1_FOUTVCOPD );pll_writel (pll, val,PLL_CTRL1 );
Greg Kroah-Hartman
maintainerPATCH 39/120 clk: pistachio: Fix PLL rate calculation in integer mode
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zdenko Pulitika <[email protected]>
commit 7937c6c57e0da7bffa7b10bac23f230c77523e35 upstream.
.recalc_rate callback for the fractional PLL doesn't take operating mode into account when calculating PLL rate. This results in the incorrect PLL rates when PLL is operating in integer mode.
Operating mode of fractional PLL is based on the value of the fractional divider. Currently it assumes that the PLL will always be configured in fractional mode which may not be
the case. This may result in the wrong output frequency.
Also vco was calculated based on the current operating mode which makes no sense because .set_rate is setting operating mode. Instead, vco should be calculated using PLL settings that are about to be set.
--- drivers/clk/pistachio/clk-pll.c | 48 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-)
drivers/clk/pistachio/clk-pll.c +46 -2
@@ -65,6 +65,12 @@#define MIN_OUTPUT_FRAC 12000000UL#define MAX_OUTPUT_FRAC 1600000000UL +/* Fractional PLL operating modes */ +enum pll_mode { +PLL_MODE_FRAC , +PLL_MODE_INT , +}; +struct pistachio_clk_pll {struct clk_hw hw;void __iomem *base;
@@ -99,6 +105,29 @@ static inline struct pistachio_clk_pll * return container_of(hw, struct pistachio_clk_pll, hw); } +static inline enum pll_mode pll_frac_get_mode (struct clk_hw *hw) +{ +struct pistachio_clk_pll *pll =to_pistachio_pll (hw); +u32 val; + + val =pll_readl (pll,PLL_CTRL3 ) &PLL_FRAC_CTRL3_DSMPD ; +return val ?PLL_MODE_INT :PLL_MODE_FRAC ; +} + +static inline void pll_frac_set_mode (struct clk_hw *hw,enum pll_mode mode) +{ +struct pistachio_clk_pll *pll =to_pistachio_pll (hw); +u32 val; + + val =pll_readl (pll,PLL_CTRL3 ); +if (mode ==PLL_MODE_INT ) + val |=PLL_FRAC_CTRL3_DSMPD |PLL_FRAC_CTRL3_DACPD ; +else + val &= ~(PLL_FRAC_CTRL3_DSMPD |PLL_FRAC_CTRL3_DACPD ); + +pll_writel (pll, val,PLL_CTRL3 ); +} +static struct pistachio_pll_rate_table *pll_get_params (struct pistachio_clk_pll *pll,unsigned long fref,unsigned long fout)
@@ -180,7 +209,11 @@ static int pll_gf40lp_frac_set_rate(struif (!params || !params->refdiv)return -EINVAL ; - vco =div64_u64 (params->fref * params->fbdiv, params->refdiv); +/* calculate vco */ + vco = params->fref; + vco *= (params->fbdiv <<24 ) + params->frac; + vco =div64_u64 (vco, params->refdiv <<24 ); +if (vco <MIN_VCO_FRAC_FRAC || vco >MAX_VCO_FRAC_FRAC )pr_warn ("%s: VCO %llu is out of range %lu..%lu\n" , name, vco,MIN_VCO_FRAC_FRAC ,MAX_VCO_FRAC_FRAC );
@@ -224,6 +257,12 @@ static int pll_gf40lp_frac_set_rate(stru (params->postdiv2 <<PLL_FRAC_CTRL2_POSTDIV2_SHIFT );pll_writel (pll, val,PLL_CTRL2 ); +/* set operating mode */ +if (params->frac) +pll_frac_set_mode (hw,PLL_MODE_FRAC ); +else +pll_frac_set_mode (hw,PLL_MODE_INT ); +if (enabled)pll_lock (pll);
@@ -247,8 +286,13 @@ static unsigned long pll_gf40lp_frac_recPLL_FRAC_CTRL2_POSTDIV2_MASK ; frac = (val >>PLL_FRAC_CTRL2_FRAC_SHIFT ) &PLL_FRAC_CTRL2_FRAC_MASK ; +/* get operating mode (int/frac) and calculate rate accordingly */ rate = parent_rate; - rate *= (fbdiv <<24 ) + frac; +if (pll_frac_get_mode (hw) ==PLL_MODE_FRAC ) + rate *= (fbdiv <<24 ) + frac; +else + rate *= (fbdiv <<24 ); + rate =do_div_round_closest (rate, (prediv * postdiv1 * postdiv2) <<24 );return rate;
Greg Kroah-Hartman
maintainerPATCH 40/120 clk: pistachio: correct critical clock list
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Damien.Horsley" <[email protected]>
commit d31ff5f7f3b142b8d1ebb3da89187c54cdf2bc71 upstream.
Current critical clock list for pistachio enables only mips and sys clocks by default but there are also other clocks that are not claimed by anyone and needs to be enabled by default.
This patch updates the critical clocks that need to be enabled by default.
Add a separate struct to distinguish the critical clocks as listed:
1.) core clocks:
a.) mips clock
2.) peripheral system clocks:
a.) sys clock
b.) sys_bus clock
c.) DDR clock
d.) ROM clock
--- drivers/clk/pistachio/clk-pistachio.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
drivers/clk/pistachio/clk-pistachio.c +14 -5
@@ -159,9 +159,15 @@ PNAME(mux_debug) = { "mips_pll_mux", "rp "wifi_pll_mux", "bt_pll_mux" };static u32 mux_debug_idx[] = {0x0 ,0x1 ,0x2 ,0x4 ,0x8 ,0x10 }; -static unsigned int pistachio_critical_clks[]__initdata = { -CLK_MIPS , -CLK_PERIPH_SYS , +static unsigned int pistachio_critical_clks_core[]__initdata = { +CLK_MIPS +}; + +static unsigned int pistachio_critical_clks_sys[]__initdata = { +PERIPH_CLK_SYS , +PERIPH_CLK_SYS_BUS , +PERIPH_CLK_DDR , +PERIPH_CLK_ROM , };static void __init pistachio_clk_init (struct device_node *np)
@@ -193,8 +199,8 @@ static void __init pistachio_clk_init(stpistachio_clk_register_provider (p); -pistachio_clk_force_enable (p, pistachio_critical_clks, -ARRAY_SIZE (pistachio_critical_clks)); +pistachio_clk_force_enable (p, pistachio_critical_clks_core, +ARRAY_SIZE (pistachio_critical_clks_core)); }CLK_OF_DECLARE (pistachio_clk,"img,pistachio-clk" , pistachio_clk_init);
@@ -261,6 +267,9 @@ static void __init pistachio_clk_periph_ ARRAY_SIZE(pistachio_periph_gates));pistachio_clk_register_provider (p); + +pistachio_clk_force_enable (p, pistachio_critical_clks_sys, +ARRAY_SIZE (pistachio_critical_clks_sys)); }CLK_OF_DECLARE (pistachio_clk_periph,"img,pistachio-clk-periph" , pistachio_clk_periph_init);
Greg Kroah-Hartman
maintainerPATCH 41/120 clk: versatile: off by one in clk_sp810_timerclken_of_get()
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 3294bee87091be5f179474f6c39d1d87769635e2 upstream.
The ">" should be ">=" or we end up reading beyond the end of the array.
--- drivers/clk/versatile/clk-sp810.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/versatile/clk-sp810.c +2 -2
@@ -128,8 +128,8 @@ static struct clk *clk_sp810_timerclken_ {struct clk_sp810 *sp810 = data; -if (WARN_ON (clkspec->args_count !=1 || clkspec->args[0 ] > -ARRAY_SIZE (sp810->timerclken))) +if (WARN_ON (clkspec->args_count !=1 || + clkspec->args[0 ] >=ARRAY_SIZE (sp810->timerclken)))return NULL ;return sp810->timerclken[clkspec->args[0 ]].clk;
Greg Kroah-Hartman
maintainerPATCH 42/120 clk: pxa: fix core frequency reporting unit
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robert Jarzmik <[email protected]>
commit 4b5fb7dc9096d949a22651370bb6bf11f21edb30 upstream.
Legacy drivers which are not yet ported, such as cpufreq-pxa[23]xx, rely on pxaXXx_get_clk_frequency_khz() to find the CPU core frequency.
This reporting was broken because the expected unit is kHz and not Hz. Fix the reporting for pxa25x, pxa27x and pxa3xx.
--- drivers/clk/pxa/clk-pxa25x.c | 2 +- drivers/clk/pxa/clk-pxa27x.c | 2 +- drivers/clk/pxa/clk-pxa3xx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/clk/pxa/clk-pxa25x.c +1 -1
@@ -79,7 +79,7 @@ unsigned int pxa25x_get_clk_frequency_kh clks[3] / 1000000, (clks[3] % 1000000) / 10000); } -return (unsigned int )clks[0 ]; +return (unsigned int )clks[0 ] / KHz; } static unsigned long clk_pxa25x_memory_get_rate(struct clk_hw *hw,
drivers/clk/pxa/clk-pxa27x.c +1 -1
@@ -80,7 +80,7 @@ unsigned int pxa27x_get_clk_frequency_khpr_info ("System bus clock: %ld.%02ldMHz\n" , clks[4 ] /1000000 , (clks[4 ] %1000000 ) /10000 ); } -return (unsigned int )clks[0 ]; +return (unsigned int )clks[0 ] / KHz; }bool pxa27x_is_ppll_disabled (void )
drivers/clk/pxa/clk-pxa3xx.c +1 -1
@@ -78,7 +78,7 @@ unsigned int pxa3xx_get_clk_frequency_khpr_info ("System bus clock: %ld.%02ldMHz\n" , clks[4 ] /1000000 , (clks[4 ] %1000000 ) /10000 ); } -return (unsigned int )clks[0 ]; +return (unsigned int )clks[0 ] / KHz; } static unsigned long clk_pxa3xx_ac97_get_rate(struct clk_hw *hw,
Greg Kroah-Hartman
maintainerPATCH 44/120 clk: qcom: Fix MSM8916 prng clock enable bit
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Georgi Djakov <[email protected]>
commit 1c4b4b0eb1909010b8ebda1ef208bf3ed62e7487 upstream.
Fix the enable bit of the pseudorandom number generator clock.
--- drivers/clk/qcom/gcc-msm8916.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/gcc-msm8916.c +1 -1
@@ -2278,7 +2278,7 @@ static struct clk_branch gcc_prng_ahb_cl .halt_check = BRANCH_HALT_VOTED, .clkr = { .enable_reg = 0x45004, - .enable_mask = BIT(0), + .enable_mask = BIT(8), .hw.init = &(struct clk_init_data){ .name = "gcc_prng_ahb_clk", .parent_names = (const char *[]){
Greg Kroah-Hartman
maintainerPATCH 45/120 PCI: Fix TI816X class code quirk
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Helgaas <[email protected]>
commit d1541dc977d376406f4584d8eb055488655c98ec upstream.
In fixup_ti816x_class(), we assigned "class = PCI_CLASS_MULTIMEDIA_VIDEO". But PCI_CLASS_MULTIMEDIA_VIDEO is only the two-byte base class/sub-class and needs to be shifted to make space for the low-order interface byte.
Shift PCI_CLASS_MULTIMEDIA_VIDEO to set the correct class code.
--- drivers/pci/quirks.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/pci/quirks.c +6 -3
@@ -2829,12 +2829,15 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INstatic void fixup_ti816x_class (struct pci_dev *dev) { +u32 class = dev->class; +/* TI 816x devices do not have class code set when in PCIe boot mode */ -dev_info (&dev->dev,"Setting PCI class for 816x PCIe device\n" ); - dev->class =PCI_CLASS_MULTIMEDIA_VIDEO ; + dev->class =PCI_CLASS_MULTIMEDIA_VIDEO <<8 ; +dev_info (&dev->dev,"PCI class overridden (%#08x -> %#08x)\n" , + class, dev->class); }DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_TI ,0xb800 , -PCI_CLASS_NOT_DEFINED ,0 , fixup_ti816x_class); +PCI_CLASS_NOT_DEFINED ,0 , fixup_ti816x_class);/* Some PCIe devices do not work reliably with the claimed maximum * payload size supported.
Greg Kroah-Hartman
maintainerPATCH 46/120 PCI: Add dev_flags bit to access VPD through function 0
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Rustad <[email protected]>
commit 932c435caba8a2ce473a91753bad0173269ef334 upstream.
Add a dev_flags bit, PCI_DEV_FLAGS_VPD_REF_F0, to access VPD through function 0 to provide VPD access on other functions. This is for hardware devices that provide copies of the same VPD capability registers in multiple functions. Because the kernel expects that each function has its own registers, both the locking and the state tracking are affected by VPD accesses to different functions.
On such devices for example, if a VPD write is performed on function 0, *any* later attempt to read VPD from any other function of that device will hang. This has to do with how the kernel tracks the expected value of the F bit per function.
Concurrent accesses to different functions of the same device can not only hang but also corrupt both read and write VPD data.
When hangs occur, typically the error message:
vpd r/w failed. This is likely a firmware bug on this device.
will be seen.
Never set this bit on function 0 or there will be an infinite recursion.
--- drivers/pci/access.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/pci.h | 2 + 2 files changed, 62 insertions(+), 1 deletion(-)
drivers/pci/access.c +60 -1
@@ -439,6 +439,56 @@ static const struct pci_vpd_ops pci_vpd_ .release = pci_vpd_pci22_release, }; +static ssize_t pci_vpd_f0_read (struct pci_dev *dev,loff_t pos,size_t count, +void *arg) +{ +struct pci_dev *tdev =pci_get_slot (dev->bus,PCI_SLOT (dev->devfn)); +ssize_t ret; + +if (!tdev) +return -ENODEV ; + + ret =pci_read_vpd (tdev, pos, count, arg); +pci_dev_put (tdev); +return ret; +} + +static ssize_t pci_vpd_f0_write (struct pci_dev *dev,loff_t pos,size_t count, +const void *arg) +{ +struct pci_dev *tdev =pci_get_slot (dev->bus,PCI_SLOT (dev->devfn)); +ssize_t ret; + +if (!tdev) +return -ENODEV ; + + ret =pci_write_vpd (tdev, pos, count, arg); +pci_dev_put (tdev); +return ret; +} + +static const struct pci_vpd_ops pci_vpd_f0_ops = { + .read = pci_vpd_f0_read, + .write = pci_vpd_f0_write, + .release = pci_vpd_pci22_release, +}; + +static int pci_vpd_f0_dev_check (struct pci_dev *dev) +{ +struct pci_dev *tdev =pci_get_slot (dev->bus,PCI_SLOT (dev->devfn)); +int ret =0 ; + +if (!tdev) +return -ENODEV ; +if (!tdev->vpd || !tdev->multifunction || + dev->class != tdev->class || dev->vendor != tdev->vendor || + dev->device != tdev->device) + ret = -ENODEV ; + +pci_dev_put (tdev); +return ret; +} +int pci_vpd_pci22_init (struct pci_dev *dev) {struct pci_vpd_pci22 *vpd;
@@ -447,12 +497,21 @@ int pci_vpd_pci22_init(struct pci_dev *d cap =pci_find_capability (dev,PCI_CAP_ID_VPD );if (!cap)return -ENODEV ; +if (dev->dev_flags &PCI_DEV_FLAGS_VPD_REF_F0 ) { +int ret =pci_vpd_f0_dev_check (dev); + +if (ret) +return ret; + } vpd =kzalloc (sizeof (*vpd),GFP_ATOMIC );if (!vpd)return -ENOMEM ; vpd->base.len =PCI_VPD_PCI22_SIZE ; - vpd->base.ops = &pci_vpd_pci22_ops; +if (dev->dev_flags &PCI_DEV_FLAGS_VPD_REF_F0 ) + vpd->base.ops = &pci_vpd_f0_ops; +else + vpd->base.ops = &pci_vpd_pci22_ops;mutex_init (&vpd->lock); vpd->cap = cap; vpd->busy = false;
include/linux/pci.h +2 -0
@@ -180,6 +180,8 @@ enum pci_dev_flags {PCI_DEV_FLAGS_NO_BUS_RESET = (__force pci_dev_flags_t) (1 <<6 ),/* Do not use PM reset even if device advertises NoSoftRst- */ PCI_DEV_FLAGS_NO_PM_RESET = (__force pci_dev_flags_t) (1 <<7 ), +/* Get VPD from function 0 VPD */ + PCI_DEV_FLAGS_VPD_REF_F0 = (__force pci_dev_flags_t) (1 << 8), }; enum pci_irq_reroute_variant {
Greg Kroah-Hartman
maintainerPATCH 47/120 PCI: Add VPD function 0 quirk for Intel Ethernet devices
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Rustad <[email protected]>
commit 7aa6ca4d39edf01f997b9e02cf6d2fdeb224f351 upstream.
Set the PCI_DEV_FLAGS_VPD_REF_F0 flag on all Intel Ethernet device functions other than function 0, so that on multi-function devices, we will always read VPD from function 0 instead of from the other functions.
--- drivers/pci/quirks.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/pci/quirks.c +9 -0
@@ -1894,6 +1894,15 @@ static void quirk_netmos(struct pci_devDECLARE_PCI_FIXUP_CLASS_HEADER (PCI_VENDOR_ID_NETMOS ,PCI_ANY_ID ,PCI_CLASS_COMMUNICATION_SERIAL ,8 , quirk_netmos); +static void quirk_f0_vpd_link (struct pci_dev *dev) +{ +if (!dev->multifunction || !PCI_FUNC (dev->devfn)) +return ; + dev->dev_flags |=PCI_DEV_FLAGS_VPD_REF_F0 ; +} +DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_INTEL ,PCI_ANY_ID , +PCI_CLASS_NETWORK_ETHERNET ,8 , quirk_f0_vpd_link); +static void quirk_e100_interrupt (struct pci_dev *dev) {u16 command, pmcsr;
Greg Kroah-Hartman
maintainerPATCH 51/120 spi: bcm2835: set up spi-mode before asserting cs-gpio
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Sperl <[email protected]>
commit acace73df2c1913a526c1b41e4741a4a6704c863 upstream.
When using reverse polarity for clock (spi-cpol) on a device the clock line gets altered after chip-select has been asserted resulting in an additional clock beat, which confuses hardware.
This did not show when using native-CS, as the same register is used to control cs as well as polarity, so the changes came into effect at the same time. Unfortunately this is not true with gpio-cs.
To avoid this situation this patch moves the setup of polarity (spi-cpol and spi-cpha) outside of the chip-select into prepare_message, which is run prior to asserting chip-select.
Also fixes resetting 3-wire mode after use of rx-mode, so that a 3-Wire sequence TX, RX, TX works as well (right now it runs TX, RX, RX instead)
--- drivers/spi/spi-bcm2835.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-)
drivers/spi/spi-bcm2835.c +23 -5
@@ -553,13 +553,11 @@ static int bcm2835_spi_transfer_one(stru spi_used_hz = cdiv ? (clk_hz / cdiv) : (clk_hz /65536 );bcm2835_wr (bs,BCM2835_SPI_CLK , cdiv); -/* handle all the modes */ +/* handle all the 3-wire mode */ if ((spi->mode &SPI_3WIRE ) && (tfr->rx_buf)) cs |=BCM2835_SPI_CS_REN ; -if (spi->mode &SPI_CPOL ) - cs |=BCM2835_SPI_CS_CPOL ; -if (spi->mode &SPI_CPHA ) - cs |=BCM2835_SPI_CS_CPHA ; +else + cs &= ~BCM2835_SPI_CS_REN ;/* for gpio_cs set dummy CS so that no HW-CS get changed * we can not run this in bcm2835_spi_set_cs, as it does
@@ -592,6 +590,25 @@ static int bcm2835_spi_transfer_one(strureturn bcm2835_spi_transfer_one_irq (master, spi, tfr, cs); } +static int bcm2835_spi_prepare_message (struct spi_master *master, +struct spi_message *msg) +{ +struct spi_device *spi = msg->spi; +struct bcm2835_spi *bs =spi_master_get_devdata (master); +u32 cs =bcm2835_rd (bs,BCM2835_SPI_CS ); + + cs &= ~(BCM2835_SPI_CS_CPOL |BCM2835_SPI_CS_CPHA ); + +if (spi->mode &SPI_CPOL ) + cs |=BCM2835_SPI_CS_CPOL ; +if (spi->mode &SPI_CPHA ) + cs |=BCM2835_SPI_CS_CPHA ; + +bcm2835_wr (bs,BCM2835_SPI_CS , cs); + +return 0 ; +} +static void bcm2835_spi_handle_err (struct spi_master *master,struct spi_message *msg) {
@@ -739,6 +756,7 @@ static int bcm2835_spi_probe(struct plat master->set_cs = bcm2835_spi_set_cs; master->transfer_one = bcm2835_spi_transfer_one; master->handle_err = bcm2835_spi_handle_err; + master->prepare_message = bcm2835_spi_prepare_message; master->dev.of_node = pdev->dev.of_node; bs =spi_master_get_devdata (master);
Greg Kroah-Hartman
maintainerPATCH 52/120 spi: Fix regression in spi-bitbang-txrx.h
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars Persson <[email protected]>
commit 26a67ec47a4c58fe79c6421c3dc3d697d322d2d6 upstream.
This patch fixes a regression introduced by commit 232a5adc5199 ("spi:
bitbang: only toggle bitchanges"). The attempt to optimize writes of consecutive bit patterns broke most of the combinations of word size and SPI modes due to selecting the wrong bit as the MSB value.
--- drivers/spi/spi-bitbang-txrx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-bitbang-txrx.h +2 -2
@@ -49,7 +49,7 @@ bitbang_txrx_be_cpha0(struct spi_device {/* if (cpol == 0) this is SPI_MODE_0; else this is SPI_MODE_2 */ -bool oldbit = !(word &1 ); +u32 oldbit = (!(word & (1 <<(bits-1 )))) <<31 ;/* clock starts at inactive polarity */ for (word <<= (32 - bits);likely (bits); bits--) {
@@ -81,7 +81,7 @@ bitbang_txrx_be_cpha1(struct spi_device {/* if (cpol == 0) this is SPI_MODE_1; else this is SPI_MODE_3 */ -bool oldbit = !(word & (1 <<31 )); +u32 oldbit = (!(word & (1 <<(bits-1 )))) <<31 ;/* clock starts at inactive polarity */ for (word <<= (32 - bits);likely (bits); bits--) {
Greg Kroah-Hartman
maintainerPATCH 19/120 s390/setup: fix novx parameter
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Schwidefsky <[email protected]>
commit 89b1145e93771d727645c96e323539c029b63f1c upstream.
The novx parameter disables the vector facility but the HWCAP_S390_VXRS bit in the ELf hardware capabilies is always set if the machine has the vector facility. If the user space program uses the "vx" string in the features field of /proc/cpuinfo to utilize vector instruction it will crash if the novx kernel paramter is set.
Convert setup_hwcaps to an arch_initcall and use MACHINE_HAS_VX to decide if the HWCAPS_S390_VXRS bit needs to be set.
--- arch/s390/kernel/setup.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
arch/s390/kernel/setup.c +7 -8
@@ -688,7 +688,7 @@ static void __init setup_memory(void)/* * Setup hardware capabilities. */ -static void __init setup_hwcaps (void ) +static int __init setup_hwcaps (void ) {static const int stfl_bits[6 ] = {0 ,2 ,7 ,17 ,19 ,21 };struct cpuid cpu_id;
@@ -754,9 +754,11 @@ static void __init setup_hwcaps(void) elf_hwcap |=HWCAP_S390_TE ;/* -* Vector extension HWCAP_S390_VXRS is bit 11. +* Vector extension HWCAP_S390_VXRS is bit 11. The Vector extension +* can be disabled with the "novx" parameter. Use MACHINE_HAS_VX +* instead of facility bit 129. */ -if (test_facility (129 )) +if (MACHINE_HAS_VX ) elf_hwcap |=HWCAP_S390_VXRS ;get_cpu_id (&cpu_id);add_device_randomness (&cpu_id,sizeof (cpu_id));
@@ -793,7 +795,9 @@ static void __init setup_hwcaps(void)strcpy (elf_platform,"z13" );break ; } +return 0 ; } +arch_initcall (setup_hwcaps);/* * Add system information as device randomness
@@ -881,11 +885,6 @@ void __init setup_arch(char **cmdline_p)cpu_init ();/* -* Setup capabilities (ELF_HWCAP & ELF_PLATFORM). -*/ -setup_hwcaps (); - -/* * Create kernel page tables and switch to virtual addressing. */ paging_init ();
Greg Kroah-Hartman
maintainerPATCH 20/120 iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markus Pargmann <[email protected]>
commit 06d2f6ca5a38abe92f1f3a132b331eee773868c3 upstream.
This patch adds selects for IIO_BUFFER and IIO_TRIGGERED_BUFFER. Without IIO_BUFFER, the driver does not compile.
--- drivers/iio/gyro/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/gyro/Kconfig +2 -1
@@ -53,7 +53,8 @@ config ADXRS450 config BMG160 tristate "BOSCH BMG160 Gyro Sensor" depends on I2C - select IIO_TRIGGERED_BUFFER if IIO_BUFFER + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER help Say yes here to build support for Bosch BMG160 Tri-axis Gyro Sensor driver. This driver also supports BMI055 gyroscope.
Greg Kroah-Hartman
maintainerPATCH 21/120 iio: event: Remove negative error code from iio_event_poll
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristina Opriceana <[email protected]>
commit 41d903c00051d8f31c98a8136edbac67e6f8688f upstream.
Negative return values are not supported by iio_event_poll since its return type is unsigned int.
--- drivers/iio/industrialio-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/industrialio-event.c +1 -1
@@ -84,7 +84,7 @@ static unsigned int iio_event_poll(strucunsigned int events =0 ;if (!indio_dev->info) -return -ENODEV ; +return events;poll_wait (filep, &ev_int->wait, wait);
Greg Kroah-Hartman
maintainerPATCH 55/120 spi: img-spfi: check for timeout error before proceeding
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sifan Naeem <[email protected]>
commit 011710e2ab659c7ad6e5e554806414bd7a9508be upstream.
Calling spfi_wait_all_done is not required if the transfer has timed out before all data is transferred.
spfi_wait_all_done polls for Alldone interrupt which is triggered to mark the transfer as complete and to indicate it is now safe to issue a new transfer.
--- drivers/spi/spi-img-spfi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/spi/spi-img-spfi.c +4 -4
@@ -267,15 +267,15 @@ static int img_spfi_start_pio(struct spicpu_relax (); } - ret =spfi_wait_all_done (spfi); -if (ret <0 ) -return ret; -if (rx_bytes >0 || tx_bytes >0 ) {dev_err (spfi->dev,"PIO transfer timed out\n" );return -ETIMEDOUT ; } + ret =spfi_wait_all_done (spfi); +if (ret <0 ) +return ret; +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 65/120 xfs: Fix xfs_attr_leafblock definition
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <[email protected]>
commit ffeecc5213024ae663377b442eedcfbacf6d0c5d upstream.
struct xfs_attr_leafblock contains 'entries' array which is declared with size 1 altough it can in fact contain much more entries. Since this array is followed by further struct members, gcc (at least in version 4.8.3) thinks that the array has the fixed size of 1 element and thus may optimize away all accesses beyond the end of array resulting in non-working code. This problem was only observed with userspace code in xfsprogs, however it's better to be safe in kernel as well and have matching kernel and xfsprogs definitions.
--- fs/xfs/libxfs/xfs_da_format.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
fs/xfs/libxfs/xfs_da_format.h +9 -2
@@ -680,8 +680,15 @@ typedef struct xfs_attr_leaf_name_remotetypedef struct xfs_attr_leafblock {xfs_attr_leaf_hdr_t hdr;/* constant-structure header block */ xfs_attr_leaf_entry_t entries[1 ];/* sorted on key, not name */ -xfs_attr_leaf_name_local_t namelist;/* grows from bottom of buf */ -xfs_attr_leaf_name_remote_t valuelist;/* grows from bottom of buf */ +/* +* The rest of the block contains the following structures after the +* leaf entries, growing from the bottom up. The variables are never +* referenced and definining them can actually make gcc optimize away +* accesses to the 'entries' array above index 0 so don't do that. +* +* xfs_attr_leaf_name_local_t namelist; +* xfs_attr_leaf_name_remote_t valuelist; +*/ }xfs_attr_leafblock_t ;/*
Greg Kroah-Hartman
maintainerPATCH 67/120 xfs: return errors from partial I/O failures to files
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Jeffery <[email protected]>
commit c9eb256eda4420c06bb10f5e8fbdbe1a34bc98e0 upstream.
There is an issue with xfs's error reporting in some cases of I/O partially failing and partially succeeding. Calls like fsync() can report success even though not all I/O was successful in partial-failure cases such as one disk of a RAID0 array being offline.
The issue can occur when there are more than one bio per xfs_ioend struct. Each call to xfs_end_bio() for a bio completing will write a value to ioend->io_error. If a successful bio completes after any failed bio, no error is reported do to it writing 0 over the error code set by any failed bio. The I/O error information is now lost and when the ioend is completed only success is reported back up the filesystem stack.
xfs_end_bio() should only set ioend->io_error in the case of BIO_UPTODATE being clear. ioend->io_error is initialized to 0 at allocation so only needs to be updated by a failed bio. Also check that ioend->io_error is 0 so that the first error reported will be the error code returned.
--- fs/xfs/xfs_aops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/xfs_aops.c +2 -1
@@ -356,7 +356,8 @@ xfs_end_bio( {xfs_ioend_t *ioend = bio->bi_private; - ioend->io_error =test_bit (BIO_UPTODATE , &bio->bi_flags) ?0 : error; +if (!ioend->io_error && !test_bit (BIO_UPTODATE , &bio->bi_flags)) + ioend->io_error = error;/* Toss bio and pass work off to an xfsdatad thread */ bio->bi_private =NULL ;
Greg Kroah-Hartman
maintainerPATCH 68/120 usb: gadget: m66592-udc: forever loop in set_feature()
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 5feb5d2003499b1094d898c010a7604d7afddc4c upstream.
There is an "&&" vs "||" typo here so this loops 3000 times or if we get unlucky it could loop forever.
--- drivers/usb/gadget/udc/m66592-udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/m66592-udc.c +1 -1
@@ -1052,7 +1052,7 @@ static void set_feature(struct m66592 *m tmp =m66592_read (m66592,M66592_INTSTS0 ) &M66592_CTSQ ;udelay (1 ); - }while (tmp !=M66592_CS_IDST || timeout-- >0 ); + }while (tmp !=M66592_CS_IDST && timeout-- >0 );if (tmp ==M66592_CS_IDST ) m66592_bset(m66592,
Greg Kroah-Hartman
maintainerPATCH 69/120 doc: usb: gadget-testing: using the updated testusb.c
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <[email protected]>
commit f811a38300be3cdb603171aea5ad3fb42b71ca53 upstream.
testusb.c at http://www.linux-usb.org/usbtest/ is out of date, using the one at the kernel source folder.
--- Documentation/usb/gadget-testing.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Documentation/usb/gadget-testing.txt +2 -5
@@ -237,9 +237,7 @@ Testing the LOOPBACK function ----------------------------- device: run the gadget -host: test-usb - -http://www.linux-usb.org/usbtest/testusb.c +host: test-usb (tools/usb/testusb.c) 8. MASS STORAGE function ========================
@@ -586,9 +584,8 @@ Testing the SOURCESINK function ------------------------------- device: run the gadget -host: test-usb +host: test-usb (tools/usb/testusb.c) -http://www.linux-usb.org/usbtest/testusb.c 16. UAC1 function =================
Greg Kroah-Hartman
maintainerPATCH 56/120 spi: img-spfi: fix multiple calls to request gpio
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sifan Naeem <[email protected]>
commit b03ba9e314c12b2127243145b5c1f41b2408de62 upstream.
spfi_setup may be called many times by the spi framework, but gpio_request_one can only be called once without freeing, repeatedly calling gpio_request_one will cause an error to be thrown, which causes the request to spi_setup to be marked as failed.
We can have a per-spi_device flag that indicates whether or not the gpio has been requested. If the gpio has already been requested use gpio_direction_output to set the direction of the gpio.
--- drivers/spi/spi-img-spfi.c | 47 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-)
drivers/spi/spi-img-spfi.c +40 -7
@@ -105,6 +105,10 @@ struct img_spfi {bool rx_dma_busy; }; +struct img_spfi_device_data { +bool gpio_requested; +}; +static inline u32 spfi_readl (struct img_spfi *spfi,u32 reg) {return readl (spfi->regs + reg);
@@ -441,20 +445,49 @@ static int img_spfi_unprepare(struct spistatic int img_spfi_setup (struct spi_device *spi) {int ret; +struct img_spfi_device_data *spfi_data =spi_get_ctldata (spi); - ret =gpio_request_one (spi->cs_gpio, (spi->mode &SPI_CS_HIGH ) ? -GPIOF_OUT_INIT_LOW :GPIOF_OUT_INIT_HIGH , -dev_name (&spi->dev)); -if (ret) -dev_err (&spi->dev,"can't request chipselect gpio %d\n" , +if (!spfi_data) { + spfi_data =kzalloc (sizeof (*spfi_data),GFP_KERNEL ); +if (!spfi_data) +return -ENOMEM ; + spfi_data->gpio_requested = false; +spi_set_ctldata (spi, spfi_data); + } +if (!spfi_data->gpio_requested) { + ret =gpio_request_one (spi->cs_gpio, + (spi->mode &SPI_CS_HIGH ) ? +GPIOF_OUT_INIT_LOW :GPIOF_OUT_INIT_HIGH , +dev_name (&spi->dev)); +if (ret) +dev_err (&spi->dev,"can't request chipselect gpio %d\n" , spi->cs_gpio); - +else + spfi_data->gpio_requested = true; + }else { +if (gpio_is_valid (spi->cs_gpio)) { +int mode = ((spi->mode &SPI_CS_HIGH ) ? +GPIOF_OUT_INIT_LOW :GPIOF_OUT_INIT_HIGH ); + + ret =gpio_direction_output (spi->cs_gpio, mode); +if (ret) +dev_err (&spi->dev,"chipselect gpio %d setup failed (%d)\n" , + spi->cs_gpio, ret); + } + }return ret; }static void img_spfi_cleanup (struct spi_device *spi) { -gpio_free (spi->cs_gpio); +struct img_spfi_device_data *spfi_data =spi_get_ctldata (spi); + +if (spfi_data) { +if (spfi_data->gpio_requested) +gpio_free (spi->cs_gpio); +kfree (spfi_data); +spi_set_ctldata (spi,NULL ); + } } static void img_spfi_config(struct spi_master *master, struct spi_device *spi,
Greg Kroah-Hartman
maintainerPATCH 71/120 usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <[email protected]>
commit 913e4a90b6f9687ac0f543e7b632753e4f51c441 upstream.
According to USB Audio Device 2.0 Spec, Ch4.10.1.1:
wMaxPacketSize is defined as follows:
Maximum packet size this endpoint is capable of sending or receiving when this configuration is selected.
This is determined by the audio bandwidth constraints of the endpoint.
In current code, the wMaxPacketSize is defined as the maximum packet size for ISO endpoint, and it will let the host reserve much more space than it really needs, so that we can't let more endpoints work together at one frame.
We find this issue when we try to let 4 f_uac2 gadgets work together [1] at FS connection.
[1]http://www.spinics.net/lists/linux-usb/msg123478.html
--- drivers/usb/gadget/function/f_uac2.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-)
drivers/usb/gadget/function/f_uac2.c +29 -2
@@ -975,6 +975,29 @@ free_ep(struct uac2_rtd_params *prm, str "%s:%d Error!\n", __func__, __LINE__); } +static void set_ep_max_packet_size (const struct f_uac2_opts *uac2_opts, +struct usb_endpoint_descriptor *ep_desc, +unsigned int factor,bool is_playback) +{ +int chmask, srate, ssize; +u16 max_packet_size; + +if (is_playback) { + chmask = uac2_opts->p_chmask; + srate = uac2_opts->p_srate; + ssize = uac2_opts->p_ssize; + }else { + chmask = uac2_opts->c_chmask; + srate = uac2_opts->c_srate; + ssize = uac2_opts->c_ssize; + } + + max_packet_size =num_channels (chmask) * ssize * +DIV_ROUND_UP (srate, factor / (1 << (ep_desc->bInterval -1 ))); + ep_desc->wMaxPacketSize =cpu_to_le16 (min (max_packet_size, +le16_to_cpu (ep_desc->wMaxPacketSize))); +} +static int afunc_bind (struct usb_configuration *cfg,struct usb_function *fn) {
@@ -1070,10 +1093,14 @@ afunc_bind(struct usb_configuration *cfg uac2->p_prm.uac2 = uac2; uac2->c_prm.uac2 = uac2; +/* Calculate wMaxPacketSize according to audio bandwidth */ +set_ep_max_packet_size (uac2_opts, &fs_epin_desc,1000 , true); +set_ep_max_packet_size (uac2_opts, &fs_epout_desc,1000 , false); +set_ep_max_packet_size (uac2_opts, &hs_epin_desc,8000 , true); +set_ep_max_packet_size (uac2_opts, &hs_epout_desc,8000 , false); + hs_epout_desc.bEndpointAddress = fs_epout_desc.bEndpointAddress; - hs_epout_desc.wMaxPacketSize = fs_epout_desc.wMaxPacketSize; hs_epin_desc.bEndpointAddress = fs_epin_desc.bEndpointAddress; - hs_epin_desc.wMaxPacketSize = fs_epin_desc.wMaxPacketSize; ret =usb_assign_descriptors (fn, fs_audio_desc, hs_audio_desc,NULL );if (ret)
Greg Kroah-Hartman
maintainerPATCH 72/120 usb: host: ehci-sys: delete useless bus_to_hcd conversion
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <[email protected]>
commit 0521cfd06e1ebcd575e7ae36aab068b38df23850 upstream.
The ehci platform device's drvdata is the pointer of struct usb_hcd already, so we doesn't need to call bus_to_hcd conversion again.
--- drivers/usb/host/ehci-sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/host/ehci-sysfs.c +4 -4
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct devint count =PAGE_SIZE ;char *ptr = buf; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); nports =HCS_N_PORTS (ehci->hcs_params);for (index =0 ; index < nports; ++index) {
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct destruct ehci_hcd *ehci;int portnum, new_owner; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); new_owner =PORT_OWNER ;/* Owned by companion */ if (sscanf (buf,"%d" , &portnum) !=1 )return -EINVAL ;
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct ehci_hcd *ehci;int n; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); n =scnprintf (buf,PAGE_SIZE ,"%d\n" , ehci->uframe_periodic_max);return n; }
@@ -101,7 +101,7 @@ static ssize_t store_uframe_periodic_maxunsigned long flags;ssize_t ret; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev));if (kstrtouint (buf,0 , &uframe_periodic_max) <0 )return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 74/120 ASoC: rt5640: fix line out no sound issue
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Lin <[email protected]>
commit 9b850ca4f1c5acd7fcbbd4b38a2d27132801a8d5 upstream.
The power for line out was not turned on when line out is enabled. So we add "LOUT amp" widget to turn on the power for line out.
--- sound/soc/codecs/rt5640.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5640.c +37 -3
@@ -984,6 +984,35 @@ static int rt5640_hp_event(struct snd_soreturn 0 ; } +static int rt5640_lout_event (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol,int event) +{ +struct snd_soc_codec *codec =snd_soc_dapm_to_codec (w->dapm); + +switch (event) { +case SND_SOC_DAPM_POST_PMU : +hp_amp_power_on (codec); +snd_soc_update_bits (codec,RT5640_PWR_ANLG1 , +RT5640_PWR_LM ,RT5640_PWR_LM ); +snd_soc_update_bits (codec,RT5640_OUTPUT , +RT5640_L_MUTE |RT5640_R_MUTE ,0 ); +break ; + +case SND_SOC_DAPM_PRE_PMD : +snd_soc_update_bits (codec,RT5640_OUTPUT , +RT5640_L_MUTE |RT5640_R_MUTE , +RT5640_L_MUTE |RT5640_R_MUTE ); +snd_soc_update_bits (codec,RT5640_PWR_ANLG1 , +RT5640_PWR_LM ,0 ); +break ; + +default : +return 0 ; + } + +return 0 ; +} +static int rt5640_hp_power_event (struct snd_soc_dapm_widget *w,struct snd_kcontrol *kcontrol,int event) {
@@ -1179,13 +1208,16 @@ static const struct snd_soc_dapm_widget 0, rt5640_spo_l_mix, ARRAY_SIZE(rt5640_spo_l_mix)),SND_SOC_DAPM_MIXER ("SPOR MIX" ,SND_SOC_NOPM ,0 ,0 , rt5640_spo_r_mix,ARRAY_SIZE (rt5640_spo_r_mix)), -SND_SOC_DAPM_MIXER ("LOUT MIX" ,RT5640_PWR_ANLG1 ,RT5640_PWR_LM_BIT ,0 , +SND_SOC_DAPM_MIXER ("LOUT MIX" ,SND_SOC_NOPM ,0 ,0 , rt5640_lout_mix,ARRAY_SIZE (rt5640_lout_mix)),SND_SOC_DAPM_SUPPLY_S ("Improve HP Amp Drv" ,1 ,SND_SOC_NOPM ,0 ,0 , rt5640_hp_power_event,SND_SOC_DAPM_POST_PMU ),SND_SOC_DAPM_PGA_S ("HP Amp" ,1 ,SND_SOC_NOPM ,0 ,0 , rt5640_hp_event,SND_SOC_DAPM_PRE_PMD |SND_SOC_DAPM_POST_PMU ), +SND_SOC_DAPM_PGA_S ("LOUT amp" ,1 ,SND_SOC_NOPM ,0 ,0 , + rt5640_lout_event, +SND_SOC_DAPM_PRE_PMD |SND_SOC_DAPM_POST_PMU ),SND_SOC_DAPM_SUPPLY ("HP L Amp" ,RT5640_PWR_ANLG1 ,RT5640_PWR_HP_L_BIT ,0 ,NULL ,0 ), SND_SOC_DAPM_SUPPLY("HP R Amp", RT5640_PWR_ANLG1,
@@ -1500,8 +1532,10 @@ static const struct snd_soc_dapm_route r {"HP R Playback", "Switch", "HP Amp"}, {"HPOL", NULL, "HP L Playback"}, {"HPOR", NULL, "HP R Playback"}, - {"LOUTL", NULL, "LOUT MIX"}, - {"LOUTR", NULL, "LOUT MIX"}, + + {"LOUT amp", NULL, "LOUT MIX"}, + {"LOUTL", NULL, "LOUT amp"}, + {"LOUTR", NULL, "LOUT amp"}, }; static const struct snd_soc_dapm_route rt5640_specific_dapm_routes[] = {
Greg Kroah-Hartman
maintainerPATCH 78/120 ASoC: arizona: Fix gain settings of FLL in free-run mode
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikesh Oswal <[email protected]>
commit 1cf5a330c05ae37a0a98ac7c9800a6f50d5579ec upstream.
The wrong register was used to set the gain of ref loop, when changing the FLL output on an active FLL. This patch corrects the offset of the gain register.
--- sound/soc/codecs/arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/arizona.c +1 -1
@@ -2058,7 +2058,7 @@ static int arizona_enable_fll(struct ariif (already_enabled) {/* Facilitate smooth refclk across the transition */ -regmap_update_bits_async (fll->arizona->regmap, fll->base +0x7 , +regmap_update_bits_async (fll->arizona->regmap, fll->base +0x9 ,ARIZONA_FLL1_GAIN_MASK ,0 ); regmap_update_bits_async(fll->arizona->regmap, fll->base + 1, ARIZONA_FLL1_FREERUN,
Greg Kroah-Hartman
maintainerPATCH 80/120 serial: 8250: dont bind to SMSC IrCC IR port
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Maciej S. Szmigiero" <[email protected]>
commit ffa34de03bcfbfa88d8352942bc238bb48e94e2d upstream.
SMSC IrCC SIR/FIR port should not be bound to by (legacy) serial driver so its own driver (smsc-ircc2) can bind to it.
--- drivers/tty/serial/8250/8250_pnp.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/tty/serial/8250/8250_pnp.c +5 -0
@@ -364,6 +364,11 @@ static const struct pnp_device_id pnp_de/* Winbond CIR port, should not be probed. We should keep track of it to prevent the legacy serial driver from probing it */ { "WEC1022", CIR_PORT }, +/* +* SMSC IrCC SIR/FIR port, should not be probed by serial driver +* as well so its own driver can bind to it. +*/ + { "SMCF010", CIR_PORT }, { "", 0 } };
Greg Kroah-Hartman
maintainerPATCH 81/120 serial: 8250: bind to ALi Fast Infrared Controller (ALI5123)
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Maciej S. Szmigiero" <[email protected]>
commit 1d7002777a8fe8188caaa98d4a8eb4ed298fcdae upstream.
This way this device can be used with irtty-sir -
at least on Toshiba Satellite A20-S103 it is not configured by default and needs PNP activation before it starts to respond on I/O ports.
This device has actually its own driver (ali-ircc), but this driver seems to be non-functional for a very long time (see http://permalink.gmane.org/gmane.linux.irda.general/484
http://permalink.gmane.org/gmane.network.protocols.obex.openobex.user/943
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535070 ).
--- drivers/acpi/acpi_pnp.c | 1 + drivers/tty/serial/8250/8250_pnp.c | 6 ++++++ 2 files changed, 7 insertions(+)
drivers/acpi/acpi_pnp.c +1 -0
@@ -153,6 +153,7 @@ static const struct acpi_device_id acpi_ {"AEI0250"}, /* PROLiNK 1456VH ISA PnP K56flex Fax Modem */ {"AEI1240"}, /* Actiontec ISA PNP 56K X2 Fax Modem */ {"AKY1021"}, /* Rockwell 56K ACF II Fax+Data+Voice Modem */ + {"ALI5123"}, /* ALi Fast Infrared Controller */ {"AZT4001"}, /* AZT3005 PnP SOUND DEVICE */ {"BDP3336"}, /* Best Data Products Inc. Smart One 336F PnP Modem */ {"BRI0A49"}, /* Boca Complete Ofc Communicator 14.4 Data-FAX */
drivers/tty/serial/8250/8250_pnp.c +6 -0
@@ -41,6 +41,12 @@ static const struct pnp_device_id pnp_de { "AEI1240", 0 },/* Rockwell 56K ACF II Fax+Data+Voice Modem */ { "AKY1021", 0 /*SPCI_FL_NO_SHIRQ*/ }, +/* +* ALi Fast Infrared Controller +* Native driver (ali-ircc) is broken so at least +* it can be used with irtty-sir. +*/ + { "ALI5123", 0 },/* AZT3005 PnP SOUND DEVICE */ { "AZT4001", 0 },/* Best Data Products Inc. Smart One 336F PnP Modem */
Greg Kroah-Hartman
maintainerPATCH 57/120 spi: img-spfi: fix kbuild test robot warning
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sifan Naeem <[email protected]>
commit 9176c6657b5c313cf504d157e6d91496ee5c8708 upstream.
drivers/spi/spi-img-spfi.c: In function 'img_spfi_setup':drivers/spi/spi-img-spfi.c:446: warning: 'ret' may be used uninitialized in this function.
--- drivers/spi/spi-img-spfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-img-spfi.c +1 -1
@@ -444,7 +444,7 @@ static int img_spfi_unprepare(struct spistatic int img_spfi_setup (struct spi_device *spi) { -int ret; +int ret = -EINVAL ;struct img_spfi_device_data *spfi_data =spi_get_ctldata (spi);if (!spfi_data) {
Greg Kroah-Hartman
maintainerPATCH 84/120 serial: samsung: fix DMA for FIFO smaller than cache line size
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robert Baldyga <[email protected]>
commit 736cd79f483fd7a1e0b71e6eaddf01d8d87fbbbb upstream.
So far DMA mode were activated when only number of bytes to send was equal or greater than min_dma_size. Due to requirement that DMA transaction buffer should be aligned to cache line size, the excessive bytes were written to FIFO before starting DMA transaction. The problem occurred when FIFO size were smaller than cache alignment, because writing all excessive bytes to FIFO would fail. It happened in DMA mode when PIO interrupts disabled, which caused driver hung.
The solution is to test if buffer is alligned to cache line size before activating DMA mode, and if it's not, running PIO mode to align buffer and then starting DMA transaction. In PIO mode, when interrupts are enabled, lack of space in FIFO isn't the problem, so buffer aligning will always finish with success.
--- drivers/tty/serial/samsung.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-)
drivers/tty/serial/samsung.c +21 -15
@@ -295,15 +295,6 @@ static int s3c24xx_serial_start_tx_dma(sif (ourport->tx_mode !=S3C24XX_TX_DMA )enable_tx_dma (ourport); -while (xmit->tail & (dma_get_cache_alignment () -1 )) { -if (rd_regl (port,S3C2410_UFSTAT ) & ourport->info->tx_fifofull) -return 0 ; -wr_regb (port,S3C2410_UTXH , xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail +1 ) & (UART_XMIT_SIZE -1 ); - port->icount.tx++; - count--; - } - dma->tx_size = count & ~(dma_get_cache_alignment () -1 ); dma->tx_transfer_addr = dma->tx_addr + xmit->tail;
@@ -343,7 +334,8 @@ static void s3c24xx_serial_start_next_tx }if (!ourport->dma || !ourport->dma->tx_chan || - count < ourport->min_dma_size) + count < ourport->min_dma_size || + xmit->tail & (dma_get_cache_alignment () -1 ))s3c24xx_serial_start_tx_pio (ourport);else s3c24xx_serial_start_tx_dma (ourport, count);
@@ -737,7 +729,7 @@ static irqreturn_t s3c24xx_serial_tx_chastruct uart_port *port = &ourport->port;struct circ_buf *xmit = &port->state->xmit;unsigned long flags; -int count; +int count, dma_count =0 ;spin_lock_irqsave (&port->lock, flags);
@@ -745,8 +737,12 @@ static irqreturn_t s3c24xx_serial_tx_chaif (ourport->dma && ourport->dma->tx_chan && count >= ourport->min_dma_size) { -s3c24xx_serial_start_tx_dma (ourport, count); - goto out; +int align =dma_get_cache_alignment () - + (xmit->tail & (dma_get_cache_alignment () -1 )); +if (count-align >= ourport->min_dma_size) { + dma_count = count-align; + count = align; + } }if (port->x_char) {
@@ -767,14 +763,24 @@ static irqreturn_t s3c24xx_serial_tx_cha/* try and drain the buffer... */ - count = port->fifosize; -while (!uart_circ_empty (xmit) && count-- >0 ) { +if (count > port->fifosize) { + count = port->fifosize; + dma_count =0 ; + } + +while (!uart_circ_empty (xmit) && count >0 ) {if (rd_regl (port,S3C2410_UFSTAT ) & ourport->info->tx_fifofull)break ;wr_regb (port,S3C2410_UTXH , xmit->buf[xmit->tail]); xmit->tail = (xmit->tail +1 ) & (UART_XMIT_SIZE -1 ); port->icount.tx++; + count--; + } + +if (!count && dma_count) { +s3c24xx_serial_start_tx_dma (ourport, dma_count); + goto out; }if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS ) {
Greg Kroah-Hartman
maintainerPATCH 85/120 crypto: vmx - Fixing AES-CTR counter bug
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leonidas Da Silva Barbosa <[email protected]>
commit 1d4aa0b4c1816e8ca92a6aadb0d8f6b43c56c0d0 upstream.
AES-CTR is using a counter 8bytes-8bytes what miss match with kernel specs.
In the previous code a vadduwm was done to increment counter. Replacing this for a vadduqm now considering both cases counter 8-8 bytes and full 16bytes.
--- drivers/crypto/vmx/aes_ctr.c | 8 +++++++- drivers/crypto/vmx/aesp8-ppc.pl | 34 +++++++++++++++++----------------- 2 files changed, 24 insertions(+), 18 deletions(-)
drivers/crypto/vmx/aes_ctr.c +7 -1
@@ -113,6 +113,7 @@ static int p8_aes_ctr_crypt(struct blkci struct scatterlist *src, unsigned int nbytes) { int ret; +u64 inc;struct blkcipher_walk walk;struct p8_aes_ctr_ctx *ctx =crypto_tfm_ctx (crypto_blkcipher_tfm (desc->tfm));
@@ -140,7 +141,12 @@ static int p8_aes_ctr_crypt(struct blkci walk.iv);pagefault_enable (); -crypto_inc (walk.iv,AES_BLOCK_SIZE ); +/* We need to update IV mostly for last bytes/round */ + inc = (nbytes &AES_BLOCK_MASK ) /AES_BLOCK_SIZE ; +if (inc >0 ) +while (inc--) +crypto_inc (walk.iv,AES_BLOCK_SIZE ); + nbytes &=AES_BLOCK_SIZE -1 ; ret =blkcipher_walk_done (desc, &walk, nbytes); }
drivers/crypto/vmx/aesp8-ppc.pl +17 -17
@@ -1437,28 +1437,28 @@ Load_ctr32_enc_key: ?vperm v31,v31,$out0,$keyperm lvx v25,$x10,$key_ # pre-load round[2] - vadduwm $two,$one,$one + vadduqm $two,$one,$one subi $inp,$inp,15 # undo "caller" $SHL $len,$len,4 - vadduwm $out1,$ivec,$one # counter values ... - vadduwm $out2,$ivec,$two + vadduqm $out1,$ivec,$one # counter values ... + vadduqm $out2,$ivec,$two vxor $out0,$ivec,$rndkey0 # ... xored with rndkey[0] le?li $idx,8 - vadduwm $out3,$out1,$two + vadduqm $out3,$out1,$two vxor $out1,$out1,$rndkey0 le?lvsl $inpperm,0,$idx - vadduwm $out4,$out2,$two + vadduqm $out4,$out2,$two vxor $out2,$out2,$rndkey0 le?vspltisb $tmp,0x0f - vadduwm $out5,$out3,$two + vadduqm $out5,$out3,$two vxor $out3,$out3,$rndkey0 le?vxor $inpperm,$inpperm,$tmp # transform for lvx_u/stvx_u - vadduwm $out6,$out4,$two + vadduqm $out6,$out4,$two vxor $out4,$out4,$rndkey0 - vadduwm $out7,$out5,$two + vadduqm $out7,$out5,$two vxor $out5,$out5,$rndkey0 - vadduwm $ivec,$out6,$two # next counter value + vadduqm $ivec,$out6,$two # next counter value vxor $out6,$out6,$rndkey0 vxor $out7,$out7,$rndkey0
@@ -1594,27 +1594,27 @@ Loop_ctr32_enc8x_middle: vcipherlast $in0,$out0,$in0 vcipherlast $in1,$out1,$in1 - vadduwm $out1,$ivec,$one # counter values ... + vadduqm $out1,$ivec,$one # counter values ... vcipherlast $in2,$out2,$in2 - vadduwm $out2,$ivec,$two + vadduqm $out2,$ivec,$two vxor $out0,$ivec,$rndkey0 # ... xored with rndkey[0] vcipherlast $in3,$out3,$in3 - vadduwm $out3,$out1,$two + vadduqm $out3,$out1,$two vxor $out1,$out1,$rndkey0 vcipherlast $in4,$out4,$in4 - vadduwm $out4,$out2,$two + vadduqm $out4,$out2,$two vxor $out2,$out2,$rndkey0 vcipherlast $in5,$out5,$in5 - vadduwm $out5,$out3,$two + vadduqm $out5,$out3,$two vxor $out3,$out3,$rndkey0 vcipherlast $in6,$out6,$in6 - vadduwm $out6,$out4,$two + vadduqm $out6,$out4,$two vxor $out4,$out4,$rndkey0 vcipherlast $in7,$out7,$in7 - vadduwm $out7,$out5,$two + vadduqm $out7,$out5,$two vxor $out5,$out5,$rndkey0 le?vperm $in0,$in0,$in0,$inpperm - vadduwm $ivec,$out6,$two # next counter value + vadduqm $ivec,$out6,$two # next counter value vxor $out6,$out6,$rndkey0 le?vperm $in1,$in1,$in1,$inpperm vxor $out7,$out7,$rndkey0
Greg Kroah-Hartman
maintainerPATCH 90/120 HID: cp2112: fix I2C_SMBUS_BYTE write
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ellen Wang <[email protected]>
commit 6d00d153f00097d259f86304e11858a50a1b8ad1 upstream.
When doing an I2C_SMBUS_BYTE write (one byte write, no address), the data to be written is in "command" not "data->byte".
--- drivers/hid/hid-cp2112.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-cp2112.c +1 -1
@@ -554,7 +554,7 @@ static int cp2112_xfer(struct i2c_adapteif (I2C_SMBUS_READ == read_write) count =cp2112_read_req (buf, addr, read_length);else - count =cp2112_write_req (buf, addr, data->byte,NULL , + count =cp2112_write_req (buf, addr, command,NULL ,0 );break ;case I2C_SMBUS_BYTE_DATA :
Greg Kroah-Hartman
maintainerPATCH 92/120 KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Gautham R. Shenoy" <[email protected]>
commit 06554d9f6cc8f0b5ec903db19726a15dfc7b09d6 upstream.
The code that handles the case when we receive a H_DOORBELL interrupt has a comment which says "Hypervisor doorbell - exit only if host IPI flag set". However, the current code does not actually check if the host IPI flag is set. This is due to a comparison instruction that got missed.
As a result, the current code performs the exit to host only if some sibling thread or a sibling sub-core is exiting to the host. This implies that, an IPI sent to a sibling core in (subcores-per-core != 1) mode will be missed by the host unless the sibling core is on the exit path to the host.
This patch adds the missing comparison operation which will ensure that when HOST_IPI flag is set, we unconditionally exit to the host.
--- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_hv_rmhandlers.S +1 -0
@@ -1127,6 +1127,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR) cmpwi r12, BOOK3S_INTERRUPT_H_DOORBELL bne 3f lbz r0, HSTATE_HOST_IPI(r13) + cmpwi r0, 0 beq 4f b guest_exit_cont 3:
Greg Kroah-Hartman
maintainerPATCH 59/120 spi: dw: Allow interface drivers to limit data I/O to word sizes
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael van der Westhuizen <[email protected]>
commit c4fe57f76269dbb2af135071513f260ca40229a3 upstream.
The commit dd11444327ce ("spi: dw-spi: Convert 16bit accesses to 32bit accesses") changed all 16bit accesses in the DW_apb_ssi driver to 32bit. This, unfortunately, breaks data register access on picoXcell, where the DW IP needs data register accesses to be word accesses (all other accesses appear to be OK).
This change introduces a new master variable to allow interface drivers to specify that 16bit data transfer I/O is required. This change also introduces the ability to set this variable via device tree bindings in the MMIO interface driver. Both the core and the MMIO interface driver default to the current 32bit behaviour.
Before this change, on a picoXcell pc3x3:
spi_master spi32766: interrupt_transfer: fifo overrun/underrun m25p80 spi32766.0: error -5 reading 9f
m25p80: probe of spi32766.0 failed with error -5
After this change:
m25p80 spi32766.0: m25p40 (512 Kbytes)
--- drivers/spi/spi-dw-mmio.c | 3 +++ drivers/spi/spi-dw.c | 4 ++-- drivers/spi/spi-dw.h | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-)
drivers/spi/spi-dw-mmio.c +3 -0
@@ -74,6 +74,9 @@ static int dw_spi_mmio_probe(struct plat dws->max_freq =clk_get_rate (dwsmmio->clk); +of_property_read_u32 (pdev->dev.of_node,"reg-io-width" , + &dws->reg_io_width); + num_cs =4 ;if (pdev->dev.of_node)
drivers/spi/spi-dw.c +2 -2
@@ -194,7 +194,7 @@ static void dw_writer(struct dw_spi *dwselse txw = *(u16 *)(dws->tx); } -dw_writel (dws,DW_SPI_DR , txw); +dw_write_io_reg (dws,DW_SPI_DR , txw); dws->tx += dws->n_bytes; } }
@@ -205,7 +205,7 @@ static void dw_reader(struct dw_spi *dwsu16 rxw;while (max--) { - rxw =dw_readl (dws,DW_SPI_DR ); + rxw =dw_read_io_reg (dws,DW_SPI_DR );/* Care rx only if the transfer's original "rx" is not null */ if (dws->rx_end - dws->len) {if (dws->n_bytes ==1 )
drivers/spi/spi-dw.h +35 -0
@@ -109,6 +109,7 @@ struct dw_spi {u32 fifo_len;/* depth of the FIFO buffer */ u32 max_freq;/* max bus freq supported */ +u32 reg_io_width;/* DR I/O width in bytes */ u16 bus_num;u16 num_cs;/* supported slave numbers */
@@ -145,11 +146,45 @@ static inline u32 dw_readl(struct dw_spireturn __raw_readl (dws->regs + offset); } +static inline u16 dw_readw (struct dw_spi *dws,u32 offset) +{ +return __raw_readw (dws->regs + offset); +} +static inline void dw_writel (struct dw_spi *dws,u32 offset,u32 val) {__raw_writel (val, dws->regs + offset); } +static inline void dw_writew (struct dw_spi *dws,u32 offset,u16 val) +{ +__raw_writew (val, dws->regs + offset); +} + +static inline u32 dw_read_io_reg (struct dw_spi *dws,u32 offset) +{ +switch (dws->reg_io_width) { +case 2 : +return dw_readw (dws, offset); +case 4 : +default : +return dw_readl (dws, offset); + } +} + +static inline void dw_write_io_reg (struct dw_spi *dws,u32 offset,u32 val) +{ +switch (dws->reg_io_width) { +case 2 : +dw_writew (dws, offset, val); +break ; +case 4 : +default : +dw_writel (dws, offset, val); +break ; + } +} +static inline void spi_enable_chip (struct dw_spi *dws,int enable) {dw_writel (dws,DW_SPI_SSIENR , (enable ?1 :0 ));
Greg Kroah-Hartman
maintainerPATCH 60/120 USB: symbolserial: Use usb_get_serial_port_data
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philipp Hachtmann <[email protected]>
commit 951d3793bbfc0a441d791d820183aa3085c83ea9 upstream.
The driver used usb_get_serial_data(port->serial) which compiled but resulted in a NULL pointer being returned (and subsequently used). I did not go deeper into this but I guess this is a regression.
port_probe")
--- drivers/usb/serial/symbolserial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/serial/symbolserial.c +3 -3
@@ -94,7 +94,7 @@ exit:static int symbol_open (struct tty_struct *tty,struct usb_serial_port *port) { -struct symbol_private *priv =usb_get_serial_data (port->serial); +struct symbol_private *priv =usb_get_serial_port_data (port);unsigned long flags;int result =0 ;
@@ -120,7 +120,7 @@ static void symbol_close(struct usb_seristatic void symbol_throttle (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data; -struct symbol_private *priv =usb_get_serial_data (port->serial); +struct symbol_private *priv =usb_get_serial_port_data (port);spin_lock_irq (&priv->lock); priv->throttled = true;
@@ -130,7 +130,7 @@ static void symbol_throttle(struct tty_sstatic void symbol_unthrottle (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data; -struct symbol_private *priv =usb_get_serial_data (port->serial); +struct symbol_private *priv =usb_get_serial_port_data (port);int result;bool was_throttled;
Greg Kroah-Hartman
maintainerPATCH 61/120 USB: qcserial: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Ward <[email protected]>
commit 44840dec6127e4d7c5074f75d2dd96bc4ab85fe3 upstream.
This is an HP-branded Sierra Wireless EM7355:
https://bugzilla.redhat.com/show_bug.cgi?id=1223646#c2
--- drivers/usb/serial/qcserial.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/qcserial.c +1 -0
@@ -139,6 +139,7 @@ static const struct usb_device_id id_tab {USB_DEVICE(0x0AF0, 0x8120)}, /* Option GTM681W *//* non-Gobi Sierra Wireless devices */ + {DEVICE_SWI(0x03f0, 0x4e1d)}, /* HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module */ {DEVICE_SWI(0x0f3d, 0x68a2)}, /* Sierra Wireless MC7700 */ {DEVICE_SWI(0x114f, 0x68a2)}, /* Sierra Wireless MC7750 */ {DEVICE_SWI(0x1199, 0x68a2)}, /* Sierra Wireless MC7710 */
Greg Kroah-Hartman
maintainerPATCH 62/120 USB: ftdi_sio: Added custom PID for CustomWare products
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthijs Kooijman <[email protected]>
commit 1fb8dc36384ae1140ee6ccc470de74397606a9d5 upstream.
CustomWare uses the FTDI VID with custom PIDs for their ShipModul MiniPlex products.
--- drivers/usb/serial/ftdi_sio.c | 4 ++++ drivers/usb/serial/ftdi_sio_ids.h | 8 ++++++++ 2 files changed, 12 insertions(+)
drivers/usb/serial/ftdi_sio.c +4 -0
@@ -605,6 +605,10 @@ static const struct usb_device_id id_tab { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2WI_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX3_PID) },/* * ELV devices: */
drivers/usb/serial/ftdi_sio_ids.h +8 -0
@@ -568,6 +568,14 @@*/ #define FTDI_SYNAPSE_SS200_PID 0x9090/* SS200 - SNAP Stick 200 */ +/* +* CustomWare / ShipModul NMEA multiplexers product ids (FTDI_VID) +*/ +#define FTDI_CUSTOMWARE_MINIPLEX_PID 0xfd48/* MiniPlex first generation NMEA Multiplexer */ +#define FTDI_CUSTOMWARE_MINIPLEX2_PID 0xfd49/* MiniPlex-USB and MiniPlex-2 series */ +#define FTDI_CUSTOMWARE_MINIPLEX2WI_PID 0xfd4a/* MiniPlex-2Wi */ +#define FTDI_CUSTOMWARE_MINIPLEX3_PID 0xfd4b/* MiniPlex-3 series */ +/********************************/ /** third-party VID/PID combos **/
Greg Kroah-Hartman
maintainerPATCH 63/120 USB: pl2303: fix baud-rate divisor calculations
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Micha=C5=82=20Pecio?= <[email protected]>
commit 49bda21266fdf195142e8b5dea057f09e96ada9f upstream.
This commit fixes the following issues:
1. The 9th bit of buf was believed to be the LSB of divisor's exponent, but the hardware interprets it as MSB (9th bit) of the mantissa. The exponent is actually one bit shorter and applies to base 4, not 2 as previously believed.
2. Loop iterations doubled the exponent instead of incrementing.
3. The exponent wasn't checked for overflow.
4. The function returned requested rate instead of actual rate.
Due to issue #2, the old code deviated from the wrong formula described in #1 and actually yielded correct rates when divisor was lower than 4096 by using exponents of 0, 2 or 4 base-2, interpreted as 0, 1, 2 base-4 with the 9th mantissa bit clear. However, at 93.75 kbaud or less the rate turned out too slow due to #2 or too fast due to #2 and #3.
I tested this patch by sending and validating 0x00,0x01,..,0xff to an FTDI dongle at 234, 987, 2401, 9601, 31415, 115199, 250k, 500k, 750k, 1M, 1.5M, 3M+1 baud. All rates passed.
I also used pv to check speed at some rates unsupported by FTDI:
45 (the lowest possible), 2M, 4M, 5M and 6M-1. Looked sane.
rates")
--- drivers/usb/serial/pl2303.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-)
drivers/usb/serial/pl2303.c +26 -9
@@ -362,21 +362,38 @@ static speed_t pl2303_encode_baud_rate_dstatic speed_t pl2303_encode_baud_rate_divisor (unsigned char buf[4 ],speed_t baud) { -unsigned int tmp; +unsigned int baseline, mantissa, exponent;/* * Apparently the formula is: -* baudrate = 12M * 32 / (2^buf[1]) / buf[0] +* baudrate = 12M * 32 / (mantissa * 4^exponent) +* where +* mantissa = buf[8:0] +* exponent = buf[11:9] */ - tmp =12000000 *32 / baud; + baseline =12000000 *32 ; + mantissa = baseline / baud; +if (mantissa ==0 ) + mantissa =1 ;/* Avoid dividing by zero if baud > 32*12M. */ + exponent =0 ; +while (mantissa >=512 ) { +if (exponent <7 ) { + mantissa >>=2 ;/* divide by 4 */ + exponent++; + }else { +/* Exponent is maxed. Trim mantissa and leave. */ + mantissa =511 ; +break ; + } + } + buf[3 ] =0x80 ; buf[2 ] =0 ; - buf[1 ] = (tmp >=256 ); -while (tmp >=256 ) { - tmp >>=2 ; - buf[1 ] <<=1 ; - } - buf[0 ] = tmp; + buf[1 ] = exponent <<1 | mantissa >>8 ; + buf[0 ] = mantissa &0xff ; + +/* Calculate and return the exact baud rate. */ + baud = (baseline / mantissa) >> (exponent <<1 );return baud; }
Greg Kroah-Hartman
maintainerPATCH 54/120 spi: sh-msiof: Fix FIFO size to 64 word from 256 word
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koji Matsuoka <[email protected]>
commit fe78d0b7691c02744004b15f6979b3f106464bc4 upstream.
The upper limit of Tx/Rx FIFO size is 64 word by the specification of H/W. This patch corrects to 64 word from 256 word.
--- drivers/spi/spi-sh-msiof.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/spi/spi-sh-msiof.c +9 -6
@@ -48,8 +48,8 @@ struct sh_msiof_spi_priv {const struct sh_msiof_chipdata *chipdata;struct sh_msiof_spi_info *info;struct completion done; -int tx_fifo_size; -int rx_fifo_size; +unsigned int tx_fifo_size; +unsigned int rx_fifo_size;void *tx_dma_page;void *rx_dma_page;dma_addr_t tx_dma_addr;
@@ -95,8 +95,6 @@ struct sh_msiof_spi_priv {#define MDR2_WDLEN1 (i) (((i) - 1) << 16)/* Word Count (1-64/256 (SH, A1))) */ #define MDR2_GRPMASK1 0x00000001/* Group Output Mask 1 (SH, A1) */ -#define MAX_WDLEN 256U -/* TSCR and RSCR */ #define SCR_BRPS_MASK 0x1f00/* Prescaler Setting (1-32) */ #define SCR_BRPS (i) (((i) - 1) << 8)
@@ -850,7 +848,12 @@ static int sh_msiof_transfer_one(struct* DMA supports 32-bit words only, hence pack 8-bit and 16-bit * words, with byte resp. word swapping. */ -unsigned int l =min (len,MAX_WDLEN *4 ); +unsigned int l =0 ; + +if (tx_buf) + l =min (len, p->tx_fifo_size *4 ); +if (rx_buf) + l =min (len, p->rx_fifo_size *4 );if (bits <=8 ) {if (l &3 )
@@ -963,7 +966,7 @@ static const struct sh_msiof_chipdata shstatic const struct sh_msiof_chipdata r8a779x_data = { .tx_fifo_size =64 , - .rx_fifo_size =256 , + .rx_fifo_size =64 , .master_flags =SPI_MASTER_MUST_TX , };
Greg Kroah-Hartman
maintainerPATCH 94/120 xtensa: fix threadptr reload on return to userspace
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Filippov <[email protected]>
commit 4229fb12a03e5da5882b420b0aa4a02e77447b86 upstream.
Userspace return code may skip restoring THREADPTR register if there are no registers that need to be zeroed. This leads to spurious failures in libc NPTL tests.
Always restore THREADPTR on return to userspace.
--- arch/xtensa/kernel/entry.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/xtensa/kernel/entry.S +2 -1
@@ -568,12 +568,13 @@ user_exception_exit: * (if we have restored WSBITS-1 frames). */ +2: #if XCHAL_HAVE_THREADPTR l32i a3, a1, PT_THREADPTR wur a3, threadptr #endif -2: j common_exception_exit + j common_exception_exit /* This is the kernel exception exit. * We avoided to do a MOVSP when we entered the exception, but we
Greg Kroah-Hartman
maintainerPATCH 103/120 x86/mce: Reenable CMCI banks when swiching back to interrupt mode
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xie XiuQi <[email protected]>
commit 1b48465500611a2dc5e75800c61ac352e22d41c3 upstream.
Zhang Liguang reported the following issue:
1) System detects a CMCI storm on the current CPU.
2) Kernel disables the CMCI interrupt on banks owned by the current CPU and switches to poll mode
3) After the CMCI storm subsides, kernel switches back to interrupt mode
4) We expect the system to reenable the CMCI interrupt on banks owned by the current CPU
mce_intel_adjust_timer
|-> cmci_reenable
|-> cmci_discover # owned banks are ignored here
static void cmci_discover(int banks)
...
for (i = 0; i < banks; i++) {
...
if (test_bit(i, owned)) # ownd banks is ignore here
continue;So convert cmci_storm_disable_banks() to cmci_toggle_interrupt_mode() which controls whether to enable or disable CMCI interrupts with its argument.
NB: We cannot clear the owned bit because the banks won't be polled, otherwise. See:
27f6c573e0f7 ("x86, CMCI: Add proper detection of end of CMCI storms")
for more info.
--- arch/x86/kernel/cpu/mcheck/mce_intel.c | 41 ++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-)
arch/x86/kernel/cpu/mcheck/mce_intel.c +23 -18
@@ -146,6 +146,27 @@ void mce_intel_hcpu_update(unsigned longper_cpu (cmci_storm_state, cpu) =CMCI_STORM_NONE ; } +static void cmci_toggle_interrupt_mode (bool on) +{ +unsigned long flags, *owned; +int bank; +u64 val; + +raw_spin_lock_irqsave (&cmci_discover_lock, flags); + owned =this_cpu_ptr (mce_banks_owned); +for_each_set_bit (bank, owned,MAX_NR_BANKS ) { +rdmsrl (MSR_IA32_MCx_CTL2 (bank), val); + +if (on) + val |=MCI_CTL2_CMCI_EN ; +else + val &= ~MCI_CTL2_CMCI_EN ; + +wrmsrl (MSR_IA32_MCx_CTL2 (bank), val); + } +raw_spin_unlock_irqrestore (&cmci_discover_lock, flags); +} +unsigned long cmci_intel_adjust_timer (unsigned long interval) { if ((this_cpu_read(cmci_backoff_cnt) > 0) &&
@@ -175,7 +196,7 @@ unsigned long cmci_intel_adjust_timer(un*/ if (!atomic_read (&cmci_storm_on_cpus)) {__this_cpu_write (cmci_storm_state,CMCI_STORM_NONE ); -cmci_reenable (); +cmci_toggle_interrupt_mode (true);cmci_recheck (); }return CMCI_POLL_INTERVAL ;
@@ -186,22 +207,6 @@ unsigned long cmci_intel_adjust_timer(un } } -static void cmci_storm_disable_banks (void ) -{ -unsigned long flags, *owned; -int bank; -u64 val; - -raw_spin_lock_irqsave (&cmci_discover_lock, flags); - owned =this_cpu_ptr (mce_banks_owned); -for_each_set_bit (bank, owned,MAX_NR_BANKS ) { -rdmsrl (MSR_IA32_MCx_CTL2 (bank), val); - val &= ~MCI_CTL2_CMCI_EN ; -wrmsrl (MSR_IA32_MCx_CTL2 (bank), val); - } -raw_spin_unlock_irqrestore (&cmci_discover_lock, flags); -} -static bool cmci_storm_detect (void ) {unsigned int cnt =__this_cpu_read (cmci_storm_cnt);
@@ -223,7 +228,7 @@ static bool cmci_storm_detect(void)if (cnt <=CMCI_STORM_THRESHOLD )return false; -cmci_storm_disable_banks (); +cmci_toggle_interrupt_mode (false);__this_cpu_write (cmci_storm_state,CMCI_STORM_ACTIVE ); r =atomic_add_return (1 , &cmci_storm_on_cpus);mce_timer_kick (CMCI_STORM_INTERVAL );
Greg Kroah-Hartman
maintainerPATCH 104/120 soc/tegra: pmc: Avoid usage of uninitialized variable
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thierry Reding <[email protected]>
commit 95169cd23bfa88003f8be06234dbd65f5737add0 upstream.
Make sure to only drop the reference to the OF node after it's been successfully obtained.
--- drivers/soc/tegra/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/tegra/pmc.c +2 -2
@@ -736,12 +736,12 @@ void tegra_pmc_init_tsense_reset(structu32 value, checksum;if (!pmc->soc->has_tsense_reset) - goto out; +return ; np =of_find_node_by_name (pmc->dev->of_node,"i2c-thermtrip" );if (!np) {dev_warn (dev,"i2c-thermtrip node not found, %s.\n" , disabled); - goto out; +return ; }if (of_property_read_u32 (np,"nvidia,i2c-controller-id" , &ctrl_id)) {
Greg Kroah-Hartman
maintainerPATCH 105/120 of/address: Dont loop forever in of_find_matching_node_by_address().
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Daney <[email protected]>
commit 3a496b00b6f90c41bd21a410871dfc97d4f3c7ab upstream.
If the internal call to of_address_to_resource() fails, we end up looping forever in of_find_matching_node_by_address(). This can be caused by a defective device tree, or calling with an incorrect matches argument.
Fix by calling of_find_matching_node() unconditionally at the end of the loop.
--- drivers/of/address.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/of/address.c +3 -3
@@ -845,10 +845,10 @@ struct device_node *of_find_matching_nodstruct resource res;while (dn) { -if (of_address_to_resource (dn,0 , &res)) -continue ; -if (res.start == base_address) +if (!of_address_to_resource (dn,0 , &res) && + res.start == base_address)return dn; + dn =of_find_matching_node (dn, matches); }
Greg Kroah-Hartman
maintainerPATCH 106/120 ARM: BCM63xx: fix parameter to of_get_cpu_node in bcm63138_smp_boot_secondary
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sudeep Holla <[email protected]>
commit a6b4b25bd15c0a490769422a7eee355e9e91a57b upstream.
of_get_cpu_node provides the device node associated with the given logical CPU and cpu_logical_map contains the physical id for each CPU in the logical ordering. Passing cpu_logical_map(cpu) to of_get_cpu_node is incorrect.
This patch fixes the issue by passing the logical CPU number to of_get_cpu_node
--- arch/arm/mach-bcm/bcm63xx_smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-bcm/bcm63xx_smp.c +1 -1
@@ -127,7 +127,7 @@ static int bcm63138_smp_boot_secondary(u }/* Locate the secondary CPU node */ - dn =of_get_cpu_node (cpu_logical_map (cpu),NULL ); + dn =of_get_cpu_node (cpu,NULL );if (!dn) {pr_err ("SMP: failed to locate secondary CPU%d node\n" , cpu); ret = -ENODEV ;
Greg Kroah-Hartman
maintainerPATCH 107/120 ARM: orion5x: fix legacy orion5x IRQ numbers
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Cama <[email protected]>
commit 5be9fc23cdb42e1d383ecc8eae8a8ff70a752708 upstream.
Since v3.18, attempts to deliver IRQ0 are rejected, breaking orion5x. Fix this by increasing all interrupts by one, as did 5d6bed2a9c8b for dove. Also, force MULTI_IRQ_HANDLER for all orion platforms (including dove) as the specific handler is needed to shift back IRQ numbers by one.
[[email protected]]: moved the select MULTI_IRQ_HANDLER from PLAT_ORION_LEGACY to ARCH_ORION5X as it broke the build for dove.
--- arch/arm/Kconfig | 1 arch/arm/mach-orion5x/include/mach/irqs.h | 64 +++++++++++++++--------------- arch/arm/mach-orion5x/irq.c | 4 - 3 files changed, 35 insertions(+), 34 deletions(-)
arch/arm/Kconfig +1 -0
@@ -536,6 +536,7 @@ config ARCH_ORION5X select MVEBU_MBUS select PCI select PLAT_ORION_LEGACY + select MULTI_IRQ_HANDLER help Support for the following Marvell Orion 5x series SoCs: Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
arch/arm/mach-orion5x/include/mach/irqs.h +32 -32
74 lines not on this page · raw message
arch/arm/mach-orion5x/irq.c +2 -2
@@ -42,7 +42,7 @@ __exception_irq_entry orion5x_legacy_han stat =readl_relaxed (MAIN_IRQ_CAUSE ); stat &=readl_relaxed (MAIN_IRQ_MASK );if (stat) { -unsigned int hwirq =__fls (stat); +unsigned int hwirq =1 +__fls (stat);handle_IRQ (hwirq, regs);return ; }
@@ -51,7 +51,7 @@ __exception_irq_entry orion5x_legacy_hanvoid __init orion5x_init_irq (void ) { -orion_irq_init (0 ,MAIN_IRQ_MASK ); +orion_irq_init (1 ,MAIN_IRQ_MASK );#ifdef CONFIG_MULTI_IRQ_HANDLER set_handle_irq (orion5x_legacy_handle_irq);
Greg Kroah-Hartman
maintainerPATCH 108/120 ARM: dts: fix clock-frequency of display timing0 for exynos3250-rinato
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hyungwon Hwang <[email protected]>
commit 65e3293381e1cf1abcfe1aa22b914650a40e3af4 upstream.
After the commit abc0b1447d49 ("drm: Perform basic sanity checks on probed modes"), proper clock-frequency becomes mandatory for validating the mode of panel. The display does not work if there is no mode validated. Also, this clock-frequency must be set appropriately for getting required frame rate.
--- arch/arm/boot/dts/exynos3250-rinato.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos3250-rinato.dts +1 -1
@@ -182,7 +182,7 @@ display-timings { timing-0 { - clock-frequency = <0>; + clock-frequency = <4600000>; hactive = <320>; vactive = <320>; hfront-porch = <1>;
Greg Kroah-Hartman
maintainerPATCH 109/120 ARM: OMAP2+: DRA7: clockdomain: change l4per2_7xx_clkdm to SW_WKUP
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vignesh R <[email protected]>
commit b9e23f321940d2db2c9def8ff723b8464fb86343 upstream.
Legacy IPs like PWMSS, present under l4per2_7xx_clkdm, cannot support smart-idle when its clock domain is in HW_AUTO on DRA7 SoCs. Hence, program clock domain to SW_WKUP.
--- arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/clockdomains7xx_data.c +1 -1
@@ -331,7 +331,7 @@ static struct clockdomain l4per2_7xx_clk .dep_bit = DRA7XX_L4PER2_STATDEP_SHIFT, .wkdep_srcs = l4per2_wkup_sleep_deps, .sleepdep_srcs = l4per2_wkup_sleep_deps, - .flags = CLKDM_CAN_HWSUP_SWSUP, + .flags = CLKDM_CAN_SWSUP, };static struct clockdomain mpu0_7xx_clkdm = {
Greg Kroah-Hartman
maintainerPATCH 110/120 ARM: rockchip: fix the CPU soft reset
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Caesar Wang <[email protected]>
commit fe4407c0dc58215a7abfb7532740d79ddabe7a7a upstream.
We need different orderings when turning a core on and turning a core off. In one case we need to assert reset before turning power off. In ther other case we need to turn power on and the deassert reset.
In general, the correct flow is:
CPU off:
reset_control_assert
regmap_update_bits(pmu, PMU_PWRDN_CON, BIT(pd), BIT(pd)) wait_for_power_domain_to_turn_off
CPU on:
regmap_update_bits(pmu, PMU_PWRDN_CON, BIT(pd), 0) wait_for_power_domain_to_turn_on reset_control_deassert
This is needed for stressing CPU up/down, as per:
cd /sys/devices/system/cpu/
for i in $(seq 10000); do
echo "================= $i ============"
for j in $(seq 100); do
while [[ "$(cat cpu1/online)$(cat cpu2/online)$(cat cpu3/online)" != "000"" ]]
echo 0 > cpu1/online
echo 0 > cpu2/online
echo 0 > cpu3/online
done
while [[ "$(cat cpu1/online)$(cat cpu2/online)$(cat cpu3/online)" != "111" ]]; do
echo 1 > cpu1/online
echo 1 > cpu2/online
echo 1 > cpu3/online
done
done
done
The following is reproducable log:
[34466.186812] PM: noirq suspend of devices complete after 0.669 msecs
[34466.186824] Disabling non-boot CPUs ...
[34466.187509] CPU1: shutdown
[34466.188672] CPU2: shutdown
[34473.736627] Kernel panic - not syncing:Watchdog detected hard LOCKUP on cpu 0
.......
or others similar log:
.......
[ 4072.454453] CPU1: shutdown
[ 4072.504436] CPU2: shutdown
[ 4072.554426] CPU3: shutdown
[ 4072.577827] CPU1: Booted secondary processor
[ 4072.582611] CPU2: Booted secondary processor
<hang>
Tested by cpu up/down scripts, the results told us need delay more timebefore write the sram. The wait time is affected by many aspects (e.g: cpu frequency, bootrom frequency, sram frequency, bus speed, ...).
Although the cpus other than cpu0 will write the sram, the speedy is
no the same as cpu0, if the cpu0 early wake up, perhaps the other cpus can't startup. As we know, the cpu0 can wake up when the cpu1/2/3 write the 'sram+4/8' and send the sev.
Anyway.....
At the moment, 1ms delay will be happy work for cpu up/down scripts test.
--- arch/arm/mach-rockchip/platsmp.c | 40 +++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-)
arch/arm/mach-rockchip/platsmp.c +22 -18
@@ -72,29 +72,22 @@ static struct reset_control *rockchip_gestatic int pmu_set_power_domain (int pd,bool on) {u32 val = (on) ?0 :BIT (pd); +struct reset_control *rstc =rockchip_get_core_reset (pd);int ret; +if (IS_ERR (rstc) &&read_cpuid_part () !=ARM_CPU_PART_CORTEX_A9 ) { +pr_err ("%s: could not get reset control for core %d\n" , + __func__, pd); +return PTR_ERR (rstc); + } +/* * We need to soft reset the cpu when we turn off the cpu power domain, * or else the active processors might be stalled when the individual * processor is powered down. */ -if (read_cpuid_part () !=ARM_CPU_PART_CORTEX_A9 ) { -struct reset_control *rstc =rockchip_get_core_reset (pd); - -if (IS_ERR (rstc)) { -pr_err ("%s: could not get reset control for core %d\n" , - __func__, pd); -return PTR_ERR (rstc); - } - -if (on) -reset_control_deassert (rstc); -else -reset_control_assert (rstc); - -reset_control_put (rstc); - } +if (!IS_ERR (rstc) && !on) +reset_control_assert (rstc); ret =regmap_update_bits (pmu,PMU_PWRDN_CON ,BIT (pd), val);if (ret <0 ) {
@@ -112,6 +105,12 @@ static int pmu_set_power_domain(int pd, } } +if (!IS_ERR (rstc)) { +if (on) +reset_control_deassert (rstc); +reset_control_put (rstc); + } +return 0 ; }
@@ -146,9 +145,14 @@ static int rockchip_boot_secondary(unsig* the mailbox: * sram_base_addr + 4: 0xdeadbeaf * sram_base_addr + 8: start address for pc +* The cpu0 need to wait the other cpus other than cpu0 entering +* the wfe state.The wait time is affected by many aspects. +* (e.g: cpu frequency, bootrom frequency, sram frequency, ...) * */ -udelay (10 ); -writel (virt_to_phys (secondary_startup), sram_base_addr +8 ); +mdelay (1 );/* ensure the cpus other than cpu0 to startup */ + +writel (virt_to_phys (rockchip_secondary_startup), + sram_base_addr +8 );writel (0xDEADBEAF , sram_base_addr +4 );dsb_sev (); }
Greg Kroah-Hartman
maintainerPATCH 111/120 ARM: dts: rockchip: fix rk3288 watchdog irq
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <[email protected]>
commit 1a1b698b115467242303daf5fe1d3c9886c2fa17 upstream.
The watchdog irq is actually SPI 79, which translates to the original 111 in the manual where the SPI irqs start at 32.
The current dw_wdt driver does not use the irq at all, so this issue never surfaced. Nevertheless fix this for a time we want to use the irq.
--- arch/arm/boot/dts/rk3288.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rk3288.dtsi +1 -1
@@ -626,7 +626,7 @@ compatible = "rockchip,rk3288-wdt", "snps,dw-wdt"; reg = <0xff800000 0x100>; clocks = <&cru PCLK_WDT>; - interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
Greg Kroah-Hartman
maintainerPATCH 95/120 xtensa: fix kernel register spilling
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Filippov <[email protected]>
commit 77d6273e79e3a86552fcf10cdd31a69b46ed2ce6 upstream.
call12 can't be safely used as the first call in the inline function, because the compiler does not extend the stack frame of the bounding function accordingly, which may result in corruption of local variables.
If a call needs to be done, do call8 first followed by call12.
For pure assembly code in _switch_to increase stack frame size of the bounding function.
--- arch/xtensa/include/asm/traps.h | 29 +++++++++++++++++++---------- arch/xtensa/kernel/entry.S | 4 ++-- 2 files changed, 21 insertions(+), 12 deletions(-)
arch/xtensa/include/asm/traps.h +19 -10
@@ -25,30 +25,39 @@ static inline void spill_registers(void) {#if XCHAL_NUM_AREGS >16 __asm__ __volatile__ ( -" call12 1f\n" + " call8 1f\n" " _j 2f\n" " retw\n" " .align 4\n" "1:\n" +#if XCHAL_NUM_AREGS ==32 +" _entry a1, 32\n" +" addi a8, a0, 3\n" +" _entry a1, 16\n" +" mov a12, a12\n" + " retw\n" +#else " _entry a1, 48\n" -" addi a12, a0, 3\n" -#if XCHAL_NUM_AREGS > 32 - " .rept (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n" +" call12 1f\n" +" retw\n" +" .align 4\n" +"1:\n" + " .rept (" __stringify(XCHAL_NUM_AREGS) " - 16) / 12\n"" _entry a1, 48\n" " mov a12, a0\n" " .endr\n" -#endif - " _entry a1, 48\n" + " _entry a1, 16\n"#if XCHAL_NUM_AREGS %12 ==0 - " mov a8, a8\n" -#elif XCHAL_NUM_AREGS %12 ==4 " mov a12, a12\n" -#elif XCHAL_NUM_AREGS %12 ==8 +#elif XCHAL_NUM_AREGS %12 ==4 " mov a4, a4\n" +#elif XCHAL_NUM_AREGS %12 ==8 +" mov a8, a8\n" #endif " retw\n" +#endif "2:\n" - : : : "a12", "a13", "memory"); + : : : "a8", "a9", "memory");#else __asm__ __volatile__ ( " mov a12, a12\n"
arch/xtensa/kernel/entry.S +2 -2
@@ -1821,7 +1821,7 @@ ENDPROC(system_call) mov a12, a0 .endr #endif - _entry a1, 48 + _entry a1, 16 #if XCHAL_NUM_AREGS % 12 == 0 mov a8, a8 #elif XCHAL_NUM_AREGS % 12 == 4
@@ -1845,7 +1845,7 @@ ENDPROC(system_call) ENTRY(_switch_to) - entry a1, 16 + entry a1, 48 mov a11, a3 # and 'next' (a3)
Greg Kroah-Hartman
maintainerPATCH 113/120 drivercore: Fix unregistration path of platform devices
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Grant Likely <[email protected]>
commit 7f5dcaf1fdf289767a126a0a5cc3ef39b5254b06 upstream.
The unregister path of platform_device is broken. On registration, it will register all resources with either a parent already set, or type==IORESOURCE_{IO,MEM}. However, on unregister it will release everything with type==IORESOURCE_{IO,MEM}, but ignore the others. There are also cases where resources don't get registered in the first place, like with devices created by of_platform_populate()*.
Fix the unregister path to be symmetrical with the register path by checking the parent pointer instead of the type field to decide which resources to unregister. This is safe because the upshot of the registration path algorithm is that registered resources have a parent pointer, and non-registered resources do not.
* It can be argued that of_platform_populate() should be registering it's resources, and they argument has some merit. However, there are quite a few platforms that end up broken if we try to do that due to overlapping resources in the device tree. Until that is fixed, we need to solve the immediate problem.
--- drivers/base/platform.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/base/platform.c +2 -6
@@ -375,9 +375,7 @@ int platform_device_add(struct platform_while (--i >=0 ) {struct resource *r = &pdev->resource[i]; -unsigned long type =resource_type (r); - -if (type ==IORESOURCE_MEM || type ==IORESOURCE_IO ) +if (r->parent)release_resource (r); }
@@ -408,9 +406,7 @@ void platform_device_del(struct platformfor (i =0 ; i < pdev->num_resources; i++) {struct resource *r = &pdev->resource[i]; -unsigned long type =resource_type (r); - -if (type ==IORESOURCE_MEM || type ==IORESOURCE_IO ) +if (r->parent)release_resource (r); } }
Greg Kroah-Hartman
maintainerPATCH 114/120 dm stats: report precise_timestamps and histogram in @stats_list output
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
commit bd49784fd1e8f42c7600fbfa206361324857f373 upstream.
If the user selected the precise_timestamps or histogram options, report it in the @stats_list message output.
If the user didn't select these options, no extra tokens are reported, thus it is backward compatible with old software that doesn't know about precise timestamps and histogram.
--- Documentation/device-mapper/statistics.txt | 4 ++++ drivers/md/dm-stats.c | 14 +++++++++++++- include/uapi/linux/dm-ioctl.h | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-)
Documentation/device-mapper/statistics.txt +4 -0
@@ -121,6 +121,10 @@ Messages Output format: <region_id>: <start_sector>+<length> <step> <program_id> <aux_data> + precise_timestamps histogram:n1,n2,n3,... + + The strings "precise_timestamps" and "histogram" are printed only + if they were specified when creating the region. @stats_print <region_id> [<starting_line> <number_of_lines>]
drivers/md/dm-stats.c +13 -1
@@ -457,12 +457,24 @@ static int dm_stats_list(struct dm_statslist_for_each_entry (s, &stats->list, list_entry) {if (!program || !strcmp (program, s->program_id)) { len = s->end - s->start; -DMEMIT ("%d: %llu+%llu %llu %s %s\n" , s->id, +DMEMIT ("%d: %llu+%llu %llu %s %s" , s->id, (unsigned long long )s->start, (unsigned long long )len, (unsigned long long )s->step, s->program_id, s->aux_data); +if (s->stat_flags &STAT_PRECISE_TIMESTAMPS ) +DMEMIT (" precise_timestamps" ); +if (s->n_histogram_entries) { +unsigned i; +DMEMIT (" histogram:" ); +for (i =0 ; i < s->n_histogram_entries; i++) { +if (i) +DMEMIT ("," ); +DMEMIT ("%llu" , s->histogram_boundaries[i]); + } + } +DMEMIT ("\n" ); } }mutex_unlock (&stats->mutex);
include/uapi/linux/dm-ioctl.h +2 -2
@@ -267,9 +267,9 @@ enum {#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)#define DM_VERSION_MAJOR 4 -#define DM_VERSION_MINOR 32 +#define DM_VERSION_MINOR 33#define DM_VERSION_PATCHLEVEL 0 -#define DM_VERSION_EXTRA "-ioctl (2015-6-26)" +#define DM_VERSION_EXTRA "-ioctl (2015-8-18)"/* Status bits */ #define DM_READONLY_FLAG (1 << 0)/* In/Out */
Greg Kroah-Hartman
maintainerPATCH 115/120 dm cache: fix leaking of deferred bio prison cells
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joe Thornber <[email protected]>
commit 9153df7405ae04c1b0466de720e0a685cfea1a3a upstream.
There were two cases where dm_cell_visit_release() was being called, which removes the cell from the prison's rbtree, but the callers didn't also return the cell to the mempool. Fix this by having them call free_prison_cell().
This leak manifested as the 'kmalloc-96' slab growing until OOM.
--- drivers/md/dm-cache-target.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/md/dm-cache-target.c +4 -0
@@ -1729,6 +1729,8 @@ static void remap_cell_to_origin_clear_dremap_to_origin (cache, bio);issue (cache, bio); } + +free_prison_cell (cache, cell); } static void remap_cell_to_cache_dirty(struct cache *cache, struct dm_bio_prison_cell *cell,
@@ -1763,6 +1765,8 @@ static void remap_cell_to_cache_dirty(stremap_to_cache (cache, bio, cblock);issue (cache, bio); } + +free_prison_cell (cache, cell); }/*----------------------------------------------------------------*/
Greg Kroah-Hartman
maintainerPATCH 116/120 fs: Set the size of empty dirs to 0.
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Eric W. Biederman" <[email protected]>
commit 4b75de8615050c1b0dd8d7794838c42f74ed36ba upstream.
Before the make_empty_dir_inode calls were introduce into proc, sysfs, and sysctl those directories when stated reported an i_size of 0. make_empty_dir_inode started reporting an i_size of 2. At least one userspace application depended on stat returning i_size of 0. So modify make_empty_dir_inode to cause an i_size of 0 to be reported for these directories.
--- fs/libfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/libfs.c +1 -1
@@ -1185,7 +1185,7 @@ void make_empty_dir_inode(struct inode * inode->i_uid =GLOBAL_ROOT_UID ; inode->i_gid =GLOBAL_ROOT_GID ; inode->i_rdev =0 ; - inode->i_size =2 ; + inode->i_size =0 ; inode->i_blkbits =PAGE_SHIFT ; inode->i_blocks =0 ;
Greg Kroah-Hartman
maintainerPATCH 117/120 hpfs: update ctime and mtime on directory modification
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
commit f49a26e7718dd30b49e3541e3e25aecf5e7294e2 upstream.
Update ctime and mtime when a directory is modified. (though OS/2 doesn't update them anyway)
--- fs/hpfs/namei.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
fs/hpfs/namei.c +24 -1
@@ -8,6 +8,17 @@#include <linux/sched.h> #include "hpfs_fn.h" +static void hpfs_update_directory_times (struct inode *dir) +{ +time_t t =get_seconds (); +if (t == dir->i_mtime.tv_sec && + t == dir->i_ctime.tv_sec) +return ; + dir->i_mtime.tv_sec = dir->i_ctime.tv_sec = t; + dir->i_mtime.tv_nsec = dir->i_ctime.tv_nsec =0 ; +hpfs_write_inode_nolock (dir); +} +static int hpfs_mkdir (struct inode *dir,struct dentry *dentry,umode_t mode) {const unsigned char *name = dentry->d_name.name;
@@ -99,6 +110,7 @@ static int hpfs_mkdir(struct inode *dir, result->i_mode = mode |S_IFDIR ;hpfs_write_inode_nolock (result); } +hpfs_update_directory_times (dir);d_instantiate (dentry, result);hpfs_unlock (dir->i_sb);return 0 ;
@@ -187,6 +199,7 @@ static int hpfs_create(struct inode *dir result->i_mode = mode |S_IFREG ;hpfs_write_inode_nolock (result); } +hpfs_update_directory_times (dir);d_instantiate (dentry, result);hpfs_unlock (dir->i_sb);return 0 ;
@@ -262,6 +275,7 @@ static int hpfs_mknod(struct inode *dir,insert_inode_hash (result);hpfs_write_inode_nolock (result); +hpfs_update_directory_times (dir);d_instantiate (dentry, result);brelse (bh);hpfs_unlock (dir->i_sb);
@@ -340,6 +354,7 @@ static int hpfs_symlink(struct inode *diinsert_inode_hash (result);hpfs_write_inode_nolock (result); +hpfs_update_directory_times (dir);d_instantiate (dentry, result);hpfs_unlock (dir->i_sb);return 0 ;
@@ -423,6 +438,8 @@ again: out1:hpfs_brelse4 (&qbh); out: +if (!err) +hpfs_update_directory_times (dir);hpfs_unlock (dir->i_sb);return err; }
@@ -477,6 +494,8 @@ static int hpfs_rmdir(struct inode *dir, out1:hpfs_brelse4 (&qbh); out: +if (!err) +hpfs_update_directory_times (dir);hpfs_unlock (dir->i_sb);return err; }
@@ -595,7 +614,7 @@ static int hpfs_rename(struct inode *old goto end1; } - end: +end:hpfs_i (i)->i_parent_dir = new_dir->i_ino;if (S_ISDIR (i->i_mode)) {inc_nlink (new_dir);
@@ -610,6 +629,10 @@ static int hpfs_rename(struct inode *oldbrelse (bh); } end1: +if (!err) { +hpfs_update_directory_times (old_dir); +hpfs_update_directory_times (new_dir); + }hpfs_unlock (i->i_sb);return err; }
Greg Kroah-Hartman
maintainerPATCH 119/120 memory-hotplug: add hot-added memory ranges to memblock before allocate node_data for a node.
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tang Chen <[email protected]>
commit 7f36e3e56db1ae75d1e157011b3cb2e0957f0a7e upstream.
Commit f9126ab9241f ("memory-hotplug: fix wrong edge when hot add a new node") hot-added memory range to memblock, after creating pgdat for new node.
But there is a problem:
add_memory()
|--> hotadd_new_pgdat()
|--> free_area_init_node()
|--> get_pfn_range_for_nid()
|--> find start_pfn and end_pfn in memblock |--> ......
|--> memblock_add_node(start, size, nid) -------- Here, just too late.
get_pfn_range_for_nid() will find that start_pfn and end_pfn are both 0. As a result, when adding memory, dmesg will give the following wrong message.
Initmem setup node 5 [mem 0x0000000000000000-0xffffffffffffffff] On node 5 totalpages: 0
Built 5 zonelists in Node order, mobility grouping on. Total pages: 32588823 Policy zone: Normal
init_memory_mapping: [mem 0x60000000000-0x607ffffffff]
The solution is simple, just add the memory range to memblock a little earlier, before hotadd_new_pgdat().
--- mm/memory_hotplug.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
mm/memory_hotplug.c +9 -1
@@ -1248,6 +1248,14 @@ int __ref add_memory(int nid, u64 start,mem_hotplug_begin (); +/* +* Add new range to memblock so that when hotadd_new_pgdat() is called +* to allocate new pgdat, get_pfn_range_for_nid() will be able to find +* this new range and calculate total pages correctly. The range will +* be removed at hot-remove time. +*/ +memblock_add_node (start, size, nid); + new_node = !node_online (nid);if (new_node) { pgdat =hotadd_new_pgdat (nid, start);
@@ -1277,7 +1285,6 @@ int __ref add_memory(int nid, u64 start,/* create new memmap entry */ firmware_map_add_hotplug (start, start + size,"System RAM" ); -memblock_add_node (start, size, nid); goto out;
@@ -1286,6 +1293,7 @@ error:if (new_pgdat)rollback_node_hotadd (nid, pgdat);release_memory_resource (res); +memblock_remove (start, size); out:mem_hotplug_done ();
Greg Kroah-Hartman
maintainerPATCH 96/120 devres: fix devres_get()
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
commit 64526370d11ce8868ca495723d595b61e8697fbf upstream.
Currently, devres_get() passes devres_free() the pointer to devres, but devres_free() should be given with the pointer to resource data.
--- drivers/base/devres.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/devres.c +2 -2
@@ -297,10 +297,10 @@ void * devres_get(struct device *dev, voif (!dr) {add_dr (dev, &new_dr->node); dr = new_dr; - new_dr =NULL ; + new_res =NULL ; }spin_unlock_irqrestore (&dev->devres_lock, flags); -devres_free (new_dr); +devres_free (new_res);return dr->data; }
Greg Kroah-Hartman
maintainerPATCH 97/120 Doc: ABI: testing: configfs-usb-gadget-loopback
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <[email protected]>
commit 8cd50626823c00ca7472b2f61cb8c0eb9798ddc0 upstream.
Fix the name of attribute
--- Documentation/ABI/testing/configfs-usb-gadget-loopback | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/ABI/testing/configfs-usb-gadget-loopback +1 -1
@@ -5,4 +5,4 @@ Description: The attributes: qlen - depth of loopback queue - bulk_buflen - buffer length + buflen - buffer length
Greg Kroah-Hartman
maintainerPATCH 99/120 spi/spi-xilinx: Fix spurious IRQ ACK on irq mode
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda Delgado <[email protected]>
commit 74346841e6f5df5f7b83d5904435d273c507dba6 upstream.
The ACK of an inexistent IRQ can trigger an spurious IRQ that breaks the txrx logic. This has been observed on axi_quad_spi:3.2 core.
This patch only ACKs IRQs that have not been Acknowledge jet.
--- drivers/spi/spi-xilinx.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/spi/spi-xilinx.c +10 -6
@@ -249,19 +249,23 @@ static int xilinx_spi_txrx_bufs(struct s xspi->tx_ptr = t->tx_buf; xspi->rx_ptr = t->rx_buf; remaining_words = t->len / xspi->bytes_per_word; -reinit_completion (&xspi->done);if (xspi->irq >=0 && remaining_words > xspi->buffer_size) { +u32 isr; use_irq = true; - xspi->write_fn (XSPI_INTR_TX_EMPTY , - xspi->regs +XIPIF_V123B_IISR_OFFSET ); -/* Enable the global IPIF interrupt */ - xspi->write_fn (XIPIF_V123B_GINTR_ENABLE , - xspi->regs +XIPIF_V123B_DGIER_OFFSET );/* Inhibit irq to avoid spurious irqs on tx_empty*/ cr = xspi->read_fn (xspi->regs +XSPI_CR_OFFSET ); xspi->write_fn (cr |XSPI_CR_TRANS_INHIBIT , xspi->regs +XSPI_CR_OFFSET ); +/* ACK old irqs (if any) */ + isr = xspi->read_fn (xspi->regs +XIPIF_V123B_IISR_OFFSET ); +if (isr) + xspi->write_fn (isr, + xspi->regs +XIPIF_V123B_IISR_OFFSET ); +/* Enable the global IPIF interrupt */ + xspi->write_fn (XIPIF_V123B_GINTR_ENABLE , + xspi->regs +XIPIF_V123B_DGIER_OFFSET ); +reinit_completion (&xspi->done); }while (remaining_words) {
Greg Kroah-Hartman
maintainerPATCH 100/120 spi/spi-xilinx: Fix mixed poll/irq mode
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda Delgado <[email protected]>
commit 16ea9b8ac45bf11d48af6013283e141e8ed86348 upstream.
Once the module process a transfer in irq mode, the next poll transfer will not work because the transmitter is left in inhibited state.
--- drivers/spi/spi-xilinx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-xilinx.c +3 -1
@@ -306,8 +306,10 @@ static int xilinx_spi_txrx_bufs(struct s remaining_words -= n_words; } -if (use_irq) +if (use_irq) { xspi->write_fn (0 , xspi->regs +XIPIF_V123B_DGIER_OFFSET ); + xspi->write_fn (cr, xspi->regs +XSPI_CR_OFFSET ); + }return t->len; }
Greg Kroah-Hartman
maintainerPATCH 101/120 auxdisplay: ks0108: fix refcount
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sudip Mukherjee <[email protected]>
commit bab383de3b84e584b0f09227151020b2a43dc34c upstream.
parport_find_base() will implicitly do parport_get_port() which increases the refcount. Then parport_register_device() will again increment the refcount. But while unloading the module we are only doing parport_unregister_device() decrementing the refcount only once. We add an parport_put_port() to neutralize the effect of parport_get_port().
--- drivers/auxdisplay/ks0108.c | 1 + 1 file changed, 1 insertion(+)
drivers/auxdisplay/ks0108.c +1 -0
@@ -139,6 +139,7 @@ static int __init ks0108_init(void) ks0108_pardevice =parport_register_device (ks0108_parport,KS0108_NAME ,NULL ,NULL ,NULL ,PARPORT_DEV_EXCL ,NULL ); +parport_put_port (ks0108_parport);if (ks0108_pardevice ==NULL ) { printk(KERN_ERR KS0108_NAME ": ERROR: " "parport didn't register new device\n");
Greg Kroah-Hartman
maintainerPATCH 102/120 regulator: pbias: Fix broken pbias disable functionality
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kishon Vijay Abraham I <[email protected]>
commit c329061be51bef655f28c9296093984c977aff85 upstream.
regulator_disable of pbias always writes '0' to the enable_reg. However actual disable value of pbias regulator is not always '0'. Fix it by populating the disable_val in pbias_reg_info for the various platforms and assign it to the disable_val of pbias regulator descriptor. This will be used by regulator_disable_regmap while disabling pbias regulator.
--- drivers/regulator/pbias-regulator.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/regulator/pbias-regulator.c +5 -0
@@ -30,6 +30,7 @@struct pbias_reg_info {u32 enable;u32 enable_mask; +u32 disable_val;u32 vmode;unsigned int enable_time;char *name;
@@ -62,6 +63,7 @@ static const struct pbias_reg_info pbias .enable = BIT(1), .enable_mask = BIT(1), .vmode = BIT(0), + .disable_val = 0, .enable_time = 100, .name = "pbias_mmc_omap2430" };
@@ -77,6 +79,7 @@ static const struct pbias_reg_info pbiasstatic const struct pbias_reg_info pbias_mmc_omap4 = { .enable =BIT (26 ) |BIT (22 ), .enable_mask =BIT (26 ) |BIT (25 ) |BIT (22 ), + .disable_val =BIT (25 ), .vmode =BIT (21 ), .enable_time =100 , .name ="pbias_mmc_omap4"
@@ -85,6 +88,7 @@ static const struct pbias_reg_info pbiasstatic const struct pbias_reg_info pbias_mmc_omap5 = { .enable =BIT (27 ) |BIT (26 ), .enable_mask =BIT (27 ) |BIT (25 ) |BIT (26 ), + .disable_val =BIT (25 ), .vmode =BIT (21 ), .enable_time =100 , .name ="pbias_mmc_omap5"
@@ -159,6 +163,7 @@ static int pbias_regulator_probe(struct drvdata[data_idx].desc.enable_reg = res->start; drvdata[data_idx].desc.enable_mask = info->enable_mask; drvdata[data_idx].desc.enable_val = info->enable; + drvdata[data_idx].desc.disable_val = info->disable_val; cfg.init_data = pbias_matches[idx].init_data; cfg.driver_data = &drvdata[data_idx];
Greg Kroah-Hartman
maintainerPATCH 22/120 iio: industrialio-buffer: Fix iio_buffer_poll return value
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristina Opriceana <[email protected]>
commit 1bdc0293901cbea23c6dc29432e81919d4719844 upstream.
Change return value to 0 if no device is bound since unsigned int cannot support negative error codes.
device has been unregistered")
--- drivers/iio/industrialio-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/industrialio-buffer.c +1 -1
@@ -151,7 +151,7 @@ unsigned int iio_buffer_poll(struct filestruct iio_buffer *rb = indio_dev->buffer;if (!indio_dev->info) -return -ENODEV ; +return 0 ;poll_wait (filp, &rb->pollq, wait);if (iio_buffer_ready (indio_dev, rb, rb->watermark,0 ))
Greg Kroah-Hartman
maintainerPATCH 23/120 iio: adis16400: Fix adis16448 gyroscope scale
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <[email protected]>
commit 8166537283b31d7abaae9e56bd48fbbc30cdc579 upstream.
Use the correct scale for the adis16448 gyroscope output.
--- drivers/iio/imu/adis16400_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/adis16400_core.c +1 -1
@@ -780,7 +780,7 @@ static struct adis16400_chip_info adis16 .flags = ADIS16400_HAS_PROD_ID |ADIS16400_HAS_SERIAL_NUMBER | ADIS16400_BURST_DIAG_STAT, - .gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */ + .gyro_scale_micro = IIO_DEGREE_TO_RAD(40000), /* 0.04 deg/s */ .accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */ .temp_scale_nano = 73860000, /* 0.07386 C */ .temp_offset = 31000000 / 73860, /* 31 C = 0x00 */
Greg Kroah-Hartman
maintainerPATCH 24/120 iio: Add inverse unit conversion macros
In reply to Greg Kroah-Hartman4.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <[email protected]>
commit c689a923c867eac40ed3826c1d9328edea8b6bc7 upstream.
Add inverse unit conversion macro to convert from standard IIO units to units that might be used by some devices.
Those are useful in combination with scale factors that are specified as IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will contain the maximum raw value the sensor will generate and the numerator the value it maps to in a specific unit. Sometimes datasheets specify those in different units than the standard IIO units (e.g. degree/s instead of rad/s) and so we need to do a unit conversion.
Quoted 1 line
Quoted 1 line
From a mathematical point of view it does not make a difference whether we
apply the unit conversion to the numerator or the inverse unit conversion to the denominator since (x / y) / z = x / (y * z). But as the denominator is typically a larger value and we are rounding both the numerator and denominator to integer values using the later method gives us a better precision (E.g. the relative error is smaller if we round 8000.3 to 8000 rather than rounding 8.3 to 8).
This is where in inverse unit conversion macros will be used.
Marked for stable as used by some upcoming fixes.
--- include/linux/iio/iio.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
include/linux/iio/iio.h +17 -0
@@ -645,6 +645,15 @@ int iio_str_to_fixpoint(const char *str,#define IIO_DEGREE_TO_RAD (deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL)/** +* IIO_RAD_TO_DEGREE() - Convert rad to degree +* @rad: A value in rad +* +* Returns the given value converted from rad to degree +*/ +#define IIO_RAD_TO_DEGREE (rad) \ + (((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL) + +/** * IIO_G_TO_M_S_2() - Convert g to meter / second**2 * @g: A value in g *
@@ -652,4 +661,12 @@ int iio_str_to_fixpoint(const char *str,*/ #define IIO_G_TO_M_S_2 (g) ((g) * 980665ULL / 100000ULL) +/** +* IIO_M_S_2_TO_G() - Convert meter / second**2 to g +* @ms2: A value in meter / second**2 +* +* Returns the given value converted from meter / second**2 to g +*/ +#define IIO_M_S_2_TO_G (ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL) +#endif /* _INDUSTRIAL_IO_H_ */
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
Build results:
total: 144 pass: 143 fail: 1 Failed builds: arm:allmodconfig Qemu test results: total: 93 pass: 83 fail: 10 Failed tests: arm:beagle:multi_v7_defconfig:omap3-beagle arm:beaglexm:multi_v7_defconfig:omap3-beagle-xm arm:overo:multi_v7_defconfig:omap3-overo-tobi arm:vexpress-a9:multi_v7_defconfig:vexpress-v2p-ca9 arm:vexpress-a15:multi_v7_defconfig:vexpress-v2p-ca15-tc1 arm:xilinx-zynq-a9:multi_v7_defconfig:zynq-zc702 arm:xilinx-zynq-a9:multi_v7_defconfig:zynq-zc706 arm:xilinx-zynq-a9:multi_v7_defconfig:zynq-zed arm:smdkc210:multi_v7_defconfig:exynos4210-smdkv310 mips:fuloong2e_defconfig
Same problems as with 4.1.
Details are available at http://server.roeck-us.net:8010/builders.
Guenter
Dear Greg,
FYI, this revision seems to be missing https://lkml.org/lkml/2015/9/3/411
[PATCH 4.2-rc5] workqueue: Make flush_workqueue() available again to non GPL modules
which actually defers 4.2 rollout for some cases, hence for 4.2.1 too.
Cheers,
Pete
Quoted 547 lines · On Samstag, 19. September 2015 10:27:20 Greg Kroah-Hartman wrote:
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.2.1-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 4.2.1-rc1Kees Cook <[email protected]>
fs: create and useseq_show_optionfor escapingTang Chen <[email protected]>
memory-hotplug: add hot-added memory ranges to memblock before allocatenode_datafor a node.Ryan Ding <[email protected]>
ocfs2: direct write will callocfs2_rw_unlock()twice when doing aio+dioMikulas Patocka <[email protected]>
hpfs: update ctime and mtime on directory modificationEric W. Biederman <[email protected]>
fs: Set the size of empty dirs to 0.Joe Thornber <[email protected]>
dm cache: fix leaking of deferred bio prison cellsMikulas Patocka <[email protected]>
dm stats: reportprecise_timestampsand histogram in @stats_list outputGrant Likely <[email protected]>
drivercore: Fix unregistration path of platform devicesJiang Liu <[email protected]>
ACPI, PCI: Penalize legacy IRQ used by ACPI SCIHeiko Stuebner <[email protected]>
ARM: dts: rockchip: fix rk3288 watchdog irqCaesar Wang <[email protected]>
ARM: rockchip: fix the CPU soft resetVignesh R <[email protected]>
ARM: OMAP2+: DRA7: clockdomain: changel4per2_7xx_clkdmtoSW_WKUPHyungwon Hwang <[email protected]>
ARM: dts: fix clock-frequency of display timing0 for exynos3250-rinatoBenjamin Cama <[email protected]>
ARM: orion5x: fix legacy orion5x IRQ numbersSudeep Holla <[email protected]>
ARM: BCM63xx: fix parameter toof_get_cpu_nodeinbcm63138_smp_boot_secondaryDavid Daney <[email protected]>
of/address: Don't loop forever inof_find_matching_node_by_address().Thierry Reding <[email protected]>
soc/tegra: pmc: Avoid usage of uninitialized variableXie XiuQi <[email protected]>
x86/mce: Reenable CMCI banks when swiching back to interrupt modeKishon Vijay Abraham I <[email protected]>
regulator: pbias: Fix broken pbias disable functionalitySudip Mukherjee <[email protected]>
auxdisplay: ks0108: fix refcountRicardo Ribalda Delgado <[email protected]>
spi/spi-xilinx: Fix mixed poll/irq modeRicardo Ribalda Delgado <[email protected]>
spi/spi-xilinx: Fix spurious IRQ ACK on irq modePeter Chen <[email protected]>
Doc: ABI: testing: configfs-usb-gadget-sourcesinkPeter Chen <[email protected]>
Doc: ABI: testing: configfs-usb-gadget-loopbackMasahiro Yamada <[email protected]>
devres: fixdevres_get()Max Filippov <[email protected]>
xtensa: fix kernel register spillingMax Filippov <[email protected]>
xtensa: fix threadptr reload on return to userspacePaul Mackerras <[email protected]>
KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTEGautham R. Shenoy <[email protected]>
KVM: PPC: Book3S HV: Exit onH_DOORBELLifHOST_IPIis setXiao Guangrong <[email protected]>
KVM: MMU: fix validation of mmio page faultEllen Wang <[email protected]>
HID: cp2112: fixI2C_SMBUS_BYTEwriteEllen Wang <[email protected]>
HID: cp2112: fix byte order in SMBUS operationsDon Zickus <[email protected]>
HID: usbhid: Fix the check forHID_RESET_PENDINGinhid_io_errorAndrey Ryabinin <[email protected]>
crypto: ghash-clmulni: specify context size for ghash async algorithmLeonidas Da Silva Barbosa <[email protected]>
crypto: vmx - Fixing GHASH Key issue on little endianLeonidas Da Silva Barbosa <[email protected]>
crypto: vmx - Fixing AES-CTR counter bugRobert Baldyga <[email protected]>
serial: samsung: fix DMA for FIFO smaller than cache line sizeMarek Szyprowski <[email protected]>
serial: samsung: fix DMA mode enter condition for small FIFO sizesAdam Lee <[email protected]>
serial: 8250_pci: Add support for Pericom PI7C9X795[1248]Maciej S. Szmigiero <[email protected]>
serial: 8250: bind to ALi Fast Infrared Controller (ALI5123)Maciej S. Szmigiero <[email protected]>
serial: 8250: don't bind to SMSC IrCC IR portCharles Keepax <[email protected]>
ASoC: arizona: Poll for FLL clock OK rather than use interruptsNikesh Oswal <[email protected]>
ASoC: arizona: Fix gain settings of FLL in free-run modeAxel Lin <[email protected]>
ASoC: adav80x: Remove .read_flag_mask setting from adav80x_regmap_configVaishali Thakkar <[email protected]>
ASoC: samsung: Remove redundantarndale_audio_removeOder Chiou <[email protected]>
ASoC: rt5645: Add structdmi_system_id"Google Celes" for chrome
platformJohn Lin <[email protected]>
ASoC: rt5640: fix line out no sound issueJohannes Thumshirn <[email protected]>
tty: serial:men_z135_uart.c: Fix race between IRQ andset_termios()Peter Chen <[email protected]>
usb: host: ehci-sys: delete uselessbus_to_hcdconversionPeter Chen <[email protected]>
usb: gadget:f_uac2: finalize wMaxPacketSize according to bandwidthKishon Vijay Abraham I <[email protected]>
usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512
bytesPeter Chen <[email protected]>
doc: usb: gadget-testing: using the updatedtestusb.cDan Carpenter <[email protected]>
usb: gadget: m66592-udc: forever loop inset_feature()David Jeffery <[email protected]>
xfs: return errors from partial I/O failures to filesJan Kara <[email protected]>
xfs: Fix file type directory corruption for btree directoriesJan Kara <[email protected]>
xfs: Fixxfs_attr_leafblockdefinitionDarrick J. Wong <[email protected]>
libxfs: readahead of dir3 data blocks should use the read verifierMichał Pecio <[email protected]>
USB: pl2303: fix baud-rate divisor calculationsMatthijs Kooijman <[email protected]>
USB:ftdi_sio: Added custom PID for CustomWare productsDavid Ward <[email protected]>
USB: qcserial: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G ModulePhilipp Hachtmann <[email protected]>
USB: symbolserial: Useusb_get_serial_port_dataMichael van der Westhuizen <[email protected]>
spi: dw: Allow interface drivers to limit data I/O to word sizesSebastian Reichel <[email protected]>
spi: omap2-mcspi: add runtime PM toset_cs()Sifan Naeem <[email protected]>
spi: img-spfi: fix kbuild test robot warningSifan Naeem <[email protected]>
spi: img-spfi: fix multiple calls to request gpioSifan Naeem <[email protected]>
spi: img-spfi: check for timeout error before proceedingKoji Matsuoka <[email protected]>
spi: sh-msiof: Fix FIFO size to 64 word from 256 wordNadav Haklai <[email protected]>
spi: orion: On a38x, implement "50MHZ SPI AC timing" Erratum No.
FE-9144572Lars Persson <[email protected]>
spi: Fix regression inspi-bitbang-txrx.hMartin Sperl <[email protected]>
spi: bcm2835: set up spi-mode before asserting cs-gpioSebastian Andrzej Siewior <[email protected]>
tty: serial: 8250_omap: do not use RX DMA if pause is not supportedMasahiro Yamada <[email protected]>
serial: 8250_uniphier: callclk_disable_unprepare()on failure pathZhang Rui <[email protected]>
PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCIMark Rustad <[email protected]>
PCI: Add VPD function 0 quirk for Intel Ethernet devicesMark Rustad <[email protected]>
PCI: Adddev_flagsbit to access VPD through function 0Bjorn Helgaas <[email protected]>
PCI: Fix TI816X class code quirkGeorgi Djakov <[email protected]>
clk: qcom: Fix MSM8916 prng clock enable bitStephen Boyd <[email protected]>
clk: qcom: SetCLK_SET_RATE_PARENTon ce1 clocksRobert Jarzmik <[email protected]>
clk: pxa: fix core frequency reporting unitDan Carpenter <[email protected]>
clk: versatile: off by one inclk_sp810_timerclken_of_get()Damien.Horsley <[email protected]>
clk: pistachio: correct critical clock listZdenko Pulitika <[email protected]>
clk: pistachio: Fix PLL rate calculation in integer modeZdenko Pulitika <[email protected]>
clk: pistachio: Fix override of clk-pll settings from boot loaderZdenko Pulitika <[email protected]>
clk: pistachio: Fix 32bit integer overflowsMarek Szyprowski <[email protected]>
clk: s5pv210: add missing call tosamsung_clk_of_add_provider()Krzysztof Kozlowski <[email protected]>
clk: exynos4: Fix wrong clock for Exynos4x12 ADCHeiko Stuebner <[email protected]>
clk: rockchip: rk3288: addCLK_SET_RATE_PARENTtosclk_macColin Ian King <[email protected]>
PM / clk: don't return int on__pm_clk_enable()David Kershner <[email protected]>
staging: unisys: Allow visorbus to autoloadIan Abbott <[email protected]>
staging: comedi: usbduxsigma: don't clobberao_timerin command testIan Abbott <[email protected]>
staging: comedi: usbduxsigma: don't clobberai_timerin command testIan Abbott <[email protected]>
staging: comedi:adl_pci7x3x: fix digital output on PCI-7230Mateusz Kulikowski <[email protected]>
staging: rtl8192e: Fix log spamming inrtl8192_hard_data_xmitJan H. Schönherr <[email protected]>
sched: Fix cpu_active_mask/cpu_online_mask raceHartmut Knaack <[email protected]>
iio:accel:mma8452: fix _get_hp_filter_indexLars-Peter Clausen <[email protected]>
iio: adis16480: Fix scale factorsLars-Peter Clausen <[email protected]>
iio: Add inverse unit conversion macrosLars-Peter Clausen <[email protected]>
iio: adis16400: Fix adis16448 gyroscope scaleCristina Opriceana <[email protected]>
iio: industrialio-buffer: Fixiio_buffer_pollreturn valueCristina Opriceana <[email protected]>
iio: event: Remove negative error code fromiio_event_pollMarkus Pargmann <[email protected]>
iio: bmg160:IIO_BUFFERandIIO_TRIGGERED_BUFFERare requiredMartin Schwidefsky <[email protected]>
s390/setup: fix novx parameterTakashi Iwai <[email protected]>
drm/i915: Fix CSR MMIO address checkChris Wilson <[email protected]>
drm/i915: Limit the number of loops for reading a split 64bit registerChris Wilson <[email protected]>
drm/i915: Always mark the object as dirty when used by the GPUGaurav K Singh <[email protected]>
drm/i915: Allow DSI dual link to be configured on any pipeJonathon Jongsma <[email protected]>
drm/qxl: validate monitors config modesLukas Wunner <[email protected]>
drm/i915: Preserve SSC earlierAlex Deucher <[email protected]>
drm/amdgpu: fix typo in dce10 watermark setupAlex Deucher <[email protected]>
drm/amdgpu: fix typo in dce11 watermark setupAlex Deucher <[email protected]>
drm/amdgpu: fix IH ring allocation for bus addresses (v2)Alex Deucher <[email protected]>
drm/amdgpu: Don't link train DisplayPort on HPD until we get the dpcdJammy Zhou <[email protected]>
drm/amdgpu: fix one warning messageAlex Deucher <[email protected]>
drm/radeon: fix HDMIquantization_rangefor pre-DCE5 asicsAlex Deucher <[email protected]>
drm/radeon/native: Send out the full AUX addressAlex Deucher <[email protected]>
drm/amdgpu/atom: Send out the full AUX addressVille Syrjälä <[email protected]>
drm/radeon/atom: Send out the full AUX addressVille Syrjälä <[email protected]>
drm/i915: Check DP link status on long hpd tooImre Deak <[email protected]>
drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre
GEN6Stephen Chandler Paul <[email protected]>
DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd-------------
Diffstat:
.../ABI/testing/configfs-usb-gadget-loopback | 2 +- .../ABI/testing/configfs-usb-gadget-sourcesink | 2 +- Documentation/device-mapper/statistics.txt | 4 ++ Documentation/usb/gadget-testing.txt | 7 +- Makefile | 4 +- arch/arm/Kconfig | 1 + arch/arm/boot/dts/exynos3250-rinato.dts | 2 +- arch/arm/boot/dts/rk3288.dtsi | 2 +- arch/arm/mach-bcm/bcm63xx_smp.c | 2 +- arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- arch/arm/mach-orion5x/include/mach/irqs.h | 64 ++++++++--------- arch/arm/mach-orion5x/irq.c | 4 +- arch/arm/mach-rockchip/platsmp.c | 40 ++++++----- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 18 +++-- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 + arch/s390/kernel/setup.c | 15 ++-- arch/x86/crypto/ghash-clmulni-intel_glue.c | 1 + arch/x86/kernel/acpi/boot.c | 1 + arch/x86/kernel/cpu/mcheck/mce_intel.c | 41 ++++++----- arch/x86/kvm/mmu.c | 45 ------------ arch/xtensa/include/asm/traps.h | 29 +++++--- arch/xtensa/kernel/entry.S | 7 +- drivers/acpi/acpi_pnp.c | 1 + drivers/acpi/pci_link.c | 16 +++++ drivers/ata/ahci.c | 13 +--- drivers/ata/pata_jmicron.c | 12 ---- drivers/auxdisplay/ks0108.c | 1 + drivers/base/devres.c | 4 +- drivers/base/platform.c | 8 +-- drivers/base/power/clock_ops.c | 4 +- drivers/clk/pistachio/clk-pistachio.c | 19 +++-- drivers/clk/pistachio/clk-pll.c | 77 +++++++++++++++----- drivers/clk/pistachio/clk.h | 14 ++-- drivers/clk/pxa/clk-pxa25x.c | 2 +- drivers/clk/pxa/clk-pxa27x.c | 2 +- drivers/clk/pxa/clk-pxa3xx.c | 2 +- drivers/clk/qcom/gcc-apq8084.c | 1 + drivers/clk/qcom/gcc-msm8916.c | 2 +- drivers/clk/qcom/gcc-msm8974.c | 1 + drivers/clk/rockchip/clk-rk3288.c | 2 +- drivers/clk/samsung/clk-exynos4.c | 2 + drivers/clk/samsung/clk-s5pv210.c | 2 + drivers/clk/versatile/clk-sp810.c | 4 +- drivers/crypto/vmx/aes_ctr.c | 8 ++- drivers/crypto/vmx/aesp8-ppc.pl | 34 ++++----- drivers/crypto/vmx/ghashp8-ppc.pl | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 5 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 20 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 15 ++-- drivers/gpu/drm/i915/i915_drv.h | 10 +-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/intel_csr.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 29 +++++--- drivers/gpu/drm/i915/intel_dp.c | 11 ++- drivers/gpu/drm/i915/intel_dsi.c | 9 ++- drivers/gpu/drm/qxl/qxl_display.c | 66 ++++++++++------- drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/radeon/atombios_dp.c | 5 +- drivers/gpu/drm/radeon/radeon_audio.c | 16 +++-- drivers/gpu/drm/radeon/radeon_connectors.c | 5 ++ drivers/gpu/drm/radeon/radeon_dp_auxch.c | 4 +- drivers/hid/hid-cp2112.c | 10 +-- drivers/hid/usbhid/hid-core.c | 2 +- drivers/iio/accel/mma8452.c | 2 +- drivers/iio/gyro/Kconfig | 3 +- drivers/iio/imu/adis16400_core.c | 2 +- drivers/iio/imu/adis16480.c | 39 ++++++++-- drivers/iio/industrialio-buffer.c | 2 +- drivers/iio/industrialio-event.c | 2 +- drivers/md/dm-cache-target.c | 4 ++ drivers/md/dm-stats.c | 14 +++- drivers/of/address.c | 6 +- drivers/pci/access.c | 61 +++++++++++++++- drivers/pci/quirks.c | 30 +++++++- drivers/regulator/pbias-regulator.c | 5 ++ drivers/soc/tegra/pmc.c | 4 +- drivers/spi/spi-bcm2835.c | 28 ++++++-- drivers/spi/spi-bitbang-txrx.h | 4 +- drivers/spi/spi-dw-mmio.c | 3 + drivers/spi/spi-dw.c | 4 +- drivers/spi/spi-dw.h | 35 +++++++++ drivers/spi/spi-img-spfi.c | 59 ++++++++++++---- drivers/spi/spi-omap2-mcspi.c | 10 +++ drivers/spi/spi-orion.c | 54 +++++++++++++- drivers/spi/spi-sh-msiof.c | 15 ++-- drivers/spi/spi-xilinx.c | 20 ++++-- drivers/staging/comedi/drivers/adl_pci7x3x.c | 16 ++++- drivers/staging/comedi/drivers/usbduxsigma.c | 70 ++++++++---------- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 +- drivers/staging/unisys/visorbus/visorchipset.c | 3 + drivers/tty/serial/8250/8250_omap.c | 14 +++- drivers/tty/serial/8250/8250_pci.c | 82 ++++++++++++++++------ drivers/tty/serial/8250/8250_pnp.c | 11 +++ drivers/tty/serial/8250/8250_uniphier.c | 1 + drivers/tty/serial/men_z135_uart.c | 9 ++- drivers/tty/serial/samsung.c | 47 ++++++++----- drivers/tty/serial/samsung.h | 1 + drivers/usb/dwc3/ep0.c | 12 +++- drivers/usb/gadget/function/f_uac2.c | 31 +++++++- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/host/ehci-sysfs.c | 8 +-- drivers/usb/serial/ftdi_sio.c | 4 ++ drivers/usb/serial/ftdi_sio_ids.h | 8 +++ drivers/usb/serial/pl2303.c | 35 ++++++--- drivers/usb/serial/qcserial.c | 1 + drivers/usb/serial/symbolserial.c | 6 +- fs/ceph/super.c | 2 +- fs/cifs/cifsfs.c | 6 +- fs/ext4/super.c | 4 +- fs/gfs2/super.c | 6 +- fs/hfs/super.c | 4 +- fs/hfsplus/options.c | 4 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hpfs/namei.c | 25 ++++++- fs/libfs.c | 2 +- fs/ocfs2/file.c | 28 ++++---- fs/ocfs2/super.c | 4 +- fs/overlayfs/super.c | 6 +- fs/reiserfs/super.c | 8 ++- fs/xfs/libxfs/xfs_da_format.h | 11 ++- fs/xfs/libxfs/xfs_dir2_data.c | 3 +- fs/xfs/libxfs/xfs_dir2_node.c | 10 ++- fs/xfs/xfs_aops.c | 3 +- fs/xfs/xfs_super.c | 4 +- include/linux/acpi.h | 2 +- include/linux/iio/iio.h | 17 +++++ include/linux/pci.h | 2 + include/linux/seq_file.h | 35 +++++++++ include/uapi/linux/dm-ioctl.h | 4 +- kernel/cgroup.c | 7 +- kernel/sched/core.c | 8 +++ mm/memory_hotplug.c | 10 ++- net/ceph/ceph_common.c | 7 +- security/selinux/hooks.c | 2 +- sound/soc/codecs/adav80x.c | 1 - sound/soc/codecs/arizona.c | 49 ++++++------- sound/soc/codecs/arizona.h | 1 - sound/soc/codecs/rt5640.c | 40 ++++++++++- sound/soc/codecs/rt5645.c | 7 ++ sound/soc/samsung/arndale_rt5631.c | 10 --- 144 files changed, 1255 insertions(+), 604 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Greg Kroah-Hartman
maintainerQuoted 8 lines · Hans-Peter Jansen
Dear Greg,
FYI, this revision seems to be missing https://lkml.org/lkml/2015/9/3/411
[PATCH 4.2-rc5] workqueue: Make
flush_workqueue()available again to non GPL moduleswhich actually defers 4.2 rollout for some cases, hence for 4.2.1 too.
I still have 200+ patches to go through for the 4.2-stable series. Patches that are submitted for -rc1 merging obviously must not be all that series for maintainers, otherwise they would have gotten them merged into the -final release, so take it up with the author/maintainer of this patch :)
In other words, be patient, it will make it into some future 4.2-stable release. If you _must_ have this patch now, it's trivial for you to add it to your own kernels that you build.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 28 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
Build results:
total: 144 pass: 143 fail: 1 Failed builds: arm:allmodconfig Qemu test results: total: 93 pass: 83 fail: 10 Failed tests: arm:beagle:multi_v7_defconfig:omap3-beagle arm:beaglexm:multi_v7_defconfig:omap3-beagle-xm arm:overo:multi_v7_defconfig:omap3-overo-tobi arm:vexpress-a9:multi_v7_defconfig:vexpress-v2p-ca9 arm:vexpress-a15:multi_v7_defconfig:vexpress-v2p-ca15-tc1 arm:xilinx-zynq-a9:multi_v7_defconfig:zynq-zc702 arm:xilinx-zynq-a9:multi_v7_defconfig:zynq-zc706 arm:xilinx-zynq-a9:multi_v7_defconfig:zynq-zed arm:smdkc210:multi_v7_defconfig:exynos4210-smdkv310 mips:fuloong2e_defconfig
Quoted 3 lines
Same problems as with 4.1.
Details are available at http://server.roeck-us.net:8010/builders.
Should be fixed with the patch now added.
thanks,
greg k-h
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
Compiled and booted on x86_32. No errors in dmesg.
regards
sudip
Greg Kroah-Hartman
maintainerQuoted 9 lines · Sudip Mukherjee
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
Compiled and booted on
x86_32. No errors in dmesg.
Great, thanks for testing and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
Quoted 8 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.2.1-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978
Greg Kroah-Hartman
maintainerQuoted 13 lines · Shuah Khan
Quoted 12 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.2.1 release. There are 120 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon Sep 21 17:15:44 UTC 2015. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.2.1-rc1.gzand the diffstat can be found below.
Quoted 6 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Thanks for testing all of these and letting me know.
greg k-h