* [PATCH 4.0 00/72] 4.0.3-stable review
@ 2015-05-11 17:54 Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 01/72] bpf: fix 64-bit divide Greg Kroah-Hartman
` (66 more replies)
0 siblings, 67 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah.kh, stable
This is the start of the stable review cycle for the 4.0.3 release.
There are 72 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 Wed May 13 17:54:19 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.0.3-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 4.0.3-rc1
K. Y. Srinivasan <kys@microsoft.com>
Drivers: hv: vmbus: Don't wait after requesting offers
Thomas Hebb <tommyhebb@gmail.com>
hfsplus: don't store special "osx" xattr prefix on-disk
Christian König <christian.koenig@amd.com>
drm/radeon: check new address before removing old one
Christian König <christian.koenig@amd.com>
drm/radeon: reset BOs address after clearing it.
Christian König <christian.koenig@amd.com>
drm/radeon: fix lockup when BOs aren't part of the VM on release
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: adjust pll when audio is not enabled
Michel Dänzer <michel.daenzer@amd.com>
drm/radeon: Use drm_calloc_ab for CS relocs
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: only enable audio streams if the monitor supports it
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: only mark audio as connected if the monitor supports it (v3)
Alex Deucher <alexander.deucher@amd.com>
drm/radeon/audio: don't enable packets until the end
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: drop dce6_dp_enable
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: fix ordering of AVI packet setup
Christoph Hellwig <hch@lst.de>
3w-sas: fix command completion race
Christoph Hellwig <hch@lst.de>
3w-9xxx: fix command completion race
Christoph Hellwig <hch@lst.de>
3w-xxxx: fix command completion race
Mike Christie <michaelc@cs.wisc.edu>
SCSI: add 1024 max sectors black list flag
Davide Italiano <dccitaliano@gmail.com>
ext4: move check under lock scope to close a race.
Lukas Czerner <lczerner@redhat.com>
ext4: fix data corruption caused by unwritten and delayed extents
Hans de Goede <hdegoede@redhat.com>
uas: Set max_sectors_240 quirk for ASM1053 devices
Hans de Goede <hdegoede@redhat.com>
uas: Add US_FL_MAX_SECTORS_240 flag
Hans de Goede <hdegoede@redhat.com>
uas: Allow uas_use_uas_driver to return usb-storage flags
Ilya Dryomov <idryomov@gmail.com>
rbd: end I/O the entire obj_request on error
Ludovic Desroches <ludovic.desroches@atmel.com>
tty/serial: at91: maxburst was missing for dma transfers
Chris Bainbridge <chris.bainbridge@gmail.com>
ACPI / SBS: Enable battery manager when present
Omar Sandoval <osandov@osandov.com>
btrfs: unlock i_mutex after attempting to delete subvolume during send
Bard Liao <bardliao@realtek.com>
ASoC: rt5677: fixed wrong DMIC ref clock
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE
Bard Liao <bardliao@realtek.com>
ASoC: rt5677: add register patch for PLL
Wei Yongjun <yongjun_wei@trendmicro.com.cn>
ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe()
Wei Yongjun <yongjun_wei@trendmicro.com.cn>
ASoC: samsung: s3c24xx-i2s: Fix return value check in s3c24xx_iis_dev_probe()
Li Jun <jun.li@freescale.com>
usb: chipidea: otg: remove mutex unlock and lock while stop and start role
Dean Nelson <dnelson@redhat.com>
arm64: add missing PAGE_ALIGN() to __dma_free()
Marek Szyprowski <m.szyprowski@samsung.com>
arm64: dma-mapping: always clear allocated buffers
Michal Simek <michal.simek@xilinx.com>
serial: xilinx: Use platform_get_irq to get irq description structure
Michal Simek <michal.simek@xilinx.com>
serial: of-serial: Remove device_type = "serial" registration
Quentin Casasnovas <quentin.casasnovas@oracle.com>
cdc-acm: prevent infinite loop when parsing CDC headers.
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Add mute-LED mode control to Thinkpad
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Fix mute-LED fixed mode
Peter Zubaj <pzubaj@marticonet.sk>
ALSA: emu10k1: Emu10k2 32 bit DMA mode
Takashi Iwai <tiwai@suse.de>
ALSA: emu10k1: Fix card shortname string buffer overflow
Takashi Iwai <tiwai@suse.de>
ALSA: emux: Fix mutex deadlock in OSS emulation
Takashi Iwai <tiwai@suse.de>
ALSA: emux: Fix mutex deadlock at unloading
Markos Chandras <markos.chandras@imgtec.com>
MIPS: Makefile: Fix MIPS ASE detection code
Markos Chandras <markos.chandras@imgtec.com>
MIPS: asm: elf: Set O32 default FPU flags
Rafał Miłecki <zajec5@gmail.com>
MIPS: BCM47XX: Fix detecting Microsoft MN-700 & Asus WL500G
Markos Chandras <markos.chandras@imgtec.com>
MIPS: Kconfig: Disable SMP/CPS for 64-bit
Niklas Cassel <niklas.cassel@axis.com>
MIPS: smp-cps: cpu_set FPU mask if FPU present
John Crispin <blogic@openwrt.org>
MIPS: ralink: add missing symbol for RALINK_ILL_ACC
John Crispin <blogic@openwrt.org>
MIPS: ralink: Fix bad config symbol in PCI makefile.
Adrien Schildknecht <adrien+dev@schischi.me>
SSB: fix Kconfig dependencies
Ralf Baechle <ralf@linux-mips.org>
Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores."
Ralf Baechle <ralf@linux-mips.org>
MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard.
Ralf Baechle <ralf@linux-mips.org>
MIPS: Fix cpu_has_mips_r2_exec_hazard.
Markos Chandras <markos.chandras@imgtec.com>
MIPS: kernel: entry.S: Set correct ISA level for mips_ihb
Markos Chandras <markos.chandras@imgtec.com>
MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case
Markos Chandras <markos.chandras@imgtec.com>
MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes
Markos Chandras <markos.chandras@imgtec.com>
MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter
Ganesan Ramalingam <ganesanr@broadcom.com>
MIPS: Netlogic: Fix for SATA PHY init
Aaro Koskinen <aaro.koskinen@iki.fi>
MIPS: OCTEON: fix PCI interrupt mapping for D-Link DSR-1000N
Alexander Sverdlin <alexander.sverdlin@nokia.com>
MIPS: Octeon: Remove udelay() causing huge IRQ latency
Lars Persson <lars.persson@axis.com>
MIPS: Fix race condition in lazy cache flushing.
Lars Persson <lars.persson@axis.com>
Revert "MIPS: Remove race window in page fault handling"
Chandrakala Chavva <cchavva@caviumnetworks.com>
MIPS: OCTEON: Use correct CSR to soft reset
Aaro Koskinen <aaro.koskinen@iki.fi>
MIPS: OCTEON: dma-octeon: fix OHCI USB config check
Nicolas Schichan <nschichan@freebox.fr>
MIPS: BCM63xx: Move bcm63xx_gpio_init() to bcm63xx_register_devices().
David S. Miller <davem@davemloft.net>
ipv4: Missing sk_nulls_node_init() in ping_unhash().
Ido Shamay <idos@mellanox.com>
net/mlx4_en: Schedule napi when RX buffers allocation fails
Hariprasad Shenai <hariprasad@chelsio.com>
cxgb4: Fix MC1 memory offset calculation
Benjamin Poirier <bpoirier@suse.de>
mlx4: Fix tx ring affinity_mask creation
Herbert Xu <herbert@gondor.apana.org.au>
route: Use ipv4_mtu instead of raw rt_pmtu
Alexei Starovoitov <ast@plumgrid.com>
bpf: fix 64-bit divide
-------------
Diffstat:
Documentation/kernel-parameters.txt | 2 +
Makefile | 4 +-
arch/arm64/mm/dma-mapping.c | 9 +--
arch/mips/Kconfig | 4 +-
arch/mips/Makefile | 14 +++-
arch/mips/bcm47xx/board.c | 4 +-
arch/mips/bcm63xx/prom.c | 4 -
arch/mips/bcm63xx/setup.c | 4 +
arch/mips/cavium-octeon/dma-octeon.c | 2 +-
arch/mips/cavium-octeon/setup.c | 5 +-
arch/mips/include/asm/cacheflush.h | 38 +++++----
arch/mips/include/asm/cpu-features.h | 33 +++++++-
arch/mips/include/asm/elf.h | 5 ++
.../asm/mach-cavium-octeon/cpu-feature-overrides.h | 1 -
arch/mips/include/asm/octeon/cvmx.h | 8 --
arch/mips/include/asm/octeon/pci-octeon.h | 3 -
arch/mips/include/asm/pgtable.h | 9 ++-
arch/mips/include/asm/r4kcache.h | 89 +++++++++++-----------
arch/mips/include/asm/spinlock.h | 2 +-
arch/mips/kernel/entry.S | 3 +-
arch/mips/kernel/smp-cps.c | 6 ++
arch/mips/mm/cache.c | 39 +++++-----
arch/mips/mm/tlbex.c | 21 +----
arch/mips/netlogic/xlp/ahci-init-xlp2.c | 13 ++++
arch/mips/pci/Makefile | 2 +-
arch/mips/pci/pci-octeon.c | 8 +-
arch/mips/pci/pcie-octeon.c | 8 --
arch/mips/ralink/Kconfig | 5 ++
drivers/acpi/sbs.c | 2 +-
drivers/block/rbd.c | 5 ++
drivers/gpu/drm/radeon/atombios_crtc.c | 3 +
drivers/gpu/drm/radeon/atombios_encoders.c | 6 +-
drivers/gpu/drm/radeon/dce6_afmt.c | 25 ------
drivers/gpu/drm/radeon/evergreen_hdmi.c | 53 ++++++++-----
drivers/gpu/drm/radeon/r600_hdmi.c | 9 ++-
drivers/gpu/drm/radeon/radeon_audio.c | 30 ++++----
drivers/gpu/drm/radeon/radeon_connectors.c | 8 +-
drivers/gpu/drm/radeon/radeon_cs.c | 4 +-
drivers/gpu/drm/radeon/radeon_vm.c | 36 +++++----
drivers/gpu/drm/radeon/si_dpm.c | 1 +
drivers/hv/channel_mgmt.c | 12 +--
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 +
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 26 ++++++-
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 8 +-
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 +
drivers/scsi/3w-9xxx.c | 57 ++++----------
drivers/scsi/3w-9xxx.h | 5 --
drivers/scsi/3w-sas.c | 50 +++---------
drivers/scsi/3w-sas.h | 4 -
drivers/scsi/3w-xxxx.c | 42 ++--------
drivers/scsi/3w-xxxx.h | 5 --
drivers/scsi/scsi_devinfo.c | 1 +
drivers/scsi/scsi_scan.c | 6 ++
drivers/ssb/Kconfig | 1 +
drivers/tty/serial/atmel_serial.c | 2 +
drivers/tty/serial/of_serial.c | 1 -
drivers/tty/serial/uartlite.c | 11 +--
drivers/tty/serial/xilinx_uartps.c | 12 +--
drivers/usb/chipidea/otg_fsm.c | 4 -
drivers/usb/class/cdc-acm.c | 7 +-
drivers/usb/storage/uas-detect.h | 11 ++-
drivers/usb/storage/uas.c | 16 +++-
drivers/usb/storage/usb.c | 8 +-
fs/btrfs/ioctl.c | 3 +-
fs/ext4/extents.c | 15 ++--
fs/ext4/extents_status.c | 8 ++
fs/ext4/inode.c | 2 +
fs/hfsplus/xattr.c | 38 ++++-----
include/linux/usb_usual.h | 2 +
include/scsi/scsi_devinfo.h | 1 +
include/sound/emu10k1.h | 14 ++--
include/sound/soc-dapm.h | 2 +-
kernel/bpf/core.c | 12 +--
net/ipv4/ping.c | 1 +
net/ipv4/route.c | 5 +-
sound/pci/emu10k1/emu10k1.c | 6 +-
sound/pci/emu10k1/emu10k1_callback.c | 4 +-
sound/pci/emu10k1/emu10k1_main.c | 21 +++--
sound/pci/emu10k1/emupcm.c | 2 +-
sound/pci/emu10k1/memory.c | 11 +--
sound/pci/hda/hda_codec.c | 21 ++---
sound/pci/hda/thinkpad_helper.c | 1 +
sound/soc/codecs/rt5677.c | 5 +-
sound/soc/codecs/tfa9879.c | 4 +-
sound/soc/samsung/s3c24xx-i2s.c | 4 +-
sound/synth/emux/emux_oss.c | 11 +--
sound/synth/emux/emux_seq.c | 29 +++++--
88 files changed, 531 insertions(+), 511 deletions(-)
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 01/72] bpf: fix 64-bit divide
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 02/72] route: Use ipv4_mtu instead of raw rt_pmtu Greg Kroah-Hartman
` (65 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Michael Holzheu, Daniel Borkmann,
Alexei Starovoitov, David S. Miller
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexei Starovoitov <ast@plumgrid.com>
[ Upstream commit 876a7ae65b86d8cec8efe7d15d050ac61116874e ]
ALU64_DIV instruction should be dividing 64-bit by 64-bit,
whereas do_div() does 64-bit by 32-bit divide.
x64 and arm64 JITs correctly implement 64 by 64 unsigned divide.
llvm BPF backend emits code assuming that ALU64_DIV does 64 by 64.
Fixes: 89aa075832b0 ("net: sock: allow eBPF programs to be attached to sockets")
Reported-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/bpf/core.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -357,8 +357,8 @@ select_insn:
ALU64_MOD_X:
if (unlikely(SRC == 0))
return 0;
- tmp = DST;
- DST = do_div(tmp, SRC);
+ div64_u64_rem(DST, SRC, &tmp);
+ DST = tmp;
CONT;
ALU_MOD_X:
if (unlikely(SRC == 0))
@@ -367,8 +367,8 @@ select_insn:
DST = do_div(tmp, (u32) SRC);
CONT;
ALU64_MOD_K:
- tmp = DST;
- DST = do_div(tmp, IMM);
+ div64_u64_rem(DST, IMM, &tmp);
+ DST = tmp;
CONT;
ALU_MOD_K:
tmp = (u32) DST;
@@ -377,7 +377,7 @@ select_insn:
ALU64_DIV_X:
if (unlikely(SRC == 0))
return 0;
- do_div(DST, SRC);
+ DST = div64_u64(DST, SRC);
CONT;
ALU_DIV_X:
if (unlikely(SRC == 0))
@@ -387,7 +387,7 @@ select_insn:
DST = (u32) tmp;
CONT;
ALU64_DIV_K:
- do_div(DST, IMM);
+ DST = div64_u64(DST, IMM);
CONT;
ALU_DIV_K:
tmp = (u32) DST;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 02/72] route: Use ipv4_mtu instead of raw rt_pmtu
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 01/72] bpf: fix 64-bit divide Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 03/72] mlx4: Fix tx ring affinity_mask creation Greg Kroah-Hartman
` (64 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Gerd v. Egidy, Herbert Xu,
David S. Miller
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
[ Upstream commit cb6ccf09d6b94bec4def1ac5cf4678d12b216474 ]
The commit 3cdaa5be9e81a914e633a6be7b7d2ef75b528562 ("ipv4: Don't
increase PMTU with Datagram Too Big message") broke PMTU in cases
where the rt_pmtu value has expired but is smaller than the new
PMTU value.
This obsolete rt_pmtu then prevents the new PMTU value from being
installed.
Fixes: 3cdaa5be9e81 ("ipv4: Don't increase PMTU with Datagram Too Big message")
Reported-by: Gerd v. Egidy <gerd.von.egidy@intra2net.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/route.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -963,10 +963,7 @@ static void __ip_rt_update_pmtu(struct r
if (dst_metric_locked(dst, RTAX_MTU))
return;
- if (dst->dev->mtu < mtu)
- return;
-
- if (rt->rt_pmtu && rt->rt_pmtu < mtu)
+ if (ipv4_mtu(dst) < mtu)
return;
if (mtu < ip_rt_min_pmtu)
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 03/72] mlx4: Fix tx ring affinity_mask creation
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 01/72] bpf: fix 64-bit divide Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 02/72] route: Use ipv4_mtu instead of raw rt_pmtu Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 04/72] cxgb4: Fix MC1 memory offset calculation Greg Kroah-Hartman
` (63 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Benjamin Poirier, Ido Shamay,
David S. Miller
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Poirier <bpoirier@suse.de>
[ Upstream commit 42eab005a5dd5d7ea2b0328aecc4d6cc0c23c9c2 ]
By default, the number of tx queues is limited by the number of online cpus
in mlx4_en_get_profile(). However, this limit no longer holds after the
ethtool .set_channels method has been called. In that situation, the driver
may access invalid bits of certain cpumask variables when queue_index >=
nr_cpu_ids.
Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Acked-by: Ido Shamay <idos@mellanox.com>
Fixes: d03a68f ("net/mlx4_en: Configure the XPS queue mapping on driver load")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -143,8 +143,10 @@ int mlx4_en_create_tx_ring(struct mlx4_e
ring->hwtstamp_tx_type = priv->hwtstamp_config.tx_type;
ring->queue_index = queue_index;
- if (queue_index < priv->num_tx_rings_p_up && cpu_online(queue_index))
- cpumask_set_cpu(queue_index, &ring->affinity_mask);
+ if (queue_index < priv->num_tx_rings_p_up)
+ cpumask_set_cpu_local_first(queue_index,
+ priv->mdev->dev->numa_node,
+ &ring->affinity_mask);
*pring = ring;
return 0;
@@ -213,7 +215,7 @@ int mlx4_en_activate_tx_ring(struct mlx4
err = mlx4_qp_to_ready(mdev->dev, &ring->wqres.mtt, &ring->context,
&ring->qp, &ring->qp_state);
- if (!user_prio && cpu_online(ring->queue_index))
+ if (!cpumask_empty(&ring->affinity_mask))
netif_set_xps_queue(priv->dev, &ring->affinity_mask,
ring->queue_index);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 04/72] cxgb4: Fix MC1 memory offset calculation
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 03/72] mlx4: Fix tx ring affinity_mask creation Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 05/72] net/mlx4_en: Schedule napi when RX buffers allocation fails Greg Kroah-Hartman
` (62 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Steve Wise, Hariprasad Shenai,
David S. Miller
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hariprasad Shenai <hariprasad@chelsio.com>
[ Upstream commit 7f0b8a56c978b0a3315ac84c6cbb065413afb8e9 ]
Commit 6559a7e8296002b4 ("cxgb4: Cleanup macros so they follow the same
style and look consistent") introduced a regression where reading MC1
memory in adapters where MC0 isn't present or MC0 size is not equal to MC1
size caused the adapter to crash due to incorrect computation of memoffset.
Fix is to read the size of MC0 instead of MC1 for offset calculation
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -492,7 +492,7 @@ int t4_memory_rw(struct adapter *adap, i
memoffset = (mtype * (edc_size * 1024 * 1024));
else {
mc_size = EXT_MEM0_SIZE_G(t4_read_reg(adap,
- MA_EXT_MEMORY1_BAR_A));
+ MA_EXT_MEMORY0_BAR_A));
memoffset = (MEM_MC0 * edc_size + mc_size) * 1024 * 1024;
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 05/72] net/mlx4_en: Schedule napi when RX buffers allocation fails
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 04/72] cxgb4: Fix MC1 memory offset calculation Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 06/72] ipv4: Missing sk_nulls_node_init() in ping_unhash() Greg Kroah-Hartman
` (61 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Ido Shamay, Amir Vadai,
David S. Miller
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ido Shamay <idos@mellanox.com>
[ Upstream commit 07841f9d94c11afe00c0498cf242edf4075729f4 ]
When system is out of memory, refilling of RX buffers fails while
the driver continue to pass the received packets to the kernel stack.
At some point, when all RX buffers deplete, driver may fall into a
sleep, and not recover when memory for new RX buffers is once again
availible. This is because hardware does not have valid descriptors,
so no interrupt will be generated for the driver to return to work
in napi context. Fix it by schedule the napi poll function from
stats_task delayed workqueue, as long as the allocations fail.
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 26 +++++++++++++++++++++++--
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1
3 files changed, 26 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1467,6 +1467,7 @@ static void mlx4_en_service_task(struct
if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS)
mlx4_en_ptp_overflow_check(mdev);
+ mlx4_en_recover_from_oom(priv);
queue_delayed_work(mdev->workqueue, &priv->service_task,
SERVICE_TASK_DELAY);
}
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -244,6 +244,12 @@ static int mlx4_en_prepare_rx_desc(struc
return mlx4_en_alloc_frags(priv, rx_desc, frags, ring->page_alloc, gfp);
}
+static inline bool mlx4_en_is_ring_empty(struct mlx4_en_rx_ring *ring)
+{
+ BUG_ON((u32)(ring->prod - ring->cons) > ring->actual_size);
+ return ring->prod == ring->cons;
+}
+
static inline void mlx4_en_update_rx_prod_db(struct mlx4_en_rx_ring *ring)
{
*ring->wqres.db.db = cpu_to_be32(ring->prod & 0xffff);
@@ -315,8 +321,7 @@ static void mlx4_en_free_rx_buf(struct m
ring->cons, ring->prod);
/* Unmap and free Rx buffers */
- BUG_ON((u32) (ring->prod - ring->cons) > ring->actual_size);
- while (ring->cons != ring->prod) {
+ while (!mlx4_en_is_ring_empty(ring)) {
index = ring->cons & ring->size_mask;
en_dbg(DRV, priv, "Processing descriptor:%d\n", index);
mlx4_en_free_rx_desc(priv, ring, index);
@@ -491,6 +496,23 @@ err_allocator:
return err;
}
+/* We recover from out of memory by scheduling our napi poll
+ * function (mlx4_en_process_cq), which tries to allocate
+ * all missing RX buffers (call to mlx4_en_refill_rx_buffers).
+ */
+void mlx4_en_recover_from_oom(struct mlx4_en_priv *priv)
+{
+ int ring;
+
+ if (!priv->port_up)
+ return;
+
+ for (ring = 0; ring < priv->rx_ring_num; ring++) {
+ if (mlx4_en_is_ring_empty(priv->rx_ring[ring]))
+ napi_reschedule(&priv->rx_cq[ring]->napi);
+ }
+}
+
void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
struct mlx4_en_rx_ring **pring,
u32 size, u16 stride)
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -790,6 +790,7 @@ int mlx4_en_activate_tx_ring(struct mlx4
void mlx4_en_deactivate_tx_ring(struct mlx4_en_priv *priv,
struct mlx4_en_tx_ring *ring);
void mlx4_en_set_num_rx_rings(struct mlx4_en_dev *mdev);
+void mlx4_en_recover_from_oom(struct mlx4_en_priv *priv);
int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
struct mlx4_en_rx_ring **pring,
u32 size, u16 stride, int node);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 06/72] ipv4: Missing sk_nulls_node_init() in ping_unhash().
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 05/72] net/mlx4_en: Schedule napi when RX buffers allocation fails Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 07/72] MIPS: BCM63xx: Move bcm63xx_gpio_init() to bcm63xx_register_devices() Greg Kroah-Hartman
` (60 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Linus Torvalds, Wen Xu,
David S. Miller
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: "David S. Miller" <davem@davemloft.net>
[ Upstream commit a134f083e79fb4c3d0a925691e732c56911b4326 ]
If we don't do that, then the poison value is left in the ->pprev
backlink.
This can cause crashes if we do a disconnect, followed by a connect().
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Wen Xu <hotdog3645@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/ping.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -158,6 +158,7 @@ void ping_unhash(struct sock *sk)
if (sk_hashed(sk)) {
write_lock_bh(&ping_table.lock);
hlist_nulls_del(&sk->sk_nulls_node);
+ sk_nulls_node_init(&sk->sk_nulls_node);
sock_put(sk);
isk->inet_num = 0;
isk->inet_sport = 0;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 07/72] MIPS: BCM63xx: Move bcm63xx_gpio_init() to bcm63xx_register_devices().
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 06/72] ipv4: Missing sk_nulls_node_init() in ping_unhash() Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 08/72] MIPS: OCTEON: dma-octeon: fix OHCI USB config check Greg Kroah-Hartman
` (59 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Nicolas Schichan, linux-mips,
Alexandre Courbot, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Schichan <nschichan@freebox.fr>
Commit 2ec459f2a77b808c1e5a3616c88b613d3f720c8d upstream.
When called from prom init code, bcm63xx_gpio_init() will fail as it
will call gpiochip_add() which relies on a working kmalloc() to alloc
the gpio_desc array and kmalloc is not useable yet at prom init time.
Move bcm63xx_gpio_init() to bcm63xx_register_devices() (an
arch_initcall) where kmalloc works.
Fixes: 14e85c0e69d5 ("gpio: remove gpio_descs global array")
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Alexandre Courbot <acourbot@nvidia.com>
Patchwork: https://patchwork.linux-mips.org/patch/9530/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/bcm63xx/prom.c | 4 ----
arch/mips/bcm63xx/setup.c | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
--- a/arch/mips/bcm63xx/prom.c
+++ b/arch/mips/bcm63xx/prom.c
@@ -17,7 +17,6 @@
#include <bcm63xx_cpu.h>
#include <bcm63xx_io.h>
#include <bcm63xx_regs.h>
-#include <bcm63xx_gpio.h>
void __init prom_init(void)
{
@@ -53,9 +52,6 @@ void __init prom_init(void)
reg &= ~mask;
bcm_perf_writel(reg, PERF_CKCTL_REG);
- /* register gpiochip */
- bcm63xx_gpio_init();
-
/* do low level board init */
board_prom_init();
--- a/arch/mips/bcm63xx/setup.c
+++ b/arch/mips/bcm63xx/setup.c
@@ -20,6 +20,7 @@
#include <bcm63xx_cpu.h>
#include <bcm63xx_regs.h>
#include <bcm63xx_io.h>
+#include <bcm63xx_gpio.h>
void bcm63xx_machine_halt(void)
{
@@ -160,6 +161,9 @@ void __init plat_mem_setup(void)
int __init bcm63xx_register_devices(void)
{
+ /* register gpiochip */
+ bcm63xx_gpio_init();
+
return board_register_devices();
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 08/72] MIPS: OCTEON: dma-octeon: fix OHCI USB config check
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 07/72] MIPS: BCM63xx: Move bcm63xx_gpio_init() to bcm63xx_register_devices() Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 09/72] MIPS: OCTEON: Use correct CSR to soft reset Greg Kroah-Hartman
` (58 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Aaro Koskinen, Aleksey Makarov, David Daney,
linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaro Koskinen <aaro.koskinen@iki.fi>
Commit a8667d706dfa394ef9fe5f9013dee92d40a096e8 upstream.
CONFIG_USB_OCTEON_OHCI is deprecated and no longer needed to use OHCI
on OCTEON II. Instead, CONFIG_USB_OHCI_HCD_PLATFORM should be used.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Aleksey Makarov <aleksey.makarov@auriga.com>
Cc: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9421/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/cavium-octeon/dma-octeon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/cavium-octeon/dma-octeon.c
+++ b/arch/mips/cavium-octeon/dma-octeon.c
@@ -306,7 +306,7 @@ void __init plat_swiotlb_setup(void)
swiotlbsize = 64 * (1<<20);
}
#endif
-#ifdef CONFIG_USB_OCTEON_OHCI
+#ifdef CONFIG_USB_OHCI_HCD_PLATFORM
/* OCTEON II ohci is only 32-bit. */
if (OCTEON_IS_OCTEON2() && max_addr >= 0x100000000ul)
swiotlbsize = 64 * (1<<20);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 09/72] MIPS: OCTEON: Use correct CSR to soft reset
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 08/72] MIPS: OCTEON: dma-octeon: fix OHCI USB config check Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 10/72] Revert "MIPS: Remove race window in page fault handling" Greg Kroah-Hartman
` (57 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Chandrakala Chavva, Aleksey Makarov,
linux-mips, David Daney, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakala Chavva <cchavva@caviumnetworks.com>
Commit 9a49899eb88803dcc0ef437f09912f9a7b7a66fd upstream.
Also delete unused cvmx_reset_octeon()
This fixes reboot for Octeon III boards
Signed-off-by: Chandrakala Chavva <cchavva@caviumnetworks.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@auriga.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/9471/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/cavium-octeon/setup.c | 5 ++++-
arch/mips/include/asm/octeon/cvmx.h | 8 --------
2 files changed, 4 insertions(+), 9 deletions(-)
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -413,7 +413,10 @@ static void octeon_restart(char *command
mb();
while (1)
- cvmx_write_csr(CVMX_CIU_SOFT_RST, 1);
+ if (OCTEON_IS_OCTEON3())
+ cvmx_write_csr(CVMX_RST_SOFT_RST, 1);
+ else
+ cvmx_write_csr(CVMX_CIU_SOFT_RST, 1);
}
--- a/arch/mips/include/asm/octeon/cvmx.h
+++ b/arch/mips/include/asm/octeon/cvmx.h
@@ -436,14 +436,6 @@ static inline uint64_t cvmx_get_cycle_gl
/***************************************************************************/
-static inline void cvmx_reset_octeon(void)
-{
- union cvmx_ciu_soft_rst ciu_soft_rst;
- ciu_soft_rst.u64 = 0;
- ciu_soft_rst.s.soft_rst = 1;
- cvmx_write_csr(CVMX_CIU_SOFT_RST, ciu_soft_rst.u64);
-}
-
/* Return the number of cores available in the chip */
static inline uint32_t cvmx_octeon_num_cores(void)
{
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 10/72] Revert "MIPS: Remove race window in page fault handling"
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 09/72] MIPS: OCTEON: Use correct CSR to soft reset Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 11/72] MIPS: Fix race condition in lazy cache flushing Greg Kroah-Hartman
` (56 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Lars Persson, linux-mips, paul.burton,
Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars Persson <lars.persson@axis.com>
Commit 5b9593f3bccb9904f260f9ad7f184e1d2921bd1e upstream.
Revert commit 2a4a8b1e5d9d ("MIPS: Remove race window in page fault
handling") because it increased the number of flushed dcache pages and
became a performance problem for some workloads.
Signed-off-by: Lars Persson <larper@axis.com>
Cc: linux-mips@linux-mips.org
Cc: paul.burton@imgtec.com
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9345/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/pgtable.h | 9 +++++----
arch/mips/mm/cache.c | 27 ++++++++-------------------
2 files changed, 13 insertions(+), 23 deletions(-)
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -127,10 +127,6 @@ do { \
} \
} while(0)
-
-extern void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
- pte_t pteval);
-
#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
#define pte_none(pte) (!(((pte).pte_low | (pte).pte_high) & ~_PAGE_GLOBAL))
@@ -154,6 +150,7 @@ static inline void set_pte(pte_t *ptep,
}
}
}
+#define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval)
static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
{
@@ -192,6 +189,7 @@ static inline void set_pte(pte_t *ptep,
}
#endif
}
+#define set_pte_at(mm, addr, ptep, pteval) set_pte(ptep, pteval)
static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
{
@@ -407,12 +405,15 @@ static inline pte_t pte_modify(pte_t pte
extern void __update_tlb(struct vm_area_struct *vma, unsigned long address,
pte_t pte);
+extern void __update_cache(struct vm_area_struct *vma, unsigned long address,
+ pte_t pte);
static inline void update_mmu_cache(struct vm_area_struct *vma,
unsigned long address, pte_t *ptep)
{
pte_t pte = *ptep;
__update_tlb(vma, address, pte);
+ __update_cache(vma, address, pte);
}
static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -119,36 +119,25 @@ void __flush_anon_page(struct page *page
EXPORT_SYMBOL(__flush_anon_page);
-static void mips_flush_dcache_from_pte(pte_t pteval, unsigned long address)
+void __update_cache(struct vm_area_struct *vma, unsigned long address,
+ pte_t pte)
{
struct page *page;
- unsigned long pfn = pte_pfn(pteval);
+ unsigned long pfn, addr;
+ int exec = (vma->vm_flags & VM_EXEC) && !cpu_has_ic_fills_f_dc;
+ pfn = pte_pfn(pte);
if (unlikely(!pfn_valid(pfn)))
return;
-
page = pfn_to_page(pfn);
if (page_mapping(page) && Page_dcache_dirty(page)) {
- unsigned long page_addr = (unsigned long) page_address(page);
-
- if (!cpu_has_ic_fills_f_dc ||
- pages_do_alias(page_addr, address & PAGE_MASK))
- flush_data_cache_page(page_addr);
+ addr = (unsigned long) page_address(page);
+ if (exec || pages_do_alias(addr, address & PAGE_MASK))
+ flush_data_cache_page(addr);
ClearPageDcacheDirty(page);
}
}
-void set_pte_at(struct mm_struct *mm, unsigned long addr,
- pte_t *ptep, pte_t pteval)
-{
- if (cpu_has_dc_aliases || !cpu_has_ic_fills_f_dc) {
- if (pte_present(pteval))
- mips_flush_dcache_from_pte(pteval, addr);
- }
-
- set_pte(ptep, pteval);
-}
-
unsigned long _page_cachable_default;
EXPORT_SYMBOL(_page_cachable_default);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 11/72] MIPS: Fix race condition in lazy cache flushing.
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 10/72] Revert "MIPS: Remove race window in page fault handling" Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 12/72] MIPS: Octeon: Remove udelay() causing huge IRQ latency Greg Kroah-Hartman
` (55 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Lars Persson, linux-mips, paul.burton,
Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars Persson <lars.persson@axis.com>
Commit 4d46a67a3eb827ccf1125959936fd51ba318dabc upstream.
The lazy cache flushing implemented in the MIPS kernel suffers from a
race condition that is exposed by do_set_pte() in mm/memory.c.
A pre-condition is a file-system that writes to the page from the CPU
in its readpage method and then calls flush_dcache_page(). One example
is ubifs. Another pre-condition is that the dcache flush is postponed
in __flush_dcache_page().
Upon a page fault for an executable mapping not existing in the
page-cache, the following will happen:
1. Write to the page
2. flush_dcache_page
3. flush_icache_page
4. set_pte_at
5. update_mmu_cache (commits the flush of a dcache-dirty page)
Between steps 4 and 5 another thread can hit the same page and it will
encounter a valid pte. Because the data still is in the L1 dcache the CPU
will fetch stale data from L2 into the icache and execute garbage.
This fix moves the commit of the cache flush to step 3 to close the
race window. It also reduces the amount of flushes on non-executable
mappings because we never enter __flush_dcache_page() for non-aliasing
CPUs.
Regressions can occur in drivers that mistakenly relies on the
flush_dcache_page() in get_user_pages() for DMA operations.
[ralf@linux-mips.org: Folded in patch 9346 to fix highmem issue.]
Signed-off-by: Lars Persson <larper@axis.com>
Cc: linux-mips@linux-mips.org
Cc: paul.burton@imgtec.com
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9346/
Patchwork: https://patchwork.linux-mips.org/patch/9738/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/cacheflush.h | 38 ++++++++++++++++++++++---------------
arch/mips/mm/cache.c | 12 +++++++++++
2 files changed, 35 insertions(+), 15 deletions(-)
--- a/arch/mips/include/asm/cacheflush.h
+++ b/arch/mips/include/asm/cacheflush.h
@@ -29,6 +29,20 @@
* - flush_icache_all() flush the entire instruction cache
* - flush_data_cache_page() flushes a page from the data cache
*/
+
+ /*
+ * This flag is used to indicate that the page pointed to by a pte
+ * is dirty and requires cleaning before returning it to the user.
+ */
+#define PG_dcache_dirty PG_arch_1
+
+#define Page_dcache_dirty(page) \
+ test_bit(PG_dcache_dirty, &(page)->flags)
+#define SetPageDcacheDirty(page) \
+ set_bit(PG_dcache_dirty, &(page)->flags)
+#define ClearPageDcacheDirty(page) \
+ clear_bit(PG_dcache_dirty, &(page)->flags)
+
extern void (*flush_cache_all)(void);
extern void (*__flush_cache_all)(void);
extern void (*flush_cache_mm)(struct mm_struct *mm);
@@ -37,13 +51,15 @@ extern void (*flush_cache_range)(struct
unsigned long start, unsigned long end);
extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
extern void __flush_dcache_page(struct page *page);
+extern void __flush_icache_page(struct vm_area_struct *vma, struct page *page);
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
static inline void flush_dcache_page(struct page *page)
{
- if (cpu_has_dc_aliases || !cpu_has_ic_fills_f_dc)
+ if (cpu_has_dc_aliases)
__flush_dcache_page(page);
-
+ else if (!cpu_has_ic_fills_f_dc)
+ SetPageDcacheDirty(page);
}
#define flush_dcache_mmap_lock(mapping) do { } while (0)
@@ -61,6 +77,11 @@ static inline void flush_anon_page(struc
static inline void flush_icache_page(struct vm_area_struct *vma,
struct page *page)
{
+ if (!cpu_has_ic_fills_f_dc && (vma->vm_flags & VM_EXEC) &&
+ Page_dcache_dirty(page)) {
+ __flush_icache_page(vma, page);
+ ClearPageDcacheDirty(page);
+ }
}
extern void (*flush_icache_range)(unsigned long start, unsigned long end);
@@ -95,19 +116,6 @@ extern void (*flush_icache_all)(void);
extern void (*local_flush_data_cache_page)(void * addr);
extern void (*flush_data_cache_page)(unsigned long addr);
-/*
- * This flag is used to indicate that the page pointed to by a pte
- * is dirty and requires cleaning before returning it to the user.
- */
-#define PG_dcache_dirty PG_arch_1
-
-#define Page_dcache_dirty(page) \
- test_bit(PG_dcache_dirty, &(page)->flags)
-#define SetPageDcacheDirty(page) \
- set_bit(PG_dcache_dirty, &(page)->flags)
-#define ClearPageDcacheDirty(page) \
- clear_bit(PG_dcache_dirty, &(page)->flags)
-
/* Run kernel code uncached, useful for cache probing functions. */
unsigned long run_uncached(void *func);
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -119,6 +119,18 @@ void __flush_anon_page(struct page *page
EXPORT_SYMBOL(__flush_anon_page);
+void __flush_icache_page(struct vm_area_struct *vma, struct page *page)
+{
+ unsigned long addr;
+
+ if (PageHighMem(page))
+ return;
+
+ addr = (unsigned long) page_address(page);
+ flush_data_cache_page(addr);
+}
+EXPORT_SYMBOL_GPL(__flush_icache_page);
+
void __update_cache(struct vm_area_struct *vma, unsigned long address,
pte_t pte)
{
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 12/72] MIPS: Octeon: Remove udelay() causing huge IRQ latency
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (10 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 11/72] MIPS: Fix race condition in lazy cache flushing Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 13/72] MIPS: OCTEON: fix PCI interrupt mapping for D-Link DSR-1000N Greg Kroah-Hartman
` (54 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Alexander Sverdlin, linux-mips, David Daney,
Rob Herring, Jiri Kosina, Randy Dunlap, Masanari Iida,
Bjorn Helgaas, Mathias, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Commit 73bf3c2a500b2db8ac966469591196bf55afb409 upstream.
udelay() in PCI/PCIe read/write callbacks cause 30ms IRQ latency on Octeon
platforms because these operations are called from PCI_OP_READ() and
PCI_OP_WRITE() under raw_spin_lock_irqsave().
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <ddaney@cavium.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Mathias <mathias.rulf@nokia.com>
Patchwork: https://patchwork.linux-mips.org/patch/9576/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/octeon/pci-octeon.h | 3 ---
arch/mips/pci/pci-octeon.c | 6 ------
arch/mips/pci/pcie-octeon.c | 8 --------
3 files changed, 17 deletions(-)
--- a/arch/mips/include/asm/octeon/pci-octeon.h
+++ b/arch/mips/include/asm/octeon/pci-octeon.h
@@ -11,9 +11,6 @@
#include <linux/pci.h>
-/* Some PCI cards require delays when accessing config space. */
-#define PCI_CONFIG_SPACE_DELAY 10000
-
/*
* The physical memory base mapped by BAR1. 256MB at the end of the
* first 4GB.
--- a/arch/mips/pci/pci-octeon.c
+++ b/arch/mips/pci/pci-octeon.c
@@ -271,9 +271,6 @@ static int octeon_read_config(struct pci
pci_addr.s.func = devfn & 0x7;
pci_addr.s.reg = reg;
-#if PCI_CONFIG_SPACE_DELAY
- udelay(PCI_CONFIG_SPACE_DELAY);
-#endif
switch (size) {
case 4:
*val = le32_to_cpu(cvmx_read64_uint32(pci_addr.u64));
@@ -308,9 +305,6 @@ static int octeon_write_config(struct pc
pci_addr.s.func = devfn & 0x7;
pci_addr.s.reg = reg;
-#if PCI_CONFIG_SPACE_DELAY
- udelay(PCI_CONFIG_SPACE_DELAY);
-#endif
switch (size) {
case 4:
cvmx_write64_uint32(pci_addr.u64, cpu_to_le32(val));
--- a/arch/mips/pci/pcie-octeon.c
+++ b/arch/mips/pci/pcie-octeon.c
@@ -1762,14 +1762,6 @@ static int octeon_pcie_write_config(unsi
default:
return PCIBIOS_FUNC_NOT_SUPPORTED;
}
-#if PCI_CONFIG_SPACE_DELAY
- /*
- * Delay on writes so that devices have time to come up. Some
- * bridges need this to allow time for the secondary busses to
- * work
- */
- udelay(PCI_CONFIG_SPACE_DELAY);
-#endif
return PCIBIOS_SUCCESSFUL;
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 13/72] MIPS: OCTEON: fix PCI interrupt mapping for D-Link DSR-1000N
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (11 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 12/72] MIPS: Octeon: Remove udelay() causing huge IRQ latency Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 14/72] MIPS: Netlogic: Fix for SATA PHY init Greg Kroah-Hartman
` (53 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Aaro Koskinen, linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaro Koskinen <aaro.koskinen@iki.fi>
Commit b083518c52ab75a345d668ca7fa41e530df08d51 upstream.
Fix PCI interrupt mapping for DSR1000N. This will get the PCI slot
interrupts working. The mapping is based on D-Link GPL tarball.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9593/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/pci/pci-octeon.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/mips/pci/pci-octeon.c
+++ b/arch/mips/pci/pci-octeon.c
@@ -214,6 +214,8 @@ const char *octeon_get_pci_interrupts(vo
return "AAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
case CVMX_BOARD_TYPE_BBGW_REF:
return "AABCD";
+ case CVMX_BOARD_TYPE_CUST_DSR1000N:
+ return "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC";
case CVMX_BOARD_TYPE_THUNDER:
case CVMX_BOARD_TYPE_EBH3000:
default:
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 14/72] MIPS: Netlogic: Fix for SATA PHY init
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (12 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 13/72] MIPS: OCTEON: fix PCI interrupt mapping for D-Link DSR-1000N Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 15/72] MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter Greg Kroah-Hartman
` (52 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Ganesan Ramalingam, Jayachandran C,
linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ganesan Ramalingam <ganesanr@broadcom.com>
Commit 872cd4c2c617bb3a203ebe18115fd0c697112b87 upstream.
Update to the SATA PHY initialization. This is needed for SATA detection
to succeed in all configurations.
Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8886/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/netlogic/xlp/ahci-init-xlp2.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
--- a/arch/mips/netlogic/xlp/ahci-init-xlp2.c
+++ b/arch/mips/netlogic/xlp/ahci-init-xlp2.c
@@ -203,6 +203,7 @@ static u8 read_phy_reg(u64 regbase, u32
static void config_sata_phy(u64 regbase)
{
u32 port, i, reg;
+ u8 val;
for (port = 0; port < 2; port++) {
for (i = 0, reg = RXCDRCALFOSC0; reg <= CALDUTY; reg++, i++)
@@ -210,6 +211,18 @@ static void config_sata_phy(u64 regbase)
for (i = 0, reg = RXDPIF; reg <= PPMDRIFTMAX_HI; reg++, i++)
write_phy_reg(regbase, reg, port, sata_phy_config2[i]);
+
+ /* Fix for PHY link up failures at lower temperatures */
+ write_phy_reg(regbase, 0x800F, port, 0x1f);
+
+ val = read_phy_reg(regbase, 0x0029, port);
+ write_phy_reg(regbase, 0x0029, port, val | (0x7 << 1));
+
+ val = read_phy_reg(regbase, 0x0056, port);
+ write_phy_reg(regbase, 0x0056, port, val & ~(1 << 3));
+
+ val = read_phy_reg(regbase, 0x0018, port);
+ write_phy_reg(regbase, 0x0018, port, val & ~(0x7 << 0));
}
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 15/72] MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (13 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 14/72] MIPS: Netlogic: Fix for SATA PHY init Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 16/72] MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes Greg Kroah-Hartman
` (51 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Markos Chandras, linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
Commit 07edf0d46c07568d08feee95bbaa38c71b084150 upstream.
Commit b0a668fb2038 ("MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator
for MIPS R6") added the mips r2-to-r6 emulator so an R2 userland can be
executed on R6 kernels. This needed both build time and runtime support.
The runtime support needed the "mipsr2emu" kernel parameter instead of
the "mipsr2emul" listed in the Kconfig help message.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: b0a668fb2038 ("MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6")
Cc: linux-mips@linux-mips.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/9504/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2072,7 +2072,7 @@ config MIPSR2_TO_R6_EMULATOR
help
Choose this option if you want to run non-R6 MIPS userland code.
Even if you say 'Y' here, the emulator will still be disabled by
- default. You can enable it using the 'mipsr2emul' kernel option.
+ default. You can enable it using the 'mipsr2emu' kernel option.
The only reason this is a build-time option is to save ~14K from the
final kernel image.
comment "MIPS R2-to-R6 emulator is only available for UP kernels"
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 16/72] MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (14 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 15/72] MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 17/72] MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case Greg Kroah-Hartman
` (50 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Markos Chandras, linux-mips,
Maciej W. Rozycki, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
Commit f6b39ae6f4d6ee835bb16e452086121aa010f1a7 upstream.
Commit 934c79231c1b("MIPS: asm: r4kcache: Add MIPS R6 cache unroll
functions") added support for MIPS R6 cache flushes but it used the
wrong base address register to perform the flushes so the same lines
were flushed over and over. Moreover, replace the "addiu" instructions
with LONG_ADDIU so the correct base address is calculated for 64-bit
cores.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: 934c79231c1b("MIPS: asm: r4kcache: Add MIPS R6 cache unroll functions")
Cc: linux-mips@linux-mips.org
Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/9384/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/r4kcache.h | 89 +++++++++++++++++++--------------------
1 file changed, 45 insertions(+), 44 deletions(-)
--- a/arch/mips/include/asm/r4kcache.h
+++ b/arch/mips/include/asm/r4kcache.h
@@ -12,6 +12,8 @@
#ifndef _ASM_R4KCACHE_H
#define _ASM_R4KCACHE_H
+#include <linux/stringify.h>
+
#include <asm/asm.h>
#include <asm/cacheops.h>
#include <asm/compiler.h>
@@ -344,7 +346,7 @@ static inline void invalidate_tcache_pag
" cache %1, 0x0a0(%0); cache %1, 0x0b0(%0)\n" \
" cache %1, 0x0c0(%0); cache %1, 0x0d0(%0)\n" \
" cache %1, 0x0e0(%0); cache %1, 0x0f0(%0)\n" \
- " addiu $1, $0, 0x100 \n" \
+ " "__stringify(LONG_ADDIU)" $1, %0, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x010($1)\n" \
" cache %1, 0x020($1); cache %1, 0x030($1)\n" \
" cache %1, 0x040($1); cache %1, 0x050($1)\n" \
@@ -368,17 +370,17 @@ static inline void invalidate_tcache_pag
" cache %1, 0x040(%0); cache %1, 0x060(%0)\n" \
" cache %1, 0x080(%0); cache %1, 0x0a0(%0)\n" \
" cache %1, 0x0c0(%0); cache %1, 0x0e0(%0)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, %0, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x020($1)\n" \
" cache %1, 0x040($1); cache %1, 0x060($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0a0($1)\n" \
" cache %1, 0x0c0($1); cache %1, 0x0e0($1)\n" \
- " addiu $1, $1, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x020($1)\n" \
" cache %1, 0x040($1); cache %1, 0x060($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0a0($1)\n" \
" cache %1, 0x0c0($1); cache %1, 0x0e0($1)\n" \
- " addiu $1, $1, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100\n" \
" cache %1, 0x000($1); cache %1, 0x020($1)\n" \
" cache %1, 0x040($1); cache %1, 0x060($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0a0($1)\n" \
@@ -396,25 +398,25 @@ static inline void invalidate_tcache_pag
" .set noat\n" \
" cache %1, 0x000(%0); cache %1, 0x040(%0)\n" \
" cache %1, 0x080(%0); cache %1, 0x0c0(%0)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, %0, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x040($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0c0($1)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x040($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0c0($1)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x040($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0c0($1)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x040($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0c0($1)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x040($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0c0($1)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x040($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0c0($1)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
" cache %1, 0x000($1); cache %1, 0x040($1)\n" \
" cache %1, 0x080($1); cache %1, 0x0c0($1)\n" \
" .set pop\n" \
@@ -429,39 +431,38 @@ static inline void invalidate_tcache_pag
" .set mips64r6\n" \
" .set noat\n" \
" cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
- " cache %1, 0x000(%0); cache %1, 0x080(%0)\n" \
- " addiu $1, %0, 0x100\n" \
+ " "__stringify(LONG_ADDIU)" $1, %0, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
+ " "__stringify(LONG_ADDIU)" $1, $1, 0x100 \n" \
+ " cache %1, 0x000($1); cache %1, 0x080($1)\n" \
" .set pop\n" \
: \
: "r" (base), \
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 17/72] MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (15 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 16/72] MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 18/72] MIPS: kernel: entry.S: Set correct ISA level for mips_ihb Greg Kroah-Hartman
` (49 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Markos Chandras, linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
Commit 518222161d4a2d3f3b2700098563b62383f83878 upstream.
Commit 5753762cbd1c("MIPS: asm: spinlock: Replace "sub" instruction
with "addiu") replaced the "sub" instruction with addiu but it did
not update the immediate value in the R10000_LLSC_WAR case.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: 5753762cbd1c("MIPS: asm: spinlock: Replace "sub" instruction with "addiu"")
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9385/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/spinlock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/include/asm/spinlock.h
+++ b/arch/mips/include/asm/spinlock.h
@@ -263,7 +263,7 @@ static inline void arch_read_unlock(arch
if (R10000_LLSC_WAR) {
__asm__ __volatile__(
"1: ll %1, %2 # arch_read_unlock \n"
- " addiu %1, 1 \n"
+ " addiu %1, -1 \n"
" sc %1, %0 \n"
" beqzl %1, 1b \n"
: "=" GCC_OFF_SMALL_ASM() (rw->lock), "=&r" (tmp)
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 18/72] MIPS: kernel: entry.S: Set correct ISA level for mips_ihb
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (16 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 17/72] MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 19/72] MIPS: Fix cpu_has_mips_r2_exec_hazard Greg Kroah-Hartman
` (48 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Markos Chandras, linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
Commit aebac99384f7a6d83a3dcd42bf2481eed2670083 upstream.
Commit 6ebb496ffc7e("MIPS: kernel: entry.S: Add MIPS R6 related
definitions") added the MIPSR6 definition but it did not update the
ISA level of the actual assembly code so a pre-MIPSR6 jr.hb instruction
was generated instead. Fix this by using the MISP_ISA_LEVEL_RAW macro.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: 6ebb496ffc7e("MIPS: kernel: entry.S: Add MIPS R6 related definitions")
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9386/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/kernel/entry.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -10,6 +10,7 @@
#include <asm/asm.h>
#include <asm/asmmacro.h>
+#include <asm/compiler.h>
#include <asm/regdef.h>
#include <asm/mipsregs.h>
#include <asm/stackframe.h>
@@ -185,7 +186,7 @@ syscall_exit_work:
* For C code use the inline version named instruction_hazard().
*/
LEAF(mips_ihb)
- .set mips32r2
+ .set MIPS_ISA_LEVEL_RAW
jr.hb ra
nop
END(mips_ihb)
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 19/72] MIPS: Fix cpu_has_mips_r2_exec_hazard.
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (17 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 18/72] MIPS: kernel: entry.S: Set correct ISA level for mips_ihb Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 20/72] MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard Greg Kroah-Hartman
` (47 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ralf Baechle <ralf@linux-mips.org>
Commit 9cdf30bd3bac697fc533988f44a117434a858f69 upstream.
Returns a non-zero value if the current processor implementation requires
an IHB instruction to deal with an instruction hazard as per MIPS R2
architecture specification, zero otherwise.
For a discussion, see http://patchwork.linux-mips.org/patch/9539/.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/cpu-features.h | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -235,8 +235,39 @@
/* MIPSR2 and MIPSR6 have a lot of similarities */
#define cpu_has_mips_r2_r6 (cpu_has_mips_r2 | cpu_has_mips_r6)
+/*
+ * cpu_has_mips_r2_exec_hazard - return if IHB is required on current processor
+ *
+ * Returns non-zero value if the current processor implementation requires
+ * an IHB instruction to deal with an instruction hazard as per MIPS R2
+ * architecture specification, zero otherwise.
+ */
#ifndef cpu_has_mips_r2_exec_hazard
-#define cpu_has_mips_r2_exec_hazard (cpu_has_mips_r2 | cpu_has_mips_r6)
+#define cpu_has_mips_r2_exec_hazard \
+({ \
+ int __res; \
+ \
+ switch (current_cpu_type()) { \
+ case CPU_M14KC: \
+ case CPU_74K: \
+ case CPU_1074K: \
+ case CPU_PROAPTIV: \
+ case CPU_P5600: \
+ case CPU_M5150: \
+ case CPU_QEMU_GENERIC: \
+ case CPU_CAVIUM_OCTEON: \
+ case CPU_CAVIUM_OCTEON_PLUS: \
+ case CPU_CAVIUM_OCTEON2: \
+ case CPU_CAVIUM_OCTEON3: \
+ __res = 0; \
+ break; \
+ \
+ default: \
+ __res = 1; \
+ } \
+ \
+ __res; \
+})
#endif
/*
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 20/72] MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard.
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (18 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 19/72] MIPS: Fix cpu_has_mips_r2_exec_hazard Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 21/72] Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores." Greg Kroah-Hartman
` (46 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ralf Baechle <ralf@linux-mips.org>
Commit f05ff43355e6997c18f82ddcee370a6e5f8643ce upstream.
This is no longer needed with the fixed, new and improved definition
of cpu_has_mips_r2_exec_hazard in <asm/cpu-features.h>.
For a discussion, see http://patchwork.linux-mips.org/patch/9539/.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h | 1 -
1 file changed, 1 deletion(-)
--- a/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
+++ b/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
@@ -50,7 +50,6 @@
#define cpu_has_mips32r2 0
#define cpu_has_mips64r1 0
#define cpu_has_mips64r2 1
-#define cpu_has_mips_r2_exec_hazard 0
#define cpu_has_dsp 0
#define cpu_has_dsp2 0
#define cpu_has_mipsmt 0
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 21/72] Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores."
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (19 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 20/72] MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 22/72] SSB: fix Kconfig dependencies Greg Kroah-Hartman
` (45 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
Commit 9eaffa84a8a46adab065c983401fc9d5949c958f upstream.
For a discussion, see http://patchwork.linux-mips.org/patch/9539/.
This reverts commit 625c0a21700bdb90844d926a1508a17a77e369c9.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/mm/tlbex.c | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -501,26 +501,9 @@ static void build_tlb_write_entry(u32 **
case tlb_indexed: tlbw = uasm_i_tlbwi; break;
}
- if (cpu_has_mips_r2_exec_hazard) {
- /*
- * The architecture spec says an ehb is required here,
- * but a number of cores do not have the hazard and
- * using an ehb causes an expensive pipeline stall.
- */
- switch (current_cpu_type()) {
- case CPU_M14KC:
- case CPU_74K:
- case CPU_1074K:
- case CPU_PROAPTIV:
- case CPU_P5600:
- case CPU_M5150:
- case CPU_QEMU_GENERIC:
- break;
-
- default:
+ if (cpu_has_mips_r2_r6) {
+ if (cpu_has_mips_r2_exec_hazard)
uasm_i_ehb(p);
- break;
- }
tlbw(p);
return;
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 22/72] SSB: fix Kconfig dependencies
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (20 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 21/72] Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores." Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 23/72] MIPS: ralink: Fix bad config symbol in PCI makefile Greg Kroah-Hartman
` (44 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Adrien Schildknecht, m, zajec5, linux-mips,
Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrien Schildknecht <adrien+dev@schischi.me>
Commit 179fa46fb666c8f2aa2bbb1f3114d5d826d59d3d upstream.
The commit 21400f252a97 ("MIPS: BCM47XX: Make ssb init NVRAM instead of
bcm47xx polling it") introduces a dependency to SSB_SFLASH but did not
add it to the Kconfig.
drivers/ssb/driver_mipscore.c:216:36: error: 'struct ssb_mipscore' has no
member named 'sflash'
struct ssb_sflash *sflash = &mcore->sflash;
^
drivers/ssb/driver_mipscore.c:249:12: error: dereferencing pointer to
incomplete type
if (sflash->present) {
^
Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Cc: m@bues.ch
Cc: zajec5@gmail.com
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9598/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ssb/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/ssb/Kconfig
+++ b/drivers/ssb/Kconfig
@@ -130,6 +130,7 @@ config SSB_DRIVER_MIPS
bool "SSB Broadcom MIPS core driver"
depends on SSB && MIPS
select SSB_SERIAL
+ select SSB_SFLASH
help
Driver for the Sonics Silicon Backplane attached
Broadcom MIPS core.
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 23/72] MIPS: ralink: Fix bad config symbol in PCI makefile.
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (21 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 22/72] SSB: fix Kconfig dependencies Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 24/72] MIPS: ralink: add missing symbol for RALINK_ILL_ACC Greg Kroah-Hartman
` (43 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, John Crispin, Paul Bolle, linux-mips,
Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Crispin <blogic@openwrt.org>
Commit 93a7de8819a661d06eb11f4de3d6888b9a842b30 upstream.
A wrong symbol is referenced by commit 187c26ddf0b2 ("MIPS: ralink: add rt2880
pci driver"). Fix this by changing it to the correct symbol.
Signed-off-by: John Crispin <blogic@openwrt.org>
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9298/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/pci/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -43,7 +43,7 @@ obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1
obj-$(CONFIG_SNI_RM) += fixup-sni.o ops-sni.o
obj-$(CONFIG_LANTIQ) += fixup-lantiq.o
obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o ops-lantiq.o
-obj-$(CONFIG_SOC_RT2880) += pci-rt2880.o
+obj-$(CONFIG_SOC_RT288X) += pci-rt2880.o
obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o
obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o
obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 24/72] MIPS: ralink: add missing symbol for RALINK_ILL_ACC
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (22 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 23/72] MIPS: ralink: Fix bad config symbol in PCI makefile Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 25/72] MIPS: smp-cps: cpu_set FPU mask if FPU present Greg Kroah-Hartman
` (42 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, John Crispin, Paul Bolle, linux-mips,
Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Crispin <blogic@openwrt.org>
Commit a7b7aad383c5dd9221a06e378197350dd27c1163 upstream.
A driver was added in commit 5433acd81e87 ("MIPS: ralink: add illegal access
driver") without the Kconfig section being added. Fix this by adding the symbol
to the Kconfig file.
Signed-off-by: John Crispin <blogic@openwrt.org>
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9299/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/ralink/Kconfig | 5 +++++
1 file changed, 5 insertions(+)
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -7,6 +7,11 @@ config CLKEVT_RT3352
select CLKSRC_OF
select CLKSRC_MMIO
+config RALINK_ILL_ACC
+ bool
+ depends on SOC_RT305X
+ default y
+
choice
prompt "Ralink SoC selection"
default SOC_RT305X
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 25/72] MIPS: smp-cps: cpu_set FPU mask if FPU present
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (23 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 24/72] MIPS: ralink: add missing symbol for RALINK_ILL_ACC Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 26/72] MIPS: Kconfig: Disable SMP/CPS for 64-bit Greg Kroah-Hartman
` (41 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Niklas Cassel, paul.burton, linux-mips,
Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Cassel <niklas.cassel@axis.com>
Commit 90db024f140d0d6ad960cc5f090e3c8ed890ca55 upstream.
If we have an FPU, enroll ourselves in the FPU-full mask.
Matching the MT_SMP and CMP implementations of smp_setup.
Signed-off-by: Niklas Cassel <niklass@axis.com>
Cc: paul.burton@imgtec.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8948/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/kernel/smp-cps.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -88,6 +88,12 @@ static void __init cps_smp_setup(void)
/* Make core 0 coherent with everything */
write_gcr_cl_coherence(0xff);
+
+#ifdef CONFIG_MIPS_MT_FPAFF
+ /* If we have an FPU, enroll ourselves in the FPU-full mask */
+ if (cpu_has_fpu)
+ cpu_set(0, mt_fpu_cpumask);
+#endif /* CONFIG_MIPS_MT_FPAFF */
}
static void __init cps_prepare_cpus(unsigned int max_cpus)
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 26/72] MIPS: Kconfig: Disable SMP/CPS for 64-bit
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (24 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 25/72] MIPS: smp-cps: cpu_set FPU mask if FPU present Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 28/72] MIPS: asm: elf: Set O32 default FPU flags Greg Kroah-Hartman
` (40 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Markos Chandras, Paul Burton, linux-mips,
Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
Commit 6ca716f2e5571d25a3899c6c5c91ff72ea6d6f5e upstream.
A 64-bit build for Malta produces far too many build problems
when SMP/CPS is selected. Moreover, there is currently no 64-bit
product with SMP/CPS so we disable SMP/CPS when building for
64-bit until it is properly supported.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8573/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2142,7 +2142,7 @@ config MIPS_CMP
config MIPS_CPS
bool "MIPS Coherent Processing System support"
- depends on SYS_SUPPORTS_MIPS_CPS
+ depends on SYS_SUPPORTS_MIPS_CPS && !64BIT
select MIPS_CM
select MIPS_CPC
select MIPS_CPS_PM if HOTPLUG_CPU
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 28/72] MIPS: asm: elf: Set O32 default FPU flags
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (25 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 26/72] MIPS: Kconfig: Disable SMP/CPS for 64-bit Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 29/72] MIPS: Makefile: Fix MIPS ASE detection code Greg Kroah-Hartman
` (39 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Markos Chandras, Mans Rullgard, Aaro Koskinen,
Matthew Fortune, Paul Burton, linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
Commit 48f8eaee3f59848809644507fc47363b37e54450 upstream.
Set good default FPU flags (FR0) for O32 binaries similar to what the
kernel does for the N64/N32 ones. This also fixes a regression
introduced in commit 46490b572544 ("MIPS: kernel: elf: Improve the
overall ABI and FPU mode checks") when MIPS_O32_FP64_SUPPORT is
disabled. In that case, the mips_set_personality_fp() did not set the
FPU mode at all because it assumed that the FPU mode was already set
properly. That led to O32 userland problems.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Reported-by: Mans Rullgard <mans@mansr.com>
Fixes: 46490b572544 ("MIPS: kernel: elf: Improve the overall ABI and FPU mode checks")
Tested-by: Mans Rullgard <mans@mansr.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/9344/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/elf.h | 5 +++++
1 file changed, 5 insertions(+)
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -294,6 +294,9 @@ do { \
if (personality(current->personality) != PER_LINUX) \
set_personality(PER_LINUX); \
\
+ clear_thread_flag(TIF_HYBRID_FPREGS); \
+ set_thread_flag(TIF_32BIT_FPREGS); \
+ \
mips_set_personality_fp(state); \
\
current->thread.abi = &mips_abi; \
@@ -319,6 +322,8 @@ do { \
do { \
set_thread_flag(TIF_32BIT_REGS); \
set_thread_flag(TIF_32BIT_ADDR); \
+ clear_thread_flag(TIF_HYBRID_FPREGS); \
+ set_thread_flag(TIF_32BIT_FPREGS); \
\
mips_set_personality_fp(state); \
\
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 29/72] MIPS: Makefile: Fix MIPS ASE detection code
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (26 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 28/72] MIPS: asm: elf: Set O32 default FPU flags Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 30/72] ALSA: emux: Fix mutex deadlock at unloading Greg Kroah-Hartman
` (38 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Markos Chandras, Maciej W. Rozycki,
linux-mips, Ralf Baechle
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markos Chandras <markos.chandras@imgtec.com>
Commit 5306a5450824691e27d68f711758515debedeeac upstream.
Commit 32098ec7bcba ("MIPS: Makefile: Move the ASEs checks after
setting the core's CFLAGS") re-arranged the MIPS ASE detection code
and also added the current cflags to the detection logic. However,
this introduced a few bugs. First of all, the mips-cflags should not
be quoted since that ends up being passed as a string to subsequent
commands leading to broken detection from the cc-option-* tools.
Moreover, in order to avoid duplicating the cflags-y because of how
cc-option works, we rework the logic so we pass only those cflags which
are needed by the selected ASE. Finally, fix some typos resulting in MSA
not being detected correctly.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: Commit 32098ec7bcba ("MIPS: Makefile: Move the ASEs checks after setting the core's CFLAGS")
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9661/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/Makefile | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -197,11 +197,17 @@ endif
# Warning: the 64-bit MIPS architecture does not support the `smartmips' extension
# Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has
# been fixed properly.
-mips-cflags := "$(cflags-y)"
-cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,$(mips-cflags),-msmartmips) -Wa,--no-warn
-cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,$(mips-cflags),-mmicromips)
+mips-cflags := $(cflags-y)
+ifeq ($(CONFIG_CPU_HAS_SMARTMIPS),y)
+smartmips-ase := $(call cc-option-yn,$(mips-cflags) -msmartmips)
+cflags-$(smartmips-ase) += -msmartmips -Wa,--no-warn
+endif
+ifeq ($(CONFIG_CPU_MICROMIPS),y)
+micromips-ase := $(call cc-option-yn,$(mips-cflags) -mmicromips)
+cflags-$(micromips-ase) += -mmicromips
+endif
ifeq ($(CONFIG_CPU_HAS_MSA),y)
-toolchain-msa := $(call cc-option-yn,-$(mips-cflags),mhard-float -mfp64 -Wa$(comma)-mmsa)
+toolchain-msa := $(call cc-option-yn,$(mips-cflags) -mhard-float -mfp64 -Wa$(comma)-mmsa)
cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA
endif
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 30/72] ALSA: emux: Fix mutex deadlock at unloading
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (27 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 29/72] MIPS: Makefile: Fix MIPS ASE detection code Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 31/72] ALSA: emux: Fix mutex deadlock in OSS emulation Greg Kroah-Hartman
` (37 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 07b0e5d49d227e3950cb13a3e8caf248ef2a310e upstream.
The emux-synth driver has a possible AB/BA mutex deadlock at unloading
the emu10k1 driver:
snd_emux_free() ->
snd_emux_detach_seq(): mutex_lock(&emu->register_mutex) ->
snd_seq_delete_kernel_client() ->
snd_seq_free_client(): mutex_lock(®ister_mutex)
snd_seq_release() ->
snd_seq_free_client(): mutex_lock(®ister_mutex) ->
snd_seq_delete_all_ports() ->
snd_emux_unuse(): mutex_lock(&emu->register_mutex)
Basically snd_emux_detach_seq() doesn't need a protection of
emu->register_mutex as it's already being unregistered. So, we can
get rid of this for avoiding the deadlock.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/synth/emux/emux_seq.c | 2 --
1 file changed, 2 deletions(-)
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -124,12 +124,10 @@ snd_emux_detach_seq(struct snd_emux *emu
if (emu->voices)
snd_emux_terminate_all(emu);
- mutex_lock(&emu->register_mutex);
if (emu->client >= 0) {
snd_seq_delete_kernel_client(emu->client);
emu->client = -1;
}
- mutex_unlock(&emu->register_mutex);
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 31/72] ALSA: emux: Fix mutex deadlock in OSS emulation
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (28 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 30/72] ALSA: emux: Fix mutex deadlock at unloading Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 32/72] ALSA: emu10k1: Fix card shortname string buffer overflow Greg Kroah-Hartman
` (36 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 1c94e65c668f44d2c69ae7e7fc268ab3268fba3e upstream.
The OSS emulation in synth-emux helper has a potential AB/BA deadlock
at the simultaneous closing and opening:
close ->
snd_seq_release() ->
sne_seq_free_client() ->
snd_seq_delete_all_ports(): takes client->ports_mutex ->
port_delete() ->
snd_emux_unuse(): takes emux->register_mutex
open ->
snd_seq_oss_open() ->
snd_emux_open_seq_oss(): takes emux->register_mutex ->
snd_seq_event_port_attach() ->
snd_seq_create_port(): takes client->ports_mutex
This patch addresses the deadlock by reducing the rance taking
emux->register_mutex in snd_emux_open_seq_oss(). The lock is needed
for the refcount handling, so move it locally. The calls in
emux_seq.c are already with the mutex, thus they are replaced with the
version without mutex lock/unlock.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/synth/emux/emux_oss.c | 11 +----------
sound/synth/emux/emux_seq.c | 27 +++++++++++++++++++++------
2 files changed, 22 insertions(+), 16 deletions(-)
--- a/sound/synth/emux/emux_oss.c
+++ b/sound/synth/emux/emux_oss.c
@@ -118,12 +118,8 @@ snd_emux_open_seq_oss(struct snd_seq_oss
if (snd_BUG_ON(!arg || !emu))
return -ENXIO;
- mutex_lock(&emu->register_mutex);
-
- if (!snd_emux_inc_count(emu)) {
- mutex_unlock(&emu->register_mutex);
+ if (!snd_emux_inc_count(emu))
return -EFAULT;
- }
memset(&callback, 0, sizeof(callback));
callback.owner = THIS_MODULE;
@@ -135,7 +131,6 @@ snd_emux_open_seq_oss(struct snd_seq_oss
if (p == NULL) {
snd_printk(KERN_ERR "can't create port\n");
snd_emux_dec_count(emu);
- mutex_unlock(&emu->register_mutex);
return -ENOMEM;
}
@@ -148,8 +143,6 @@ snd_emux_open_seq_oss(struct snd_seq_oss
reset_port_mode(p, arg->seq_mode);
snd_emux_reset_port(p);
-
- mutex_unlock(&emu->register_mutex);
return 0;
}
@@ -195,13 +188,11 @@ snd_emux_close_seq_oss(struct snd_seq_os
if (snd_BUG_ON(!emu))
return -ENXIO;
- mutex_lock(&emu->register_mutex);
snd_emux_sounds_off_all(p);
snd_soundfont_close_check(emu->sflist, SF_CLIENT_NO(p->chset.port));
snd_seq_event_port_detach(p->chset.client, p->chset.port);
snd_emux_dec_count(emu);
- mutex_unlock(&emu->register_mutex);
return 0;
}
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -267,8 +267,8 @@ snd_emux_event_input(struct snd_seq_even
/*
* increment usage count
*/
-int
-snd_emux_inc_count(struct snd_emux *emu)
+static int
+__snd_emux_inc_count(struct snd_emux *emu)
{
emu->used++;
if (!try_module_get(emu->ops.owner))
@@ -282,12 +282,21 @@ snd_emux_inc_count(struct snd_emux *emu)
return 1;
}
+int snd_emux_inc_count(struct snd_emux *emu)
+{
+ int ret;
+
+ mutex_lock(&emu->register_mutex);
+ ret = __snd_emux_inc_count(emu);
+ mutex_unlock(&emu->register_mutex);
+ return ret;
+}
/*
* decrease usage count
*/
-void
-snd_emux_dec_count(struct snd_emux *emu)
+static void
+__snd_emux_dec_count(struct snd_emux *emu)
{
module_put(emu->card->module);
emu->used--;
@@ -296,6 +305,12 @@ snd_emux_dec_count(struct snd_emux *emu)
module_put(emu->ops.owner);
}
+void snd_emux_dec_count(struct snd_emux *emu)
+{
+ mutex_lock(&emu->register_mutex);
+ __snd_emux_dec_count(emu);
+ mutex_unlock(&emu->register_mutex);
+}
/*
* Routine that is called upon a first use of a particular port
@@ -315,7 +330,7 @@ snd_emux_use(void *private_data, struct
mutex_lock(&emu->register_mutex);
snd_emux_init_port(p);
- snd_emux_inc_count(emu);
+ __snd_emux_inc_count(emu);
mutex_unlock(&emu->register_mutex);
return 0;
}
@@ -338,7 +353,7 @@ snd_emux_unuse(void *private_data, struc
mutex_lock(&emu->register_mutex);
snd_emux_sounds_off_all(p);
- snd_emux_dec_count(emu);
+ __snd_emux_dec_count(emu);
mutex_unlock(&emu->register_mutex);
return 0;
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 32/72] ALSA: emu10k1: Fix card shortname string buffer overflow
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (29 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 31/72] ALSA: emux: Fix mutex deadlock in OSS emulation Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 33/72] ALSA: emu10k1: Emu10k2 32 bit DMA mode Greg Kroah-Hartman
` (35 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit d02260824e2cad626fb2a9d62e27006d34b6dedc upstream.
Some models provide too long string for the shortname that has 32bytes
including the terminator, and it results in a non-terminated string
exposed to the user-space. This isn't too critical, though, as the
string is stopped at the succeeding longname string.
This patch fixes such entries by dropping "SB" prefix (it's enough to
fit within 32 bytes, so far). Meanwhile, it also changes strcpy()
with strlcpy() to make sure that this kind of problem won't happen in
future, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/emu10k1/emu10k1.c | 6 ++++--
sound/pci/emu10k1/emu10k1_main.c | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -183,8 +183,10 @@ static int snd_card_emu10k1_probe(struct
}
#endif
- strcpy(card->driver, emu->card_capabilities->driver);
- strcpy(card->shortname, emu->card_capabilities->name);
+ strlcpy(card->driver, emu->card_capabilities->driver,
+ sizeof(card->driver));
+ strlcpy(card->shortname, emu->card_capabilities->name,
+ sizeof(card->shortname));
snprintf(card->longname, sizeof(card->longname),
"%s (rev.%d, serial:0x%x) at 0x%lx, irq %i",
card->shortname, emu->revision, emu->serial, emu->port, emu->irq);
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -1421,7 +1421,7 @@ static struct snd_emu_chip_details emu_c
*
*/
{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x20011102,
- .driver = "Audigy2", .name = "SB Audigy 2 ZS Notebook [SB0530]",
+ .driver = "Audigy2", .name = "Audigy 2 ZS Notebook [SB0530]",
.id = "Audigy2",
.emu10k2_chip = 1,
.ca0108_chip = 1,
@@ -1571,7 +1571,7 @@ static struct snd_emu_chip_details emu_c
.adc_1361t = 1, /* 24 bit capture instead of 16bit */
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102,
- .driver = "Audigy2", .name = "SB Audigy 2 Platinum EX [SB0280]",
+ .driver = "Audigy2", .name = "Audigy 2 Platinum EX [SB0280]",
.id = "Audigy2",
.emu10k2_chip = 1,
.ca0102_chip = 1,
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 33/72] ALSA: emu10k1: Emu10k2 32 bit DMA mode
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (30 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 32/72] ALSA: emu10k1: Fix card shortname string buffer overflow Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 36/72] cdc-acm: prevent infinite loop when parsing CDC headers Greg Kroah-Hartman
` (34 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Peter Zubaj, Takashi Iwai
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zubaj <pzubaj@marticonet.sk>
commit 7241ea558c6715501e777396b5fc312c372e11d9 upstream.
Looks like audigy emu10k2 (probably emu10k1 - sb live too) support two
modes for DMA. Second mode is useful for 64 bit os with more then 2 GB
of ram (fixes problems with big soundfont loading)
1) 32MB from 2 GB address space using 8192 pages (used now as default)
2) 16MB from 4 GB address space using 4096 pages
Mode is set using HCFG_EXPANDED_MEM flag in HCFG register.
Also format of emu10k2 page table is then different.
Signed-off-by: Peter Zubaj <pzubaj@marticonet.sk>
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/sound/emu10k1.h | 14 +++++++++-----
sound/pci/emu10k1/emu10k1_callback.c | 4 ++--
sound/pci/emu10k1/emu10k1_main.c | 17 ++++++++++++-----
sound/pci/emu10k1/emupcm.c | 2 +-
sound/pci/emu10k1/memory.c | 11 ++++++-----
5 files changed, 30 insertions(+), 18 deletions(-)
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -41,7 +41,8 @@
#define EMUPAGESIZE 4096
#define MAXREQVOICES 8
-#define MAXPAGES 8192
+#define MAXPAGES0 4096 /* 32 bit mode */
+#define MAXPAGES1 8192 /* 31 bit mode */
#define RESERVED 0
#define NUM_MIDI 16
#define NUM_G 64 /* use all channels */
@@ -50,8 +51,7 @@
/* FIXME? - according to the OSS driver the EMU10K1 needs a 29 bit DMA mask */
#define EMU10K1_DMA_MASK 0x7fffffffUL /* 31bit */
-#define AUDIGY_DMA_MASK 0x7fffffffUL /* 31bit FIXME - 32 should work? */
- /* See ALSA bug #1276 - rlrevell */
+#define AUDIGY_DMA_MASK 0xffffffffUL /* 32bit mode */
#define TMEMSIZE 256*1024
#define TMEMSIZEREG 4
@@ -466,8 +466,11 @@
#define MAPB 0x0d /* Cache map B */
-#define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */
-#define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */
+#define MAP_PTE_MASK0 0xfffff000 /* The 20 MSBs of the PTE indexed by the PTI */
+#define MAP_PTI_MASK0 0x00000fff /* The 12 bit index to one of the 4096 PTE dwords */
+
+#define MAP_PTE_MASK1 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */
+#define MAP_PTI_MASK1 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */
/* 0x0e, 0x0f: Not used */
@@ -1704,6 +1707,7 @@ struct snd_emu10k1 {
unsigned short model; /* subsystem id */
unsigned int card_type; /* EMU10K1_CARD_* */
unsigned int ecard_ctrl; /* ecard control bits */
+ unsigned int address_mode; /* address mode */
unsigned long dma_mask; /* PCI DMA mask */
unsigned int delay_pcm_irq; /* in samples */
int max_cache_pages; /* max memory size / PAGE_SIZE */
--- a/sound/pci/emu10k1/emu10k1_callback.c
+++ b/sound/pci/emu10k1/emu10k1_callback.c
@@ -415,7 +415,7 @@ start_voice(struct snd_emux_voice *vp)
snd_emu10k1_ptr_write(hw, Z2, ch, 0);
/* invalidate maps */
- temp = (hw->silent_page.addr << 1) | MAP_PTI_MASK;
+ temp = (hw->silent_page.addr << hw->address_mode) | (hw->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0);
snd_emu10k1_ptr_write(hw, MAPA, ch, temp);
snd_emu10k1_ptr_write(hw, MAPB, ch, temp);
#if 0
@@ -436,7 +436,7 @@ start_voice(struct snd_emux_voice *vp)
snd_emu10k1_ptr_write(hw, CDF, ch, sample);
/* invalidate maps */
- temp = ((unsigned int)hw->silent_page.addr << 1) | MAP_PTI_MASK;
+ temp = ((unsigned int)hw->silent_page.addr << hw_address_mode) | (hw->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0);
snd_emu10k1_ptr_write(hw, MAPA, ch, temp);
snd_emu10k1_ptr_write(hw, MAPB, ch, temp);
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -282,7 +282,7 @@ static int snd_emu10k1_init(struct snd_e
snd_emu10k1_ptr_write(emu, TCB, 0, 0); /* taken from original driver */
snd_emu10k1_ptr_write(emu, TCBS, 0, 4); /* taken from original driver */
- silent_page = (emu->silent_page.addr << 1) | MAP_PTI_MASK;
+ silent_page = (emu->silent_page.addr << emu->address_mode) | (emu->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0);
for (ch = 0; ch < NUM_G; ch++) {
snd_emu10k1_ptr_write(emu, MAPA, ch, silent_page);
snd_emu10k1_ptr_write(emu, MAPB, ch, silent_page);
@@ -348,6 +348,11 @@ static int snd_emu10k1_init(struct snd_e
outl(reg | A_IOCFG_GPOUT0, emu->port + A_IOCFG);
}
+ if (emu->address_mode == 0) {
+ /* use 16M in 4G */
+ outl(inl(emu->port + HCFG) | HCFG_EXPANDED_MEM, emu->port + HCFG);
+ }
+
return 0;
}
@@ -1877,8 +1882,10 @@ int snd_emu10k1_create(struct snd_card *
is_audigy = emu->audigy = c->emu10k2_chip;
+ /* set addressing mode */
+ emu->address_mode = is_audigy ? 0 : 1;
/* set the DMA transfer mask */
- emu->dma_mask = is_audigy ? AUDIGY_DMA_MASK : EMU10K1_DMA_MASK;
+ emu->dma_mask = emu->address_mode ? EMU10K1_DMA_MASK : AUDIGY_DMA_MASK;
if (pci_set_dma_mask(pci, emu->dma_mask) < 0 ||
pci_set_consistent_dma_mask(pci, emu->dma_mask) < 0) {
dev_err(card->dev,
@@ -1903,7 +1910,7 @@ int snd_emu10k1_create(struct snd_card *
emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT;
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
- 32 * 1024, &emu->ptb_pages) < 0) {
+ (emu->address_mode ? 32 : 16) * 1024, &emu->ptb_pages) < 0) {
err = -ENOMEM;
goto error;
}
@@ -2002,8 +2009,8 @@ int snd_emu10k1_create(struct snd_card *
/* Clear silent pages and set up pointers */
memset(emu->silent_page.area, 0, PAGE_SIZE);
- silent_page = emu->silent_page.addr << 1;
- for (idx = 0; idx < MAXPAGES; idx++)
+ silent_page = emu->silent_page.addr << emu->address_mode;
+ for (idx = 0; idx < (emu->address_mode ? MAXPAGES1 : MAXPAGES0); idx++)
((u32 *)emu->ptb_pages.area)[idx] = cpu_to_le32(silent_page | idx);
/* set up voice indices */
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -380,7 +380,7 @@ static void snd_emu10k1_pcm_init_voice(s
snd_emu10k1_ptr_write(emu, Z1, voice, 0);
snd_emu10k1_ptr_write(emu, Z2, voice, 0);
/* invalidate maps */
- silent_page = ((unsigned int)emu->silent_page.addr << 1) | MAP_PTI_MASK;
+ silent_page = ((unsigned int)emu->silent_page.addr << emu->address_mode) | (emu->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0);
snd_emu10k1_ptr_write(emu, MAPA, voice, silent_page);
snd_emu10k1_ptr_write(emu, MAPB, voice, silent_page);
/* modulation envelope */
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -34,10 +34,11 @@
* aligned pages in others
*/
#define __set_ptb_entry(emu,page,addr) \
- (((u32 *)(emu)->ptb_pages.area)[page] = cpu_to_le32(((addr) << 1) | (page)))
+ (((u32 *)(emu)->ptb_pages.area)[page] = cpu_to_le32(((addr) << (emu->address_mode)) | (page)))
#define UNIT_PAGES (PAGE_SIZE / EMUPAGESIZE)
-#define MAX_ALIGN_PAGES (MAXPAGES / UNIT_PAGES)
+#define MAX_ALIGN_PAGES0 (MAXPAGES0 / UNIT_PAGES)
+#define MAX_ALIGN_PAGES1 (MAXPAGES1 / UNIT_PAGES)
/* get aligned page from offset address */
#define get_aligned_page(offset) ((offset) >> PAGE_SHIFT)
/* get offset address from aligned page */
@@ -124,7 +125,7 @@ static int search_empty_map_area(struct
}
page = blk->mapped_page + blk->pages;
}
- size = MAX_ALIGN_PAGES - page;
+ size = (emu->address_mode ? MAX_ALIGN_PAGES1 : MAX_ALIGN_PAGES0) - page;
if (size >= max_size) {
*nextp = pos;
return page;
@@ -181,7 +182,7 @@ static int unmap_memblk(struct snd_emu10
q = get_emu10k1_memblk(p, mapped_link);
end_page = q->mapped_page;
} else
- end_page = MAX_ALIGN_PAGES;
+ end_page = (emu->address_mode ? MAX_ALIGN_PAGES1 : MAX_ALIGN_PAGES0);
/* remove links */
list_del(&blk->mapped_link);
@@ -307,7 +308,7 @@ snd_emu10k1_alloc_pages(struct snd_emu10
if (snd_BUG_ON(!emu))
return NULL;
if (snd_BUG_ON(runtime->dma_bytes <= 0 ||
- runtime->dma_bytes >= MAXPAGES * EMUPAGESIZE))
+ runtime->dma_bytes >= (emu->address_mode ? MAXPAGES1 : MAXPAGES0) * EMUPAGESIZE))
return NULL;
hdr = emu->memhdr;
if (snd_BUG_ON(!hdr))
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 36/72] cdc-acm: prevent infinite loop when parsing CDC headers.
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (31 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 33/72] ALSA: emu10k1: Emu10k2 32 bit DMA mode Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 37/72] serial: of-serial: Remove device_type = "serial" registration Greg Kroah-Hartman
` (33 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Phil Turnbull, Quentin Casasnovas,
Sergei Shtylyov, Oliver Neukum, Adam Lee
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quentin Casasnovas <quentin.casasnovas@oracle.com>
commit 0d3bba0287d4e284c3ec7d3397e81eec920d5e7e upstream.
Phil and I found out a problem with commit:
7e860a6e7aa6 ("cdc-acm: add sanity checks")
It added some sanity checks to ignore potential garbage in CDC headers but
also introduced a potential infinite loop. This can happen at the first
loop iteration (elength = 0 in that case) if the description isn't a
DT_CS_INTERFACE or later if 'buffer[0]' is zero.
It should also be noted that the wrong length was being added to 'buffer'
in case 'buffer[1]' was not a DT_CS_INTERFACE descriptor, since elength was
assigned after that check in the loop.
A specially crafted USB device could be used to trigger this infinite loop.
Fixes: 7e860a6e7aa6 ("cdc-acm: add sanity checks")
Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
CC: Oliver Neukum <oneukum@suse.de>
CC: Adam Lee <adam8157@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/class/cdc-acm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1133,11 +1133,16 @@ static int acm_probe(struct usb_interfac
}
while (buflen > 0) {
+ elength = buffer[0];
+ if (!elength) {
+ dev_err(&intf->dev, "skipping garbage byte\n");
+ elength = 1;
+ goto next_desc;
+ }
if (buffer[1] != USB_DT_CS_INTERFACE) {
dev_err(&intf->dev, "skipping garbage\n");
goto next_desc;
}
- elength = buffer[0];
switch (buffer[2]) {
case USB_CDC_UNION_TYPE: /* we've found it */
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 37/72] serial: of-serial: Remove device_type = "serial" registration
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (32 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 36/72] cdc-acm: prevent infinite loop when parsing CDC headers Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 38/72] serial: xilinx: Use platform_get_irq to get irq description structure Greg Kroah-Hartman
` (32 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Michal Simek, Arnd Bergmann
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Simek <michal.simek@xilinx.com>
commit 6befa9d883385c580369a2cc9e53fbf329771f6d upstream.
Do not probe all serial drivers by of_serial.c which are using
device_type = "serial"; property. Only drivers which have valid
compatible strings listed in the driver should be probed.
When PORT_UNKNOWN is setup probe will fail anyway.
Arnd quotation about driver historical background:
"when I wrote that driver initially, the idea was that it would
get used as a stub to hook up all other serial drivers but after
that, the common code learned to create platform devices from DT"
This patch fix the problem with on the system with xilinx_uartps and
16550a where of_serial failed to register for xilinx_uartps and because
of irq_dispose_mapping() removed irq_desc. Then when xilinx_uartps was asking
for irq with request_irq() EINVAL is returned.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/of_serial.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -344,7 +344,6 @@ static struct of_device_id of_platform_s
{ .compatible = "ibm,qpace-nwp-serial",
.data = (void *)PORT_NWPSERIAL, },
#endif
- { .type = "serial", .data = (void *)PORT_UNKNOWN, },
{ /* end of list */ },
};
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 38/72] serial: xilinx: Use platform_get_irq to get irq description structure
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (33 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 37/72] serial: of-serial: Remove device_type = "serial" registration Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 39/72] arm64: dma-mapping: always clear allocated buffers Greg Kroah-Hartman
` (31 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Michal Simek
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Simek <michal.simek@xilinx.com>
commit 5c90c07b98c02198d9777a7c4f3047b0a94bf7ed upstream.
For systems with CONFIG_SERIAL_OF_PLATFORM=y and device_type =
"serial"; property in DT of_serial.c driver maps and unmaps IRQ (because
driver probe fails). Then a driver is called but irq mapping is not
created that's why driver is failing again in again on request_irq().
Based on this use platform_get_irq() instead of platform_get_resource()
which is doing irq_desc allocation and driver itself can request IRQ.
Fix both xilinx serial drivers in the tree.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/uartlite.c | 11 ++++++-----
drivers/tty/serial/xilinx_uartps.c | 12 ++++++------
2 files changed, 12 insertions(+), 11 deletions(-)
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -632,7 +632,8 @@ MODULE_DEVICE_TABLE(of, ulite_of_match);
static int ulite_probe(struct platform_device *pdev)
{
- struct resource *res, *res2;
+ struct resource *res;
+ int irq;
int id = pdev->id;
#ifdef CONFIG_OF
const __be32 *prop;
@@ -646,11 +647,11 @@ static int ulite_probe(struct platform_d
if (!res)
return -ENODEV;
- res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res2)
- return -ENODEV;
+ irq = platform_get_irq(pdev, 0);
+ if (irq <= 0)
+ return -ENXIO;
- return ulite_assign(&pdev->dev, id, res->start, res2->start);
+ return ulite_assign(&pdev->dev, id, res->start, irq);
}
static int ulite_remove(struct platform_device *pdev)
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1325,9 +1325,9 @@ static SIMPLE_DEV_PM_OPS(cdns_uart_dev_p
*/
static int cdns_uart_probe(struct platform_device *pdev)
{
- int rc, id;
+ int rc, id, irq;
struct uart_port *port;
- struct resource *res, *res2;
+ struct resource *res;
struct cdns_uart *cdns_uart_data;
cdns_uart_data = devm_kzalloc(&pdev->dev, sizeof(*cdns_uart_data),
@@ -1374,9 +1374,9 @@ static int cdns_uart_probe(struct platfo
goto err_out_clk_disable;
}
- res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res2) {
- rc = -ENODEV;
+ irq = platform_get_irq(pdev, 0);
+ if (irq <= 0) {
+ rc = -ENXIO;
goto err_out_clk_disable;
}
@@ -1405,7 +1405,7 @@ static int cdns_uart_probe(struct platfo
* and triggers invocation of the config_port() entry point.
*/
port->mapbase = res->start;
- port->irq = res2->start;
+ port->irq = irq;
port->dev = &pdev->dev;
port->uartclk = clk_get_rate(cdns_uart_data->uartclk);
port->private_data = cdns_uart_data;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 39/72] arm64: dma-mapping: always clear allocated buffers
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (34 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 38/72] serial: xilinx: Use platform_get_irq to get irq description structure Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 40/72] arm64: add missing PAGE_ALIGN() to __dma_free() Greg Kroah-Hartman
` (30 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Marek Szyprowski, Will Deacon
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <m.szyprowski@samsung.com>
commit 6829e274a623187c24f7cfc0e3d35f25d087fcc5 upstream.
Buffers allocated by dma_alloc_coherent() are always zeroed on Alpha,
ARM (32bit), MIPS, PowerPC, x86/x86_64 and probably other architectures.
It turned out that some drivers rely on this 'feature'. Allocated buffer
might be also exposed to userspace with dma_mmap() call, so clearing it
is desired from security point of view to avoid exposing random memory
to userspace. This patch unifies dma_alloc_coherent() behavior on ARM64
architecture with other implementations by unconditionally zeroing
allocated buffer.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/mm/dma-mapping.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -67,8 +67,7 @@ static void *__alloc_from_pool(size_t si
*ret_page = phys_to_page(phys);
ptr = (void *)val;
- if (flags & __GFP_ZERO)
- memset(ptr, 0, size);
+ memset(ptr, 0, size);
}
return ptr;
@@ -113,8 +112,7 @@ static void *__dma_alloc_coherent(struct
*dma_handle = phys_to_dma(dev, page_to_phys(page));
addr = page_address(page);
- if (flags & __GFP_ZERO)
- memset(addr, 0, size);
+ memset(addr, 0, size);
return addr;
} else {
return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 40/72] arm64: add missing PAGE_ALIGN() to __dma_free()
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (35 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 39/72] arm64: dma-mapping: always clear allocated buffers Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 41/72] usb: chipidea: otg: remove mutex unlock and lock while stop and start role Greg Kroah-Hartman
` (29 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Catalin Marinas, Dean Nelson,
Will Deacon
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 2cff98b99c469880ce830cbcde015b53b67e0a7b upstream.
__dma_alloc() does a PAGE_ALIGN() on the passed in size argument before
doing anything else. __dma_free() does not. And because it doesn't, it is
possible to leak memory should size not be an integer multiple of PAGE_SIZE.
The solution is to add a PAGE_ALIGN() to __dma_free() like is done in
__dma_alloc().
Additionally, this patch removes a redundant PAGE_ALIGN() from
__dma_alloc_coherent(), since __dma_alloc_coherent() can only be called
from __dma_alloc(), which already does a PAGE_ALIGN() before the call.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/mm/dma-mapping.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -104,7 +104,6 @@ static void *__dma_alloc_coherent(struct
struct page *page;
void *addr;
- size = PAGE_ALIGN(size);
page = dma_alloc_from_contiguous(dev, size >> PAGE_SHIFT,
get_order(size));
if (!page)
@@ -193,6 +192,8 @@ static void __dma_free(struct device *de
{
void *swiotlb_addr = phys_to_virt(dma_to_phys(dev, dma_handle));
+ size = PAGE_ALIGN(size);
+
if (!is_device_dma_coherent(dev)) {
if (__free_from_pool(vaddr, size))
return;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 41/72] usb: chipidea: otg: remove mutex unlock and lock while stop and start role
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (36 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 40/72] arm64: add missing PAGE_ALIGN() to __dma_free() Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 42/72] ASoC: samsung: s3c24xx-i2s: Fix return value check in s3c24xx_iis_dev_probe() Greg Kroah-Hartman
` (28 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Li Jun, Peter Chen
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Jun <jun.li@freescale.com>
commit a5a356cee89f86ff86cc3ce24136ca1f802c1bf1 upstream.
Wrongly release mutex lock during otg_statemachine may result in re-enter
otg_statemachine, which is not allowed, we should do next state transtition
after previous one completed.
Fixes: 826cfe751f3e ("usb: chipidea: add OTG fsm operation functions implementation")
Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/chipidea/otg_fsm.c | 4 ----
1 file changed, 4 deletions(-)
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -537,7 +537,6 @@ static int ci_otg_start_host(struct otg_
{
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
- mutex_unlock(&fsm->lock);
if (on) {
ci_role_stop(ci);
ci_role_start(ci, CI_ROLE_HOST);
@@ -546,7 +545,6 @@ static int ci_otg_start_host(struct otg_
hw_device_reset(ci);
ci_role_start(ci, CI_ROLE_GADGET);
}
- mutex_lock(&fsm->lock);
return 0;
}
@@ -554,12 +552,10 @@ static int ci_otg_start_gadget(struct ot
{
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
- mutex_unlock(&fsm->lock);
if (on)
usb_gadget_vbus_connect(&ci->gadget);
else
usb_gadget_vbus_disconnect(&ci->gadget);
- mutex_lock(&fsm->lock);
return 0;
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 42/72] ASoC: samsung: s3c24xx-i2s: Fix return value check in s3c24xx_iis_dev_probe()
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (37 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 41/72] usb: chipidea: otg: remove mutex unlock and lock while stop and start role Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 43/72] ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe() Greg Kroah-Hartman
` (27 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Wei Yongjun, Krzysztof Kozlowski,
Mark Brown
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
commit c479163a1b6ab424786fbcd9225b4e3c1c58eb0b upstream.
In case of error, the function devm_ioremap_resource() returns
ERR_PTR() and never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/samsung/s3c24xx-i2s.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -461,8 +461,8 @@ static int s3c24xx_iis_dev_probe(struct
return -ENOENT;
}
s3c24xx_i2s.regs = devm_ioremap_resource(&pdev->dev, res);
- if (s3c24xx_i2s.regs == NULL)
- return -ENXIO;
+ if (IS_ERR(s3c24xx_i2s.regs))
+ return PTR_ERR(s3c24xx_i2s.regs);
s3c24xx_i2s_pcm_stereo_out.dma_addr = res->start + S3C2410_IISFIFO;
s3c24xx_i2s_pcm_stereo_in.dma_addr = res->start + S3C2410_IISFIFO;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 43/72] ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe()
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (38 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 42/72] ASoC: samsung: s3c24xx-i2s: Fix return value check in s3c24xx_iis_dev_probe() Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 44/72] ASoC: rt5677: add register patch for PLL Greg Kroah-Hartman
` (26 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Wei Yongjun, Peter Rosin, Mark Brown
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
commit 427ced4b203dfea4f08b1298cd1f88e19039fca4 upstream.
In case of error, the function devm_kzalloc() returns NULL
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/tfa9879.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/sound/soc/codecs/tfa9879.c
+++ b/sound/soc/codecs/tfa9879.c
@@ -280,8 +280,8 @@ static int tfa9879_i2c_probe(struct i2c_
int i;
tfa9879 = devm_kzalloc(&i2c->dev, sizeof(*tfa9879), GFP_KERNEL);
- if (IS_ERR(tfa9879))
- return PTR_ERR(tfa9879);
+ if (!tfa9879)
+ return -ENOMEM;
i2c_set_clientdata(i2c, tfa9879);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 44/72] ASoC: rt5677: add register patch for PLL
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (39 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 43/72] ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe() Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 45/72] ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE Greg Kroah-Hartman
` (25 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bard Liao, Mark Brown
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bard Liao <bardliao@realtek.com>
commit 74d6ea52aeef0236242221c6eff6d892565c5a92 upstream.
The PLL output will be unstable in some cases. We can fix it by
setting some registers.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/rt5677.c | 3 +++
1 file changed, 3 insertions(+)
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -62,6 +62,9 @@ static const struct reg_default init_lis
{RT5677_PR_BASE + 0x1e, 0x0000},
{RT5677_PR_BASE + 0x12, 0x0eaa},
{RT5677_PR_BASE + 0x14, 0x018a},
+ {RT5677_PR_BASE + 0x15, 0x0490},
+ {RT5677_PR_BASE + 0x38, 0x0f71},
+ {RT5677_PR_BASE + 0x39, 0x0f71},
};
#define RT5677_INIT_REG_LEN ARRAY_SIZE(init_list)
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 45/72] ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (40 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 44/72] ASoC: rt5677: add register patch for PLL Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 46/72] ASoC: rt5677: fixed wrong DMIC ref clock Greg Kroah-Hartman
` (24 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Charles Keepax, Mark Brown
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
commit a2d97723cb3a7741af81868427b36bba274b681b upstream.
Correct small copy and paste error where autodisable was not being
enabled for the SOC_DAPM_SINGLE_TLV_AUTODISABLE control.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/sound/soc-dapm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -287,7 +287,7 @@ struct device;
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE,\
.tlv.p = (tlv_array), \
.get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \
- .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) }
+ .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 1) }
#define SOC_DAPM_SINGLE_TLV_VIRT(xname, max, tlv_array) \
SOC_DAPM_SINGLE(xname, SND_SOC_NOPM, 0, max, 0, tlv_array)
#define SOC_DAPM_ENUM(xname, xenum) \
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 46/72] ASoC: rt5677: fixed wrong DMIC ref clock
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (41 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 45/72] ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 47/72] btrfs: unlock i_mutex after attempting to delete subvolume during send Greg Kroah-Hartman
` (23 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bard Liao, Mark Brown
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bard Liao <bardliao@realtek.com>
commit 60a8d62b8497c23eb3d48149af7e55dac2dd83a2 upstream.
DMIC clock source is not from codec system clock directly. it is
generated from the division of system clock. And it should be 256 *
sample rate of AIF1.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/rt5677.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -904,7 +904,7 @@ static int set_dmic_clk(struct snd_soc_d
{
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
- int idx = rl6231_calc_dmic_clk(rt5677->sysclk);
+ int idx = rl6231_calc_dmic_clk(rt5677->lrck[RT5677_AIF1] << 8);
if (idx < 0)
dev_err(codec->dev, "Failed to set DMIC clock\n");
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 47/72] btrfs: unlock i_mutex after attempting to delete subvolume during send
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (42 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 46/72] ASoC: rt5677: fixed wrong DMIC ref clock Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 48/72] ACPI / SBS: Enable battery manager when present Greg Kroah-Hartman
` (22 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Filipe Manana, David Sterba,
Omar Sandoval, Chris Mason
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Omar Sandoval <osandov@osandov.com>
commit 909e26dce3f7600f5e293ac0522c28790a0c8c9c upstream.
Whenever the check for a send in progress introduced in commit
521e0546c970 (btrfs: protect snapshots from deleting during send) is
hit, we return without unlocking inode->i_mutex. This is easy to see
with lockdep enabled:
[ +0.000059] ================================================
[ +0.000028] [ BUG: lock held when returning to user space! ]
[ +0.000029] 4.0.0-rc5-00096-g3c435c1 #93 Not tainted
[ +0.000026] ------------------------------------------------
[ +0.000029] btrfs/211 is leaving the kernel with locks still held!
[ +0.000029] 1 lock held by btrfs/211:
[ +0.000023] #0: (&type->i_mutex_dir_key){+.+.+.}, at: [<ffffffff8135b8df>] btrfs_ioctl_snap_destroy+0x2df/0x7a0
Make sure we unlock it in the error path.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/btrfs/ioctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2403,7 +2403,7 @@ static noinline int btrfs_ioctl_snap_des
"Attempt to delete subvolume %llu during send",
dest->root_key.objectid);
err = -EPERM;
- goto out_dput;
+ goto out_unlock_inode;
}
d_invalidate(dentry);
@@ -2498,6 +2498,7 @@ out_up_write:
root_flags & ~BTRFS_ROOT_SUBVOL_DEAD);
spin_unlock(&dest->root_item_lock);
}
+out_unlock_inode:
mutex_unlock(&inode->i_mutex);
if (!err) {
shrink_dcache_sb(root->fs_info->sb);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 48/72] ACPI / SBS: Enable battery manager when present
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (43 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 47/72] btrfs: unlock i_mutex after attempting to delete subvolume during send Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 49/72] tty/serial: at91: maxburst was missing for dma transfers Greg Kroah-Hartman
` (21 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Chris Bainbridge, Rafael J. Wysocki
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Bainbridge <chris.bainbridge@gmail.com>
commit 61f8ff693923e4b19748b0e8287b99778f2661c7 upstream.
Commit 9faf6136ff46 (ACPI / SBS: Disable smart battery manager on
Apple) introduced a regression disabling the SBS battery manager.
The battery manager should be marked as present when
acpi_manager_get_info() returns 0.
Fixes: 9faf6136ff46 (ACPI / SBS: Disable smart battery manager on Apple)
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/acpi/sbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -670,7 +670,7 @@ static int acpi_sbs_add(struct acpi_devi
if (!sbs_manager_broken) {
result = acpi_manager_get_info(sbs);
if (!result) {
- sbs->manager_present = 0;
+ sbs->manager_present = 1;
for (id = 0; id < MAX_SBS_BAT; ++id)
if ((sbs->batteries_supported & (1 << id)))
acpi_battery_add(sbs, id);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 49/72] tty/serial: at91: maxburst was missing for dma transfers
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (44 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 48/72] ACPI / SBS: Enable battery manager when present Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 50/72] rbd: end I/O the entire obj_request on error Greg Kroah-Hartman
` (20 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ludovic Desroches, Nicolas Ferre
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ludovic Desroches <ludovic.desroches@atmel.com>
commit a8d4e01637902311c5643b69a5c80e2805f04054 upstream.
Maxburst was not set when doing the dma slave configuration. This value
is checked by the recently introduced xdmac. It causes an error when
doing the slave configuration and so prevents from using dma.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/atmel_serial.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -880,6 +880,7 @@ static int atmel_prepare_tx_dma(struct u
config.direction = DMA_MEM_TO_DEV;
config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
config.dst_addr = port->mapbase + ATMEL_US_THR;
+ config.dst_maxburst = 1;
ret = dmaengine_slave_config(atmel_port->chan_tx,
&config);
@@ -1059,6 +1060,7 @@ static int atmel_prepare_rx_dma(struct u
config.direction = DMA_DEV_TO_MEM;
config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
config.src_addr = port->mapbase + ATMEL_US_RHR;
+ config.src_maxburst = 1;
ret = dmaengine_slave_config(atmel_port->chan_rx,
&config);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 50/72] rbd: end I/O the entire obj_request on error
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (45 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 49/72] tty/serial: at91: maxburst was missing for dma transfers Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 51/72] uas: Allow uas_use_uas_driver to return usb-storage flags Greg Kroah-Hartman
` (19 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Alex Elder, Shawn Edwards, Sage Weil,
Ilya Dryomov
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Dryomov <idryomov@gmail.com>
commit 082a75dad84d79d1c15ea9e50f31cb4bb4fa7fd6 upstream.
When we end I/O struct request with error, we need to pass
obj_request->length as @nr_bytes so that the entire obj_request worth
of bytes is completed. Otherwise block layer ends up confused and we
trip on
rbd_assert(more ^ (which == img_request->obj_request_count));
in rbd_img_obj_callback() due to more being true no matter what. We
already do it in most cases but we are missing some, in particular
those where we don't even get a chance to submit any obj_requests, due
to an early -ENOMEM for example.
A number of obj_request->xferred assignments seem to be redundant but
I haven't touched any of obj_request->xferred stuff to keep this small
and isolated.
Cc: Alex Elder <elder@linaro.org>
Reported-by: Shawn Edwards <lesser.evil@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/rbd.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2264,6 +2264,11 @@ static bool rbd_img_obj_end_request(stru
result, xferred);
if (!img_request->result)
img_request->result = result;
+ /*
+ * Need to end I/O on the entire obj_request worth of
+ * bytes in case of error.
+ */
+ xferred = obj_request->length;
}
/* Image object requests don't own their page array */
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 51/72] uas: Allow uas_use_uas_driver to return usb-storage flags
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (46 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 50/72] rbd: end I/O the entire obj_request on error Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 52/72] uas: Add US_FL_MAX_SECTORS_240 flag Greg Kroah-Hartman
` (18 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans de Goede, Alan Stern
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit a5011d44f0e1117a6db14b19b57c51f8be5673a0 upstream.
uas_use_uas_driver may set some US_FL_foo flags during detection, currently
these are stored in a local variable and then throw away, but these may be
of interest to the caller, so add an extra parameter to (optionally) return
the detected flags, and use this in the uas driver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/storage/uas-detect.h | 6 +++++-
drivers/usb/storage/uas.c | 6 +++---
drivers/usb/storage/usb.c | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -51,7 +51,8 @@ static int uas_find_endpoints(struct usb
}
static int uas_use_uas_driver(struct usb_interface *intf,
- const struct usb_device_id *id)
+ const struct usb_device_id *id,
+ unsigned long *flags_ret)
{
struct usb_host_endpoint *eps[4] = { };
struct usb_device *udev = interface_to_usbdev(intf);
@@ -132,5 +133,8 @@ static int uas_use_uas_driver(struct usb
return 0;
}
+ if (flags_ret)
+ *flags_ret = flags;
+
return 1;
}
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -887,8 +887,9 @@ static int uas_probe(struct usb_interfac
struct Scsi_Host *shost = NULL;
struct uas_dev_info *devinfo;
struct usb_device *udev = interface_to_usbdev(intf);
+ unsigned long dev_flags;
- if (!uas_use_uas_driver(intf, id))
+ if (!uas_use_uas_driver(intf, id, &dev_flags))
return -ENODEV;
if (uas_switch_interface(udev, intf))
@@ -910,8 +911,7 @@ static int uas_probe(struct usb_interfac
devinfo->udev = udev;
devinfo->resetting = 0;
devinfo->shutdown = 0;
- devinfo->flags = id->driver_info;
- usb_stor_adjust_quirks(udev, &devinfo->flags);
+ devinfo->flags = dev_flags;
init_usb_anchor(&devinfo->cmd_urbs);
init_usb_anchor(&devinfo->sense_urbs);
init_usb_anchor(&devinfo->data_urbs);
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -1080,7 +1080,7 @@ static int storage_probe(struct usb_inte
/* If uas is enabled and this device can do uas then ignore it. */
#if IS_ENABLED(CONFIG_USB_UAS)
- if (uas_use_uas_driver(intf, id))
+ if (uas_use_uas_driver(intf, id, NULL))
return -ENXIO;
#endif
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 52/72] uas: Add US_FL_MAX_SECTORS_240 flag
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (47 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 51/72] uas: Allow uas_use_uas_driver to return usb-storage flags Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 53/72] uas: Set max_sectors_240 quirk for ASM1053 devices Greg Kroah-Hartman
` (17 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans de Goede, Alan Stern
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit ee136af4a064c2f61e2025873584d2c7ec93f4ae upstream.
The usb-storage driver sets max_sectors = 240 in its scsi-host template,
for uas we do not want to do that for all devices, but testing has shown
that some devices need it.
This commit adds a US_FL_MAX_SECTORS_240 flag for such devices, and
implements support for it in uas.c, while at it it also adds support
for US_FL_MAX_SECTORS_64 to uas.c.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/kernel-parameters.txt | 2 ++
drivers/usb/storage/uas.c | 10 +++++++++-
drivers/usb/storage/usb.c | 6 +++++-
include/linux/usb_usual.h | 2 ++
4 files changed, 18 insertions(+), 2 deletions(-)
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -3746,6 +3746,8 @@ bytes respectively. Such letter suffixes
READ_CAPACITY_16 command);
f = NO_REPORT_OPCODES (don't use report opcodes
command, uas only);
+ g = MAX_SECTORS_240 (don't transfer more than
+ 240 sectors at a time, uas only);
h = CAPACITY_HEURISTICS (decrease the
reported device capacity by one
sector if the number is odd);
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -759,7 +759,10 @@ static int uas_eh_bus_reset_handler(stru
static int uas_slave_alloc(struct scsi_device *sdev)
{
- sdev->hostdata = (void *)sdev->host->hostdata;
+ struct uas_dev_info *devinfo =
+ (struct uas_dev_info *)sdev->host->hostdata;
+
+ sdev->hostdata = devinfo;
/* USB has unusual DMA-alignment requirements: Although the
* starting address of each scatter-gather element doesn't matter,
@@ -778,6 +781,11 @@ static int uas_slave_alloc(struct scsi_d
*/
blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
+ if (devinfo->flags & US_FL_MAX_SECTORS_64)
+ blk_queue_max_hw_sectors(sdev->request_queue, 64);
+ else if (devinfo->flags & US_FL_MAX_SECTORS_240)
+ blk_queue_max_hw_sectors(sdev->request_queue, 240);
+
return 0;
}
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -479,7 +479,8 @@ void usb_stor_adjust_quirks(struct usb_d
US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT |
US_FL_NO_READ_DISC_INFO | US_FL_NO_READ_CAPACITY_16 |
US_FL_INITIAL_READ10 | US_FL_WRITE_CACHE |
- US_FL_NO_ATA_1X | US_FL_NO_REPORT_OPCODES);
+ US_FL_NO_ATA_1X | US_FL_NO_REPORT_OPCODES |
+ US_FL_MAX_SECTORS_240);
p = quirks;
while (*p) {
@@ -520,6 +521,9 @@ void usb_stor_adjust_quirks(struct usb_d
case 'f':
f |= US_FL_NO_REPORT_OPCODES;
break;
+ case 'g':
+ f |= US_FL_MAX_SECTORS_240;
+ break;
case 'h':
f |= US_FL_CAPACITY_HEURISTICS;
break;
--- a/include/linux/usb_usual.h
+++ b/include/linux/usb_usual.h
@@ -77,6 +77,8 @@
/* Cannot handle ATA_12 or ATA_16 CDBs */ \
US_FLAG(NO_REPORT_OPCODES, 0x04000000) \
/* Cannot handle MI_REPORT_SUPPORTED_OPERATION_CODES */ \
+ US_FLAG(MAX_SECTORS_240, 0x08000000) \
+ /* Sets max_sectors to 240 */ \
#define US_FLAG(name, value) US_FL_##name = value ,
enum { US_DO_ALL_FLAGS };
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 53/72] uas: Set max_sectors_240 quirk for ASM1053 devices
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (48 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 52/72] uas: Add US_FL_MAX_SECTORS_240 flag Greg Kroah-Hartman
@ 2015-05-11 17:54 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 54/72] ext4: fix data corruption caused by unwritten and delayed extents Greg Kroah-Hartman
` (16 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Steve Bangert, Hans de Goede,
Alan Stern
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit 8e779c6c4a398763c21371fe40f649206041dc1e upstream.
Testing has shown that ASM1053 devices do not work properly with transfers
larger than 240 sectors, so set max_sectors to 240 on these.
Reported-by: Steve Bangert <sbangert@frontier.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Steve Bangert <sbangert@frontier.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/storage/uas-detect.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -74,7 +74,7 @@ static int uas_use_uas_driver(struct usb
* this writing the following versions exist:
* ASM1051 - no uas support version
* ASM1051 - with broken (*) uas support
- * ASM1053 - with working uas support
+ * ASM1053 - with working uas support, but problems with large xfers
* ASM1153 - with working uas support
*
* Devices with these chips re-use a number of device-ids over the
@@ -104,6 +104,9 @@ static int uas_use_uas_driver(struct usb
} else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) {
/* Possibly an ASM1051, disable uas */
flags |= US_FL_IGNORE_UAS;
+ } else {
+ /* ASM1053, these have issues with large transfers */
+ flags |= US_FL_MAX_SECTORS_240;
}
}
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 54/72] ext4: fix data corruption caused by unwritten and delayed extents
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (49 preceding siblings ...)
2015-05-11 17:54 ` [PATCH 4.0 53/72] uas: Set max_sectors_240 quirk for ASM1053 devices Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 55/72] ext4: move check under lock scope to close a race Greg Kroah-Hartman
` (15 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Lukas Czerner, Theodore Tso
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Czerner <lczerner@redhat.com>
commit d2dc317d564a46dfc683978a2e5a4f91434e9711 upstream.
Currently it is possible to lose whole file system block worth of data
when we hit the specific interaction with unwritten and delayed extents
in status extent tree.
The problem is that when we insert delayed extent into extent status
tree the only way to get rid of it is when we write out delayed buffer.
However there is a limitation in the extent status tree implementation
so that when inserting unwritten extent should there be even a single
delayed block the whole unwritten extent would be marked as delayed.
At this point, there is no way to get rid of the delayed extents,
because there are no delayed buffers to write out. So when a we write
into said unwritten extent we will convert it to written, but it still
remains delayed.
When we try to write into that block later ext4_da_map_blocks() will set
the buffer new and delayed and map it to invalid block which causes
the rest of the block to be zeroed loosing already written data.
For now we can fix this by simply not allowing to set delayed status on
written extent in the extent status tree. Also add WARN_ON() to make
sure that we notice if this happens in the future.
This problem can be easily reproduced by running the following xfs_io.
xfs_io -f -c "pwrite -S 0xaa 4096 2048" \
-c "falloc 0 131072" \
-c "pwrite -S 0xbb 65536 2048" \
-c "fsync" /mnt/test/fff
echo 3 > /proc/sys/vm/drop_caches
xfs_io -c "pwrite -S 0xdd 67584 2048" /mnt/test/fff
This can be theoretically also reproduced by at random by running fsx,
but it's not very reliable, though on machines with bigger page size
(like ppc) this can be seen more often (especially xfstest generic/127)
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/extents_status.c | 8 ++++++++
fs/ext4/inode.c | 2 ++
2 files changed, 10 insertions(+)
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -705,6 +705,14 @@ int ext4_es_insert_extent(struct inode *
BUG_ON(end < lblk);
+ if ((status & EXTENT_STATUS_DELAYED) &&
+ (status & EXTENT_STATUS_WRITTEN)) {
+ ext4_warning(inode->i_sb, "Inserting extent [%u/%u] as "
+ " delayed and written which can potentially "
+ " cause data loss.\n", lblk, len);
+ WARN_ON(1);
+ }
+
newes.es_lblk = lblk;
newes.es_len = len;
ext4_es_store_pblock_status(&newes, pblk, status);
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -534,6 +534,7 @@ int ext4_map_blocks(handle_t *handle, st
status = map->m_flags & EXT4_MAP_UNWRITTEN ?
EXTENT_STATUS_UNWRITTEN : EXTENT_STATUS_WRITTEN;
if (!(flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) &&
+ !(status & EXTENT_STATUS_WRITTEN) &&
ext4_find_delalloc_range(inode, map->m_lblk,
map->m_lblk + map->m_len - 1))
status |= EXTENT_STATUS_DELAYED;
@@ -638,6 +639,7 @@ found:
status = map->m_flags & EXT4_MAP_UNWRITTEN ?
EXTENT_STATUS_UNWRITTEN : EXTENT_STATUS_WRITTEN;
if (!(flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) &&
+ !(status & EXTENT_STATUS_WRITTEN) &&
ext4_find_delalloc_range(inode, map->m_lblk,
map->m_lblk + map->m_len - 1))
status |= EXTENT_STATUS_DELAYED;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 55/72] ext4: move check under lock scope to close a race.
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (50 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 54/72] ext4: fix data corruption caused by unwritten and delayed extents Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 56/72] SCSI: add 1024 max sectors black list flag Greg Kroah-Hartman
` (14 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Davide Italiano, Theodore Tso
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Davide Italiano <dccitaliano@gmail.com>
commit 280227a75b56ab5d35854f3a77ef74a7ad56a203 upstream.
fallocate() checks that the file is extent-based and returns
EOPNOTSUPP in case is not. Other tasks can convert from and to
indirect and extent so it's safe to check only after grabbing
the inode mutex.
Signed-off-by: Davide Italiano <dccitaliano@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/extents.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4934,13 +4934,6 @@ long ext4_fallocate(struct file *file, i
if (ret)
return ret;
- /*
- * currently supporting (pre)allocate mode for extent-based
- * files _only_
- */
- if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
- return -EOPNOTSUPP;
-
if (mode & FALLOC_FL_COLLAPSE_RANGE)
return ext4_collapse_range(inode, offset, len);
@@ -4962,6 +4955,14 @@ long ext4_fallocate(struct file *file, i
mutex_lock(&inode->i_mutex);
+ /*
+ * We only support preallocation for extent-based files only
+ */
+ if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
+ ret = -EOPNOTSUPP;
+ goto out;
+ }
+
if (!(mode & FALLOC_FL_KEEP_SIZE) &&
offset + len > i_size_read(inode)) {
new_size = offset + len;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 56/72] SCSI: add 1024 max sectors black list flag
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (51 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 55/72] ext4: move check under lock scope to close a race Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 57/72] 3w-xxxx: fix command completion race Greg Kroah-Hartman
` (13 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Christian Hesse, Mike Christie,
Christoph Hellwig, James Bottomley
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Christie <michaelc@cs.wisc.edu>
commit 35e9a9f93994d7f7d12afa41169c7ba05513721b upstream.
This works around a issue with qnap iscsi targets not handling large IOs
very well.
The target returns:
VPD INQUIRY: Block limits page (SBC)
Maximum compare and write length: 1 blocks
Optimal transfer length granularity: 1 blocks
Maximum transfer length: 4294967295 blocks
Optimal transfer length: 4294967295 blocks
Maximum prefetch, xdread, xdwrite transfer length: 0 blocks
Maximum unmap LBA count: 8388607
Maximum unmap block descriptor count: 1
Optimal unmap granularity: 16383
Unmap granularity alignment valid: 0
Unmap granularity alignment: 0
Maximum write same length: 0xffffffff blocks
Maximum atomic transfer length: 0
Atomic alignment: 0
Atomic transfer length granularity: 0
and it is *sometimes* able to handle at least one IO of size up to 8 MB. We
have seen in traces where it will sometimes work, but other times it
looks like it fails and it looks like it returns failures if we send
multiple large IOs sometimes. Also it looks like it can return 2 different
errors. It will sometimes send iscsi reject errors indicating out of
resources or it will send invalid cdb illegal requests check conditions.
And then when it sends iscsi rejects it does not seem to handle retries
when there are command sequence holes, so I could not just add code to
try and gracefully handle that error code.
The problem is that we do not have a good contact for the company,
so we are not able to determine under what conditions it returns
which error and why it sometimes works.
So, this patch just adds a new black list flag to set targets like this to
the old max safe sectors of 1024. The max_hw_sectors changes added in 3.19
caused this regression, so I also ccing stable.
Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/scsi_devinfo.c | 1 +
drivers/scsi/scsi_scan.c | 6 ++++++
include/scsi/scsi_devinfo.h | 1 +
3 files changed, 8 insertions(+)
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -226,6 +226,7 @@ static struct {
{"PIONEER", "CD-ROM DRM-624X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
{"Promise", "VTrak E610f", NULL, BLIST_SPARSELUN | BLIST_NO_RSOC},
{"Promise", "", NULL, BLIST_SPARSELUN},
+ {"QNAP", "iSCSI Storage", NULL, BLIST_MAX_1024},
{"QUANTUM", "XP34301", "1071", BLIST_NOTQ},
{"REGAL", "CDC-4X", NULL, BLIST_MAX5LUN | BLIST_SINGLELUN},
{"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN},
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -897,6 +897,12 @@ static int scsi_add_lun(struct scsi_devi
*/
if (*bflags & BLIST_MAX_512)
blk_queue_max_hw_sectors(sdev->request_queue, 512);
+ /*
+ * Max 1024 sector transfer length for targets that report incorrect
+ * max/optimal lengths and relied on the old block layer safe default
+ */
+ else if (*bflags & BLIST_MAX_1024)
+ blk_queue_max_hw_sectors(sdev->request_queue, 1024);
/*
* Some devices may not want to have a start command automatically
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -36,5 +36,6 @@
for sequential scan */
#define BLIST_TRY_VPD_PAGES 0x10000000 /* Attempt to read VPD pages */
#define BLIST_NO_RSOC 0x20000000 /* don't try to issue RSOC */
+#define BLIST_MAX_1024 0x40000000 /* maximum 1024 sector cdb length */
#endif
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 57/72] 3w-xxxx: fix command completion race
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (52 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 56/72] SCSI: add 1024 max sectors black list flag Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 58/72] 3w-9xxx: " Greg Kroah-Hartman
` (12 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Adam Radford,
James Bottomley
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@lst.de>
commit 9cd9554615cba14f0877cc9972a6537ad2bdde61 upstream.
The 3w-xxxx driver needs to tear down the dma mappings before returning
the command to the midlayer, as there is no guarantee the sglist and
count are valid after that point. Also remove the dma mapping helpers
which have another inherent race due to the request_id index.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/3w-xxxx.c | 42 ++++++------------------------------------
drivers/scsi/3w-xxxx.h | 5 -----
2 files changed, 6 insertions(+), 41 deletions(-)
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -1271,32 +1271,6 @@ static int tw_initialize_device_extensio
return 0;
} /* End tw_initialize_device_extension() */
-static int tw_map_scsi_sg_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
-{
- int use_sg;
-
- dprintk(KERN_WARNING "3w-xxxx: tw_map_scsi_sg_data()\n");
-
- use_sg = scsi_dma_map(cmd);
- if (use_sg < 0) {
- printk(KERN_WARNING "3w-xxxx: tw_map_scsi_sg_data(): pci_map_sg() failed.\n");
- return 0;
- }
-
- cmd->SCp.phase = TW_PHASE_SGLIST;
- cmd->SCp.have_data_in = use_sg;
-
- return use_sg;
-} /* End tw_map_scsi_sg_data() */
-
-static void tw_unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
-{
- dprintk(KERN_WARNING "3w-xxxx: tw_unmap_scsi_data()\n");
-
- if (cmd->SCp.phase == TW_PHASE_SGLIST)
- scsi_dma_unmap(cmd);
-} /* End tw_unmap_scsi_data() */
-
/* This function will reset a device extension */
static int tw_reset_device_extension(TW_Device_Extension *tw_dev)
{
@@ -1319,8 +1293,8 @@ static int tw_reset_device_extension(TW_
srb = tw_dev->srb[i];
if (srb != NULL) {
srb->result = (DID_RESET << 16);
- tw_dev->srb[i]->scsi_done(tw_dev->srb[i]);
- tw_unmap_scsi_data(tw_dev->tw_pci_dev, tw_dev->srb[i]);
+ scsi_dma_unmap(srb);
+ srb->scsi_done(srb);
}
}
}
@@ -1767,8 +1741,8 @@ static int tw_scsiop_read_write(TW_Devic
command_packet->byte8.io.lba = lba;
command_packet->byte6.block_count = num_sectors;
- use_sg = tw_map_scsi_sg_data(tw_dev->tw_pci_dev, tw_dev->srb[request_id]);
- if (!use_sg)
+ use_sg = scsi_dma_map(srb);
+ if (use_sg <= 0)
return 1;
scsi_for_each_sg(tw_dev->srb[request_id], sg, use_sg, i) {
@@ -1955,9 +1929,6 @@ static int tw_scsi_queue_lck(struct scsi
/* Save the scsi command for use by the ISR */
tw_dev->srb[request_id] = SCpnt;
- /* Initialize phase to zero */
- SCpnt->SCp.phase = TW_PHASE_INITIAL;
-
switch (*command) {
case READ_10:
case READ_6:
@@ -2185,12 +2156,11 @@ static irqreturn_t tw_interrupt(int irq,
/* Now complete the io */
if ((error != TW_ISR_DONT_COMPLETE)) {
+ scsi_dma_unmap(tw_dev->srb[request_id]);
+ tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
tw_dev->state[request_id] = TW_S_COMPLETED;
tw_state_request_finish(tw_dev, request_id);
tw_dev->posted_request_count--;
- tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
-
- tw_unmap_scsi_data(tw_dev->tw_pci_dev, tw_dev->srb[request_id]);
}
}
--- a/drivers/scsi/3w-xxxx.h
+++ b/drivers/scsi/3w-xxxx.h
@@ -195,11 +195,6 @@ static unsigned char tw_sense_table[][4]
#define TW_AEN_SMART_FAIL 0x000F
#define TW_AEN_SBUF_FAIL 0x0024
-/* Phase defines */
-#define TW_PHASE_INITIAL 0
-#define TW_PHASE_SINGLE 1
-#define TW_PHASE_SGLIST 2
-
/* Misc defines */
#define TW_ALIGNMENT_6000 64 /* 64 bytes */
#define TW_ALIGNMENT_7000 4 /* 4 bytes */
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 58/72] 3w-9xxx: fix command completion race
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (53 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 57/72] 3w-xxxx: fix command completion race Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 59/72] 3w-sas: " Greg Kroah-Hartman
` (11 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Adam Radford,
James Bottomley
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@lst.de>
commit 118c855b5623f3e2e6204f02623d88c09e0c34de upstream.
The 3w-9xxx driver needs to tear down the dma mappings before returning
the command to the midlayer, as there is no guarantee the sglist and
count are valid after that point. Also remove the dma mapping helpers
which have another inherent race due to the request_id index.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/3w-9xxx.c | 57 +++++++++++--------------------------------------
drivers/scsi/3w-9xxx.h | 5 ----
2 files changed, 13 insertions(+), 49 deletions(-)
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -149,7 +149,6 @@ static int twa_reset_sequence(TW_Device_
static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry *sglistarg);
static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id);
static char *twa_string_lookup(twa_message_type *table, unsigned int aen_code);
-static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id);
/* Functions */
@@ -1340,11 +1339,11 @@ static irqreturn_t twa_interrupt(int irq
}
/* Now complete the io */
+ scsi_dma_unmap(cmd);
+ cmd->scsi_done(cmd);
tw_dev->state[request_id] = TW_S_COMPLETED;
twa_free_request_id(tw_dev, request_id);
tw_dev->posted_request_count--;
- tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
- twa_unmap_scsi_data(tw_dev, request_id);
}
/* Check for valid status after each drain */
@@ -1402,26 +1401,6 @@ static void twa_load_sgl(TW_Device_Exten
}
} /* End twa_load_sgl() */
-/* This function will perform a pci-dma mapping for a scatter gather list */
-static int twa_map_scsi_sg_data(TW_Device_Extension *tw_dev, int request_id)
-{
- int use_sg;
- struct scsi_cmnd *cmd = tw_dev->srb[request_id];
-
- use_sg = scsi_dma_map(cmd);
- if (!use_sg)
- return 0;
- else if (use_sg < 0) {
- TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1c, "Failed to map scatter gather list");
- return 0;
- }
-
- cmd->SCp.phase = TW_PHASE_SGLIST;
- cmd->SCp.have_data_in = use_sg;
-
- return use_sg;
-} /* End twa_map_scsi_sg_data() */
-
/* This function will poll for a response interrupt of a request */
static int twa_poll_response(TW_Device_Extension *tw_dev, int request_id, int seconds)
{
@@ -1600,9 +1579,11 @@ static int twa_reset_device_extension(TW
(tw_dev->state[i] != TW_S_INITIAL) &&
(tw_dev->state[i] != TW_S_COMPLETED)) {
if (tw_dev->srb[i]) {
- tw_dev->srb[i]->result = (DID_RESET << 16);
- tw_dev->srb[i]->scsi_done(tw_dev->srb[i]);
- twa_unmap_scsi_data(tw_dev, i);
+ struct scsi_cmnd *cmd = tw_dev->srb[i];
+
+ cmd->result = (DID_RESET << 16);
+ scsi_dma_unmap(cmd);
+ cmd->scsi_done(cmd);
}
}
}
@@ -1781,21 +1762,18 @@ static int twa_scsi_queue_lck(struct scs
/* Save the scsi command for use by the ISR */
tw_dev->srb[request_id] = SCpnt;
- /* Initialize phase to zero */
- SCpnt->SCp.phase = TW_PHASE_INITIAL;
-
retval = twa_scsiop_execute_scsi(tw_dev, request_id, NULL, 0, NULL);
switch (retval) {
case SCSI_MLQUEUE_HOST_BUSY:
+ scsi_dma_unmap(SCpnt);
twa_free_request_id(tw_dev, request_id);
- twa_unmap_scsi_data(tw_dev, request_id);
break;
case 1:
- tw_dev->state[request_id] = TW_S_COMPLETED;
- twa_free_request_id(tw_dev, request_id);
- twa_unmap_scsi_data(tw_dev, request_id);
SCpnt->result = (DID_ERROR << 16);
+ scsi_dma_unmap(SCpnt);
done(SCpnt);
+ tw_dev->state[request_id] = TW_S_COMPLETED;
+ twa_free_request_id(tw_dev, request_id);
retval = 0;
}
out:
@@ -1863,8 +1841,8 @@ static int twa_scsiop_execute_scsi(TW_De
command_packet->sg_list[0].address = TW_CPU_TO_SGL(tw_dev->generic_buffer_phys[request_id]);
command_packet->sg_list[0].length = cpu_to_le32(TW_MIN_SGL_LENGTH);
} else {
- sg_count = twa_map_scsi_sg_data(tw_dev, request_id);
- if (sg_count == 0)
+ sg_count = scsi_dma_map(srb);
+ if (sg_count < 0)
goto out;
scsi_for_each_sg(srb, sg, sg_count, i) {
@@ -1979,15 +1957,6 @@ static char *twa_string_lookup(twa_messa
return(table[index].text);
} /* End twa_string_lookup() */
-/* This function will perform a pci-dma unmap */
-static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id)
-{
- struct scsi_cmnd *cmd = tw_dev->srb[request_id];
-
- if (cmd->SCp.phase == TW_PHASE_SGLIST)
- scsi_dma_unmap(cmd);
-} /* End twa_unmap_scsi_data() */
-
/* This function gets called when a disk is coming on-line */
static int twa_slave_configure(struct scsi_device *sdev)
{
--- a/drivers/scsi/3w-9xxx.h
+++ b/drivers/scsi/3w-9xxx.h
@@ -324,11 +324,6 @@ static twa_message_type twa_error_table[
#define TW_CURRENT_DRIVER_BUILD 0
#define TW_CURRENT_DRIVER_BRANCH 0
-/* Phase defines */
-#define TW_PHASE_INITIAL 0
-#define TW_PHASE_SINGLE 1
-#define TW_PHASE_SGLIST 2
-
/* Misc defines */
#define TW_9550SX_DRAIN_COMPLETED 0xFFFF
#define TW_SECTOR_SIZE 512
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 59/72] 3w-sas: fix command completion race
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (54 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 58/72] 3w-9xxx: " Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 60/72] drm/radeon: fix ordering of AVI packet setup Greg Kroah-Hartman
` (10 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Torsten Luettgert,
Bernd Kardatzki, Adam Radford, James Bottomley
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@lst.de>
commit 579d69bc1fd56d5af5761969aa529d1d1c188300 upstream.
The 3w-sas driver needs to tear down the dma mappings before returning
the command to the midlayer, as there is no guarantee the sglist and
count are valid after that point. Also remove the dma mapping helpers
which have another inherent race due to the request_id index.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Torsten Luettgert <ml-lkml@enda.eu>
Tested-by: Bernd Kardatzki <Bernd.Kardatzki@med.uni-tuebingen.de>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/3w-sas.c | 50 ++++++++++----------------------------------------
drivers/scsi/3w-sas.h | 4 ----
2 files changed, 10 insertions(+), 44 deletions(-)
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -290,26 +290,6 @@ static int twl_post_command_packet(TW_De
return 0;
} /* End twl_post_command_packet() */
-/* This function will perform a pci-dma mapping for a scatter gather list */
-static int twl_map_scsi_sg_data(TW_Device_Extension *tw_dev, int request_id)
-{
- int use_sg;
- struct scsi_cmnd *cmd = tw_dev->srb[request_id];
-
- use_sg = scsi_dma_map(cmd);
- if (!use_sg)
- return 0;
- else if (use_sg < 0) {
- TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1, "Failed to map scatter gather list");
- return 0;
- }
-
- cmd->SCp.phase = TW_PHASE_SGLIST;
- cmd->SCp.have_data_in = use_sg;
-
- return use_sg;
-} /* End twl_map_scsi_sg_data() */
-
/* This function hands scsi cdb's to the firmware */
static int twl_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry_ISO *sglistarg)
{
@@ -357,8 +337,8 @@ static int twl_scsiop_execute_scsi(TW_De
if (!sglistarg) {
/* Map sglist from scsi layer to cmd packet */
if (scsi_sg_count(srb)) {
- sg_count = twl_map_scsi_sg_data(tw_dev, request_id);
- if (sg_count == 0)
+ sg_count = scsi_dma_map(srb);
+ if (sg_count <= 0)
goto out;
scsi_for_each_sg(srb, sg, sg_count, i) {
@@ -1102,15 +1082,6 @@ out:
return retval;
} /* End twl_initialize_device_extension() */
-/* This function will perform a pci-dma unmap */
-static void twl_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id)
-{
- struct scsi_cmnd *cmd = tw_dev->srb[request_id];
-
- if (cmd->SCp.phase == TW_PHASE_SGLIST)
- scsi_dma_unmap(cmd);
-} /* End twl_unmap_scsi_data() */
-
/* This function will handle attention interrupts */
static int twl_handle_attention_interrupt(TW_Device_Extension *tw_dev)
{
@@ -1251,11 +1222,11 @@ static irqreturn_t twl_interrupt(int irq
}
/* Now complete the io */
+ scsi_dma_unmap(cmd);
+ cmd->scsi_done(cmd);
tw_dev->state[request_id] = TW_S_COMPLETED;
twl_free_request_id(tw_dev, request_id);
tw_dev->posted_request_count--;
- tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
- twl_unmap_scsi_data(tw_dev, request_id);
}
/* Check for another response interrupt */
@@ -1400,10 +1371,12 @@ static int twl_reset_device_extension(TW
if ((tw_dev->state[i] != TW_S_FINISHED) &&
(tw_dev->state[i] != TW_S_INITIAL) &&
(tw_dev->state[i] != TW_S_COMPLETED)) {
- if (tw_dev->srb[i]) {
- tw_dev->srb[i]->result = (DID_RESET << 16);
- tw_dev->srb[i]->scsi_done(tw_dev->srb[i]);
- twl_unmap_scsi_data(tw_dev, i);
+ struct scsi_cmnd *cmd = tw_dev->srb[i];
+
+ if (cmd) {
+ cmd->result = (DID_RESET << 16);
+ scsi_dma_unmap(cmd);
+ cmd->scsi_done(cmd);
}
}
}
@@ -1507,9 +1480,6 @@ static int twl_scsi_queue_lck(struct scs
/* Save the scsi command for use by the ISR */
tw_dev->srb[request_id] = SCpnt;
- /* Initialize phase to zero */
- SCpnt->SCp.phase = TW_PHASE_INITIAL;
-
retval = twl_scsiop_execute_scsi(tw_dev, request_id, NULL, 0, NULL);
if (retval) {
tw_dev->state[request_id] = TW_S_COMPLETED;
--- a/drivers/scsi/3w-sas.h
+++ b/drivers/scsi/3w-sas.h
@@ -103,10 +103,6 @@ static char *twl_aen_severity_table[] =
#define TW_CURRENT_DRIVER_BUILD 0
#define TW_CURRENT_DRIVER_BRANCH 0
-/* Phase defines */
-#define TW_PHASE_INITIAL 0
-#define TW_PHASE_SGLIST 2
-
/* Misc defines */
#define TW_SECTOR_SIZE 512
#define TW_MAX_UNITS 32
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 60/72] drm/radeon: fix ordering of AVI packet setup
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (55 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 59/72] 3w-sas: " Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 61/72] drm/radeon: drop dce6_dp_enable Greg Kroah-Hartman
` (9 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 304f07e9c8d302cf3183248cbabb40598eb5b732 upstream.
Set the line first, then enable the stream. May fix
pink line problems on some displays.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/evergreen_hdmi.c | 12 ++++++------
drivers/gpu/drm/radeon/r600_hdmi.c | 9 +++++----
2 files changed, 11 insertions(+), 10 deletions(-)
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -219,13 +219,13 @@ void evergreen_set_avi_packet(struct rad
WREG32(AFMT_AVI_INFO3 + offset,
frame[0xC] | (frame[0xD] << 8) | (buffer[1] << 24));
- WREG32_OR(HDMI_INFOFRAME_CONTROL0 + offset,
- HDMI_AVI_INFO_SEND | /* enable AVI info frames */
- HDMI_AVI_INFO_CONT); /* required for audio info values to be updated */
-
WREG32_P(HDMI_INFOFRAME_CONTROL1 + offset,
- HDMI_AVI_INFO_LINE(2), /* anything other than 0 */
- ~HDMI_AVI_INFO_LINE_MASK);
+ HDMI_AVI_INFO_LINE(2), /* anything other than 0 */
+ ~HDMI_AVI_INFO_LINE_MASK);
+
+ WREG32_OR(HDMI_INFOFRAME_CONTROL0 + offset,
+ HDMI_AVI_INFO_SEND | /* enable AVI info frames */
+ HDMI_AVI_INFO_CONT); /* required for audio info values to be updated */
}
void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
--- a/drivers/gpu/drm/radeon/r600_hdmi.c
+++ b/drivers/gpu/drm/radeon/r600_hdmi.c
@@ -228,12 +228,13 @@ void r600_set_avi_packet(struct radeon_d
WREG32(HDMI0_AVI_INFO3 + offset,
frame[0xC] | (frame[0xD] << 8) | (buffer[1] << 24));
+ WREG32_OR(HDMI0_INFOFRAME_CONTROL1 + offset,
+ HDMI0_AVI_INFO_LINE(2)); /* anything other than 0 */
+
WREG32_OR(HDMI0_INFOFRAME_CONTROL0 + offset,
- HDMI0_AVI_INFO_SEND | /* enable AVI info frames */
- HDMI0_AVI_INFO_CONT); /* send AVI info frames every frame/field */
+ HDMI0_AVI_INFO_SEND | /* enable AVI info frames */
+ HDMI0_AVI_INFO_CONT); /* send AVI info frames every frame/field */
- WREG32_OR(HDMI0_INFOFRAME_CONTROL1 + offset,
- HDMI0_AVI_INFO_LINE(2)); /* anything other than 0 */
}
/*
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 61/72] drm/radeon: drop dce6_dp_enable
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (56 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 60/72] drm/radeon: fix ordering of AVI packet setup Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 62/72] drm/radeon/audio: dont enable packets until the end Greg Kroah-Hartman
` (8 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 12428327bbd1180b5d8ef83fdf9482b878d0502a upstream.
It's mostly duplicated with evergreen_dp_enable. This
is a prerequisite for fix implemented in another patch.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/dce6_afmt.c | 25 -------------------------
drivers/gpu/drm/radeon/evergreen_hdmi.c | 2 +-
drivers/gpu/drm/radeon/radeon_audio.c | 3 +--
3 files changed, 2 insertions(+), 28 deletions(-)
--- a/drivers/gpu/drm/radeon/dce6_afmt.c
+++ b/drivers/gpu/drm/radeon/dce6_afmt.c
@@ -295,28 +295,3 @@ void dce6_dp_audio_set_dto(struct radeon
WREG32(DCCG_AUDIO_DTO1_MODULE, clock);
}
}
-
-void dce6_dp_enable(struct drm_encoder *encoder, bool enable)
-{
- struct drm_device *dev = encoder->dev;
- struct radeon_device *rdev = dev->dev_private;
- struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
- struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
-
- if (!dig || !dig->afmt)
- return;
-
- if (enable) {
- WREG32(EVERGREEN_DP_SEC_TIMESTAMP + dig->afmt->offset,
- EVERGREEN_DP_SEC_TIMESTAMP_MODE(1));
- WREG32(EVERGREEN_DP_SEC_CNTL + dig->afmt->offset,
- EVERGREEN_DP_SEC_ASP_ENABLE | /* Audio packet transmission */
- EVERGREEN_DP_SEC_ATP_ENABLE | /* Audio timestamp packet transmission */
- EVERGREEN_DP_SEC_AIP_ENABLE | /* Audio infoframe packet transmission */
- EVERGREEN_DP_SEC_STREAM_ENABLE); /* Master enable for secondary stream engine */
- } else {
- WREG32(EVERGREEN_DP_SEC_CNTL + dig->afmt->offset, 0);
- }
-
- dig->afmt->enabled = enable;
-}
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -437,7 +437,7 @@ void evergreen_dp_enable(struct drm_enco
WREG32(EVERGREEN_DP_SEC_TIMESTAMP + dig->afmt->offset,
EVERGREEN_DP_SEC_TIMESTAMP_MODE(1));
- if (radeon_connector->con_priv) {
+ if (!ASIC_IS_DCE6(rdev) && radeon_connector->con_priv) {
dig_connector = radeon_connector->con_priv;
val = RREG32(EVERGREEN_DP_SEC_AUD_N + dig->afmt->offset);
val &= ~EVERGREEN_DP_SEC_N_BASE_MULTIPLE(0xf);
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -102,7 +102,6 @@ static void radeon_audio_dp_mode_set(str
void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable);
void evergreen_dp_enable(struct drm_encoder *encoder, bool enable);
-void dce6_dp_enable(struct drm_encoder *encoder, bool enable);
static const u32 pin_offsets[7] =
{
@@ -240,7 +239,7 @@ static struct radeon_audio_funcs dce6_dp
.set_avi_packet = evergreen_set_avi_packet,
.set_audio_packet = dce4_set_audio_packet,
.mode_set = radeon_audio_dp_mode_set,
- .dpms = dce6_dp_enable,
+ .dpms = evergreen_dp_enable,
};
static void radeon_audio_interface_init(struct radeon_device *rdev)
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 62/72] drm/radeon/audio: dont enable packets until the end
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (57 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 61/72] drm/radeon: drop dce6_dp_enable Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 63/72] drm/radeon: only mark audio as connected if the monitor supports it (v3) Greg Kroah-Hartman
` (7 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 362ff251390f3d1f8fe94666f4fc4e5876381114 upstream.
Don't enable the audio and avi infoframes and audio stream
until all the state is set up.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/evergreen_hdmi.c | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -222,10 +222,6 @@ void evergreen_set_avi_packet(struct rad
WREG32_P(HDMI_INFOFRAME_CONTROL1 + offset,
HDMI_AVI_INFO_LINE(2), /* anything other than 0 */
~HDMI_AVI_INFO_LINE_MASK);
-
- WREG32_OR(HDMI_INFOFRAME_CONTROL0 + offset,
- HDMI_AVI_INFO_SEND | /* enable AVI info frames */
- HDMI_AVI_INFO_CONT); /* required for audio info values to be updated */
}
void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
@@ -370,9 +366,13 @@ void dce4_set_audio_packet(struct drm_en
WREG32(AFMT_AUDIO_PACKET_CONTROL2 + offset,
AFMT_AUDIO_CHANNEL_ENABLE(0xff));
+ WREG32(HDMI_AUDIO_PACKET_CONTROL + offset,
+ HDMI_AUDIO_DELAY_EN(1) | /* set the default audio delay */
+ HDMI_AUDIO_PACKETS_PER_LINE(3)); /* should be suffient for all audio modes and small enough for all hblanks */
+
/* allow 60958 channel status and send audio packets fields to be updated */
- WREG32(AFMT_AUDIO_PACKET_CONTROL + offset,
- AFMT_AUDIO_SAMPLE_SEND | AFMT_RESET_FIFO_WHEN_AUDIO_DIS | AFMT_60958_CS_UPDATE);
+ WREG32_OR(AFMT_AUDIO_PACKET_CONTROL + offset,
+ AFMT_RESET_FIFO_WHEN_AUDIO_DIS | AFMT_60958_CS_UPDATE);
}
@@ -398,17 +398,16 @@ void evergreen_hdmi_enable(struct drm_en
return;
if (enable) {
- WREG32(HDMI_INFOFRAME_CONTROL1 + dig->afmt->offset,
- HDMI_AUDIO_INFO_LINE(2)); /* anything other than 0 */
-
- WREG32(HDMI_AUDIO_PACKET_CONTROL + dig->afmt->offset,
- HDMI_AUDIO_DELAY_EN(1) | /* set the default audio delay */
- HDMI_AUDIO_PACKETS_PER_LINE(3)); /* should be suffient for all audio modes and small enough for all hblanks */
-
WREG32(HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset,
+ HDMI_AVI_INFO_SEND | /* enable AVI info frames */
+ HDMI_AVI_INFO_CONT | /* required for audio info values to be updated */
HDMI_AUDIO_INFO_SEND | /* enable audio info frames (frames won't be set until audio is enabled) */
HDMI_AUDIO_INFO_CONT); /* required for audio info values to be updated */
+ WREG32_OR(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
+ AFMT_AUDIO_SAMPLE_SEND);
} else {
+ WREG32_AND(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
+ ~AFMT_AUDIO_SAMPLE_SEND);
WREG32(HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset, 0);
}
@@ -434,6 +433,9 @@ void evergreen_dp_enable(struct drm_enco
struct radeon_connector_atom_dig *dig_connector;
uint32_t val;
+ WREG32_OR(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
+ AFMT_AUDIO_SAMPLE_SEND);
+
WREG32(EVERGREEN_DP_SEC_TIMESTAMP + dig->afmt->offset,
EVERGREEN_DP_SEC_TIMESTAMP_MODE(1));
@@ -457,6 +459,8 @@ void evergreen_dp_enable(struct drm_enco
EVERGREEN_DP_SEC_STREAM_ENABLE); /* Master enable for secondary stream engine */
} else {
WREG32(EVERGREEN_DP_SEC_CNTL + dig->afmt->offset, 0);
+ WREG32_AND(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
+ ~AFMT_AUDIO_SAMPLE_SEND);
}
dig->afmt->enabled = enable;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 63/72] drm/radeon: only mark audio as connected if the monitor supports it (v3)
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (58 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 62/72] drm/radeon/audio: dont enable packets until the end Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 64/72] drm/radeon: only enable audio streams if the monitor supports it Greg Kroah-Hartman
` (6 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 0f55db36d49d45b80eff0c0a2a498766016f458b upstream.
Otherwise the driver may try and send audio which may confuse the
monitor.
v2: set pin to NULL if no audio
v3: avoid crash with analog encoders
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/radeon_audio.c | 27 +++++++++++++++------------
drivers/gpu/drm/radeon/radeon_connectors.c | 8 ++++++--
2 files changed, 21 insertions(+), 14 deletions(-)
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -460,30 +460,33 @@ void radeon_audio_detect(struct drm_conn
if (!connector || !connector->encoder)
return;
+ if (!radeon_encoder_is_digital(connector->encoder))
+ return;
+
rdev = connector->encoder->dev->dev_private;
radeon_encoder = to_radeon_encoder(connector->encoder);
dig = radeon_encoder->enc_priv;
- if (status == connector_status_connected) {
- struct radeon_connector *radeon_connector;
- int sink_type;
-
- if (!drm_detect_monitor_audio(radeon_connector_edid(connector))) {
- radeon_encoder->audio = NULL;
- return;
- }
+ if (!dig->afmt)
+ return;
- radeon_connector = to_radeon_connector(connector);
- sink_type = radeon_dp_getsinktype(radeon_connector);
+ if (status == connector_status_connected) {
+ struct radeon_connector *radeon_connector = to_radeon_connector(connector);
if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
- sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT)
+ radeon_dp_getsinktype(radeon_connector) ==
+ CONNECTOR_OBJECT_ID_DISPLAYPORT)
radeon_encoder->audio = rdev->audio.dp_funcs;
else
radeon_encoder->audio = rdev->audio.hdmi_funcs;
dig->afmt->pin = radeon_audio_get_pin(connector->encoder);
- radeon_audio_enable(rdev, dig->afmt->pin, 0xf);
+ if (drm_detect_monitor_audio(radeon_connector_edid(connector))) {
+ radeon_audio_enable(rdev, dig->afmt->pin, 0xf);
+ } else {
+ radeon_audio_enable(rdev, dig->afmt->pin, 0);
+ dig->afmt->pin = NULL;
+ }
} else {
radeon_audio_enable(rdev, dig->afmt->pin, 0);
dig->afmt->pin = NULL;
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1333,8 +1333,10 @@ out:
/* updated in get modes as well since we need to know if it's analog or digital */
radeon_connector_update_scratch_regs(connector, ret);
- if (radeon_audio != 0)
+ if (radeon_audio != 0) {
+ radeon_connector_get_edid(connector);
radeon_audio_detect(connector, ret);
+ }
exit:
pm_runtime_mark_last_busy(connector->dev->dev);
@@ -1659,8 +1661,10 @@ radeon_dp_detect(struct drm_connector *c
radeon_connector_update_scratch_regs(connector, ret);
- if (radeon_audio != 0)
+ if (radeon_audio != 0) {
+ radeon_connector_get_edid(connector);
radeon_audio_detect(connector, ret);
+ }
out:
pm_runtime_mark_last_busy(connector->dev->dev);
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 64/72] drm/radeon: only enable audio streams if the monitor supports it
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (59 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 63/72] drm/radeon: only mark audio as connected if the monitor supports it (v3) Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 66/72] drm/radeon: adjust pll when audio is not enabled Greg Kroah-Hartman
` (5 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 38aef1549b18539eaecd804383a6ccb6588a9ce1 upstream.
Selectively enable which packets we send based on monitor caps.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/atombios_encoders.c | 6 ++----
drivers/gpu/drm/radeon/evergreen_hdmi.c | 27 +++++++++++++++++++--------
2 files changed, 21 insertions(+), 12 deletions(-)
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -1729,17 +1729,15 @@ radeon_atom_encoder_dpms(struct drm_enco
struct drm_device *dev = encoder->dev;
struct radeon_device *rdev = dev->dev_private;
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
- struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
int encoder_mode = atombios_get_encoder_mode(encoder);
DRM_DEBUG_KMS("encoder dpms %d to mode %d, devices %08x, active_devices %08x\n",
radeon_encoder->encoder_id, mode, radeon_encoder->devices,
radeon_encoder->active_device);
- if (connector && (radeon_audio != 0) &&
+ if ((radeon_audio != 0) &&
((encoder_mode == ATOM_ENCODER_MODE_HDMI) ||
- (ENCODER_MODE_IS_DP(encoder_mode) &&
- drm_detect_monitor_audio(radeon_connector_edid(connector)))))
+ ENCODER_MODE_IS_DP(encoder_mode)))
radeon_audio_dpms(encoder, mode);
switch (radeon_encoder->encoder_id) {
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -398,13 +398,23 @@ void evergreen_hdmi_enable(struct drm_en
return;
if (enable) {
- WREG32(HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset,
- HDMI_AVI_INFO_SEND | /* enable AVI info frames */
- HDMI_AVI_INFO_CONT | /* required for audio info values to be updated */
- HDMI_AUDIO_INFO_SEND | /* enable audio info frames (frames won't be set until audio is enabled) */
- HDMI_AUDIO_INFO_CONT); /* required for audio info values to be updated */
- WREG32_OR(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
- AFMT_AUDIO_SAMPLE_SEND);
+ struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
+
+ if (drm_detect_monitor_audio(radeon_connector_edid(connector))) {
+ WREG32(HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset,
+ HDMI_AVI_INFO_SEND | /* enable AVI info frames */
+ HDMI_AVI_INFO_CONT | /* required for audio info values to be updated */
+ HDMI_AUDIO_INFO_SEND | /* enable audio info frames (frames won't be set until audio is enabled) */
+ HDMI_AUDIO_INFO_CONT); /* required for audio info values to be updated */
+ WREG32_OR(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
+ AFMT_AUDIO_SAMPLE_SEND);
+ } else {
+ WREG32(HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset,
+ HDMI_AVI_INFO_SEND | /* enable AVI info frames */
+ HDMI_AVI_INFO_CONT); /* required for audio info values to be updated */
+ WREG32_AND(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
+ ~AFMT_AUDIO_SAMPLE_SEND);
+ }
} else {
WREG32_AND(AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset,
~AFMT_AUDIO_SAMPLE_SEND);
@@ -423,11 +433,12 @@ void evergreen_dp_enable(struct drm_enco
struct radeon_device *rdev = dev->dev_private;
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
+ struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
if (!dig || !dig->afmt)
return;
- if (enable) {
+ if (enable && drm_detect_monitor_audio(radeon_connector_edid(connector))) {
struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
struct radeon_connector_atom_dig *dig_connector;
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 66/72] drm/radeon: adjust pll when audio is not enabled
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (60 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 64/72] drm/radeon: only enable audio streams if the monitor supports it Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 67/72] drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5 Greg Kroah-Hartman
` (4 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 7fe04d6fa824ccea704535a597dc417c8687f990 upstream.
Fixes display problems with some monitors when audio
is not enabled.
Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=89505
https://bugzilla.kernel.org/show_bug.cgi?id=94171
Plus several reports on IRC.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/atombios_crtc.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -580,6 +580,9 @@ static u32 atombios_adjust_pll(struct dr
else
radeon_crtc->pll_flags |= RADEON_PLL_PREFER_LOW_REF_DIV;
+ /* if there is no audio, set MINM_OVER_MAXP */
+ if (!drm_detect_monitor_audio(radeon_connector_edid(connector)))
+ radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
if (rdev->family < CHIP_RV770)
radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
/* use frac fb div on APUs */
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 67/72] drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (61 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 66/72] drm/radeon: adjust pll when audio is not enabled Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 71/72] hfsplus: dont store special "osx" xattr prefix on-disk Greg Kroah-Hartman
` (3 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit cd17e02ff4db58ec32d35cf331c705d295779930 upstream.
Seems to have problems with high mclks.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=76490
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/si_dpm.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -2924,6 +2924,7 @@ struct si_dpm_quirk {
static struct si_dpm_quirk si_dpm_quirk_list[] = {
/* PITCAIRN - https://bugs.freedesktop.org/show_bug.cgi?id=76490 */
{ PCI_VENDOR_ID_ATI, 0x6810, 0x1462, 0x3036, 0, 120000 },
+ { PCI_VENDOR_ID_ATI, 0x6811, 0x174b, 0xe271, 0, 120000 },
{ 0, 0, 0, 0 },
};
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 71/72] hfsplus: dont store special "osx" xattr prefix on-disk
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (62 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 67/72] drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5 Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 72/72] Drivers: hv: vmbus: Dont wait after requesting offers Greg Kroah-Hartman
` (2 subsequent siblings)
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Thomas Hebb, Hin-Tak Leung,
Sergei Antonov, Anton Altaparmakov, Fabian Frederick,
Christian Kujau, Christoph Hellwig, Al Viro, Viacheslav Dubeyko,
Andrew Morton, Linus Torvalds
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Hebb <tommyhebb@gmail.com>
commit db579e76f06e78de011b2cb7e028740a82f5558c upstream.
On Mac OS X, HFS+ extended attributes are not namespaced. Since we want
to be compatible with OS X filesystems and yet still support the Linux
namespacing system, the hfsplus driver implements a special "osx"
namespace that is reported for any attribute that is not namespaced
on-disk. However, the current code for getting and setting these
unprefixed attributes is broken.
hfsplus_osx_setattr() and hfsplus_osx_getattr() are passed names that have
already had their "osx." prefixes stripped by the generic functions. The
functions first, quite correctly, check those names to make sure that they
aren't prefixed with a known namespace, which would allow namespace access
restrictions to be bypassed. However, the functions then prepend "osx."
to the name they're given before passing it on to hfsplus_getattr() and
hfsplus_setattr(). Not only does this cause the "osx." prefix to be
stored on-disk, defeating its purpose, it also breaks the check for the
special "com.apple.FinderInfo" attribute, which is reported for all files,
and as a consequence makes some userspace applications (e.g. GNU patch)
fail even when extended attributes are not otherwise in use.
There are five commits which have touched this particular code:
127e5f5ae51e ("hfsplus: rework functionality of getting, setting and deleting of extended attributes")
b168fff72109 ("hfsplus: use xattr handlers for removexattr")
bf29e886b242 ("hfsplus: correct usage of HFSPLUS_ATTR_MAX_STRLEN for non-English attributes")
fcacbd95e121 ("fs/hfsplus: move xattr_name allocation in hfsplus_getxattr()")
ec1bbd346f18 ("fs/hfsplus: move xattr_name allocation in hfsplus_setxattr()")
The first commit creates the functions to begin with. The namespace is
prepended by the original code, which I believe was correct at the time,
since hfsplus_?etattr() stripped the prefix if found. The second commit
removes this behavior from hfsplus_?etattr() and appears to have been
intended to also remove the prefixing from hfsplus_osx_?etattr().
However, what it actually does is remove a necessary strncpy() call
completely, breaking the osx namespace entirely. The third commit re-adds
the strncpy() call as it was originally, but doesn't mention it in its
commit message. The final two commits refactor the code and don't affect
its functionality.
This commit does what b168fff attempted to do (prevent the prefix from
being added), but does it properly, instead of passing in an empty buffer
(which is what b168fff actually did).
Fixes: b168fff72109 ("hfsplus: use xattr handlers for removexattr")
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Sergei Antonov <saproj@gmail.com>
Cc: Anton Altaparmakov <anton@tuxera.com>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/hfsplus/xattr.c | 42 ++++++++++++++++--------------------------
1 file changed, 16 insertions(+), 26 deletions(-)
--- a/fs/hfsplus/xattr.c
+++ b/fs/hfsplus/xattr.c
@@ -806,9 +806,6 @@ end_removexattr:
static int hfsplus_osx_getxattr(struct dentry *dentry, const char *name,
void *buffer, size_t size, int type)
{
- char *xattr_name;
- int res;
-
if (!strcmp(name, ""))
return -EINVAL;
@@ -818,24 +815,19 @@ static int hfsplus_osx_getxattr(struct d
*/
if (is_known_namespace(name))
return -EOPNOTSUPP;
- xattr_name = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN
- + XATTR_MAC_OSX_PREFIX_LEN + 1, GFP_KERNEL);
- if (!xattr_name)
- return -ENOMEM;
- strcpy(xattr_name, XATTR_MAC_OSX_PREFIX);
- strcpy(xattr_name + XATTR_MAC_OSX_PREFIX_LEN, name);
-
- res = hfsplus_getxattr(dentry, xattr_name, buffer, size);
- kfree(xattr_name);
- return res;
+
+ /*
+ * osx is the namespace we use to indicate an unprefixed
+ * attribute on the filesystem (like the ones that OS X
+ * creates), so we pass the name through unmodified (after
+ * ensuring it doesn't conflict with another namespace).
+ */
+ return hfsplus_getxattr(dentry, name, buffer, size);
}
static int hfsplus_osx_setxattr(struct dentry *dentry, const char *name,
const void *buffer, size_t size, int flags, int type)
{
- char *xattr_name;
- int res;
-
if (!strcmp(name, ""))
return -EINVAL;
@@ -845,16 +837,14 @@ static int hfsplus_osx_setxattr(struct d
*/
if (is_known_namespace(name))
return -EOPNOTSUPP;
- xattr_name = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN
- + XATTR_MAC_OSX_PREFIX_LEN + 1, GFP_KERNEL);
- if (!xattr_name)
- return -ENOMEM;
- strcpy(xattr_name, XATTR_MAC_OSX_PREFIX);
- strcpy(xattr_name + XATTR_MAC_OSX_PREFIX_LEN, name);
-
- res = hfsplus_setxattr(dentry, xattr_name, buffer, size, flags);
- kfree(xattr_name);
- return res;
+
+ /*
+ * osx is the namespace we use to indicate an unprefixed
+ * attribute on the filesystem (like the ones that OS X
+ * creates), so we pass the name through unmodified (after
+ * ensuring it doesn't conflict with another namespace).
+ */
+ return hfsplus_setxattr(dentry, name, buffer, size, flags);
}
static size_t hfsplus_osx_listxattr(struct dentry *dentry, char *list,
^ permalink raw reply [flat|nested] 70+ messages in thread
* [PATCH 4.0 72/72] Drivers: hv: vmbus: Dont wait after requesting offers
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (63 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 71/72] hfsplus: dont store special "osx" xattr prefix on-disk Greg Kroah-Hartman
@ 2015-05-11 17:55 ` Greg Kroah-Hartman
2015-05-11 20:14 ` [PATCH 4.0 00/72] 4.0.3-stable review Guenter Roeck
2015-05-11 23:40 ` Shuah Khan
66 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 17:55 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, K. Y. Srinivasan
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: "K. Y. Srinivasan" <kys@microsoft.com>
commit 73cffdb65e679b98893f484063462c045adcf212 upstream.
Don't wait after sending request for offers to the host. This wait is
unnecessary and simply adds 5 seconds to the boot time.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hv/channel_mgmt.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -787,7 +787,7 @@ int vmbus_request_offers(void)
{
struct vmbus_channel_message_header *msg;
struct vmbus_channel_msginfo *msginfo;
- int ret, t;
+ int ret;
msginfo = kmalloc(sizeof(*msginfo) +
sizeof(struct vmbus_channel_message_header),
@@ -795,8 +795,6 @@ int vmbus_request_offers(void)
if (!msginfo)
return -ENOMEM;
- init_completion(&msginfo->waitevent);
-
msg = (struct vmbus_channel_message_header *)msginfo->msg;
msg->msgtype = CHANNELMSG_REQUESTOFFERS;
@@ -810,14 +808,6 @@ int vmbus_request_offers(void)
goto cleanup;
}
- t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ);
- if (t == 0) {
- ret = -ETIMEDOUT;
- goto cleanup;
- }
-
-
-
cleanup:
kfree(msginfo);
^ permalink raw reply [flat|nested] 70+ messages in thread
* Re: [PATCH 4.0 00/72] 4.0.3-stable review
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (64 preceding siblings ...)
2015-05-11 17:55 ` [PATCH 4.0 72/72] Drivers: hv: vmbus: Dont wait after requesting offers Greg Kroah-Hartman
@ 2015-05-11 20:14 ` Guenter Roeck
2015-05-11 20:16 ` Greg Kroah-Hartman
2015-05-11 23:40 ` Shuah Khan
66 siblings, 1 reply; 70+ messages in thread
From: Guenter Roeck @ 2015-05-11 20:14 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, torvalds, akpm, shuah.kh, stable
On Mon, May 11, 2015 at 10:54:06AM -0700, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.0.3 release.
> There are 72 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 Wed May 13 17:54:19 UTC 2015.
> Anything received after that time might be too late.
>
Build results:
total: 125 pass: 125 fail: 0
Qemu test results:
total: 30 pass: 30 fail: 0
Details are available at http://server.roeck-us.net:8010/builders.
Guenter
^ permalink raw reply [flat|nested] 70+ messages in thread
* Re: [PATCH 4.0 00/72] 4.0.3-stable review
2015-05-11 20:14 ` [PATCH 4.0 00/72] 4.0.3-stable review Guenter Roeck
@ 2015-05-11 20:16 ` Greg Kroah-Hartman
0 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-11 20:16 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-kernel, torvalds, akpm, shuah.kh, stable
On Mon, May 11, 2015 at 01:14:40PM -0700, Guenter Roeck wrote:
> On Mon, May 11, 2015 at 10:54:06AM -0700, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.0.3 release.
> > There are 72 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 Wed May 13 17:54:19 UTC 2015.
> > Anything received after that time might be too late.
> >
> Build results:
> total: 125 pass: 125 fail: 0
> Qemu test results:
> total: 30 pass: 30 fail: 0
>
> Details are available at http://server.roeck-us.net:8010/builders.
Great, thanks for letting me know about all 3 of these.
greg k-h
^ permalink raw reply [flat|nested] 70+ messages in thread
* Re: [PATCH 4.0 00/72] 4.0.3-stable review
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
` (65 preceding siblings ...)
2015-05-11 20:14 ` [PATCH 4.0 00/72] 4.0.3-stable review Guenter Roeck
@ 2015-05-11 23:40 ` Shuah Khan
2015-05-12 4:08 ` Greg Kroah-Hartman
66 siblings, 1 reply; 70+ messages in thread
From: Shuah Khan @ 2015-05-11 23:40 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, linux, shuah.kh, stable
On 05/11/2015 11:54 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.0.3 release.
> There are 72 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 Wed May 13 17:54:19 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.0.3-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 70+ messages in thread
* Re: [PATCH 4.0 00/72] 4.0.3-stable review
2015-05-11 23:40 ` Shuah Khan
@ 2015-05-12 4:08 ` Greg Kroah-Hartman
0 siblings, 0 replies; 70+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-12 4:08 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable
On Mon, May 11, 2015 at 05:40:28PM -0600, Shuah Khan wrote:
> On 05/11/2015 11:54 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.0.3 release.
> > There are 72 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 Wed May 13 17:54:19 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.0.3-rc1.gz
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
>
> Compiled and booted on my test system. No dmesg regressions.
Thanks for testing all 3 of these and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 70+ messages in thread
end of thread, other threads:[~2015-05-12 4:08 UTC | newest]
Thread overview: 70+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 17:54 [PATCH 4.0 00/72] 4.0.3-stable review Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 01/72] bpf: fix 64-bit divide Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 02/72] route: Use ipv4_mtu instead of raw rt_pmtu Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 03/72] mlx4: Fix tx ring affinity_mask creation Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 04/72] cxgb4: Fix MC1 memory offset calculation Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 05/72] net/mlx4_en: Schedule napi when RX buffers allocation fails Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 06/72] ipv4: Missing sk_nulls_node_init() in ping_unhash() Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 07/72] MIPS: BCM63xx: Move bcm63xx_gpio_init() to bcm63xx_register_devices() Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 08/72] MIPS: OCTEON: dma-octeon: fix OHCI USB config check Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 09/72] MIPS: OCTEON: Use correct CSR to soft reset Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 10/72] Revert "MIPS: Remove race window in page fault handling" Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 11/72] MIPS: Fix race condition in lazy cache flushing Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 12/72] MIPS: Octeon: Remove udelay() causing huge IRQ latency Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 13/72] MIPS: OCTEON: fix PCI interrupt mapping for D-Link DSR-1000N Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 14/72] MIPS: Netlogic: Fix for SATA PHY init Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 15/72] MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 16/72] MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 17/72] MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 18/72] MIPS: kernel: entry.S: Set correct ISA level for mips_ihb Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 19/72] MIPS: Fix cpu_has_mips_r2_exec_hazard Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 20/72] MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 21/72] Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores." Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 22/72] SSB: fix Kconfig dependencies Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 23/72] MIPS: ralink: Fix bad config symbol in PCI makefile Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 24/72] MIPS: ralink: add missing symbol for RALINK_ILL_ACC Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 25/72] MIPS: smp-cps: cpu_set FPU mask if FPU present Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 26/72] MIPS: Kconfig: Disable SMP/CPS for 64-bit Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 28/72] MIPS: asm: elf: Set O32 default FPU flags Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 29/72] MIPS: Makefile: Fix MIPS ASE detection code Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 30/72] ALSA: emux: Fix mutex deadlock at unloading Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 31/72] ALSA: emux: Fix mutex deadlock in OSS emulation Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 32/72] ALSA: emu10k1: Fix card shortname string buffer overflow Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 33/72] ALSA: emu10k1: Emu10k2 32 bit DMA mode Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 36/72] cdc-acm: prevent infinite loop when parsing CDC headers Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 37/72] serial: of-serial: Remove device_type = "serial" registration Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 38/72] serial: xilinx: Use platform_get_irq to get irq description structure Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 39/72] arm64: dma-mapping: always clear allocated buffers Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 40/72] arm64: add missing PAGE_ALIGN() to __dma_free() Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 41/72] usb: chipidea: otg: remove mutex unlock and lock while stop and start role Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 42/72] ASoC: samsung: s3c24xx-i2s: Fix return value check in s3c24xx_iis_dev_probe() Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 43/72] ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe() Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 44/72] ASoC: rt5677: add register patch for PLL Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 45/72] ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 46/72] ASoC: rt5677: fixed wrong DMIC ref clock Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 47/72] btrfs: unlock i_mutex after attempting to delete subvolume during send Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 48/72] ACPI / SBS: Enable battery manager when present Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 49/72] tty/serial: at91: maxburst was missing for dma transfers Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 50/72] rbd: end I/O the entire obj_request on error Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 51/72] uas: Allow uas_use_uas_driver to return usb-storage flags Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 52/72] uas: Add US_FL_MAX_SECTORS_240 flag Greg Kroah-Hartman
2015-05-11 17:54 ` [PATCH 4.0 53/72] uas: Set max_sectors_240 quirk for ASM1053 devices Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 54/72] ext4: fix data corruption caused by unwritten and delayed extents Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 55/72] ext4: move check under lock scope to close a race Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 56/72] SCSI: add 1024 max sectors black list flag Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 57/72] 3w-xxxx: fix command completion race Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 58/72] 3w-9xxx: " Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 59/72] 3w-sas: " Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 60/72] drm/radeon: fix ordering of AVI packet setup Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 61/72] drm/radeon: drop dce6_dp_enable Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 62/72] drm/radeon/audio: dont enable packets until the end Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 63/72] drm/radeon: only mark audio as connected if the monitor supports it (v3) Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 64/72] drm/radeon: only enable audio streams if the monitor supports it Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 66/72] drm/radeon: adjust pll when audio is not enabled Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 67/72] drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5 Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 71/72] hfsplus: dont store special "osx" xattr prefix on-disk Greg Kroah-Hartman
2015-05-11 17:55 ` [PATCH 4.0 72/72] Drivers: hv: vmbus: Dont wait after requesting offers Greg Kroah-Hartman
2015-05-11 20:14 ` [PATCH 4.0 00/72] 4.0.3-stable review Guenter Roeck
2015-05-11 20:16 ` Greg Kroah-Hartman
2015-05-11 23:40 ` Shuah Khan
2015-05-12 4:08 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).