4.14.168-stable review
Subsystems (9)
Greg Kroah-Hartman
maintainerPATCH 1/343 xfs: Sanity check flags of Q_XQUOTARM call
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
commit 3dd4d40b420846dd35869ccc8f8627feef2cff32 upstream.
Flags passed to Q_XQUOTARM were not sanity checked for invalid values. Fix that.
--- fs/xfs/xfs_quotaops.c | 3 +++ 1 file changed, 3 insertions(+)
fs/xfs/xfs_quotaops.c +3 -0
@@ -214,6 +214,9 @@ xfs_fs_rm_xquota(if (XFS_IS_QUOTA_ON (mp))return -EINVAL ; +if (uflags & ~(FS_USER_QUOTA |FS_GROUP_QUOTA |FS_PROJ_QUOTA )) +return -EINVAL ; +if (uflags &FS_USER_QUOTA ) flags |=XFS_DQ_USER ;if (uflags &FS_GROUP_QUOTA )
Greg Kroah-Hartman
maintainerPATCH 2/343 mfd: intel-lpss: Add default I2C device properties for Gemini Lake
In reply to Greg Kroah-HartmanFrom: Jarkko Nikula <[email protected]>
commit 3f31bc67e4dc6a555341dffefe328ddd58e8b431 upstream.
It turned out Intel Gemini Lake doesn't use the same I2C timing parameters as Broxton.
I got confirmation from the Windows team that Gemini Lake systems should use updated timing parameters that differ from those used in Broxton based systems.
--- drivers/mfd/intel-lpss-pci.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
drivers/mfd/intel-lpss-pci.c +20 -8
@@ -126,6 +126,18 @@ static const struct intel_lpss_platform_ .properties = apl_i2c_properties, }; +static struct property_entry glk_i2c_properties[] = { +PROPERTY_ENTRY_U32 ("i2c-sda-hold-time-ns" ,313 ), +PROPERTY_ENTRY_U32 ("i2c-sda-falling-time-ns" ,171 ), +PROPERTY_ENTRY_U32 ("i2c-scl-falling-time-ns" ,290 ), + { }, +}; + +static const struct intel_lpss_platform_info glk_i2c_info = { + .clk_rate =133000000 , + .properties = glk_i2c_properties, +}; +static const struct intel_lpss_platform_info cnl_i2c_info = { .clk_rate =216000000 , .properties = spt_i2c_properties,
@@ -165,14 +177,14 @@ static const struct pci_device_id intel_ { PCI_VDEVICE(INTEL, 0x1ac6), (kernel_ulong_t)&bxt_info }, { PCI_VDEVICE(INTEL, 0x1aee), (kernel_ulong_t)&bxt_uart_info },/* GLK */ - { PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&bxt_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&glk_i2c_info }, { PCI_VDEVICE(INTEL, 0x31bc), (kernel_ulong_t)&bxt_uart_info }, { PCI_VDEVICE(INTEL, 0x31be), (kernel_ulong_t)&bxt_uart_info }, { PCI_VDEVICE(INTEL, 0x31c0), (kernel_ulong_t)&bxt_uart_info },
Greg Kroah-Hartman
maintainerPATCH 3/343 powerpc/archrandom: fix arch_get_random_seed_int()
In reply to Greg Kroah-HartmanFrom: Ard Biesheuvel <[email protected]>
commit b6afd1234cf93aa0d71b4be4788c47534905f0be upstream.
Commit 01c9348c7620ec65
powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_*
updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to arch_get_random_seed_[int|long]() instead. However, it failed to take into account that arch_get_random_int() was implemented in terms of arch_get_random_long(), and so we ended up with a version of the former that is essentially a NOP as well.
Fix this by calling arch_get_random_seed_long() from arch_get_random_seed_int() instead.
--- arch/powerpc/include/asm/archrandom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/archrandom.h +1 -1
@@ -28,7 +28,7 @@ static inline int arch_get_random_seed_iunsigned long val;int rc; - rc =arch_get_random_long (&val); + rc =arch_get_random_seed_long (&val);if (rc) *v = val;
Greg Kroah-Hartman
maintainerPATCH 4/343 tipc: fix wrong timeout input for tipc_wait_for_cond()
In reply to Greg Kroah-HartmanFrom: Tung Nguyen <[email protected]>
commit 12db3c8083fcab4270866a88191933f2d9f24f89 upstream.
In function __tipc_shutdown(), the timeout value passed to tipc_wait_for_cond() is not jiffies.
This commit fixes it by converting that value from milliseconds to jiffies.
--- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/socket.c +1 -1
@@ -487,7 +487,7 @@ static void __tipc_shutdown(struct sockestruct sock *sk = sock->sk;struct tipc_sock *tsk =tipc_sk (sk);struct net *net =sock_net (sk); -long timeout =CONN_TIMEOUT_DEFAULT ; +long timeout =msecs_to_jiffies (CONN_TIMEOUT_DEFAULT );u32 dnode =tsk_peer_node (tsk);struct sk_buff *skb;
Greg Kroah-Hartman
maintainerPATCH 5/343 mt7601u: fix bbp version check in mt7601u_wait_bbp_ready
In reply to Greg Kroah-HartmanFrom: Lorenzo Bianconi <[email protected]>
commit 15e14f76f85f4f0eab3b8146e1cd3c58ce272823 upstream.
Fix bbp ready check in mt7601u_wait_bbp_ready. The issue is reported by coverity with the following error:
Logical vs. bitwise operator
The expression's value does not depend on the operands; inadvertent use of the wrong operator is a likely logic error.
Addresses-Coverity-ID: 1309441 ("Logical vs. bitwise operator")
--- drivers/net/wireless/mediatek/mt7601u/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt7601u/phy.c +1 -1
@@ -221,7 +221,7 @@ int mt7601u_wait_bbp_ready(struct mt7601do { val =mt7601u_bbp_rr (dev,MT_BBP_REG_VERSION ); -if (val && ~val) +if (val && val !=0xff )break ; }while (--i);
Greg Kroah-Hartman
maintainerPATCH 6/343 crypto: sun4i-ss - fix big endian issues
In reply to Greg Kroah-HartmanFrom: Corentin Labbe <[email protected]>
commit d1d787bcebfe122a5bd443ae565696661e2e9656 upstream.
When testing BigEndian kernel, the sun4i-ss was failling all crypto tests.
This patch fix endian issues with it.
--- drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
drivers/crypto/sunxi-ss/sun4i-ss-hash.c +11 -10
@@ -179,7 +179,7 @@ static int sun4i_hash(struct ahash_reque*/ unsigned int i =0 , end, fill, min_fill, nwait, nbw =0 , j =0 , todo;unsigned int in_i =0 ; -u32 spaces, rx_cnt =SS_RX_DEFAULT , bf[32 ] = {0 }, wb =0 , v, ivmode =0 ; +u32 spaces, rx_cnt =SS_RX_DEFAULT , bf[32 ] = {0 }, v, ivmode =0 ;struct sun4i_req_ctx *op =ahash_request_ctx (areq);struct crypto_ahash *tfm =crypto_ahash_reqtfm (areq);struct sun4i_tfm_ctx *tfmctx =crypto_ahash_ctx (tfm);
@@ -188,6 +188,7 @@ static int sun4i_hash(struct ahash_requestruct sg_mapping_iter mi;int in_r, err =0 ;size_t copied =0 ; +__le32 wb =0 ; dev_dbg(ss->dev, "%s %s bc=%llu len=%u mode=%x wl=%u h0=%0x", __func__, crypto_tfm_alg_name(areq->base.tfm),
@@ -399,7 +400,7 @@ hash_final: nbw = op->len -4 * nwait;if (nbw) { - wb = *(u32 *)(op->buf + nwait *4 ); + wb =cpu_to_le32 (*(u32 *)(op->buf + nwait *4 )); wb &=GENMASK ((nbw *8 ) -1 ,0 ); op->byte_count += nbw;
@@ -408,7 +409,7 @@ hash_final:/* write the remaining bytes of the nbw buffer */ wb |= ((1 <<7 ) << (nbw *8 )); - bf[j++] = wb; + bf[j++] =le32_to_cpu (wb);/* * number of space to pad to obtain 64o minus 8(size) minus 4 (final 1)
@@ -427,13 +428,13 @@ hash_final:/* write the length of data */ if (op->mode ==SS_OP_SHA1 ) { -__be64 bits =cpu_to_be64 (op->byte_count <<3 ); - bf[j++] =lower_32_bits (bits); - bf[j++] =upper_32_bits (bits); +__be64 *bits = (__be64 *)&bf[j]; + *bits =cpu_to_be64 (op->byte_count <<3 ); + j +=2 ; }else { -__le64 bits = op->byte_count <<3 ; - bf[j++] =lower_32_bits (bits); - bf[j++] =upper_32_bits (bits); +__le64 *bits = (__le64 *)&bf[j]; + *bits =cpu_to_le64 (op->byte_count <<3 ); + j +=2 ; }writesl (ss->base +SS_RXFIFO , bf, j);
@@ -475,7 +476,7 @@ hash_final: } }else {for (i =0 ; i <4 ; i++) { - v =readl (ss->base +SS_MD0 + i *4 ); + v =cpu_to_le32 (readl (ss->base +SS_MD0 + i *4 ));memcpy (areq->result + i *4 , &v,4 ); } }
Greg Kroah-Hartman
maintainerPATCH 7/343 leds: tlc591xx: update the maximum brightness
In reply to Greg Kroah-HartmanFrom: Jean-Jacques Hiblot <[email protected]>
commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 upstream.
The TLC chips actually offer 257 levels:
- 0: led OFF
- 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6%
- 256: led fully ON
--- drivers/leds/leds-tlc591xx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/leds/leds-tlc591xx.c +4 -3
@@ -16,6 +16,7 @@#include <linux/slab.h> #define TLC591XX_MAX_LEDS 16 +#define TLC591XX_MAX_BRIGHTNESS 256#define TLC591XX_REG_MODE1 0x00#define MODE1_RESPON_ADDR_MASK 0xF0
@@ -115,11 +116,11 @@ tlc591xx_brightness_set(struct led_classstruct tlc591xx_priv *priv = led->priv;int err; -switch (brightness) { +switch ((int )brightness) {case 0 : err =tlc591xx_set_ledout (priv, led,LEDOUT_OFF );break ; -case LED_FULL : +case TLC591XX_MAX_BRIGHTNESS : err =tlc591xx_set_ledout (priv, led,LEDOUT_ON );break ;default :
@@ -160,7 +161,7 @@ tlc591xx_configure(struct device *dev, led->priv = priv; led->led_no = i; led->ldev.brightness_set_blocking = tlc591xx_brightness_set; - led->ldev.max_brightness =LED_FULL ; + led->ldev.max_brightness =TLC591XX_MAX_BRIGHTNESS ; err =led_classdev_register (dev, &led->ldev);if (err <0 ) { dev_err(dev, "couldn't register LED %s\n",
Greg Kroah-Hartman
maintainerPATCH 8/343 drm/sti: do not remove the drm_bridge that was never added
In reply to Greg Kroah-HartmanFrom: Peter Rosin <[email protected]>
[ Upstream commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd ]
Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken.
The more natural approach would perhaps be to add a drm_bridge_add, but there are several other bridges that never call drm_bridge_add. Just removing the drm_bridge_remove is the easier fix.
--- drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - 2 files changed, 2 deletions(-)
drivers/gpu/drm/sti/sti_hda.c +0 -1
@@ -721,7 +721,6 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)return 0 ; err_sysfs: -drm_bridge_remove (bridge);return -EINVAL ; }
drivers/gpu/drm/sti/sti_hdmi.c +0 -1
@@ -1314,7 +1314,6 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)return 0 ; err_sysfs: -drm_bridge_remove (bridge); hdmi->drm_connector =NULL ;return -EINVAL ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainercover 4.14.168-stable review
This is the start of the stable review cycle for the 4.14.168 release. There are 343 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 Sun, 26 Jan 2020 09:26:30 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.168-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.14.168-rc1
Finn Thain <[email protected]>
m68k: Call timer_interrupt() with interrupts disabled
Fabrice Gasnier <[email protected]>
serial: stm32: fix clearing interrupt error flags
Max Gurtovoy <[email protected]>
IB/iser: Fix dma_nents type definition
Andre Przywara <[email protected]>
arm64: dts: juno: Fix UART frequency
Sam Bobroff <[email protected]>
drm/radeon: fix bad DMA from INTERRUPT_CNTL2
Chuhong Yuan <[email protected]>
dmaengine: ti: edma: fix missed failure handling
Navid Emamdoost <[email protected]>
affs: fix a memory leak in affs_remount
H. Nikolaus Schaller <[email protected]>
mmc: core: fix wl1251 sdio quirks
H. Nikolaus Schaller <[email protected]>
mmc: sdio: fix wl1251 vendor id
Eric Dumazet <[email protected]>
packet: fix data-race in fanout_flow_is_huge()
Eric Dumazet <[email protected]>
net: neigh: use long type to store jiffies delta
Stephen Hemminger <[email protected]>
hv_netvsc: flag software created hash value
Tiezhu Yang <[email protected]>
MIPS: Loongson: Fix return value of loongson_hwmon_init
Marc Dionne <[email protected]>
afs: Fix large file support
Stefan Wahren <[email protected]>
net: qca_spi: Move reset_count to struct qcaspi
Jakub Kicinski <[email protected]>
net: netem: correct the parent's backlog when corrupted packet was dropped
Jakub Kicinski <[email protected]>
net: netem: fix error path for corrupted GSO frames
Robin Gong <[email protected]>
dmaengine: imx-sdma: fix size check for sdma script_number
Jeffrey Hugo <[email protected]>
drm/msm/dsi: Implement reset correctly
Eric Dumazet <[email protected]>
tcp: annotate lockless access to tcp_memory_pressure
Eric Dumazet <[email protected]>
net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_headEric Dumazet <[email protected]>
net: avoid possible false sharing in sk_leave_memory_pressure()
YueHaibing <[email protected]>
act_mirred: Fix mirred_init_module error handling
Antonio Borneo <[email protected]>
net: stmmac: fix length of PTP clock's name string
Eric Biggers <[email protected]>
llc: fix sk_buff refcounting in llc_conn_state_process()
Eric Biggers <[email protected]>
llc: fix another potential sk_buff leak in llc_ui_sendmsg()
Johannes Berg <[email protected]>
mac80211: accept deauth frames in IBSS mode
Jose Abreu <[email protected]>
net: stmmac: gmac4+: Not all Unicast addresses may be available
Ard Biesheuvel <[email protected]>
nvme: retain split access workaround for capability reads
Dan Carpenter <[email protected]>
net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse()
Dan Carpenter <[email protected]>
of: mdio: Fix a signedness bug in of_phy_get_and_connect()
Dan Carpenter <[email protected]>
net: axienet: fix a signedness bug in probe
Dan Carpenter <[email protected]>
net: stmmac: dwmac-meson8b: Fix signedness bug in probe
Dan Carpenter <[email protected]>
net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe()
Dan Carpenter <[email protected]>
net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()
Dan Carpenter <[email protected]>
net: aquantia: Fix aq_vec_isr_legacy() return value
Filippo Sironi <[email protected]>
iommu/amd: Wait for completion of IOTLB flush in attach_device
Gerd Rausch <[email protected]>
net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names'
Håkon Bugge <[email protected]>
RDMA/cma: Fix false error message
Nicolas Boichat <[email protected]>
ath10k: adjust skb length in ath10k_sdio_mbox_rx_packet
Li Jin <[email protected]>
pinctrl: iproc-gpio: Fix incorrect pinconf configurations
Mao Wenan <[email protected]>
net: sonic: replace dev_kfree_skb in sonic_send_packet
Dan Robertson <[email protected]>
hwmon: (shtc1) fix shtc1 and shtw1 id mask
Firo Yang <[email protected]>
ixgbe: sync the first fragment unconditionally
Omar Sandoval <[email protected]>
btrfs: use correct count in btrfs_file_write_iter()
Filipe Manana <[email protected]>
Btrfs: fix inode cache waiters hanging on path allocation failure
Filipe Manana <[email protected]>
Btrfs: fix inode cache waiters hanging on failure to start caching thread
Filipe Manana <[email protected]>
Btrfs: fix hang when loading existing inode cache off disk
Govindarajulu Varadarajan <[email protected]>
scsi: fnic: fix msix interrupt allocation
Mao Wenan <[email protected]>
net: sonic: return NETDEV_TX_OK if failed to map buffer
Andrey Smirnov <[email protected]>
tty: serial: fsl_lpuart: Use appropriate lpuart32_* I/O funcs
Lorenzo Bianconi <[email protected]>
ath9k: dynack: fix possible deadlock in ath_dynack_node_{de}init
Colin Ian King <[email protected]>
iio: dac: ad5380: fix incorrect assignment to val
Colin Ian King <[email protected]>
bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA
Dexuan Cui <[email protected]>
irqdomain: Add the missing assignment of domain->fwnode for named fwnode
Dan Carpenter <[email protected]>
staging: greybus: light: fix a couple double frees
Masami Hiramatsu <[email protected]>
x86, perf: Fix the dependency of the x86 insn decoder selftest
Stephen Boyd <[email protected]>
power: supply: Init device wakeup after device_add()
Guenter Roeck <[email protected]>
hwmon: (lm75) Fix write operations for negative temperatures
Linus Torvalds <[email protected]>
Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()"
Andy Shevchenko <[email protected]>
ahci: Do not export local variable ahci_em_messages
Yong Wu <[email protected]>
iommu/mediatek: Fix iova_to_phys PA start for 4GB mode
Nick Desaulniers <[email protected]>
mips: avoid explicit UB in assignment of mips_io_port_base
Bruno Thomsen <[email protected]>
rtc: pcf2127: bugfix: read rtc disables watchdog
Alexandre Kroupski <[email protected]>
media: atmel: atmel-isi: fix timeout value for stop streaming
Felix Fietkau <[email protected]>
mac80211: minstrel_ht: fix per-group max throughput rate initialization
Andy Shevchenko <[email protected]>
dmaengine: dw: platform: Switch to acpi_dma_controller_register()
Maxime Ripard <[email protected]>
ASoC: sun4i-i2s: RX and TX counter registers are swapped
Eric W. Biederman <[email protected]>
signal: Allow cifs and drbd to receive their terminating signals
Vasundhara Volam <[email protected]>
bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails
Gerd Rausch <[email protected]>
net/rds: Add a few missing rds_stat_names entries
YueHaibing <[email protected]>
ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls
YueHaibing <[email protected]>
ASoC: cs4349: Use PM ops 'cs4349_runtime_pm'
YueHaibing <[email protected]>
ASoC: es8328: Fix copy-paste error in es8328_right_line_controls
Colin Ian King <[email protected]>
ext4: set error return correctly when ext4_htree_store_dirent fails
Iuliana Prodan <[email protected]>
crypto: caam - free resources in case caam_rng registration failed
Steve French <[email protected]>
cifs: fix rmmod regression in cifs.ko caused by force_sig changes
Mark Zhang <[email protected]>
net/mlx5: Fix mlx5_ifc_query_lag_out_bits
Fabrice Gasnier <[email protected]>
ARM: dts: stm32: add missing vdda-supply to adc on stm32h743i-eval
Jon Maloy <[email protected]>
tipc: reduce risk of wakeup queue starvation
Johannes Berg <[email protected]>
ALSA: aoa: onyx: always initialize register read value
Arnd Bergmann <[email protected]>
crypto: ccp - Reduce maximum stack usage
Thomas Gleixner <[email protected]>
x86/kgbd: Use NMI_VECTOR not APIC_DM_NMI
Arnd Bergmann <[email protected]>
mic: avoid statically declaring a 'struct device'.
Ruslan Bilovol <[email protected]>
usb: host: xhci-hub: fix extra endianness conversion
Arnd Bergmann <[email protected]>
qed: reduce maximum stack frame size
YueHaibing <[email protected]>
libertas_tf: Use correct channel range in lbtf_geo_init
Rafael J. Wysocki <[email protected]>
PM: sleep: Fix possible overflow in pm_system_cancel_wakeup()
Icenowy Zheng <[email protected]>
clk: sunxi-ng: v3s: add the missing PLL_DDR1
Colin Ian King <[email protected]>
scsi: libfc: fix null pointer dereference on a null lport
Wen Yang <[email protected]>
net: pasemi: fix an use-after-free in pasemi_mac_phy_init()
Xi Wang <[email protected]>
RDMA/hns: Fixs hw access invalid dma memory error
Arnd Bergmann <[email protected]>
devres: allow const resource arguments
David Howells <[email protected]>
rxrpc: Fix uninitialized error code in rxrpc_send_data_packet()
Andy Shevchenko <[email protected]>
mfd: intel-lpss: Release IDA resources
Kevin Mitchell <[email protected]>
iommu/amd: Make iommu_disable safer
Michael Chan <[email protected]>
bnxt_en: Fix ethtool selftest crash under error conditions.
Bryan O'Donoghue <[email protected]>
nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing
Nathan Huckleberry <[email protected]>
clk: qcom: Fix -Wunused-const-variable
Andy Shevchenko <[email protected]>
dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width"
Ravi Bangoria <[email protected]>
perf/ioctl: Add check for the sample_period value
Rob Clark <[email protected]>
drm/msm/a3xx: remove TPL1 regs from snapshot
Chen-Yu Tsai <[email protected]>
rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
Chen-Yu Tsai <[email protected]>
rtc: pcf8563: Fix interrupt trigger method
Peter Ujfalusi <[email protected]>
ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs
Julian Wiedmann <[email protected]>
net/af_iucv: always register net_device notifier
Jakub Kicinski <[email protected]>
net: netem: fix backlog accounting for corrupted GSO frames
Jeffrey Hugo <[email protected]>
drm/msm/mdp5: Fix mdp5_cfg_init error return
Nathan Lynch <[email protected]>
powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration
Nathan Lynch <[email protected]>
powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild
Michal Kalderon <[email protected]>
qed: iWARP - Use READ_ONCE and smp_store_release to access ep->state
Eric Auger <[email protected]>
iommu/vt-d: Duplicate iommu_resv_region objects per device list
George Wilkie <[email protected]>
mpls: fix warning with multi-label encap
Colin Ian King <[email protected]>
media: vivid: fix incorrect assignment operation when setting video mode
Florian Fainelli <[email protected]>
cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency
Florian Fainelli <[email protected]>
cpufreq: brcmstb-avs-cpufreq: Fix initial command check
Stephen Hemminger <[email protected]>
netvsc: unshare skb in VF rx handler
Eric Dumazet <[email protected]>
inet: frags: call inet_frags_fini() after unregister_pernet_subsys()
Eric W. Biederman <[email protected]>
signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig
Lu Baolu <[email protected]>
iommu: Use right function to get group for device
Rafael J. Wysocki <[email protected]>
PCI: PM: Avoid possible suspend-to-idle issue
Nathan Chancellor <[email protected]>
misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa
Erwan Le Ray <[email protected]>
serial: stm32: fix wakeup source initialization
Erwan Le Ray <[email protected]>
serial: stm32: Add support of TC bit status check
Erwan Le Ray <[email protected]>
serial: stm32: fix transmit_chars when tx is stopped
Erwan Le Ray <[email protected]>
serial: stm32: fix rx error handling
Hook, Gary <[email protected]>
crypto: ccp - Fix 3DES complaint from ccp-crypto module
Hook, Gary <[email protected]>
crypto: ccp - fix AES CFB error exposed by new test vectors
Christophe Leroy <[email protected]>
spi: spi-fsl-spi: call spi_finalize_current_message() at the end
Sagiv Ozeri <[email protected]>
RDMA/qedr: Fix incorrect device rate.
Jerome Brunet <[email protected]>
arm64: dts: meson: libretech-cc: set eMMC as removable
Jon Hunter <[email protected]>
dmaengine: tegra210-adma: Fix crash during probe
Jernej Skrabec <[email protected]>
ARM: dts: sun8i-h3: Fix wifi in Beelink X2 DT
Robert Richter <[email protected]>
EDAC/mc: Fix edac_mc_find() in case no device is found
Matthias Kaehlcke <[email protected]>
thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power
Brian Masney <[email protected]>
backlight: lm3630a: Return 0 on success in update_status functions
Dan Carpenter <[email protected]>
kdb: do a sanity check on the cpu in kdb_per_cpu()
Russell King <[email protected]>
ARM: riscpc: fix lack of keyboard interrupts after irq conversion
Bichao Zheng <[email protected]>
pwm: meson: Don't disable PWM when setting duty repeatedly
Martin Blumenstingl <[email protected]>
pwm: meson: Consider 128 a valid pre-divider
Florian Westphal <[email protected]>
netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule
Iuliana Prodan <[email protected]>
crypto: caam - fix caam_dump_sg that iterates through scatterlist
Dan Carpenter <[email protected]>
platform/x86: alienware-wmi: printing the wrong error code
Dan Carpenter <[email protected]>
media: davinci/vpbe: array underflow in vpbe_enum_outputs()
Dan Carpenter <[email protected]>
media: omap_vout: potential buffer overflow in vidioc_dqbuf()
YueHaibing <[email protected]>
l2tp: Fix possible NULL pointer dereference
Parav Pandit <[email protected]>
vfio/mdev: Fix aborting mdev child device removal if one fails
Parav Pandit <[email protected]>
vfio/mdev: Avoid release parent reference during error path
David Howells <[email protected]>
afs: Fix the afs.cell and afs.volume xattr handlers
Igor Konopko <[email protected]>
lightnvm: pblk: fix lock order in pblk_rb_tear_down_check
Pan Bian <[email protected]>
mmc: core: fix possible use after free of host
Sameer Pujar <[email protected]>
dmaengine: tegra210-adma: restore channel status
Sameeh Jubran <[email protected]>
net: ena: fix ena_com_fill_hash_function() implementation
Sameeh Jubran <[email protected]>
net: ena: fix incorrect test of supported hash function
Sameeh Jubran <[email protected]>
net: ena: fix: Free napi resources when ena_up() fails
Sameeh Jubran <[email protected]>
net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry
Lu Baolu <[email protected]>
iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU
Jack Morgenstein <[email protected]>
IB/mlx5: Add missing XRC options to QP optional params mask
Minas Harutyunyan <[email protected]>
dwc2: gadget: Fix completed transfer size calculation in DDMA
Arnd Bergmann <[email protected]>
usb: gadget: fsl: fix link error against usb-gadget module
Jerome Brunet <[email protected]>
ASoC: fix valid stream condition
Willem de Bruijn <[email protected]>
packet: in recvmsg msg_name return at least sizeof sockaddr_ll
Bart Van Assche <[email protected]>
scsi: qla2xxx: Avoid that qlt_send_resp_ctio() corrupts memory
Bart Van Assche <[email protected]>
scsi: qla2xxx: Fix a format specifier
Hongbo Yao <[email protected]>
irqchip/gic-v3-its: fix some definitions of inner cacheability attributes
Trond Myklebust <[email protected]>
NFS: Don't interrupt file writeout due to fatal errors
Takashi Iwai <[email protected]>
ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()
Alexandru Ardelean <[email protected]>
dmaengine: axi-dmac: Don't check the number of frames for alignment
Dan Carpenter <[email protected]>
6lowpan: Off by one handling ->nexthdr
Akinobu Mita <[email protected]>
media: ov2659: fix unbalanced mutex_lock/unlock
Vladimir Oltean <[email protected]>
ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect
Ben Hutchings <[email protected]>
powerpc: vdso: Make vdso32 installation conditional in vdso_install
Kees Cook <[email protected]>
selftests/ipc: Fix msgque compiler warnings
Jie Liu <[email protected]>
tipc: set sysctl_tipc_rmem and named_timeout right range
Colin Ian King <[email protected]>
platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer
Guenter Roeck <[email protected]>
hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses
Yunsheng Lin <[email protected]>
net: hns3: fix for vport->bw_limit overflow problem
YueHaibing <[email protected]>
ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"
Bart Van Assche <[email protected]>
scsi: target/core: Fix a race condition in the LUN lookup code
Bart Van Assche <[email protected]>
scsi: qla2xxx: Unregister chrdev if module initialization fails
YueHaibing <[email protected]>
ehea: Fix a copy-paste err in ehea_init_port_res
Martin Sperl <[email protected]>
spi: bcm2835aux: fix driver to not allow 65535 (=-1) cs-gpios
Dan Carpenter <[email protected]>
soc/fsl/qe: Fix an error code in qe_pin_request()
Sowjanya Komatineni <[email protected]>
spi: tegra114: configure dma burst size to fifo trig level
Sowjanya Komatineni <[email protected]>
spi: tegra114: flush fifos
Sowjanya Komatineni <[email protected]>
spi: tegra114: terminate dma and reset on transfer timeout
Sowjanya Komatineni <[email protected]>
spi: tegra114: fix for unpacked mode transfers
Sowjanya Komatineni <[email protected]>
spi: tegra114: clear packed bit for unpacked mode
YueHaibing <[email protected]>
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
Arnd Bergmann <[email protected]>
media: davinci-isif: avoid uninitialized variable use
Tony Lindgren <[email protected]>
ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()
Maxime Ripard <[email protected]>
arm64: dts: allwinner: a64: Add missing PIO clocks
Finn Thain <[email protected]>
m68k: mac: Fix VIA timer counter accesses
Jon Maloy <[email protected]>
tipc: tipc clang warning
Arnd Bergmann <[email protected]>
jfs: fix bogus variable self-initialization
Axel Lin <[email protected]>
regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB
Nicholas Mc Guire <[email protected]>
media: cx23885: check allocation return
Dan Carpenter <[email protected]>
media: wl128x: Fix an error code in fm_download_firmware()
Dan Carpenter <[email protected]>
media: cx18: update *pos correctly in cx18_read_pos()
Dan Carpenter <[email protected]>
media: ivtv: update *pos correctly in ivtv_read_pos()
Axel Lin <[email protected]>
regulator: lp87565: Fix missing register for LP87565_BUCK_0
Kangjie Lu <[email protected]>
net: sh_eth: fix a missing check of of_get_phy_mode
Dan Carpenter <[email protected]>
xen, cpu_hotplug: Prevent an out of bounds access
Dan Carpenter <[email protected]>
drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen()
Steve Sistare <[email protected]>
scsi: megaraid_sas: reduce module load time
Qian Cai <[email protected]>
x86/mm: Remove unused variable 'cpu'
Guenter Roeck <[email protected]>
nios2: ksyms: Add missing symbol exports
Rashmica Gupta <[email protected]>
powerpc/mm: Check secondary hash page table
Igor Russkikh <[email protected]>
net: aquantia: fixed instack structure overflow
Trond Myklebust <[email protected]>
NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()
Pablo Neira Ayuso <[email protected]>
netfilter: nft_set_hash: fix lookups with fixed size hash on big endian
Axel Lin <[email protected]>
regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA
Vladimir Murzin <[email protected]>
ARM: 8848/1: virt: Align GIC version check with arm64 counterpart
Marek Szyprowski <[email protected]>
ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used
Stefan Wahren <[email protected]>
mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe
Trond Myklebust <[email protected]>
NFS/pnfs: Bulk destroy of layouts needs to be safe w.r.t. umount
Mattias Jacobsson <[email protected]>
platform/x86: wmi: fix potential null pointer dereference
Marek Szyprowski <[email protected]>
clocksource/drivers/exynos_mct: Fix error path in timer resources initialization
Chen-Yu Tsai <[email protected]>
clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable
Trond Myklebust <[email protected]>
NFS: Fix a soft lockup in the delegation recovery code
Michael Ellerman <[email protected]>
powerpc/64s: Fix logic when handling unknown CPU features
Nathan Chancellor <[email protected]>
staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xx
Eric W. Biederman <[email protected]>
fs/nfs: Fix nfs_parse_devname to not modify it's argument
Takashi Iwai <[email protected]>
ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()
Colin Ian King <[email protected]>
drm/nouveau/pmu: don't print reply values if exec is false
Colin Ian King <[email protected]>
drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON
Vinod Koul <[email protected]>
net: dsa: qca8k: Enable delay for RGMII_ID mode
Axel Lin <[email protected]>
regulator: pv88090: Fix array out-of-bounds access
Axel Lin <[email protected]>
regulator: pv88080: Fix array out-of-bounds access
Axel Lin <[email protected]>
regulator: pv88060: Fix array out-of-bounds access
YueHaibing <[email protected]>
cdc-wdm: pass return value of recover_from_urb_loss
Robin Murphy <[email protected]>
dmaengine: mv_xor: Use correct device for DMA API
Nicholas Mc Guire <[email protected]>
staging: r8822be: check kzalloc return or bail
Alexey Kardashevskiy <[email protected]>
KVM: PPC: Release all hardware TCE tables attached to a group
Vadim Pasternak <[email protected]>
hwmon: (pmbus/tps53679) Fix driver info initialization in probe routine
Eric Auger <[email protected]>
vfio_pci: Enable memory accesses before calling pci_map_rom
David Howells <[email protected]>
keys: Timestamp new keys
Ming Lei <[email protected]>
block: don't use bio->bi_vcnt to figure out segment number
Sven Van Asbroeck <[email protected]>
usb: phy: twl6030-usb: fix possible use-after-free on remove
Wen Yang <[email protected]>
PCI: endpoint: functions: Use memcpy_fromio()/memcpy_toio()
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7792: Fix vin1_data18_b pin group
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: emev2: Add missing pinmux functions
Dan Carpenter <[email protected]>
drm/etnaviv: potential NULL dereference
Steve Wise <[email protected]>
iw_cxgb4: use tos when finding ipv6 routes
Steve Wise <[email protected]>
iw_cxgb4: use tos when importing the endpoint
YueHaibing <[email protected]>
fbdev: chipsfb: remove set but not used variable 'size'
Colin Ian King <[email protected]>
rtc: pm8xxx: fix unintended sign extension
Colin Ian King <[email protected]>
rtc: 88pm80x: fix unintended sign extension
Colin Ian King <[email protected]>
rtc: 88pm860x: fix unintended sign extension
Uwe Kleine-König <[email protected]>
rtc: ds1307: rx8130: Fix alarm handling
Moritz Fischer <[email protected]>
net: phy: fixed_phy: Fix fixed_phy not checking GPIO
Michael Kao <[email protected]>
thermal: mediatek: fix register index error
Colin Ian King <[email protected]>
rtc: ds1672: fix unintended sign extension
Colin Ian King <[email protected]>
staging: most: cdev: add missing check for cdev_add failure
Sara Sharon <[email protected]>
iwlwifi: mvm: fix RSS config command
Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: phy3250: fix SD card regulator voltage
Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller clocks property
Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller variant
Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: reparent keypad controller to SIC1
Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: add required clocks property to keypad device node
Rafael J. Wysocki <[email protected]>
driver core: Do not resume suppliers under device_links_write_lock()
Corentin Labbe <[email protected]>
crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments
Liu Jian <[email protected]>
driver: uio: fix possible use-after-free in __uio_register_device
Liu Jian <[email protected]>
driver: uio: fix possible memory leak in __uio_register_device
YueHaibing <[email protected]>
tty: ipwireless: Fix potential NULL pointer dereference
Johannes Berg <[email protected]>
iwlwifi: mvm: fix A-MPDU reference assignment
Moni Shoua <[email protected]>
net/mlx5: Take lock with IRQs disabled to avoid deadlock
Mordechay Goodstein <[email protected]>
iwlwifi: mvm: avoid possible access out of array.
Chen-Yu Tsai <[email protected]>
clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it
YueHaibing <[email protected]>
spi/topcliff_pch: Fix potential NULL dereference on allocation error
Eric Wong <[email protected]>
rtc: cmos: ignore bogus century byte
Israel Rukshin <[email protected]>
IB/iser: Pass the correct number of entries for dma mapped SGL
Stefan Agner <[email protected]>
ASoC: imx-sgtl5000: put of nodes if finding codec fails
Eric Biggers <[email protected]>
crypto: tgr192 - fix unaligned memory access
YueHaibing <[email protected]>
crypto: brcm - Fix some set-but-not-used warning
Masahiro Yamada <[email protected]>
kbuild: mark prepare0 as PHONY to fix external module build
Pawe? Chmiel <[email protected]>
media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL
Dan Carpenter <[email protected]>
drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()
Raju Rangoju <[email protected]>
RDMA/iw_cxgb4: Fix the unchecked ep dereference
Charles Keepax <[email protected]>
spi: cadence: Correct initialisation of runtime PM
Loic Poulain <[email protected]>
arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD
YueHaibing <[email protected]>
drm/shmob: Fix return value check in shmob_drm_probe
Gal Pressman <[email protected]>
RDMA/qedr: Fix out of bounds index check in query pkey
Gal Pressman <[email protected]>
RDMA/ocrdma: Fix out of bounds index check in query pkey
Gal Pressman <[email protected]>
IB/usnic: Fix out of bounds index check in query pkey
Jonas Gorski <[email protected]>
MIPS: BCM63XX: drop unused and broken DSP platform device
Yangtao Li <[email protected]>
clk: dove: fix refcount leak in dove_clk_init()
Yangtao Li <[email protected]>
clk: mv98dx3236: fix refcount leak in mv98dx3236_clk_init()
Yangtao Li <[email protected]>
clk: armada-xp: fix refcount leak in axp_clk_init()
Yangtao Li <[email protected]>
clk: kirkwood: fix refcount leak in kirkwood_clk_init()
Yangtao Li <[email protected]>
clk: armada-370: fix refcount leak in a370_clk_init()
Yangtao Li <[email protected]>
clk: vf610: fix refcount leak in vf610_clocks_init()
Yangtao Li <[email protected]>
clk: imx7d: fix refcount leak in imx7d_clocks_init()
Yangtao Li <[email protected]>
clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
Yangtao Li <[email protected]>
clk: imx6q: fix refcount leak in imx6q_clocks_init()
Yangtao Li <[email protected]>
clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
Yangtao Li <[email protected]>
clk: socfpga: fix refcount leak
Yangtao Li <[email protected]>
clk: qoriq: fix refcount leak in clockgen_init()
Yangtao Li <[email protected]>
clk: highbank: fix refcount leak in hb_clk_init()
Dan Carpenter <[email protected]>
Input: nomadik-ske-keypad - fix a loop timeout test
Petr Machata <[email protected]>
vxlan: changelink: Fix handling of default remotes
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7734: Add missing IPSR11 field
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
Kelvin Cao <[email protected]>
switchtec: Remove immediate status check after submitting MRPC command
Stefan Wahren <[email protected]>
staging: bcm2835-camera: Abort probe if there is no camera
Yuval Shaia <[email protected]>
IB/rxe: Fix incorrect cache cleanup in error flow
Yoshihiro Shimoda <[email protected]>
net: phy: Fix not to call phy_resume() if PHY is not attached
Lyude Paul <[email protected]>
drm/dp_mst: Skip validating ports during destruction, just ref
YueHaibing <[email protected]>
exportfs: fix 'passing zero to ERR_PTR()' warning
Colin Ian King <[email protected]>
pcrypt: use format specifier in kobject_add
Gustavo A. R. Silva <[email protected]>
NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
Petr Machata <[email protected]>
mlxsw: reg: QEEC: Add minimum shaper fields
Maxime Ripard <[email protected]>
drm/sun4i: hdmi: Fix double flag assignation
Christophe Leroy <[email protected]>
powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()
Hans de Goede <[email protected]>
pwm: lpss: Release runtime-pm reference from the driver's remove callback
Spencer E. Olson <[email protected]>
staging: comedi: ni_mio_common: protect register write overflow
Nicolas Huaman <[email protected]>
ALSA: usb-audio: update quirk for B&W PX to remove microphone
Linus Walleij <[email protected]>
regulator: fixed: Default enable high on DT regulators
Alex Estrin <[email protected]>
IB/hfi1: Add mtu check for operational data VLs
Zhu Yanjun <[email protected]>
IB/rxe: replace kvfree with vfree
John Garry <[email protected]>
drm/hisilicon: hibmc: Don't overwrite fb helper surface depth
Jitendra Bhivare <[email protected]>
PCI: iproc: Remove PAXC slot check to allow VF support
Jann Horn <[email protected]>
apparmor: don't try to replace stale label in ptrace access check
Anders Roxell <[email protected]>
ALSA: hda: fix unused variable warning
Dan Carpenter <[email protected]>
drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
Peter Rosin <[email protected]>
drm/sti: do not remove the drm_bridge that was never added
Jean-Jacques Hiblot <[email protected]>
leds: tlc591xx: update the maximum brightness
Corentin Labbe <[email protected]>
crypto: sun4i-ss - fix big endian issues
Lorenzo Bianconi <[email protected]>
mt7601u: fix bbp version check in mt7601u_wait_bbp_ready
Tung Nguyen <[email protected]>
tipc: fix wrong timeout input for tipc_wait_for_cond()
Ard Biesheuvel <[email protected]>
powerpc/archrandom: fix arch_get_random_seed_int()
Jarkko Nikula <[email protected]>
mfd: intel-lpss: Add default I2C device properties for Gemini Lake
Jan Kara <[email protected]>
xfs: Sanity check flags of Q_XQUOTARM call
-------------
Diffstat:
Makefile | 8 +- arch/arm/boot/dts/lpc3250-phy3250.dts | 4 +- arch/arm/boot/dts/lpc32xx.dtsi | 10 +- arch/arm/boot/dts/ls1021a-twr.dts | 9 +- arch/arm/boot/dts/ls1021a.dtsi | 11 +- arch/arm/boot/dts/stm32h743i-eval.dts | 1 + arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 4 + arch/arm/common/mcpm_entry.c | 2 +- arch/arm/include/asm/suspend.h | 1 + arch/arm/kernel/hyp-stub.S | 4 +- arch/arm/kernel/sleep.S | 12 ++ arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-rpc/irq.c | 3 +- arch/arm/plat-pxa/ssp.c | 6 - arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +- .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 - arch/arm64/boot/dts/arm/juno-clocks.dtsi | 4 +- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 + arch/m68k/amiga/cia.c | 9 ++ arch/m68k/atari/ataints.c | 4 +- arch/m68k/atari/time.c | 15 ++- arch/m68k/bvme6000/config.c | 20 +-- arch/m68k/hp300/time.c | 10 +- arch/m68k/mac/via.c | 119 ++++++++++------- arch/m68k/mvme147/config.c | 18 +-- arch/m68k/mvme16x/config.c | 21 +-- arch/m68k/q40/q40ints.c | 19 +-- arch/m68k/sun3/sun3ints.c | 3 + arch/m68k/sun3x/time.c | 16 ++- arch/mips/bcm63xx/Makefile | 6 +- arch/mips/bcm63xx/boards/board_bcm963xx.c | 20 --- arch/mips/bcm63xx/dev-dsp.c | 56 -------- arch/mips/include/asm/io.h | 14 +- .../include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h | 14 -- .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 5 - arch/mips/kernel/setup.c | 2 +- arch/nios2/kernel/nios2_ksyms.c | 12 ++ arch/powerpc/Makefile | 2 + arch/powerpc/include/asm/archrandom.h | 2 +- arch/powerpc/include/asm/kgdb.h | 5 +- arch/powerpc/kernel/cacheinfo.c | 21 +++ arch/powerpc/kernel/cacheinfo.h | 4 + arch/powerpc/kernel/dt_cpu_ftrs.c | 17 +-- arch/powerpc/kernel/kgdb.c | 43 ++++-- arch/powerpc/kvm/book3s_64_vio.c | 1 - arch/powerpc/mm/dump_hashpagetable.c | 2 +- arch/powerpc/platforms/pseries/mobility.c | 10 ++ arch/x86/Kconfig.debug | 2 +- arch/x86/kernel/kgdb.c | 2 +- arch/x86/mm/tlb.c | 3 - block/blk-merge.c | 8 +- crypto/pcrypt.c | 2 +- crypto/tgr192.c | 6 +- drivers/ata/libahci.c | 1 - drivers/base/core.c | 20 ++- drivers/base/power/wakeup.c | 2 +- drivers/bcma/driver_pci.c | 4 +- drivers/block/drbd/drbd_main.c | 2 + drivers/clk/clk-highbank.c | 1 + drivers/clk/clk-qoriq.c | 1 + drivers/clk/imx/clk-imx6q.c | 1 + drivers/clk/imx/clk-imx6sx.c | 1 + drivers/clk/imx/clk-imx7d.c | 1 + drivers/clk/imx/clk-vf610.c | 1 + drivers/clk/mvebu/armada-370.c | 4 +- drivers/clk/mvebu/armada-xp.c | 4 +- drivers/clk/mvebu/dove.c | 8 +- drivers/clk/mvebu/kirkwood.c | 2 + drivers/clk/mvebu/mv98dx3236.c | 4 +- drivers/clk/qcom/gcc-msm8996.c | 36 ----- drivers/clk/samsung/clk-exynos4.c | 1 + drivers/clk/socfpga/clk-pll-a10.c | 1 + drivers/clk/socfpga/clk-pll.c | 1 + drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 19 ++- drivers/clk/sunxi-ng/ccu-sun8i-v3s.h | 6 +- drivers/clocksource/exynos_mct.c | 14 +- drivers/clocksource/timer-sun5i.c | 10 ++ drivers/cpufreq/brcmstb-avs-cpufreq.c | 12 +- drivers/crypto/amcc/crypto4xx_trng.h | 4 +- drivers/crypto/bcm/cipher.c | 6 +- drivers/crypto/caam/caamrng.c | 5 +- drivers/crypto/caam/error.c | 2 +- drivers/crypto/ccp/ccp-crypto-aes.c | 8 +- drivers/crypto/ccp/ccp-ops.c | 67 +++++----- drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 21 +-- drivers/dma/dma-axi-dmac.c | 2 +- drivers/dma/dw/platform.c | 14 +- drivers/dma/edma.c | 6 +- drivers/dma/hsu/hsu.c | 4 +- drivers/dma/imx-sdma.c | 8 ++ drivers/dma/mv_xor.c | 2 +- drivers/dma/tegra210-adma.c | 72 ++++++++-- drivers/edac/edac_mc.c | 12 +- drivers/gpu/drm/drm_dp_mst_topology.c | 15 ++- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 1 - drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 24 ++-- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c | 4 +- drivers/gpu/drm/radeon/cik.c | 4 +- drivers/gpu/drm/radeon/r600.c | 4 +- drivers/gpu/drm/radeon/si.c | 4 +- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +- drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +- drivers/gpu/drm/virtio/virtgpu_vq.c | 5 +- drivers/hwmon/lm75.c | 2 +- drivers/hwmon/pmbus/tps53679.c | 9 +- drivers/hwmon/shtc1.c | 2 +- drivers/hwmon/w83627hf.c | 42 +++++- drivers/iio/dac/ad5380.c | 2 +- drivers/infiniband/core/cma.c | 2 +- drivers/infiniband/hw/cxgb4/cm.c | 24 ++-- drivers/infiniband/hw/hfi1/chip.c | 26 +++- drivers/infiniband/hw/hns/hns_roce_qp.c | 1 - drivers/infiniband/hw/mlx5/qp.c | 21 +++ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 27 ++-- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/sw/rxe/rxe_cq.c | 4 +- drivers/infiniband/sw/rxe/rxe_pool.c | 26 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 5 +- drivers/infiniband/ulp/iser/iscsi_iser.h | 2 +- drivers/infiniband/ulp/iser/iser_memory.c | 10 +- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- drivers/iommu/amd_iommu.c | 2 + drivers/iommu/amd_iommu_init.c | 3 + drivers/iommu/intel-iommu.c | 39 +++--- drivers/iommu/iommu.c | 6 +- drivers/iommu/mtk_iommu.c | 26 +++- drivers/leds/leds-tlc591xx.c | 7 +- drivers/lightnvm/pblk-rb.c | 2 +- drivers/media/i2c/ov2659.c | 2 +- drivers/media/pci/cx18/cx18-fileops.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c | 5 +- drivers/media/pci/ivtv/ivtv-fileops.c | 2 +- drivers/media/pci/tw5864/tw5864-video.c | 4 +- drivers/media/platform/atmel/atmel-isi.c | 2 +- drivers/media/platform/davinci/isif.c | 9 -- drivers/media/platform/davinci/vpbe.c | 2 +- drivers/media/platform/omap/omap_vout.c | 15 +-- drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 +- drivers/media/platform/vivid/vivid-osd.c | 2 +- drivers/media/radio/wl128x/fmdrv_common.c | 5 +- drivers/mfd/intel-lpss-pci.c | 28 ++-- drivers/mfd/intel-lpss.c | 1 + drivers/misc/mic/card/mic_x100.c | 28 ++-- drivers/misc/sgi-xp/xpc_partition.c | 2 +- drivers/mmc/core/host.c | 2 - drivers/mmc/core/quirks.h | 7 + drivers/mmc/host/sdhci-brcmstb.c | 4 +- drivers/net/dsa/qca8k.c | 12 ++ drivers/net/dsa/qca8k.h | 1 + drivers/net/ethernet/amazon/ena/ena_com.c | 3 +- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 +- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 15 +-- .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 4 +- .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 4 +- drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 18 ++- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 +- drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 ++- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 5 +- drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 +++- drivers/net/ethernet/natsemi/sonic.c | 6 +- drivers/net/ethernet/pasemi/pasemi_mac.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 16 ++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 34 +++-- drivers/net/ethernet/qualcomm/qca_spi.c | 9 +- drivers/net/ethernet/qualcomm/qca_spi.h | 1 + drivers/net/ethernet/renesas/sh_eth.c | 6 +- .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 2 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 13 +- drivers/net/phy/fixed_phy.c | 6 +- drivers/net/phy/phy_device.c | 11 +- drivers/net/vxlan.c | 7 +- drivers/net/wireless/ath/ath10k/sdio.c | 29 +++-- drivers/net/wireless/ath/ath9k/dynack.c | 8 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 12 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 19 ++- drivers/net/wireless/marvell/libertas_tf/cmd.c | 2 +- drivers/net/wireless/mediatek/mt7601u/phy.c | 2 +- drivers/ntb/hw/idt/ntb_hw_idt.c | 8 +- drivers/nvme/host/pci.c | 2 +- drivers/nvmem/imx-ocotp.c | 3 +- drivers/of/of_mdio.c | 2 +- drivers/pci/endpoint/functions/pci-epf-test.c | 4 +- drivers/pci/host/pcie-iproc.c | 8 -- drivers/pci/pci-driver.c | 17 ++- drivers/pci/switch/switchtec.c | 4 - drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 96 +++++++++++--- drivers/pinctrl/sh-pfc/pfc-emev2.c | 20 +++ drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 3 +- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 8 +- drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 8 +- drivers/pinctrl/sh-pfc/pfc-sh7269.c | 2 +- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 4 +- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 4 +- drivers/platform/mips/cpu_hwmon.c | 2 +- drivers/platform/x86/alienware-wmi.c | 19 ++- drivers/platform/x86/wmi.c | 3 + drivers/power/supply/power_supply_core.c | 10 +- drivers/pwm/pwm-lpss.c | 6 + drivers/pwm/pwm-meson.c | 9 +- drivers/rapidio/rio_cm.c | 4 +- drivers/regulator/fixed.c | 11 +- drivers/regulator/lp87565-regulator.c | 2 +- drivers/regulator/pv88060-regulator.c | 2 +- drivers/regulator/pv88080-regulator.c | 2 +- drivers/regulator/pv88090-regulator.c | 2 +- drivers/regulator/tps65086-regulator.c | 4 +- drivers/regulator/wm831x-dcdc.c | 4 +- drivers/rtc/rtc-88pm80x.c | 21 ++- drivers/rtc/rtc-88pm860x.c | 21 ++- drivers/rtc/rtc-ds1307.c | 7 +- drivers/rtc/rtc-ds1672.c | 3 +- drivers/rtc/rtc-mc146818-lib.c | 2 +- drivers/rtc/rtc-pcf2127.c | 32 ++--- drivers/rtc/rtc-pcf8563.c | 13 +- drivers/rtc/rtc-pm8xxx.c | 6 +- drivers/scsi/fnic/fnic_isr.c | 4 +- drivers/scsi/libfc/fc_exch.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +- drivers/scsi/qla2xxx/qla_os.c | 34 +++-- drivers/scsi/qla2xxx/qla_target.c | 14 +- drivers/soc/fsl/qe/gpio.c | 4 +- drivers/spi/spi-bcm2835aux.c | 13 +- drivers/spi/spi-cadence.c | 11 +- drivers/spi/spi-fsl-spi.c | 2 +- drivers/spi/spi-tegra114.c | 145 +++++++++++++++------ drivers/spi/spi-topcliff-pch.c | 6 + drivers/staging/comedi/drivers/ni_mio_common.c | 24 +++- drivers/staging/greybus/light.c | 12 +- drivers/staging/most/aim-cdev/cdev.c | 5 +- .../rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 5 +- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 ++ drivers/target/target_core_device.c | 4 +- drivers/thermal/cpu_cooling.c | 2 +- drivers/thermal/mtk_thermal.c | 6 +- drivers/tty/ipwireless/hardware.c | 2 + drivers/tty/serial/fsl_lpuart.c | 28 ++-- drivers/tty/serial/stm32-usart.c | 123 +++++++++-------- drivers/tty/serial/stm32-usart.h | 10 +- drivers/uio/uio.c | 10 +- drivers/usb/class/cdc-wdm.c | 2 +- drivers/usb/dwc2/gadget.c | 1 + drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/phy/Kconfig | 2 +- drivers/usb/phy/phy-twl6030-usb.c | 2 +- drivers/vfio/mdev/mdev_core.c | 11 +- drivers/vfio/pci/vfio_pci.c | 19 ++- drivers/video/backlight/lm3630a_bl.c | 4 +- drivers/video/fbdev/chipsfb.c | 3 +- drivers/xen/cpu_hotplug.c | 2 +- drivers/xen/pvcalls-back.c | 2 +- fs/affs/super.c | 6 - fs/afs/super.c | 1 + fs/afs/xattr.c | 4 +- fs/btrfs/file.c | 3 +- fs/btrfs/inode-map.c | 28 +++- fs/cifs/connect.c | 3 +- fs/exportfs/expfs.c | 1 + fs/ext4/inline.c | 2 +- fs/jfs/jfs_txnmgr.c | 3 +- fs/nfs/delegation.c | 20 +-- fs/nfs/delegation.h | 1 + fs/nfs/flexfilelayout/flexfilelayout.h | 32 +++-- fs/nfs/pnfs.c | 33 +++-- fs/nfs/pnfs.h | 1 + fs/nfs/super.c | 2 +- fs/nfs/write.c | 2 +- fs/xfs/xfs_quotaops.c | 3 + include/linux/device.h | 3 +- include/linux/irqchip/arm-gic-v3.h | 12 +- include/linux/mlx5/mlx5_ifc.h | 2 - include/linux/mmc/sdio_ids.h | 2 + include/linux/pci.h | 1 + include/linux/platform_data/dma-imx-sdma.h | 3 + include/linux/signal.h | 15 ++- include/media/davinci/vpbe.h | 2 +- include/net/request_sock.h | 4 +- include/net/tcp.h | 2 +- kernel/debug/kdb/kdb_main.c | 2 +- kernel/events/core.c | 3 + kernel/irq/irqdomain.c | 1 + kernel/signal.c | 5 + lib/devres.c | 3 +- lib/kfifo.c | 3 +- net/6lowpan/nhc.c | 2 +- net/bridge/netfilter/ebtables.c | 4 +- net/core/neighbour.c | 4 +- net/core/sock.c | 4 +- net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv4/inet_connection_sock.c | 2 +- net/ipv4/tcp.c | 4 +- net/ipv6/reassembly.c | 2 +- net/iucv/af_iucv.c | 27 +++- net/l2tp/l2tp_core.c | 3 +- net/llc/af_llc.c | 34 +++-- net/llc/llc_conn.c | 35 ++--- net/llc/llc_if.c | 12 +- net/mac80211/rc80211_minstrel_ht.c | 2 +- net/mac80211/rx.c | 11 +- net/mpls/mpls_iptunnel.c | 2 +- net/netfilter/nft_set_hash.c | 23 +++- net/packet/af_packet.c | 25 +++- net/rds/ib_stats.c | 2 +- net/rds/stats.c | 2 + net/rxrpc/output.c | 3 + net/sched/act_mirred.c | 6 +- net/sched/sch_netem.c | 18 ++- net/tipc/link.c | 29 +++-- net/tipc/node.c | 7 +- net/tipc/socket.c | 2 +- net/tipc/sysctl.c | 8 +- security/apparmor/include/context.h | 2 + security/apparmor/lsm.c | 4 +- security/keys/key.c | 1 + sound/aoa/codecs/onyx.c | 4 +- sound/pci/hda/hda_controller.h | 9 +- sound/soc/codecs/cs4349.c | 1 + sound/soc/codecs/es8328.c | 2 +- sound/soc/codecs/wm8737.c | 2 +- sound/soc/davinci/davinci-mcasp.c | 13 +- sound/soc/fsl/imx-sgtl5000.c | 3 +- sound/soc/qcom/apq8016_sbc.c | 21 ++- sound/soc/soc-pcm.c | 4 +- sound/soc/sunxi/sun4i-i2s.c | 4 +- sound/usb/mixer.c | 4 +- sound/usb/quirks-table.h | 9 +- tools/testing/selftests/ipc/msgque.c | 11 +- 346 files changed, 2015 insertions(+), 1275 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 343/343 m68k: Call timer_interrupt() with interrupts disabled
From: Finn Thain <[email protected]>
[ Upstream commit 1efdd4bd254311498123a15fa0acd565f454da97 ]
Some platforms execute their timer handler with the interrupt priority level set below 6. That means the handler could be interrupted by another driver and this could lead to re-entry of the timer core.
Avoid this by use of local_irq_save/restore for timer interrupt dispatch. This provides mutual exclusion around the timer interrupt flag access which is needed later in this series for the clocksource conversion.
--- arch/m68k/amiga/cia.c | 9 +++++++++ arch/m68k/atari/ataints.c | 4 ++-- arch/m68k/atari/time.c | 15 ++++++++++++++- arch/m68k/bvme6000/config.c | 20 ++++++++++---------- arch/m68k/hp300/time.c | 10 ++++++++-- arch/m68k/mac/via.c | 17 +++++++++++++++++ arch/m68k/mvme147/config.c | 18 ++++++++++-------- arch/m68k/mvme16x/config.c | 21 +++++++++++---------- arch/m68k/q40/q40ints.c | 19 +++++++++++-------- arch/m68k/sun3/sun3ints.c | 3 +++ arch/m68k/sun3x/time.c | 16 ++++++++++------ 11 files changed, 105 insertions(+), 47 deletions(-)
arch/m68k/amiga/cia.c +9 -0
@@ -88,10 +88,19 @@ static irqreturn_t cia_handler(int irq, void *dev_id)struct ciabase *base = dev_id;int mach_irq;unsigned char ints; +unsigned long flags; +/* Interrupts get disabled while the timer irq flag is cleared and +* the timer interrupt serviced. +*/ mach_irq = base->cia_irq; +local_irq_save (flags); ints =cia_set_irq (base,CIA_ICR_ALL ); amiga_custom.intreq = base->int_mask; +if (ints &1 ) +generic_handle_irq (mach_irq); +local_irq_restore (flags); + mach_irq++, ints >>=1 ;for (; ints; mach_irq++, ints >>=1 ) {if (ints &1 )generic_handle_irq (mach_irq);
arch/m68k/atari/ataints.c +2 -2
@@ -142,7 +142,7 @@ struct mfptimerbase { .name = "MFP Timer D" }; -static irqreturn_t mfptimer_handler (int irq,void *dev_id) +static irqreturn_t mfp_timer_d_handler (int irq,void *dev_id) {struct mfptimerbase *base = dev_id;int mach_irq;
@@ -344,7 +344,7 @@ void __init atari_init_IRQ(void) st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd &0xf0 ) |0x6 ;/* request timer D dispatch handler */ -if (request_irq (IRQ_MFP_TIMD , mfptimer_handler,IRQF_SHARED , +if (request_irq (IRQ_MFP_TIMD , mfp_timer_d_handler,IRQF_SHARED , stmfp_base.name, &stmfp_base))pr_err ("Couldn't register %s interrupt\n" , stmfp_base.name);
arch/m68k/atari/time.c +14 -1
@@ -24,6 +24,18 @@DEFINE_SPINLOCK (rtc_lock);EXPORT_SYMBOL_GPL (rtc_lock); +static irqreturn_t mfp_timer_c_handler (int irq,void *dev_id) +{ +irq_handler_t timer_routine = dev_id; +unsigned long flags; + +local_irq_save (flags); +timer_routine (0 ,NULL ); +local_irq_restore (flags); + +return IRQ_HANDLED ; +} +void __init atari_sched_init (irq_handler_t timer_routine) {
@@ -32,7 +44,8 @@ atari_sched_init(irq_handler_t timer_routine)/* start timer C, div = 1:100 */ st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd &15 ) |0x60 ;/* install interrupt service routine for MFP Timer C */ -if (request_irq (IRQ_MFP_TIMC , timer_routine,0 ,"timer" , timer_routine)) +if (request_irq (IRQ_MFP_TIMC , mfp_timer_c_handler,0 ,"timer" , + timer_routine))pr_err ("Couldn't register timer interrupt\n" ); }
arch/m68k/bvme6000/config.c +10 -10
@@ -45,11 +45,6 @@ extern int bvme6000_set_clock_mmss (unsigned long);extern void bvme6000_reset (void );void bvme6000_set_vectors (void ); -/* Save tick handler routine pointer, will point to xtime_update() in -* kernel/timer/timekeeping.c, called via bvme6000_process_int() */ - -static irq_handler_t tick_handler; -int __init bvme6000_parse_bootinfo (const struct bi_record *bi) {
@@ -159,12 +154,18 @@ irqreturn_t bvme6000_abort_int (int irq, void *dev_id)static irqreturn_t bvme6000_timer_int (int irq,void *dev_id) { +irq_handler_t timer_routine = dev_id; +unsigned long flags;volatile RtcPtr_t rtc = (RtcPtr_t )BVME_RTC_BASE ; -unsigned char msr = rtc->msr &0xc0 ; +unsigned char msr; +local_irq_save (flags); + msr = rtc->msr &0xc0 ; rtc->msr = msr |0x20 ;/* Ack the interrupt */ +timer_routine (0 ,NULL ); +local_irq_restore (flags); -return tick_handler (irq, dev_id); +return IRQ_HANDLED ; }/*
@@ -183,9 +184,8 @@ void bvme6000_sched_init (irq_handler_t timer_routine) rtc->msr =0 ;/* Ensure timer registers accessible */ - tick_handler = timer_routine; -if (request_irq (BVME_IRQ_RTC , bvme6000_timer_int,0 , -"timer" , bvme6000_timer_int)) +if (request_irq (BVME_IRQ_RTC , bvme6000_timer_int,0 ,"timer" , + timer_routine))panic ("Couldn't register timer int" ); rtc->t1cr_omr =0x04 ;/* Mode 2, ext clk */
arch/m68k/hp300/time.c +8 -2
@@ -38,13 +38,19 @@static irqreturn_t hp300_tick (int irq,void *dev_id) { +irq_handler_t timer_routine = dev_id; +unsigned long flags;unsigned long tmp; -irq_handler_t vector = dev_id; + +local_irq_save (flags);in_8 (CLOCKBASE +CLKSR ); asmvolatile ("movpw %1@(5),%0" :"=d" (tmp) :"a" (CLOCKBASE )); +timer_routine (0 ,NULL ); +local_irq_restore (flags); +/* Turn off the network and SCSI leds */ blinken_leds (0 ,0xe0 ); -return vector (irq,NULL ); +return IRQ_HANDLED ; }u32 hp300_gettimeoffset (void )
arch/m68k/mac/via.c +17 -0
@@ -398,6 +398,8 @@ void via_nubus_irq_shutdown(int irq)* via6522.c :-), disable/pending masks added. */ +#define VIA_TIMER_1_INT BIT(6) +void via1_irq (struct irq_desc *desc) {int irq_num;
@@ -407,6 +409,21 @@ void via1_irq(struct irq_desc *desc)if (!events)return ; + irq_num =IRQ_MAC_TIMER_1 ; + irq_bit =VIA_TIMER_1_INT ; +if (events & irq_bit) { +unsigned long flags; + +local_irq_save (flags); + via1[vIFR] = irq_bit; +generic_handle_irq (irq_num); +local_irq_restore (flags); + + events &= ~irq_bit; +if (!events) +return ; + } + irq_num =VIA1_SOURCE_BASE ; irq_bit =1 ; do {
arch/m68k/mvme147/config.c +10 -8
@@ -46,11 +46,6 @@ extern void mvme147_reset (void);static int bcd2int (unsigned char b); -/* Save tick handler routine pointer, will point to xtime_update() in -* kernel/time/timekeeping.c, called via mvme147_process_int() */ - -irq_handler_t tick_handler; -int __init mvme147_parse_bootinfo (const struct bi_record *bi) {
@@ -106,16 +101,23 @@ void __init config_mvme147(void)static irqreturn_t mvme147_timer_int (int irq,void *dev_id) { +irq_handler_t timer_routine = dev_id; +unsigned long flags; + +local_irq_save (flags); m147_pcc->t1_int_cntrl =PCC_TIMER_INT_CLR ; m147_pcc->t1_int_cntrl =PCC_INT_ENAB |PCC_LEVEL_TIMER1 ; -return tick_handler (irq, dev_id); +timer_routine (0 ,NULL ); +local_irq_restore (flags); + +return IRQ_HANDLED ; }void mvme147_sched_init (irq_handler_t timer_routine) { - tick_handler = timer_routine; -if (request_irq (PCC_IRQ_TIMER1 , mvme147_timer_int,0 ,"timer 1" ,NULL )) +if (request_irq (PCC_IRQ_TIMER1 , mvme147_timer_int,0 ,"timer 1" , + timer_routine))pr_err ("Couldn't register timer interrupt\n" );/* Init the clock with a value */
arch/m68k/mvme16x/config.c +11 -10
@@ -51,11 +51,6 @@ extern void mvme16x_reset (void);int bcd2int (unsigned char b); -/* Save tick handler routine pointer, will point to xtime_update() in -* kernel/time/timekeeping.c, called via mvme16x_process_int() */ - -static irq_handler_t tick_handler; -unsigned short mvme16x_config;EXPORT_SYMBOL (mvme16x_config);
@@ -354,8 +349,15 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)static irqreturn_t mvme16x_timer_int (int irq,void *dev_id) { - *(volatile unsigned char *)0xfff4201b |=8 ; -return tick_handler (irq, dev_id); +irq_handler_t timer_routine = dev_id; +unsigned long flags; + +local_irq_save (flags); + *(volatile unsigned char *)0xfff4201b |=8 ; +timer_routine (0 ,NULL ); +local_irq_restore (flags); + +return IRQ_HANDLED ; }void mvme16x_sched_init (irq_handler_t timer_routine)
@@ -363,14 +365,13 @@ void mvme16x_sched_init (irq_handler_t timer_routine)uint16_t brdno =be16_to_cpu (mvme_bdid.brdno);int irq; - tick_handler = timer_routine;/* Using PCCchip2 or MC2 chip tick timer 1 */ *(volatile unsigned long *)0xfff42008 =0 ; *(volatile unsigned long *)0xfff42004 =10000 ;/* 10ms */ *(volatile unsigned char *)0xfff42017 |=3 ; *(volatile unsigned char *)0xfff4201b =0x16 ; -if (request_irq (MVME16x_IRQ_TIMER, mvme16x_timer_int,0 , -"timer" , mvme16x_timer_int)) +if (request_irq (MVME16x_IRQ_TIMER, mvme16x_timer_int,0 ,"timer" , + timer_routine))panic ("Couldn't register timer int" );if (brdno ==0x0162 || brdno ==0x172 )
arch/m68k/q40/q40ints.c +11 -8
@@ -127,10 +127,10 @@ void q40_mksound(unsigned int hz, unsigned int ticks) sound_ticks = ticks <<1 ; } -static irq_handler_t q40_timer_routine; - -static irqreturn_t q40_timer_int (int irq,void * dev) +static irqreturn_t q40_timer_int (int irq,void *dev_id) { +irq_handler_t timer_routine = dev_id; + ql_ticks = ql_ticks ?0 :1 ;if (sound_ticks) {unsigned char sval=(sound_ticks &1 ) ?128 -SVOL :128 +SVOL ;
@@ -139,8 +139,13 @@ static irqreturn_t q40_timer_int (int irq, void * dev) *DAC_RIGHT =sval; } -if (!ql_ticks) -q40_timer_routine (irq, dev); +if (!ql_ticks) { +unsigned long flags; + +local_irq_save (flags); +timer_routine (0 ,NULL ); +local_irq_restore (flags); + }return IRQ_HANDLED ; }
@@ -148,11 +153,9 @@ void q40_sched_init (irq_handler_t timer_routine) {int timer_irq; - q40_timer_routine = timer_routine; timer_irq =Q40_IRQ_FRAME ; -if (request_irq (timer_irq, q40_timer_int,0 , -"timer" , q40_timer_int)) +if (request_irq (timer_irq, q40_timer_int,0 ,"timer" , timer_routine))panic ("Couldn't register timer int" );master_outb (-1 ,FRAME_CLEAR_REG );
arch/m68k/sun3/sun3ints.c +3 -0
@@ -61,8 +61,10 @@ static irqreturn_t sun3_int7(int irq, void *dev_id)static irqreturn_t sun3_int5 (int irq,void *dev_id) { +unsigned long flags;unsigned int cnt; +local_irq_save (flags);#ifdef CONFIG_SUN3 intersil_clear ();#endif
@@ -76,6 +78,7 @@ static irqreturn_t sun3_int5(int irq, void *dev_id) cnt =kstat_irqs_cpu (irq,0 );if (!(cnt %20 ))sun3_leds (led_pattern[cnt %160 /20 ]); +local_irq_restore (flags);return IRQ_HANDLED ; }
arch/m68k/sun3x/time.c +10 -6
@@ -78,15 +78,19 @@ u32 sun3x_gettimeoffset(void) }#if 0 -static void sun3x_timer_tick (int irq,void *dev_id,struct pt_regs *regs) +static irqreturn_t sun3x_timer_tick (int irq,void *dev_id) { -void (*vector)(int ,void *,struct pt_regs *) = dev_id; +irq_handler_t timer_routine = dev_id; +unsigned long flags; -/* Clear the pending interrupt - pulse the enable line low */ -disable_irq (5 ); -enable_irq (5 ); +local_irq_save (flags); +/* Clear the pending interrupt - pulse the enable line low */ +disable_irq (5 ); +enable_irq (5 ); +timer_routine (0 ,NULL ); +local_irq_restore (flags); -vector (irq,NULL , regs); +return IRQ_HANDLED ; }#endif
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 10/343 ALSA: hda: fix unused variable warning
In reply to Greg Kroah-HartmanFrom: Anders Roxell <[email protected]>
[ Upstream commit 5b03006d5c58ddd31caf542eef4d0269bcf265b3 ]
When CONFIG_X86=n function azx_snoop doesn't use the variable chip it only returns true.
sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’:sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable]
struct azx *chip = bus_to_azx(bus);
^~~~Create a inline function of azx_snoop.
--- sound/pci/hda/hda_controller.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/pci/hda/hda_controller.h +4 -5
@@ -176,11 +176,10 @@ struct azx {#define azx_bus (chip) (&(chip)->bus.core)#define bus_to_azx (_bus) container_of(_bus, struct azx, bus.core) -#ifdef CONFIG_X86 -#define azx_snoop (chip) ((chip)->snoop) -#else -#define azx_snoop (chip) true -#endif +static inline bool azx_snoop (struct azx *chip) +{ +return !IS_ENABLED (CONFIG_X86 ) || chip->snoop; +}/* * macros for easy use
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 20/343 powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
[ Upstream commit fb978ca207743badfe7efd9eebe68bcbb4969f79 ]
Generic implementation fails to remove breakpoints after init when CONFIG_STRICT_KERNEL_RWX is selected:
[ 13.251285] KGDB: BP remove failed: c001c338 [ 13.259587] kgdbts: ERROR PUT: end of test buffer on 'do_fork_test' line 8 expected OK got $E14#aa [ 13.268969] KGDB: re-enter exception: ALL breakpoints killed [ 13.275099] CPU: 0 PID: 1 Comm: init Not tainted 4.18.0-g82bbb913ffd8 #860 [ 13.282836] Call Trace: [ 13.285313] [c60e1ba0] [c0080ef0] kgdb_handle_exception+0x6f4/0x720 (unreliable) [ 13.292618] [c60e1c30] [c000e97c] kgdb_handle_breakpoint+0x3c/0x98 [ 13.298709] [c60e1c40] [c000af54] program_check_exception+0x104/0x700 [ 13.305083] [c60e1c60] [c000e45c] ret_from_except_full+0x0/0x4 [ 13.310845] [c60e1d20] [c02a22ac] run_simple_test+0x2b4/0x2d4 [ 13.316532] [c60e1d30] [c0081698] put_packet+0xb8/0x158 [ 13.321694] [c60e1d60] [c00820b4] gdb_serial_stub+0x230/0xc4c [ 13.327374] [c60e1dc0] [c0080af8] kgdb_handle_exception+0x2fc/0x720 [ 13.333573] [c60e1e50] [c000e928] kgdb_singlestep+0xb4/0xcc [ 13.339068] [c60e1e70] [c000ae1c] single_step_exception+0x90/0xac [ 13.345100] [c60e1e80] [c000e45c] ret_from_except_full+0x0/0x4 [ 13.350865] [c60e1f40] [c000e11c] ret_from_syscall+0x0/0x38 [ 13.356346] Kernel panic - not syncing: Recursive entry to debugger
This patch creates powerpc specific version of kgdb_arch_set_breakpoint() and kgdb_arch_remove_breakpoint() using patch_instruction()
--- arch/powerpc/include/asm/kgdb.h | 5 +++- arch/powerpc/kernel/kgdb.c | 43 +++++++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 9 deletions(-)
arch/powerpc/include/asm/kgdb.h +4 -1
@@ -26,9 +26,12 @@#define BREAK_INSTR_SIZE 4#define BUFMAX ((NUMREGBYTES * 2) + 512)#define OUTBUFMAX ((NUMREGBYTES * 2) + 512) + +#define BREAK_INSTR 0x7d821008/* twge r2, r2 */ +static inline void arch_kgdb_breakpoint (void ) { - asm(".long 0x7d821008" );/* twge r2, r2 */ + asm(stringify_in_c(.long BREAK_INSTR)); }#define CACHE_FLUSH_IS_SAFE 1#define DBG_MAX_REG_NUM 70
arch/powerpc/kernel/kgdb.c +35 -8
64 lines not on this page · raw message
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 21/343 drm/sun4i: hdmi: Fix double flag assignation
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 1e0ff648940e603cab6c52cf3723017d30d78f30 ]
The is_double flag is a boolean currently assigned to the value of the d variable, that is either 1 or 2. It means that this is_double variable is always set to true, even though the initial intent was to have it set to true when d is 2.
Fix this.
--- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +1 -1
@@ -50,7 +50,7 @@ static unsigned long sun4i_tmds_calc_divider(unsigned long rate, (rate - tmp_rate) < (rate - best_rate)) { best_rate = tmp_rate; best_m = m; - is_double = d; + is_double = (d ==2 ) ? true : false; } } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 22/343 mlxsw: reg: QEEC: Add minimum shaper fields
In reply to Greg Kroah-HartmanFrom: Petr Machata <[email protected]>
[ Upstream commit 8b931821aa04823e2e5df0ae93937baabbd23286 ]
Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable configuration of minimum shaper.
Increase the QEEC length to 0x20 as well: that's the length that the register has had for a long time now, but with the configurations that mlxsw typically exercises, the firmware tolerated 0x1C-sized packets. With mise=true however, FW rejects packets unless they have the full required length.
--- drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/reg.h +21 -1
@@ -2452,7 +2452,7 @@ static inline void mlxsw_reg_qtct_pack(char *payload, u8 local_port,* Configures the ETS elements. */ #define MLXSW_REG_QEEC_ID 0x400D -#define MLXSW_REG_QEEC_LEN 0x1C +#define MLXSW_REG_QEEC_LEN 0x20MLXSW_REG_DEFINE (qeec,MLXSW_REG_QEEC_ID ,MLXSW_REG_QEEC_LEN );
@@ -2494,6 +2494,15 @@ MLXSW_ITEM32(reg, qeec, element_index, 0x04, 0, 8);*/ MLXSW_ITEM32 (reg, qeec, next_element_index,0x08 ,0 ,8 ); +/* reg_qeec_mise +* Min shaper configuration enable. Enables configuration of the min +* shaper on this ETS element +* 0 - Disable +* 1 - Enable +* Access: RW +*/ +MLXSW_ITEM32 (reg, qeec, mise,0x0C ,31 ,1 ); +enum {MLXSW_REG_QEEC_BYTES_MODE ,MLXSW_REG_QEEC_PACKETS_MODE ,
@@ -2510,6 +2519,17 @@ enum {*/ MLXSW_ITEM32 (reg, qeec, pb,0x0C ,28 ,1 ); +/* The smallest permitted min shaper rate. */ +#define MLXSW_REG_QEEC_MIS_MIN 200000/* Kbps */ + +/* reg_qeec_min_shaper_rate +* Min shaper information rate. +* For CPU port, can only be configured for port hierarchy. +* When in bytes mode, value is specified in units of 1000bps. +* Access: RW +*/ +MLXSW_ITEM32 (reg, qeec, min_shaper_rate,0x0C ,0 ,28 ); +/* reg_qeec_mase * Max shaper configuration enable. Enables configuration of the max * shaper on this ETS element.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 23/343 NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
In reply to Greg Kroah-HartmanFrom: Gustavo A. R. Silva <[email protected]>
[ Upstream commit 1b7619828d0c341612f58683e73f279c37e70bbc ]
Both devm_kcalloc() and devm_kzalloc() return NULL on error. They never return error pointers.
The use of IS_ERR_OR_NULL is currently applied to the wrong context.
Fix this by replacing IS_ERR_OR_NULL with regular NULL checks.
--- drivers/ntb/hw/idt/ntb_hw_idt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ntb/hw/idt/ntb_hw_idt.c +4 -4
@@ -1105,9 +1105,9 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port, }/* Allocate memory for memory window descriptors */ - ret_mws =devm_kcalloc (&ndev->ntb.pdev->dev, *mw_cnt, -sizeof (*ret_mws),GFP_KERNEL ); -if (IS_ERR_OR_NULL (ret_mws)) + ret_mws =devm_kcalloc (&ndev->ntb.pdev->dev, *mw_cnt,sizeof (*ret_mws), +GFP_KERNEL ); +if (!ret_mws)return ERR_PTR (-ENOMEM );/* Copy the info of detected memory windows */
@@ -2393,7 +2393,7 @@ static struct idt_ntb_dev *idt_create_dev(struct pci_dev *pdev,/* Allocate memory for the IDT PCIe-device descriptor */ ndev =devm_kzalloc (&pdev->dev,sizeof (*ndev),GFP_KERNEL ); -if (IS_ERR_OR_NULL (ndev)) { +if (!ndev) {dev_err (&pdev->dev,"Memory allocation failed for descriptor" );return ERR_PTR (-ENOMEM ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 19/343 pwm: lpss: Release runtime-pm reference from the drivers remove callback
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 42885551cedb45961879d2fc3dc3c4dc545cc23e ]
For each pwm output which gets enabled through pwm_lpss_apply(), we do a pm_runtime_get_sync().
This commit adds pm_runtime_put() calls to pwm_lpss_remove() to balance these when the driver gets removed with some of the outputs still enabled.
--- drivers/pwm/pwm-lpss.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/pwm/pwm-lpss.c +6 -0
@@ -216,6 +216,12 @@ EXPORT_SYMBOL_GPL(pwm_lpss_probe);int pwm_lpss_remove (struct pwm_lpss_chip *lpwm) { +int i; + +for (i =0 ; i < lpwm->info->npwm; i++) { +if (pwm_is_enabled (&lpwm->chip.pwms[i])) +pm_runtime_put (lpwm->chip.dev); + }return pwmchip_remove (&lpwm->chip); }EXPORT_SYMBOL_GPL (pwm_lpss_remove);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 11/343 apparmor: dont try to replace stale label in ptrace access check
In reply to Greg Kroah-HartmanFrom: Jann Horn <[email protected]>
[ Upstream commit 1f8266ff58840d698a1e96d2274189de1bdf7969 ]
As a comment above begin_current_label_crit_section() explains, begin_current_label_crit_section() must run in sleepable context because when label_is_stale() is true, aa_replace_current_label() runs, which uses prepare_creds(), which can sleep.
Until now, the ptrace access check (which runs with a task lock held) violated this rule.
Also add a might_sleep() assertion to begin_current_label_crit_section(), because asserts are less likely to be ignored than comments.
--- security/apparmor/include/context.h | 2 ++ security/apparmor/lsm.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
security/apparmor/include/context.h +2 -0
@@ -191,6 +191,8 @@ static inline struct aa_label *begin_current_label_crit_section(void) {struct aa_label *label =aa_current_raw_label (); +might_sleep (); +if (label_is_stale (label)) { label =aa_get_newest_label (label);if (aa_replace_current_label (label) ==0 )
security/apparmor/lsm.c +2 -2
@@ -108,12 +108,12 @@ static int apparmor_ptrace_access_check(struct task_struct *child,struct aa_label *tracer, *tracee;int error; - tracer =begin_current_label_crit_section (); + tracer =__begin_current_label_crit_section (); tracee =aa_get_task_label (child); error =aa_may_ptrace (tracer, tracee, mode ==PTRACE_MODE_READ ?AA_PTRACE_READ :AA_PTRACE_TRACE );aa_put_label (tracee); -end_current_label_crit_section (tracer); +__end_current_label_crit_section (tracer);return error; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 12/343 PCI: iproc: Remove PAXC slot check to allow VF support
In reply to Greg Kroah-HartmanFrom: Jitendra Bhivare <[email protected]>
[ Upstream commit 4da6b4480766e5bc9c4d7bc14bf1d0939a1a5fa7 ]
Fix previous incorrect logic that limits PAXC slot number to zero only. In order for SRIOV/VF to work, we need to allow the slot number to be greater than zero.
--- drivers/pci/host/pcie-iproc.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/pci/host/pcie-iproc.c +0 -8
@@ -573,14 +573,6 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct iproc_pcie *pcie,return (pcie->base + offset); } -/* -* PAXC is connected to an internally emulated EP within the SoC. It -* allows only one device. -*/ -if (pcie->ep_is_internal) -if (slot >0 ) -return NULL ; -return iproc_pcie_map_ep_cfg_reg (pcie, busno, slot, fn, where); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 13/343 drm/hisilicon: hibmc: Dont overwrite fb helper surface depth
In reply to Greg Kroah-HartmanFrom: John Garry <[email protected]>
[ Upstream commit 0ff9f49646353ce31312411e7e7bd2281492a40e ]
Currently the driver overwrites the surface depth provided by the fb helper to give an invalid bpp/surface depth combination.
This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl"), which now causes the driver to fail to probe.
Fix by not overwriting the surface depth.
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c +0 -1
@@ -71,7 +71,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,DRM_DEBUG_DRIVER ("surface width(%d), height(%d) and bpp(%d)\n" , sizes->surface_width, sizes->surface_height, sizes->surface_bpp); - sizes->surface_depth =32 ; bytes_per_pixel =DIV_ROUND_UP (sizes->surface_bpp,8 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 14/343 IB/rxe: replace kvfree with vfree
In reply to Greg Kroah-HartmanFrom: Zhu Yanjun <[email protected]>
[ Upstream commit 721ad7e643f7002efa398838693f90284ea216d1 ]
The buf is allocated by vmalloc_user in the function rxe_queue_init. So it is better to free it by vfree.
--- drivers/infiniband/sw/rxe/rxe_cq.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/infiniband/sw/rxe/rxe_cq.c +2 -2
@@ -30,7 +30,7 @@* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - +#include <linux/vmalloc.h> #include "rxe.h" #include "rxe_loc.h" #include "rxe_queue.h"
@@ -97,7 +97,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, err =do_mmap_info (rxe, udata, false, context, cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);if (err) { -kvfree (cq->queue->buf); +vfree (cq->queue->buf);kfree (cq->queue);return err; }
drivers/infiniband/sw/rxe/rxe_qp.c +3 -2
@@ -34,6 +34,7 @@#include <linux/skbuff.h> #include <linux/delay.h> #include <linux/sched.h> +#include <linux/vmalloc.h> #include "rxe.h" #include "rxe_loc.h"
@@ -255,7 +256,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, qp->sq.queue->buf_size, &qp->sq.queue->ip);if (err) { -kvfree (qp->sq.queue->buf); +vfree (qp->sq.queue->buf);kfree (qp->sq.queue);return err; }
@@ -308,7 +309,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, qp->rq.queue->buf_size, &qp->rq.queue->ip);if (err) { -kvfree (qp->rq.queue->buf); +vfree (qp->rq.queue->buf);kfree (qp->rq.queue);return err; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 15/343 IB/hfi1: Add mtu check for operational data VLs
In reply to Greg Kroah-HartmanFrom: Alex Estrin <[email protected]>
[ Upstream commit eb50130964e8c1379f37c3d3bab33a411ec62e98 ]
Since Virtual Lanes BCT credits and MTU are set through separate MADs, we have to ensure both are valid, and data VLs are ready for transmission before we allow port transition to Armed state.
--- drivers/infiniband/hw/hfi1/chip.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-)
drivers/infiniband/hw/hfi1/chip.c +22 -4
@@ -10552,12 +10552,29 @@ void set_link_down_reason(struct hfi1_pportdata *ppd, u8 lcl_reason, } } -/* -* Verify if BCT for data VLs is non-zero. +/** +* data_vls_operational() - Verify if data VL BCT credits and MTU +* are both set. +* @ppd: pointer to hfi1_pportdata structure +* +* Return: true - Ok, false -otherwise. */ static inline bool data_vls_operational (struct hfi1_pportdata *ppd) { -return !!ppd->actual_vls_operational; +int i; +u64 reg; + +if (!ppd->actual_vls_operational) +return false; + +for (i =0 ; i < ppd->vls_supported; i++) { + reg =read_csr (ppd->dd,SEND_CM_CREDIT_VL + (8 * i)); +if ((reg && !ppd->dd->vld[i].mtu) || + (!reg && ppd->dd->vld[i].mtu)) +return false; + } + +return true; }/*
@@ -10662,7 +10679,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)if (!data_vls_operational (ppd)) {dd_dev_err (dd, -"%s: data VLs not operational\n" , __func__); +"%s: Invalid data VL credits or mtu\n" , + __func__); ret = -EINVAL ;break ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 16/343 regulator: fixed: Default enable high on DT regulators
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit 28be5f15df2ee6882b0a122693159c96a28203c7 ]
commit efdfeb079cc3
("regulator: fixed: Convert to use GPIO descriptor only") switched to use gpiod_get() to look up the regulator from the gpiolib core whether that is device tree or boardfile.
This meant that we activate the code ina603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags") which means the descriptors coming from the device tree already have the right inversion and open drain semantics set up from the gpiolib core.
As the fixed regulator was inspected again we got the inverted inversion and things broke.
Fix it by ignoring the config in the device tree for now: the later patches in the series will push all inversion handling over to the gpiolib core and set it up properly in the boardfiles for legacy devices, but I did not finish that for this kernel cycle.
--- drivers/regulator/fixed.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/regulator/fixed.c +8 -3
@@ -84,9 +84,14 @@ of_get_fixed_voltage_config(struct device *dev,of_property_read_u32 (np,"startup-delay-us" , &config->startup_delay); - config->enable_high =of_property_read_bool (np,"enable-active-high" ); - config->gpio_is_open_drain =of_property_read_bool (np, -"gpio-open-drain" ); +/* +* FIXME: we pulled active low/high and open drain handling into +* gpiolib so it will be handled there. Delete this in the second +* step when we also remove the custom inversion handling for all +* legacy boardfiles. +*/ + config->enable_high =1 ; + config->gpio_is_open_drain =0 ;if (of_find_property (np,"vin-supply" ,NULL )) config->input_supply ="vin" ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 17/343 ALSA: usb-audio: update quirk for B&W PX to remove microphone
In reply to Greg Kroah-HartmanFrom: Nicolas Huaman <[email protected]>
[ Upstream commit c369c8db15d51fa175d2ba85928f79d16af6b562 ]
A quirk in snd-usb-audio was added to automate setting sample rate to 4800k and remove the previously exposed nonfunctional microphone for the Bowers & Wilkins PX:
commit 240a8af929c7c57dcde28682725b29cf8474e8e5
https://lore.kernel.org/patchwork/patch/919689/
However the headphones where updated shortly after that to remove the unintentional microphone functionality. I guess because of this the headphones now crash when connecting them via USB while the quirk is active. Dmesg:
snd-usb-audio: probe of 2-3:1.0 failed with error -22 usb 2-3: 2:1: cannot get min/max values for control 2 (id 2)
This patch removes the microfone and allows the headphones to connect and work out of the box. It is based on the current mainline kernel
and successfully applied an tested on my machine (4.18.10.arch1-1).
--- sound/usb/quirks-table.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
sound/usb/quirks-table.h +2 -7
@@ -3293,19 +3293,14 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), .ifnum = 0, .type = QUIRK_AUDIO_STANDARD_MIXER, }, - /* Capture */ - { - .ifnum = 1, - .type = QUIRK_IGNORE_INTERFACE, - },/* Playback */ { - .ifnum = 2, + .ifnum = 1, .type = QUIRK_AUDIO_FIXED_ENDPOINT, .data = &(const struct audioformat) { .formats = SNDRV_PCM_FMTBIT_S16_LE, .channels = 2, - .iface = 2, + .iface = 1, .altsetting = 1, .altset_idx = 1, .attributes = UAC_EP_CS_ATTR_FILL_MAX |
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 18/343 staging: comedi: ni_mio_common: protect register write overflow
In reply to Greg Kroah-HartmanFrom: Spencer E. Olson <[email protected]>
[ Upstream commit 1cbca5852d6c16e85a21487a15d211195aacd4a1 ]
Fixes two problems introduced as early as
commit 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code"):
(1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is not unduly overwritten on e-series devices. On e-series devices, the first three of the last four bits are reserved. The last bit defines the output selection of the RGOUT0 pin, otherwise known as RTSI_Sub_Selection. For m-series devices, these last four bits are indeed used as the output selection of the RTSI7 pin (and the RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the RTSI_Trig_Direction register.
(2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI lines.
This patch also cleans up the ni_get_rtsi_routing command for readability.
--- .../staging/comedi/drivers/ni_mio_common.c | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/staging/comedi/drivers/ni_mio_common.c +17 -7
@@ -4991,7 +4991,10 @@ static int ni_valid_rtsi_output_source(struct comedi_device *dev,case NI_RTSI_OUTPUT_G_SRC0 :case NI_RTSI_OUTPUT_G_GATE0 :case NI_RTSI_OUTPUT_RGOUT0 : -case NI_RTSI_OUTPUT_RTSI_BRD_0 : +case NI_RTSI_OUTPUT_RTSI_BRD (0 ): +case NI_RTSI_OUTPUT_RTSI_BRD (1 ): +case NI_RTSI_OUTPUT_RTSI_BRD (2 ): +case NI_RTSI_OUTPUT_RTSI_BRD (3 ):return 1 ;case NI_RTSI_OUTPUT_RTSI_OSC :return (devpriv->is_m_series) ?1 :0 ;
@@ -5012,11 +5015,18 @@ static int ni_set_rtsi_routing(struct comedi_device *dev, devpriv->rtsi_trig_a_output_reg |=NISTC_RTSI_TRIG (chan, src);ni_stc_writew (dev, devpriv->rtsi_trig_a_output_reg,NISTC_RTSI_TRIGA_OUT_REG ); - }else if (chan <8 ) { + }else if (chan <NISTC_RTSI_TRIG_NUM_CHAN (devpriv->is_m_series)) { devpriv->rtsi_trig_b_output_reg &= ~NISTC_RTSI_TRIG_MASK (chan); devpriv->rtsi_trig_b_output_reg |=NISTC_RTSI_TRIG (chan, src);ni_stc_writew (dev, devpriv->rtsi_trig_b_output_reg,NISTC_RTSI_TRIGB_OUT_REG ); + }else if (chan !=NISTC_RTSI_TRIG_OLD_CLK_CHAN ) { +/* probably should never reach this, since the +* ni_valid_rtsi_output_source above errors out if chan is too +* high +*/ +dev_err (dev->class_dev,"%s: unknown rtsi channel\n" , __func__); +return -EINVAL ; }return 2 ; }
@@ -5032,12 +5042,12 @@ static unsigned int ni_get_rtsi_routing(struct comedi_device *dev, }else if (chan <NISTC_RTSI_TRIG_NUM_CHAN (devpriv->is_m_series)) {return NISTC_RTSI_TRIG_TO_SRC (chan, devpriv->rtsi_trig_b_output_reg); - }else { -if (chan ==NISTC_RTSI_TRIG_OLD_CLK_CHAN ) -return NI_RTSI_OUTPUT_RTSI_OSC ; -dev_err (dev->class_dev,"bug! should never get here?\n" ); -return 0 ; + }else if (chan ==NISTC_RTSI_TRIG_OLD_CLK_CHAN ) { +return NI_RTSI_OUTPUT_RTSI_OSC ; } + +dev_err (dev->class_dev,"%s: unknown rtsi channel\n" , __func__); +return -EINVAL ; } static int ni_rtsi_insn_config(struct comedi_device *dev,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 9/343 drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ]
This doesn't affect runtime because in the current code "idx" is always valid.
First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is off by one so we could end up reading one element beyond the end of the vgdev->capsets[] array.
--- drivers/gpu/drm/virtio/virtgpu_vq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +3 -2
@@ -648,11 +648,11 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, {struct virtio_gpu_get_capset *cmd_p;struct virtio_gpu_vbuffer *vbuf; -int max_size = vgdev->capsets[idx].max_size; +int max_size;struct virtio_gpu_drv_cap_cache *cache_ent;void *resp_buf; -if (idx > vgdev->num_capsets) +if (idx >= vgdev->num_capsets)return -EINVAL ;if (version > vgdev->capsets[idx].max_version)
@@ -662,6 +662,7 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev,if (!cache_ent)return -ENOMEM ; + max_size = vgdev->capsets[idx].max_size; cache_ent->caps_cache =kmalloc (max_size,GFP_KERNEL );if (!cache_ent->caps_cache) {kfree (cache_ent);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 25/343 exportfs: fix passing zero to ERR_PTR() warning
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 909e22e05353a783c526829427e9a8de122fba9c ]
Fix a static code checker warning:
fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR'
The error path for lookup_one_len_unlocked failure should set err to PTR_ERR.
--- fs/exportfs/expfs.c | 1 + 1 file changed, 1 insertion(+)
fs/exportfs/expfs.c +1 -0
@@ -147,6 +147,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt, tmp =lookup_one_len_unlocked (nbuf, parent,strlen (nbuf));if (IS_ERR (tmp)) {dprintk ("%s: lookup failed: %d\n" , __func__,PTR_ERR (tmp)); + err =PTR_ERR (tmp); goto out_err; }if (tmp != dentry) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 34/343 pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 0d6256cb880166a4111bebce35790019e56b6e1b ]
The vin1_b_data18_mux[] arrays contains pin marks for the 2 LSB bits of the color components. The vin1_b_data18_pins[] array rightfully does not include the corresponding pin numbers, as RGB18 is subset of RGB24, containing only the 6 MSB bits of each component.
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 --- 1 file changed, 3 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +0 -3
@@ -4348,17 +4348,14 @@ static const unsigned int vin1_b_data18_pins[] = { };static const unsigned int vin1_b_data18_mux[] = {/* B */ -VI1_DATA0_B_MARK ,VI1_DATA1_B_MARK ,VI1_DATA2_B_MARK ,VI1_DATA3_B_MARK ,VI1_DATA4_B_MARK ,VI1_DATA5_B_MARK ,VI1_DATA6_B_MARK ,VI1_DATA7_B_MARK ,/* G */ -VI1_G0_B_MARK ,VI1_G1_B_MARK ,VI1_G2_B_MARK ,VI1_G3_B_MARK ,VI1_G4_B_MARK ,VI1_G5_B_MARK ,VI1_G6_B_MARK ,VI1_G7_B_MARK ,/* R */ -VI1_R0_B_MARK ,VI1_R1_B_MARK ,VI1_R2_B_MARK ,VI1_R3_B_MARK ,VI1_R4_B_MARK ,VI1_R5_B_MARK ,VI1_R6_B_MARK ,VI1_R7_B_MARK ,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 35/343 pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 124cde98f856b6206b804acbdec3b7c80f8c3427 ]
The tpu4_to3_mux[] array contains the TPU4TO3 pin mark, but the tpu4_to3_pins[] array lacks the corresponding pin number.
Add the missing pin number, for non-GPIO pin F26.
--- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +1 -0
@@ -3086,6 +3086,7 @@ static const unsigned int tpu4_to2_mux[] = { };static const unsigned int tpu4_to3_pins[] = {/* TO */ +PIN_NUMBER (6 ,26 ), };static const unsigned int tpu4_to3_mux[] = {TPU4TO3_MARK ,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 36/343 pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 6a6c195d98a1a5e70faa87f594d7564af1dd1bed ]
The Peripheral Function Select Register 9 contains 12 fields, but the variable field descriptor contains a 13th bogus field of 3 bits.
--- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +1 -1
@@ -4742,7 +4742,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { FN_AVB_MDC, FN_SSI_SDATA6_B, 0, 0, } }, { PINMUX_CFG_REG_VAR("IPSR9", 0xE6060044, 32, - 1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3) { + 1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3) {/* IP9_31 [1] */ 0, 0,/* IP9_30_28 [3] */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 37/343 pinctrl: sh-pfc: sh7734: Add missing IPSR11 field
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 94482af7055e1ffa211c1135256b85590ebcac99 ]
The Peripheral Function Select Register 11 contains 3 reserved bits and 15 variable-width fields, but the variable field descriptor does not contain the 3-bit field IP11[25:23].
--- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
@@ -2237,7 +2237,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { FN_LCD_DATA15_B, 0, 0, 0 } }, {PINMUX_CFG_REG_VAR ("IPSR11" ,0xFFFC0048 ,32 , - 3, 1, 2, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) { + 3, 1, 2, 3, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) {/* IP11_31_29 [3] */ 0, 0, 0, 0, 0, 0, 0, 0,/* IP11_28 [1] */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 26/343 drm/dp_mst: Skip validating ports during destruction, just ref
In reply to Greg Kroah-HartmanFrom: Lyude Paul <[email protected]>
[ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ]
Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago.
Pretend we have a topology like this:
|- DP-1: mst_primary
|- DP-4: active display
|- DP-5: disconnected
|- DP-6: active hub
|- DP-7: active display
|- DP-8: disconnected
|- DP-9: disconnectedIf we unplug DP-6, the topology starting at DP-7 will be destroyed but it's payloads will live on in DP-1's VCPI allocations and thus require removal. However, this removal currently fails because drm_dp_update_payload_part1() will (rightly so) try to validate the port before accessing it, fail then abort. If we keep going, eventually we run the MST hub out of bandwidth and all new allocations will start to fail (or in my case; all new displays just start flickering a ton).
We could just teach drm_dp_update_payload_part1() not to drop the port ref in this case, but then we also need to teach drm_dp_destroy_payload_step1() to do the same thing, then hope no one ever adds anything to the that requires a validated port reference in drm_dp_destroy_connector_work(). Kind of sketchy.
So let's go with a more clever solution: any port that drm_dp_destroy_connector_work() interacts with is guaranteed to still exist in memory until we say so. While said port might not be valid we don't really care: that's the whole reason we're destroying it in the first place! So, teach drm_dp_get_validated_port_ref() to use the all mighty current_work() function to avoid attempting to validate ports from the context of mgr->destroy_connector_work. I can't see any situation where this wouldn't be safe, and this avoids having to play whack-a-mole in the future of trying to work around port validation.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +13 -2
@@ -982,9 +982,20 @@ static struct drm_dp_mst_port *drm_dp_mst_get_port_ref_locked(struct drm_dp_mst_static struct drm_dp_mst_port *drm_dp_get_validated_port_ref (struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port) {struct drm_dp_mst_port *rport =NULL ; +mutex_lock (&mgr->lock); -if (mgr->mst_primary) - rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, port); +/* +* Port may or may not be 'valid' but we don't care about that when +* destroying the port and we are guaranteed that the port pointer +* will be valid until we've finished +*/ +if (current_work () == &mgr->destroy_connector_work) { +kref_get (&port->kref); + rport = port; + }else if (mgr->mst_primary) { + rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, + port); + }mutex_unlock (&mgr->lock);return rport; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 27/343 net: phy: Fix not to call phy_resume() if PHY is not attached
In reply to Greg Kroah-HartmanFrom: Yoshihiro Shimoda <[email protected]>
[ Upstream commit ef1b5bf506b1f0ee3edc98533e1f3ecb105eb46a ]
This patch fixes an issue that mdio_bus_phy_resume() doesn't call phy_resume() if the PHY is not attached.
--- drivers/net/phy/phy_device.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/net/phy/phy_device.c +6 -5
@@ -76,7 +76,7 @@ static LIST_HEAD(phy_fixup_list);static DEFINE_MUTEX (phy_fixup_lock);#ifdef CONFIG_PM -static bool mdio_bus_phy_may_suspend (struct phy_device *phydev) +static bool mdio_bus_phy_may_suspend (struct phy_device *phydev,bool suspend) {struct device_driver *drv = phydev->mdio.dev.driver;struct phy_driver *phydrv =to_phy_driver (drv);
@@ -88,10 +88,11 @@ static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)/* PHY not attached? May suspend if the PHY has not already been * suspended as part of a prior call to phy_disconnect() -> * phy_detach() -> phy_suspend() because the parent netdev might be the -* MDIO bus driver and clock gated at this point. +* MDIO bus driver and clock gated at this point. Also may resume if +* PHY is not attached. */ if (!netdev) -return !phydev->suspended; +return suspend ? !phydev->suspended : phydev->suspended;/* Don't suspend PHY if the attached netdev parent may wakeup. * The parent may point to a PCI device, as in tg3 driver.
@@ -121,7 +122,7 @@ static int mdio_bus_phy_suspend(struct device *dev)if (phydev->attached_dev && phydev->adjust_link)phy_stop_machine (phydev); -if (!mdio_bus_phy_may_suspend (phydev)) +if (!mdio_bus_phy_may_suspend (phydev, true))return 0 ;return phy_suspend (phydev);
@@ -132,7 +133,7 @@ static int mdio_bus_phy_resume(struct device *dev)struct phy_device *phydev =to_phy_device (dev);int ret; -if (!mdio_bus_phy_may_suspend (phydev)) +if (!mdio_bus_phy_may_suspend (phydev, false)) goto no_resume; ret =phy_resume (phydev);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 28/343 IB/rxe: Fix incorrect cache cleanup in error flow
In reply to Greg Kroah-HartmanFrom: Yuval Shaia <[email protected]>
[ Upstream commit 6db21d8986e14e2e86573a3b055b05296188bd2c ]
Array iterator stays at the same slot, fix it.
--- drivers/infiniband/sw/rxe/rxe_pool.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/infiniband/sw/rxe/rxe_pool.c +14 -12
@@ -112,6 +112,18 @@ static inline struct kmem_cache *pool_cache(struct rxe_pool *pool)return rxe_type_info[pool->type].cache; } +static void rxe_cache_clean (size_t cnt) +{ +int i; +struct rxe_type_info *type; + +for (i =0 ; i < cnt; i++) { + type = &rxe_type_info[i]; +kmem_cache_destroy (type->cache); + type->cache =NULL ; + } +} +int rxe_cache_init (void ) {int err;
@@ -136,24 +148,14 @@ int rxe_cache_init(void)return 0 ; err1: -while (--i >=0 ) { -kmem_cache_destroy (type->cache); - type->cache =NULL ; - } +rxe_cache_clean (i);return err; }void rxe_cache_exit (void ) { -int i; -struct rxe_type_info *type; - -for (i =0 ; i <RXE_NUM_TYPES ; i++) { - type = &rxe_type_info[i]; -kmem_cache_destroy (type->cache); - type->cache =NULL ; - } +rxe_cache_clean (RXE_NUM_TYPES ); }static int rxe_pool_init_index (struct rxe_pool *pool,u32 max,u32 min)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 38/343 pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit e28dc3f09c9d2555a9bd982f0847988591052226 ]
While the SEL_PWM[0-3] fields in the Module Select Register 0 support 4 possible configurations per PWM pin, only the first 3 are valid.
Replace the invalid and unused configurations for SEL_PWM[0-3]_3 by dummies.
--- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +4 -4
@@ -391,10 +391,10 @@ FM(IP12_31_28) IP12_31_28 \#define MOD_SEL0_27 FM(SEL_MSIOF3_0) FM(SEL_MSIOF3_1)#define MOD_SEL0_26 FM(SEL_HSCIF3_0) FM(SEL_HSCIF3_1)#define MOD_SEL0_25 FM(SEL_SCIF4_0) FM(SEL_SCIF4_1) -#define MOD_SEL0_24_23 FM(SEL_PWM0_0) FM(SEL_PWM0_1) FM(SEL_PWM0_2) FM(SEL_PWM0_3) -#define MOD_SEL0_22_21 FM(SEL_PWM1_0) FM(SEL_PWM1_1) FM(SEL_PWM1_2) FM(SEL_PWM1_3) -#define MOD_SEL0_20_19 FM(SEL_PWM2_0) FM(SEL_PWM2_1) FM(SEL_PWM2_2) FM(SEL_PWM2_3) -#define MOD_SEL0_18_17 FM(SEL_PWM3_0) FM(SEL_PWM3_1) FM(SEL_PWM3_2) FM(SEL_PWM3_3) +#define MOD_SEL0_24_23 FM(SEL_PWM0_0) FM(SEL_PWM0_1) FM(SEL_PWM0_2) F_(0, 0) +#define MOD_SEL0_22_21 FM(SEL_PWM1_0) FM(SEL_PWM1_1) FM(SEL_PWM1_2) F_(0, 0) +#define MOD_SEL0_20_19 FM(SEL_PWM2_0) FM(SEL_PWM2_1) FM(SEL_PWM2_2) F_(0, 0) +#define MOD_SEL0_18_17 FM(SEL_PWM3_0) FM(SEL_PWM3_1) FM(SEL_PWM3_2) F_(0, 0)#define MOD_SEL0_15 FM(SEL_IRQ_0_0) FM(SEL_IRQ_0_1)#define MOD_SEL0_14 FM(SEL_IRQ_1_0) FM(SEL_IRQ_1_1)#define MOD_SEL0_13 FM(SEL_IRQ_2_0) FM(SEL_IRQ_2_1)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 29/343 staging: bcm2835-camera: Abort probe if there is no camera
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
[ Upstream commit 7566f39dfdc11f8a97d5810c6e6295a88f97ef91 ]
Abort the probing of the camera driver in case there isn't a camera actually connected to the Raspberry Pi. This solution also avoids a NULL ptr dereference of mmal instance on driver unload.
--- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +9 -0
@@ -1849,6 +1849,12 @@ static int __init bm2835_mmal_init(void) num_cameras =get_num_cameras (instance, resolutions,MAX_BCM2835_CAMERAS ); + +if (num_cameras <1 ) { + ret = -ENODEV ; + goto cleanup_mmal; + } +if (num_cameras >MAX_BCM2835_CAMERAS ) num_cameras =MAX_BCM2835_CAMERAS ;
@@ -1948,6 +1954,9 @@ cleanup_gdev:pr_info ("%s: error %d while loading driver\n" ,BM2835_MMAL_MODULE_NAME , ret); +cleanup_mmal: +vchiq_mmal_finalise (instance); +return ret; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 30/343 switchtec: Remove immediate status check after submitting MRPC command
In reply to Greg Kroah-HartmanFrom: Kelvin Cao <[email protected]>
[ Upstream commit 526180408b815aa7b96fd48bd23cdd33ef04e38e ]
After submitting a Firmware Download MRPC command, Switchtec firmware will delay Management EP BAR MemRd TLP responses by more than 10ms. This is a firmware limitation. Delayed MemRd completions are a problem for systems with a low Completion Timeout (CTO).
The current driver checks the MRPC status immediately after submitting an MRPC command, which results in a delayed MemRd completion that may cause a Completion Timeout.
Remove the immediate status check and rely on the check after receiving an interrupt or timing out.
This is only a software workaround to the READ issue and a proper fix of this should be done in firmware.
--- drivers/pci/switch/switchtec.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/pci/switch/switchtec.c +0 -4
@@ -399,10 +399,6 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev) stuser->data, stuser->data_len);iowrite32 (stuser->cmd, &stdev->mmio_mrpc->cmd); - stuser->status =ioread32 (&stdev->mmio_mrpc->status); -if (stuser->status !=SWITCHTEC_MRPC_STATUS_INPROGRESS ) -mrpc_complete_cmd (stdev); -schedule_delayed_work (&stdev->mrpc_timeout,msecs_to_jiffies (500 )); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 31/343 pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8 ]
The gether_gmii_mux[] array contains the REF125CK pin mark, but the gether_gmii_pins[] array lacks the corresponding pin number.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -1
@@ -1982,7 +1982,7 @@ static const unsigned int gether_gmii_pins[] = {*/ 185 ,186 ,187 ,188 ,189 ,190 ,191 ,192 ,174 ,161 ,204 ,171 ,170 ,169 ,168 ,167 ,166 ,173 ,172 ,176 ,184 ,183 ,203 , - 205, 163, 206, 207, + 205, 163, 206, 207, 158, };static const unsigned int gether_gmii_mux[] = { ET_ERXD0_MARK, ET_ERXD1_MARK, ET_ERXD2_MARK, ET_ERXD3_MARK,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 32/343 pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b ]
The lcd0_data24_1_pins[] array contains the LCD0 D1[2-5] pin numbers, but the lcd0_data24_1_mux[] array lacks the corresponding pin marks.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -0
@@ -2154,6 +2154,7 @@ static const unsigned int lcd0_data24_1_mux[] = {LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK ,LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK ,LCD0_D8_MARK ,LCD0_D9_MARK ,LCD0_D10_MARK ,LCD0_D11_MARK , +LCD0_D12_MARK ,LCD0_D13_MARK ,LCD0_D14_MARK ,LCD0_D15_MARK ,LCD0_D16_MARK ,LCD0_D17_MARK ,LCD0_D18_PORT163_MARK ,LCD0_D19_PORT162_MARK ,LCD0_D20_PORT161_MARK ,LCD0_D21_PORT158_MARK , LCD0_D22_PORT160_MARK, LCD0_D23_PORT159_MARK,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 33/343 pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 884fa25fb6e5e63ab970d612a628313bb68f37cc ]
The qspi_data4_b_mux[] array contains pin marks for the clock and chip select pins. The qspi_data4_b_pins[] array rightfully does not contain the corresponding pin numbers, as the control pins are provided by a separate group (qspi_ctrl_b).
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -2
@@ -3220,8 +3220,7 @@ static const unsigned int qspi_data4_b_pins[] = { RCAR_GP_PIN(6, 4), };static const unsigned int qspi_data4_b_mux[] = { -SPCLK_B_MARK ,MOSI_IO0_B_MARK ,MISO_IO1_B_MARK , -IO2_B_MARK ,IO3_B_MARK ,SSL_B_MARK , +MOSI_IO0_B_MARK ,MISO_IO1_B_MARK ,IO2_B_MARK ,IO3_B_MARK , };/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 24/343 pcrypt: use format specifier in kobject_add
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit b1e3874c75ab15288f573b3532e507c37e8e7656 ]
Passing string 'name' as the format specifier is potentially hazardous because name could (although very unlikely to) have a format specifier embedded in it causing issues when parsing the non-existent arguments to these. Follow best practice by using the "%s" format string for the string 'name'.
Cleans up clang warning:crypto/pcrypt.c:397:40: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
--- crypto/pcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/pcrypt.c +1 -1
@@ -394,7 +394,7 @@ static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name)int ret; pinst->kobj.kset = pcrypt_kset; - ret =kobject_add (&pinst->kobj,NULL , name); + ret =kobject_add (&pinst->kobj,NULL ,"%s" , name);if (!ret)kobject_uevent (&pinst->kobj,KOBJ_ADD );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 40/343 pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 4d374bacd7c9665179f9752a52d5d602c45d8190 ]
The IP10[5:3] field in Peripheral Function Select Register 10 has a width of 3 bits, i.e. it allows programming one out of 8 different configurations.
However, 9 values are provided instead of 8, overflowing into the subsequent field in the register, and thus breaking the configuration of the latter.
Fix this by dropping a bogus zero value.
--- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
@@ -2231,7 +2231,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_LCD_CL1_B ,0 ,0 ,/* IP10_5_3 [3] */ FN_SSI_WS23 ,FN_VI1_5_B ,FN_TX1_D ,FN_HSCK0_C ,FN_FALE_B , -FN_LCD_DON_B ,0 ,0 ,0 , +FN_LCD_DON_B ,0 ,0 ,/* IP10_2_0 [3] */ FN_SSI_SCK23 ,FN_VI1_4_B ,FN_RX1_D ,FN_FCLE_B , FN_LCD_DATA15_B, 0, 0, 0 }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 49/343 clk: imx7d: fix refcount leak in imx7d_clocks_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 5f8c183a996b76bb09748073c856e4246fd4ce95 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx7d.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx7d.c +1 -0
@@ -416,6 +416,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx7d-anatop" ); base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np); clks[IMX7D_PLL_ARM_MAIN_SRC ] =imx_clk_mux ("pll_arm_main_src" , base +0x60 ,14 ,2 , pll_bypass_src_sel,ARRAY_SIZE (pll_bypass_src_sel)); clks[IMX7D_PLL_DRAM_MAIN_SRC ] =imx_clk_mux ("pll_dram_main_src" , base +0x70 ,14 ,2 , pll_bypass_src_sel,ARRAY_SIZE (pll_bypass_src_sel));
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 50/343 clk: vf610: fix refcount leak in vf610_clocks_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 567177024e0313e4f0dcba7ba10c0732e50e655d ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-vf610.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-vf610.c +1 -0
@@ -203,6 +203,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,vf610-anatop" ); anatop_base =of_iomap (np,0 );BUG_ON (!anatop_base); +of_node_put (np); np = ccm_node; ccm_base =of_iomap (np,0 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 52/343 clk: kirkwood: fix refcount leak in kirkwood_clk_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit e7beeab9c61591cd0e690d8733d534c3f4278ff8 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/kirkwood.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/mvebu/kirkwood.c +2 -0
@@ -333,6 +333,8 @@ static void __init kirkwood_clk_init(struct device_node *np)if (cgnp) {mvebu_clk_gating_setup (cgnp, kirkwood_gating_desc);kirkwood_clk_muxing_setup (cgnp, kirkwood_mux_desc); + +of_node_put (cgnp); } } CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock",
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 53/343 clk: armada-xp: fix refcount leak in axp_clk_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit db20a90a4b6745dad62753f8bd2f66afdd5abc84 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/armada-xp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-xp.c +3 -1
@@ -228,7 +228,9 @@ static void __init axp_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &axp_coreclks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, axp_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (axp_clk,"marvell,armada-xp-core-clock" , axp_clk_init);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 41/343 vxlan: changelink: Fix handling of default remotes
In reply to Greg Kroah-HartmanFrom: Petr Machata <[email protected]>
[ Upstream commit ce5e098f7a10b4bf8e948c12fa350320c5c3afad ]
Default remotes are stored as FDB entries with an Ethernet address of 00:00:00:00:00:00. When a request is made to change a remote address of a VXLAN device, vxlan_changelink() first deletes the existing default remote, and then creates a new FDB entry.
This works well as long as the list of default remotes matches exactly the configuration of a VXLAN remote address. Thus when the VXLAN device has a remote of X, there should be exactly one default remote FDB entry X. If the VXLAN device has no remote address, there should be no such entry.
Besides using "ip link set", it is possible to manipulate the list of default remotes by using the "bridge fdb". It is therefore easy to break the above condition. Under such circumstances, the __vxlan_fdb_delete() call doesn't delete the FDB entry itself, but just one remote. The following vxlan_fdb_create() then creates a new FDB entry, leading to a situation where two entries exist for the address 00:00:00:00:00:00, each with a different subset of default remotes.
An even more obvious breakage rooted in the same cause can be observed when a remote address is configured for a VXLAN device that did not have one before. In that case vxlan_changelink() doesn't remove any remote, and just creates a new FDB entry for the new address:
$ ip link add name vx up type vxlan id 2000 dstport 4789 $ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent $ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent $ ip link set dev vx type vxlan remote 192.0.2.30 $ bridge fdb sh dev vx | grep 00:00:00:00:00:00 00:00:00:00:00:00 dst 192.0.2.30 self permanent <- new entry, 1 rdst 00:00:00:00:00:00 dst 192.0.2.20 self permanent <- orig. entry, 2 rdsts 00:00:00:00:00:00 dst 192.0.2.30 self permanent
To fix this, instead of calling vxlan_fdb_create() directly, defer to vxlan_fdb_update(). That has logic to handle the duplicates properly. Additionally, it also handles notifications, so drop that call from changelink as well.
--- drivers/net/vxlan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/vxlan.c +3 -4
@@ -3494,7 +3494,6 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],struct vxlan_rdst *dst = &vxlan->default_dst;struct vxlan_rdst old_dst;struct vxlan_config conf; -struct vxlan_fdb *f =NULL ;int err; err = vxlan_nl2conf(tb, data,
@@ -3520,19 +3519,19 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[], old_dst.remote_ifindex, 0);if (!vxlan_addr_any (&dst->remote_ip)) { - err =vxlan_fdb_create (vxlan, all_zeros_mac, + err =vxlan_fdb_update (vxlan, all_zeros_mac, &dst->remote_ip,NUD_REACHABLE |NUD_PERMANENT , +NLM_F_APPEND |NLM_F_CREATE , vxlan->cfg.dst_port, dst->remote_vni, dst->remote_vni, dst->remote_ifindex, -NTF_SELF , &f); +NTF_SELF );if (err) {spin_unlock_bh (&vxlan->hash_lock);return err; } -vxlan_fdb_notify (vxlan, f,first_remote_rtnl (f),RTM_NEWNEIGH ); }spin_unlock_bh (&vxlan->hash_lock); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 42/343 Input: nomadik-ske-keypad - fix a loop timeout test
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 4d8f727b83bcd6702c2d210330872c9122d2d360 ]
The loop exits with "timeout" set to -1 not to 0.
--- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/nomadik-ske-keypad.c +1 -1
@@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(struct ske_keypad *keypad)while ((readl (keypad->reg_base +SKE_RIS ) !=0x00000000 ) && timeout--)cpu_relax (); -if (!timeout) +if (timeout ==-1 )return -EINVAL ;/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 43/343 clk: highbank: fix refcount leak in hb_clk_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 5eb8ba90958de1285120dae5d3a5d2b1a360b3b4 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/clk-highbank.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-highbank.c +1 -0
@@ -293,6 +293,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk/* Map system registers */ srnp =of_find_compatible_node (NULL ,NULL ,"calxeda,hb-sregs" ); hb_clk->reg =of_iomap (srnp,0 ); +of_node_put (srnp);BUG_ON (!hb_clk->reg); hb_clk->reg += reg;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 44/343 clk: qoriq: fix refcount leak in clockgen_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 70af6c5b5270e8101f318c4b69cc98a726edfab9 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/clk-qoriq.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-qoriq.c +1 -0
@@ -1382,6 +1382,7 @@ static void __init clockgen_init(struct device_node *np)pr_err ("%s: Couldn't map %pOF regs\n" , __func__, guts); } +of_node_put (guts); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 45/343 clk: socfpga: fix refcount leak
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 7f9705beeb3759e69165e7aff588f6488ff6c1ac ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/socfpga/clk-pll-a10.c | 1 + drivers/clk/socfpga/clk-pll.c | 1 + 2 files changed, 2 insertions(+)
drivers/clk/socfpga/clk-pll-a10.c +1 -0
@@ -95,6 +95,7 @@ static struct clk * __init __socfpga_pll_init(struct device_node *node, clkmgr_np =of_find_compatible_node (NULL ,NULL ,"altr,clk-mgr" ); clk_mgr_a10_base_addr =of_iomap (clkmgr_np,0 ); +of_node_put (clkmgr_np);BUG_ON (!clk_mgr_a10_base_addr); pll_clk->hw.reg = clk_mgr_a10_base_addr + reg;
drivers/clk/socfpga/clk-pll.c +1 -0
@@ -100,6 +100,7 @@ static __init struct clk *__socfpga_pll_init(struct device_node *node, clkmgr_np =of_find_compatible_node (NULL ,NULL ,"altr,clk-mgr" ); clk_mgr_base_addr =of_iomap (clkmgr_np,0 ); +of_node_put (clkmgr_np);BUG_ON (!clk_mgr_base_addr); pll_clk->hw.reg = clk_mgr_base_addr + reg;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 51/343 clk: armada-370: fix refcount leak in a370_clk_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit a3c24050bdf70c958a8d98c2823b66ea761e6a31 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/armada-370.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-370.c +3 -1
@@ -177,8 +177,10 @@ static void __init a370_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &a370_coreclks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, a370_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (a370_clk,"marvell,armada-370-core-clock" , a370_clk_init);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 46/343 clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit cee82eb9532090cd1dc953e845d71f9b1445c84e ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/samsung/clk-exynos4.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/samsung/clk-exynos4.c +1 -0
@@ -1240,6 +1240,7 @@ static unsigned long __init exynos4_get_xom(void) xom =readl (chipid_base +8 );iounmap (chipid_base); +of_node_put (np); }return xom;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 47/343 clk: imx6q: fix refcount leak in imx6q_clocks_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit c9ec1d8fef31b5fc9e90e99f9bd685db5caa7c5e ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx6q.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6q.c +1 -0
@@ -431,6 +431,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx6q-anatop" ); anatop_base = base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np);/* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */ if (clk_on_imx6q () &&imx_get_soc_revision () ==IMX_CHIP_REVISION_1_0 ) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 39/343 pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 9540cbdfcd861caf67a6f0e4bb7f46d41c4aad86 ]
The Port C I/O Register 0 contains 7 reserved bits, but the descriptor contains only dummy configuration values for 6 reserved bits, thus breaking the configuration of all subsequent fields in the register.
Fix this by adding the two missing configuration values.
--- drivers/pinctrl/sh-pfc/pfc-sh7269.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7269.c +1 -1
@@ -2119,7 +2119,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { }, { PINMUX_CFG_REG("PCIOR0", 0xfffe3852, 16, 1) { -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PC8_IN ,PC8_OUT ,PC7_IN ,PC7_OUT , PC6_IN, PC6_OUT,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 48/343 clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 1731e14fb30212dd8c1e9f8fc1af061e56498c55 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx6sx.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6sx.c +1 -0
@@ -164,6 +164,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx6sx-anatop" ); base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np); clks[IMX6SX_PLL1_BYPASS_SRC ] =imx_clk_mux ("pll1_bypass_src" , base +0x00 ,14 ,1 , pll_bypass_src_sels,ARRAY_SIZE (pll_bypass_src_sels)); clks[IMX6SX_PLL2_BYPASS_SRC ] =imx_clk_mux ("pll2_bypass_src" , base +0x30 ,14 ,1 , pll_bypass_src_sels,ARRAY_SIZE (pll_bypass_src_sels));
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 55/343 clk: dove: fix refcount leak in dove_clk_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 8d726c5128298386b907963033be93407b0c4275 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/dove.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/clk/mvebu/dove.c +6 -2
@@ -190,10 +190,14 @@ static void __init dove_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &dove_coreclks); -if (ddnp) +if (ddnp) {dove_divider_clk_init (ddnp); +of_node_put (ddnp); + } -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, dove_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (dove_clk,"marvell,dove-core-clock" , dove_clk_init);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 64/343 drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit f8261c376e7f8cb9024af5a6c54be540c7f9108e ]
The etnaviv_gem_get_pages() never returns NULL. It returns error pointers on error.
--- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_dump.c +1 -1
@@ -207,7 +207,7 @@ void etnaviv_core_dump(struct etnaviv_gpu *gpu)mutex_lock (&obj->lock); pages =etnaviv_gem_get_pages (obj);mutex_unlock (&obj->lock); -if (pages) { +if (!IS_ERR (pages)) {int j; iter.hdr->data[0 ] = bomap - bomap_start;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 65/343 media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL
In reply to Greg Kroah-HartmanFrom: Pawe? Chmiel <[email protected]>
[ Upstream commit 19c624c6b29e244c418f8b44a711cbf5e82e3cd4 ]
This commit corrects max and step values for v4l2 control for V4L2_CID_JPEG_RESTART_INTERVAL. Max should be 0xffff and step should be 1. It was found by using v4l2-compliance tool and checking result of VIDIOC_QUERY_EXT_CTRL/QUERYMENU test.
Previously it was complaining that step was bigger than difference between max and min.
--- drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/s5p-jpeg/jpeg-core.c +1 -1
@@ -2005,7 +2005,7 @@ static int s5p_jpeg_controls_create(struct s5p_jpeg_ctx *ctx)v4l2_ctrl_new_std (&ctx->ctrl_handler, &s5p_jpeg_ctrl_ops,V4L2_CID_JPEG_RESTART_INTERVAL , -0 ,3 ,0xffff ,0 ); +0 ,0xffff ,1 ,0 );if (ctx->jpeg->variant->version ==SJPEG_S5P ) mask = ~0x06 ;/* 422, 420 */ }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 66/343 kbuild: mark prepare0 as PHONY to fix external module build
In reply to Greg Kroah-HartmanFrom: Masahiro Yamada <[email protected]>
[ Upstream commit e00d8880481497474792d28c14479a9fb6752046 ]
Commit c3ff2a5193fa ("powerpc/32: add stack protector support") caused kernel panic on PowerPC when an external module is used with CONFIG_STACKPROTECTOR because the 'prepare' target was not executed for the external module build.
Commit e07db28eea38 ("kbuild: fix single target build for external module") turned it into a build error because the 'prepare' target is now executed but the 'prepare0' target is missing for the external module build.
External module on arm/arm64 with CONFIG_STACKPROTECTOR_PER_TASK is also broken in the same way.
Move 'PHONY += prepare0' to the common place. GNU Make is fine with missing rule for phony targets. I also removed the comment which is wrong irrespective of this commit.
I minimize the change so it can be easily backported to 4.20.x
To fix v4.20, please backport e07db28eea38 ("kbuild: fix single target build for external module"), and then this commit.
--- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -971,6 +971,7 @@ ifdef CONFIG_STACK_VALIDATION endif endif +PHONY += prepare0 ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
@@ -1065,8 +1066,7 @@ include/config/kernel.release: include/config/auto.conf FORCE # archprepare is used in arch Makefiles and when processed asm symlink, # version.h and scripts_basic is processed / created. -# Listed in dependency order -PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 +PHONY += prepare archprepare prepare1 prepare2 prepare3 # prepare3 is used to check if we are building in a separate output directory, # and if so do:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 67/343 crypto: brcm - Fix some set-but-not-used warning
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 707d0cf8f7cff6dfee9197002859912310532c4f ]
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/crypto/bcm/cipher.c: In function 'handle_ahash_req':drivers/crypto/bcm/cipher.c:720:15: warning:
variable 'chunk_start' set but not used [-Wunused-but-set-variable]
drivers/crypto/bcm/cipher.c: In function 'spu_rx_callback':drivers/crypto/bcm/cipher.c:1679:31: warning:
variable 'areq' set but not used [-Wunused-but-set-variable]
drivers/crypto/bcm/cipher.c:1678:22: warning:
variable 'ctx' set but not used [-Wunused-but-set-variable]
--- drivers/crypto/bcm/cipher.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/crypto/bcm/cipher.c +1 -5
@@ -718,7 +718,7 @@ static int handle_ahash_req(struct iproc_reqctx_s *rctx)*/ unsigned int new_data_len; -unsigned int chunk_start =0 ; +unsigned int __maybe_unused chunk_start =0 ;u32 db_size;/* Length of data field, incl gcm and hash padding */ int pad_len =0 ;/* total pad len, including gcm, hash, stat padding */ u32 data_pad_len =0 ;/* length of GCM/CCM padding */
@@ -1676,8 +1676,6 @@ static void spu_rx_callback(struct mbox_client *cl, void *msg)struct spu_hw *spu = &iproc_priv.spu;struct brcm_message *mssg = msg;struct iproc_reqctx_s *rctx; -struct iproc_ctx_s *ctx; -struct crypto_async_request *areq;int err =0 ; rctx = mssg->ctx;
@@ -1687,8 +1685,6 @@ static void spu_rx_callback(struct mbox_client *cl, void *msg) err = -EFAULT ; goto cb_finish; } - areq = rctx->parent; - ctx = rctx->ctx;/* process the SPU status */ err = spu->spu_status_process (rctx->msg_buf.rx_stat);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 68/343 crypto: tgr192 - fix unaligned memory access
In reply to Greg Kroah-HartmanFrom: Eric Biggers <[email protected]>
[ Upstream commit f990f7fb58ac8ac9a43316f09a48cff1a49dda42 ]
Fix an unaligned memory access in tgr192_transform() by using the unaligned access helpers.
--- crypto/tgr192.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
crypto/tgr192.c +3 -3
@@ -25,8 +25,9 @@#include <linux/init.h> #include <linux/module.h> #include <linux/mm.h> -#include <asm/byteorder.h> #include <linux/types.h> +#include <asm/byteorder.h> +#include <asm/unaligned.h> #define TGR192_DIGEST_SIZE 24#define TGR160_DIGEST_SIZE 20
@@ -468,10 +469,9 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data)u64 a, b, c, aa, bb, cc;u64 x[8 ];int i; -const __le64 *ptr = (const __le64 *)data;for (i =0 ; i <8 ; i++) - x[i] =le64_to_cpu (ptr[i]); + x[i] =get_unaligned_le64 (data + i *sizeof (__le64));/* save */ a = aa = tctx->a;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 56/343 MIPS: BCM63XX: drop unused and broken DSP platform device
In reply to Greg Kroah-HartmanFrom: Jonas Gorski <[email protected]>
[ Upstream commit 682fee802843b332f9c51ffc8e062de5ff773f2e ]
Trying to register the DSP platform device results in a null pointer access:
[ 0.124184] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804e305c, ra == 804e6f20 [ 0.135208] Oops[#1]: [ 0.137514] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.87 ... [ 0.197117] epc : 804e305c bcm63xx_dsp_register+0x80/0xa4 [ 0.202838] ra : 804e6f20 board_register_devices+0x258/0x390
...
This happens because it tries to copy the passed platform data over the platform_device's unpopulated platform_data.
Since this code has been broken since its submission, no driver was ever submitted for it, and apparently nobody was using it, just remove it instead of trying to fix it.
--- arch/mips/bcm63xx/Makefile | 6 +- arch/mips/bcm63xx/boards/board_bcm963xx.c | 20 ------- arch/mips/bcm63xx/dev-dsp.c | 56 ------------------- .../asm/mach-bcm63xx/bcm63xx_dev_dsp.h | 14 ----- .../include/asm/mach-bcm63xx/board_bcm963xx.h | 5 -- 5 files changed, 3 insertions(+), 98 deletions(-) delete mode 100644 arch/mips/bcm63xx/dev-dsp.c delete mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
arch/mips/bcm63xx/Makefile +3 -3
@@ -1,8 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \ - dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \ - dev-wdt.o dev-usb-usbd.o + setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ + dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ + dev-usb-usbd.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-y += boards/
arch/mips/bcm63xx/boards/board_bcm963xx.c +0 -20
@@ -23,7 +23,6 @@#include <bcm63xx_nvram.h> #include <bcm63xx_dev_pci.h> #include <bcm63xx_dev_enet.h> -#include <bcm63xx_dev_dsp.h> #include <bcm63xx_dev_flash.h> #include <bcm63xx_dev_hsspi.h> #include <bcm63xx_dev_pcmcia.h>
@@ -289,14 +288,6 @@ static struct board_info __initdata board_96348gw_10 = { .has_pccard = 1, .has_ehci0 = 1, - .has_dsp = 1, - .dsp = { - .gpio_rst = 6, - .gpio_int = 34, - .cs = 2, - .ext_irq = 2, - }, - .leds = { { .name = "adsl-fail",
@@ -401,14 +392,6 @@ static struct board_info __initdata board_96348gw = { .has_ohci0 = 1, - .has_dsp = 1, - .dsp = { - .gpio_rst = 6, - .gpio_int = 34, - .ext_irq = 2, - .cs = 2, - }, - .leds = { { .name = "adsl-fail",
@@ -898,9 +881,6 @@ int __init board_register_devices(void)if (board.has_usbd)bcm63xx_usbd_register (&board.usbd); -if (board.has_dsp) -bcm63xx_dsp_register (&board.dsp); -/* Generate MAC address for WLAN and register our SPROM, * do this after registering enet devices */
arch/mips/bcm63xx/dev-dsp.c deleted +0 -56
56 lines not on this page · raw message
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h deleted +0 -14
@@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __BCM63XX_DSP_H -#define __BCM63XX_DSP_H - -struct bcm63xx_dsp_platform_data { -unsigned gpio_rst; -unsigned gpio_int; -unsigned cs; -unsigned ext_irq; -}; - -int __init bcm63xx_dsp_register (const struct bcm63xx_dsp_platform_data *pd); - -#endif /* __BCM63XX_DSP_H */
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +0 -5
@@ -7,7 +7,6 @@#include <linux/leds.h> #include <bcm63xx_dev_enet.h> #include <bcm63xx_dev_usb_usbd.h> -#include <bcm63xx_dev_dsp.h> /* * flash mapping
@@ -31,7 +30,6 @@ struct board_info { unsigned int has_ohci0:1; unsigned int has_ehci0:1; unsigned int has_usbd:1; - unsigned int has_dsp:1; unsigned int has_uart0:1; unsigned int has_uart1:1;
@@ -43,9 +41,6 @@ struct board_info {/* USB config */ struct bcm63xx_usbd_platform_data usbd; -/* DSP config */ -struct bcm63xx_dsp_platform_data dsp; -/* GPIO LEDs */ struct gpio_led leds[5 ];
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 57/343 IB/usnic: Fix out of bounds index check in query pkey
In reply to Greg Kroah-HartmanFrom: Gal Pressman <[email protected]>
[ Upstream commit 4959d5da5737dd804255c75b8cea0a2929ce279a ]
The pkey table size is one element, index should be tested for > 0 instead of > 1.
--- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/usnic/usnic_ib_verbs.c +1 -1
@@ -423,7 +423,7 @@ struct net_device *usnic_get_netdev(struct ib_device *device, u8 port_num)int usnic_ib_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >1 ) +if (index >0 )return -EINVAL ; *pkey =0xffff ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 58/343 RDMA/ocrdma: Fix out of bounds index check in query pkey
In reply to Greg Kroah-HartmanFrom: Gal Pressman <[email protected]>
[ Upstream commit b188940796c7be31c1b8c25a9a0e0842c2e7a49e ]
The pkey table size is one element, index should be tested for > 0 instead of > 1.
--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
@@ -55,7 +55,7 @@int ocrdma_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >1 ) +if (index >0 )return -EINVAL ; *pkey =0xffff ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 59/343 RDMA/qedr: Fix out of bounds index check in query pkey
In reply to Greg Kroah-HartmanFrom: Gal Pressman <[email protected]>
[ Upstream commit dbe30dae487e1a232158c24b432d45281c2805b7 ]
The pkey table size is QEDR_ROCE_PKEY_TABLE_LEN, index should be tested for >= QEDR_ROCE_PKEY_TABLE_LEN instead of > QEDR_ROCE_PKEY_TABLE_LEN.
--- drivers/infiniband/hw/qedr/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/qedr/verbs.c +1 -1
@@ -63,7 +63,7 @@ static inline int qedr_ib_copy_to_udata(struct ib_udata *udata, void *src,int qedr_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >QEDR_ROCE_PKEY_TABLE_LEN ) +if (index >=QEDR_ROCE_PKEY_TABLE_LEN )return -EINVAL ; *pkey =QEDR_ROCE_PKEY_DEFAULT ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 60/343 drm/shmob: Fix return value check in shmob_drm_probe
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 06c3bbd3c12737a50c2e981821b5585e1786e73d ]
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().
--- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/shmobile/shmob_drm_drv.c +2 -2
@@ -233,8 +233,8 @@ static int shmob_drm_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); sdev->mmio =devm_ioremap_resource (&pdev->dev, res); -if (sdev->mmio ==NULL ) -return -ENOMEM ; +if (IS_ERR (sdev->mmio)) +return PTR_ERR (sdev->mmio); ret =shmob_drm_setup_clocks (sdev, pdata->clk_source);if (ret <0 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 61/343 arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD
In reply to Greg Kroah-HartmanFrom: Loic Poulain <[email protected]>
[ Upstream commit af61bef513ba179559e56908b8c465e587bc3890 ]
In the same way as for msm8974-hammerhead, l11 load, used for SDCARD VMMC, needs to be increased in order to prevent any voltage drop issues (due to limited current) happening with some SDCARDS or during specific operations (e.g. write).
Tested on Dragonboard-410c and DART-SD410 boards.
--- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +2 -0
@@ -458,6 +458,8 @@ l11 { regulator-min-microvolt = <1750000>; regulator-max-microvolt = <3337000>; + regulator-allow-set-load; + regulator-system-load = <200000>; }; l12 {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 62/343 spi: cadence: Correct initialisation of runtime PM
In reply to Greg Kroah-HartmanFrom: Charles Keepax <[email protected]>
[ Upstream commit 734882a8bf984c2ac8a57d8ac3ee53230bd0bed8 ]
Currently the driver calls pm_runtime_put_autosuspend but without ever having done a pm_runtime_get, this causes the reference count in the pm runtime core to become -1. The bad reference count causes the core to sometimes suspend whilst an active SPI transfer is in progress.
arizona spi0.1: SPI transfer timed outspi_master spi0: failed to transfer one message from queue
The correct proceedure is to do all the initialisation that requires the hardware to be powered up before enabling the PM runtime, then enable the PM runtime having called pm_runtime_set_active to inform it that the hardware is currently powered up. The core will then power it down at it's leisure and no explicit pm_runtime_put is required.
--- drivers/spi/spi-cadence.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/spi/spi-cadence.c +4 -7
@@ -584,11 +584,6 @@ static int cdns_spi_probe(struct platform_device *pdev) goto clk_dis_apb; } -pm_runtime_use_autosuspend (&pdev->dev); -pm_runtime_set_autosuspend_delay (&pdev->dev,SPI_AUTOSUSPEND_TIMEOUT ); -pm_runtime_set_active (&pdev->dev); -pm_runtime_enable (&pdev->dev); - ret =of_property_read_u32 (pdev->dev.of_node,"num-cs" , &num_cs);if (ret <0 ) master->num_chipselect =CDNS_SPI_DEFAULT_NUM_CS ;
@@ -603,8 +598,10 @@ static int cdns_spi_probe(struct platform_device *pdev)/* SPI controller initializations */ cdns_spi_init_hw (xspi); -pm_runtime_mark_last_busy (&pdev->dev); -pm_runtime_put_autosuspend (&pdev->dev); +pm_runtime_set_active (&pdev->dev); +pm_runtime_enable (&pdev->dev); +pm_runtime_use_autosuspend (&pdev->dev); +pm_runtime_set_autosuspend_delay (&pdev->dev,SPI_AUTOSUSPEND_TIMEOUT ); irq =platform_get_irq (pdev,0 );if (irq <=0 ) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 63/343 RDMA/iw_cxgb4: Fix the unchecked ep dereference
In reply to Greg Kroah-HartmanFrom: Raju Rangoju <[email protected]>
[ Upstream commit 3352976c892301fd576a2e9ff0ac7337b2e2ca48 ]
The patch 944661dd97f4: "RDMA/iw_cxgb4: atomically lookup ep and get a reference" from May 6, 2016, leads to the following Smatch complaint:
drivers/infiniband/hw/cxgb4/cm.c:2953 terminate()
error: we previously assumed 'ep' could be null (see line 2945)
--- drivers/infiniband/hw/cxgb4/cm.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +10 -7
@@ -2923,15 +2923,18 @@ static int terminate(struct c4iw_dev *dev, struct sk_buff *skb) ep =get_ep_from_tid (dev, tid);BUG_ON (!ep); -if (ep && ep->com.qp) { -pr_warn ("TERM received tid %u qpid %u\n" , - tid, ep->com.qp->wq.sq.qid); - attrs.next_state =C4IW_QP_STATE_TERMINATE ; -c4iw_modify_qp (ep->com.qp->rhp, ep->com.qp, -C4IW_QP_ATTR_NEXT_STATE , &attrs,1 ); +if (ep) { +if (ep->com.qp) { +pr_warn ("TERM received tid %u qpid %u\n" , tid, + ep->com.qp->wq.sq.qid); + attrs.next_state =C4IW_QP_STATE_TERMINATE ; +c4iw_modify_qp (ep->com.qp->rhp, ep->com.qp, +C4IW_QP_ATTR_NEXT_STATE , &attrs,1 ); + } + +c4iw_put_ep (&ep->com); }else pr_warn ("TERM received tid %u no ep/qp\n" , tid); -c4iw_put_ep (&ep->com);return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 54/343 clk: mv98dx3236: fix refcount leak in mv98dx3236_clk_init()
In reply to Greg Kroah-HartmanFrom: Yangtao Li <[email protected]>
[ Upstream commit 9b4eedf627045ae5ddcff60a484200cdd554c413 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/mv98dx3236.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/mv98dx3236.c +3 -1
@@ -174,7 +174,9 @@ static void __init mv98dx3236_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &mv98dx3236_core_clocks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, mv98dx3236_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (mv98dx3236_clk,"marvell,mv98dx3236-core-clock" , mv98dx3236_clk_init);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 70/343 IB/iser: Pass the correct number of entries for dma mapped SGL
In reply to Greg Kroah-HartmanFrom: Israel Rukshin <[email protected]>
[ Upstream commit 57b26497fabe1b9379b59fbc7e35e608e114df16 ]
ib_dma_map_sg() augments the SGL into a 'dma mapped SGL'. This process may change the number of entries and the lengths of each entry.
Code that touches dma_address is iterating over the 'dma mapped SGL' and must use dma_nents which returned from ib_dma_map_sg().
ib_sg_to_pages() and ib_map_mr_sg() are using dma_address so they must use dma_nents.
--- drivers/infiniband/ulp/iser/iser_memory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/infiniband/ulp/iser/iser_memory.c +5 -5
@@ -240,8 +240,8 @@ int iser_fast_reg_fmr(struct iscsi_iser_task *iser_task, page_vec->npages =0 ; page_vec->fake_mr.page_size =SIZE_4K ; plen =ib_sg_to_pages (&page_vec->fake_mr, mem->sg, - mem->size,NULL , iser_set_page); -if (unlikely (plen < mem->size)) { + mem->dma_nents,NULL , iser_set_page); +if (unlikely (plen < mem->dma_nents)) {iser_err ("page vec too short to hold this SG\n" );iser_data_buf_dump (mem, device->ib_device);iser_dump_page_vec (page_vec);
@@ -450,10 +450,10 @@ static int iser_fast_reg_mr(struct iscsi_iser_task *iser_task,ib_update_fast_reg_key (mr,ib_inc_rkey (mr->rkey)); - n =ib_map_mr_sg (mr, mem->sg, mem->size,NULL ,SIZE_4K ); -if (unlikely (n != mem->size)) { + n =ib_map_mr_sg (mr, mem->sg, mem->dma_nents,NULL ,SIZE_4K ); +if (unlikely (n != mem->dma_nents)) {iser_err ("failed to map sg (%d/%d)\n" , - n, mem->size); + n, mem->dma_nents);return n <0 ? n : -EINVAL ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 79/343 driver: uio: fix possible use-after-free in __uio_register_device
In reply to Greg Kroah-HartmanFrom: Liu Jian <[email protected]>
[ Upstream commit 221a1f4ac12d2ab46246c160b2e00d1b1160d5d9 ]
In uio_dev_add_attributes() error handing case, idev is used after device_unregister(), in which 'idev' has been released, touch idev cause use-after-free.
--- drivers/uio/uio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/uio/uio.c +4 -2
@@ -944,6 +944,7 @@ int __uio_register_device(struct module *owner,return ret; } +device_initialize (&idev->dev); idev->dev.devt =MKDEV (uio_major, idev->minor); idev->dev.class = &uio_class; idev->dev.parent = parent;
@@ -954,7 +955,7 @@ int __uio_register_device(struct module *owner,if (ret) goto err_device_create; - ret =device_register (&idev->dev); + ret =device_add (&idev->dev);if (ret) goto err_device_create;
@@ -986,9 +987,10 @@ int __uio_register_device(struct module *owner, err_request_irq:uio_dev_del_attributes (idev); err_uio_dev_add_attributes: -device_unregister (&idev->dev); +device_del (&idev->dev); err_device_create:uio_free_minor (idev); +put_device (&idev->dev);return ret; }EXPORT_SYMBOL_GPL (__uio_register_device);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 80/343 crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments
In reply to Greg Kroah-HartmanFrom: Corentin Labbe <[email protected]>
[ Upstream commit 6e88098ca43a3d80ae86908f7badba683c8a0d84 ]
When building without CONFIG_HW_RANDOM_PPC4XX, I hit the following build failure:drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_probe':drivers/crypto/amcc/crypto4xx_core.c:1407:20: error: passing argument 1 of 'ppc4xx_trng_probe' from incompatible pointer type [-Werror=incompatible-pointer-types] In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:drivers/crypto/amcc/crypto4xx_trng.h:28:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *' drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_remove':drivers/crypto/amcc/crypto4xx_core.c:1434:21: error: passing argument 1 of 'ppc4xx_trng_remove' from incompatible pointer type [-Werror=incompatible-pointer-types] In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:drivers/crypto/amcc/crypto4xx_trng.h:30:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *'
This patch fix the needed argument of ppc4xx_trng_probe()/ppc4xx_trng_remove() in that case.
--- drivers/crypto/amcc/crypto4xx_trng.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/amcc/crypto4xx_trng.h +2 -2
@@ -26,9 +26,9 @@ void ppc4xx_trng_probe(struct crypto4xx_core_device *core_dev);void ppc4xx_trng_remove (struct crypto4xx_core_device *core_dev);#else static inline void ppc4xx_trng_probe ( -struct crypto4xx_device *dev__maybe_unused ) { } +struct crypto4xx_core_device *dev__maybe_unused ) { }static inline void ppc4xx_trng_remove ( -struct crypto4xx_device *dev__maybe_unused ) { } +struct crypto4xx_core_device *dev__maybe_unused ) { }#endif #endif
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 81/343 driver core: Do not resume suppliers under device_links_write_lock()
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
[ Upstream commit 5db25c9eb893df8f6b93c1d97b8006d768e1b6f5 ]
It is incorrect to call pm_runtime_get_sync() under device_links_write_lock(), because it may end up trying to take device_links_read_lock() while resuming the target device and that will deadlock in the non-SRCU case, so avoid that by resuming the supplier device in device_link_add() before calling device_links_write_lock().
--- drivers/base/core.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/base/core.c +14 -6
@@ -180,11 +180,20 @@ struct device_link *device_link_add(struct device *consumer, struct device *supplier, u32 flags) {struct device_link *link; +bool rpm_put_supplier = false;if (!consumer || !supplier || ((flags &DL_FLAG_STATELESS ) && (flags &DL_FLAG_AUTOREMOVE )))return NULL ; +if (flags &DL_FLAG_PM_RUNTIME && flags &DL_FLAG_RPM_ACTIVE ) { +if (pm_runtime_get_sync (supplier) <0 ) { +pm_runtime_put_noidle (supplier); +return NULL ; + } + rpm_put_supplier = true; + } +device_links_write_lock ();device_pm_lock ();
@@ -209,13 +218,8 @@ struct device_link *device_link_add(struct device *consumer,if (flags &DL_FLAG_PM_RUNTIME ) {if (flags &DL_FLAG_RPM_ACTIVE ) { -if (pm_runtime_get_sync (supplier) <0 ) { -pm_runtime_put_noidle (supplier); -kfree (link); - link =NULL ; - goto out; - } link->rpm_active = true; + rpm_put_supplier = false; }pm_runtime_new_link (consumer);/*
@@ -286,6 +290,10 @@ struct device_link *device_link_add(struct device *consumer, out:device_pm_unlock ();device_links_write_unlock (); + +if (rpm_put_supplier) +pm_runtime_put (supplier); +return link; }EXPORT_SYMBOL_GPL (device_link_add);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 82/343 ARM: dts: lpc32xx: add required clocks property to keypad device node
In reply to Greg Kroah-HartmanFrom: Vladimir Zapolskiy <[email protected]>
[ Upstream commit 3e88bc38b9f6fe4b69cecf81badd3c19fde97f97 ]
NXP LPC32xx keypad controller requires a clock property to be defined.
The change fixes the driver initialization problem:
lpc32xx_keys 40050000.key: failed to get clock
lpc32xx_keys: probe of 40050000.key failed with error -2
--- arch/arm/boot/dts/lpc32xx.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/lpc32xx.dtsi +1 -0
@@ -462,6 +462,7 @@ key: key@40050000 { compatible = "nxp,lpc3220-key"; reg = <0x40050000 0x1000>; + clocks = <&clk LPC32XX_CLK_KEY>; interrupts = <54 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 83/343 ARM: dts: lpc32xx: reparent keypad controller to SIC1
In reply to Greg Kroah-HartmanFrom: Vladimir Zapolskiy <[email protected]>
[ Upstream commit 489261c45f0ebbc1c2813f337bbdf858267f5033 ]
After switching to a new interrupt controller scheme by separating SIC1 and SIC2 from MIC interrupt controller just one SoC keypad controller was not taken into account, fix it now:
WARNING: CPU: 0 PID: 1 at kernel/irq/irqdomain.c:524 irq_domain_associate+0x50/0x1b0 error: hwirq 0x36 is too large for interrupt-controller@40008000 ... lpc32xx_keys 40050000.key: failed to get platform irq lpc32xx_keys: probe of 40050000.key failed with error -22
--- arch/arm/boot/dts/lpc32xx.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/lpc32xx.dtsi +2 -1
@@ -463,7 +463,8 @@ compatible = "nxp,lpc3220-key"; reg = <0x40050000 0x1000>; clocks = <&clk LPC32XX_CLK_KEY>; - interrupts = <54 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&sic1>; + interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 71/343 rtc: cmos: ignore bogus century byte
In reply to Greg Kroah-HartmanFrom: Eric Wong <[email protected]>
[ Upstream commit 2a4daadd4d3e507138f8937926e6a4df49c6bfdc ]
Older versions of Libreboot and Coreboot had an invalid value (`3' in my case) in the century byte affecting the GM45 in the Thinkpad X200. Not everybody's updated their firmwares, and Linux <= 4.2 was able to read the RTC without problems, so workaround this by ignoring invalid values.
--- drivers/rtc/rtc-mc146818-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-mc146818-lib.c +1 -1
@@ -82,7 +82,7 @@ unsigned int mc146818_get_time(struct rtc_time *time) time->tm_year += real_year -72 ;#endif -if (century) +if (century >20 ) time->tm_year += (century -19 ) *100 ;/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 72/343 spi/topcliff_pch: Fix potential NULL dereference on allocation error
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit e902cdcb5112b89ee445588147964723fd69ffb4 ]
In pch_spi_handle_dma, it doesn't check for NULL returns of kcalloc so it would result in an Oops.
--- drivers/spi/spi-topcliff-pch.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/spi/spi-topcliff-pch.c +6 -0
@@ -1008,6 +1008,9 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)/* RX */ dma->sg_rx_p =kcalloc (num,sizeof (*dma->sg_rx_p),GFP_ATOMIC ); +if (!dma->sg_rx_p) +return ; +sg_init_table (dma->sg_rx_p, num);/* Initialize SG table */ /* offset, length setting */ sg = dma->sg_rx_p;
@@ -1068,6 +1071,9 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) } dma->sg_tx_p =kcalloc (num,sizeof (*dma->sg_tx_p),GFP_ATOMIC ); +if (!dma->sg_tx_p) +return ; +sg_init_table (dma->sg_tx_p, num);/* Initialize SG table */ /* offset, length setting */ sg = dma->sg_tx_p;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 73/343 clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit 108a459ef4cd17a28711d81092044e597b5c7618 ]
The PLL-MIPI clock is somewhat special as it has its own LDOs which need to be turned on for this PLL to actually work and output a clock signal.
Add the 2 LDO enable bits to the gate bits.
--- drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun8i-a23.c +1 -1
@@ -132,7 +132,7 @@ static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_mipi_clk, "pll-mipi",8 ,4 ,/* N */ 4 ,2 ,/* K */ 0 ,4 ,/* M */ -BIT (31 ),/* gate */ +BIT (31 ) |BIT (23 ) |BIT (22 ),/* gate */ BIT (28 ),/* lock */ CLK_SET_RATE_UNGATE);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 74/343 iwlwifi: mvm: avoid possible access out of array.
In reply to Greg Kroah-HartmanFrom: Mordechay Goodstein <[email protected]>
[ Upstream commit b0d795a9ae558209656b18930c2b4def5f8fdfb8 ]
The value in txq_id can be out of array scope,
validate it before accessing the array.
--- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +13 -6
@@ -2417,7 +2417,7 @@ int iwl_mvm_sta_tx_agg_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,struct iwl_mvm_sta *mvmsta =iwl_mvm_sta_from_mac80211 (sta);struct iwl_mvm_tid_data *tid_data;u16 normalized_ssn; -int txq_id; +u16 txq_id;int ret;if (WARN_ON_ONCE (tid >=IWL_MAX_TID_COUNT ))
@@ -2452,17 +2452,24 @@ int iwl_mvm_sta_tx_agg_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,*/ txq_id = mvmsta->tid_data[tid].txq_id;if (txq_id ==IWL_MVM_INVALID_QUEUE ) { - txq_id =iwl_mvm_find_free_queue (mvm, mvmsta->sta_id, -IWL_MVM_DQA_MIN_DATA_QUEUE , -IWL_MVM_DQA_MAX_DATA_QUEUE ); -if (txq_id <0 ) { - ret = txq_id; + ret =iwl_mvm_find_free_queue (mvm, mvmsta->sta_id, +IWL_MVM_DQA_MIN_DATA_QUEUE , +IWL_MVM_DQA_MAX_DATA_QUEUE ); +if (ret <0 ) {IWL_ERR (mvm,"Failed to allocate agg queue\n" ); goto release_locks; } + txq_id = ret; +/* TXQ hasn't yet been enabled, so mark it only as reserved */ mvm->queue_info[txq_id].status =IWL_MVM_QUEUE_RESERVED ; + }else if (WARN_ON (txq_id >=IWL_MAX_HW_QUEUES )) { + ret = -ENXIO ; +IWL_ERR (mvm,"tid_id %d out of range (0, %d)!\n" , + tid,IWL_MAX_HW_QUEUES -1 ); + goto out; + }else if (unlikely (mvm->queue_info[txq_id].status ==IWL_MVM_QUEUE_SHARED )) { ret = -ENXIO ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 75/343 net/mlx5: Take lock with IRQs disabled to avoid deadlock
In reply to Greg Kroah-HartmanFrom: Moni Shoua <[email protected]>
[ Upstream commit 33814e5d127e21f53b52e17b0722c1b57d4f4d29 ]
The lock in qp_table might be taken from process context or from interrupt context. This may lead to a deadlock unless it is taken with IRQs disabled.
Discovered by lockdep
================================
WARNING: inconsistent lock state
4.20.0-rc6
--------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W}
python/12572 [HC1[1]:SC0[0]:HE0:SE1] takes:00000000052a4df4 (&(&table->lock)->rlock#2){?.+.}, /0x50 [mlx5_core] {HARDIRQ-ON-W} state was registered at:
_raw_spin_lock+0x33/0x70 mlx5_get_rsc+0x1a/0x50 [mlx5_core] mlx5_ib_eqe_pf_action+0x493/0x1be0 [mlx5_ib] process_one_work+0x90c/0x1820 worker_thread+0x87/0xbb0 kthread+0x320/0x3e0 ret_from_fork+0x24/0x30 irq event stamp: 103928 hardirqs last enabled at (103927): [] nk+0x1a/0x1c hardirqs last disabled at (103928): [] unk+0x1a/0x1c softirqs last enabled at (103924): [] tcp_sendmsg+0x31/0x40 softirqs last disabled at (103922): [] 80
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----lock(&(&table->lock)->rlock#2);
lock(&(&table->lock)->rlock#2);
*** DEADLOCK ***
--- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/qp.c +3 -2
@@ -44,14 +44,15 @@ static struct mlx5_core_rsc_common *mlx5_get_rsc(struct mlx5_core_dev *dev, {struct mlx5_qp_table *table = &dev->priv.qp_table;struct mlx5_core_rsc_common *common; +unsigned long flags; -spin_lock (&table->lock); +spin_lock_irqsave (&table->lock, flags); common =radix_tree_lookup (&table->tree, rsn);if (common)atomic_inc (&common->refcount); -spin_unlock (&table->lock); +spin_unlock_irqrestore (&table->lock, flags);if (!common) { mlx5_core_warn(dev, "Async event for bogus resource 0x%x\n",
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 76/343 iwlwifi: mvm: fix A-MPDU reference assignment
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 1f7698abedeeb3fef3cbcf78e16f925df675a179 ]
The current code assigns the reference, and then goes to increment it if the toggle bit has changed. That way, we get
Toggle 0 0 0 0 1 1 1 1 ID 1 1 1 1 1 2 2 2
Fix that by assigning the post-toggle ID to get
Toggle 0 0 0 0 1 1 1 1 ID 1 1 1 1 2 2 2 2
--- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +1 -1
@@ -871,12 +871,12 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,bool toggle_bit = phy_info &IWL_RX_MPDU_PHY_AMPDU_TOGGLE ; rx_status->flag |=RX_FLAG_AMPDU_DETAILS ; - rx_status->ampdu_reference = mvm->ampdu_ref;/* toggle is switched whenever new aggregation starts */ if (toggle_bit != mvm->ampdu_toggle) { mvm->ampdu_ref++; mvm->ampdu_toggle = toggle_bit; } + rx_status->ampdu_reference = mvm->ampdu_ref; }rcu_read_lock ();
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 77/343 tty: ipwireless: Fix potential NULL pointer dereference
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 7dd50e205b3348dc7784efbdf85723551de64a25 ]
There is a potential NULL pointer dereference in case alloc_ctrl_packet() fails and returns NULL.
--- drivers/tty/ipwireless/hardware.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/ipwireless/hardware.c +2 -0
@@ -1516,6 +1516,8 @@ static void ipw_send_setup_packet(struct ipw_hardware *hw)sizeof (struct ipw_setup_get_version_query_packet ),ADDR_SETUP_PROT ,TL_PROTOCOLID_SETUP , TL_SETUP_SIGNO_GET_VERSION_QRY); +if (!ver_packet) +return ; ver_packet->header.length =sizeof (struct tl_setup_get_version_qry );/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 78/343 driver: uio: fix possible memory leak in __uio_register_device
In reply to Greg Kroah-HartmanFrom: Liu Jian <[email protected]>
[ Upstream commit 1a392b3de7c5747506b38fc14b2e79977d3c7770 ]
'idev' is malloced in __uio_register_device() and leak free it before leaving from the uio_get_minor() error handing case, it will cause memory leak.
--- drivers/uio/uio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/uio/uio.c +3 -1
@@ -939,8 +939,10 @@ int __uio_register_device(struct module *owner,atomic_set (&idev->event,0 ); ret =uio_get_minor (idev); -if (ret) +if (ret) { +kfree (idev);return ret; + } idev->dev.devt =MKDEV (uio_major, idev->minor); idev->dev.class = &uio_class;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 69/343 ASoC: imx-sgtl5000: put of nodes if finding codec fails
In reply to Greg Kroah-HartmanFrom: Stefan Agner <[email protected]>
[ Upstream commit d9866572486802bc598a3e8576a5231378d190de ]
Make sure to properly put the of node in case finding the codec fails.
--- sound/soc/fsl/imx-sgtl5000.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/fsl/imx-sgtl5000.c +2 -1
@@ -119,7 +119,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) codec_dev =of_find_i2c_device_by_node (codec_np);if (!codec_dev) {dev_err (&pdev->dev,"failed to find codec platform device\n" ); -return -EPROBE_DEFER ; + ret = -EPROBE_DEFER ; + goto fail; } data =devm_kzalloc (&pdev->dev,sizeof (*data),GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 85/343 ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller clocks property
In reply to Greg Kroah-HartmanFrom: Vladimir Zapolskiy <[email protected]>
[ Upstream commit 30fc01bae3cda747e7d9c352b1aa51ca113c8a9d ]
The originally added ARM PrimeCell PL111 clocks property misses the required "clcdclk" clock, which is the same as a clock to enable the LCD controller on NXP LPC3230 and NXP LPC3250 SoCs.
--- arch/arm/boot/dts/lpc32xx.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/lpc32xx.dtsi +2 -2
@@ -142,8 +142,8 @@ compatible = "arm,pl111", "arm,primecell"; reg = <0x31040000 0x1000>; interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clk LPC32XX_CLK_LCD>; - clock-names = "apb_pclk"; + clocks = <&clk LPC32XX_CLK_LCD>, <&clk LPC32XX_CLK_LCD>; + clock-names = "clcdclk", "apb_pclk"; status = "disabled"; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 94/343 rtc: 88pm80x: fix unintended sign extension
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit fb0b322537a831b5b0cb948c56f8f958ce493d3a ]
Shifting a u8 by 24 will cause the value to be promoted to an integer. If the top bit of the u8 is set then the following conversion to an unsigned long will sign extend the value causing the upper 32 bits to be set in the result.
Fix this by casting the u8 value to an unsigned long before the shift.
Detected by CoverityScan, CID#714646-714649 ("Unintended sign extension")
--- drivers/rtc/rtc-88pm80x.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
drivers/rtc/rtc-88pm80x.c +14 -7
@@ -116,12 +116,14 @@ static int pm80x_rtc_read_time(struct device *dev, struct rtc_time *tm)unsigned char buf[4 ];unsigned long ticks, base, data;regmap_raw_read (info->map,PM800_RTC_EXPIRE2_1 , buf,4 ); - base = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + base = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ];dev_dbg (info->dev,"%x-%x-%x-%x\n" , buf[0 ], buf[1 ], buf[2 ], buf[3 ]);/* load 32-bit read-only counter */ regmap_raw_read (info->map,PM800_RTC_COUNTER1 , buf,4 ); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; ticks = base + data;dev_dbg (info->dev,"get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
@@ -144,7 +146,8 @@ static int pm80x_rtc_set_time(struct device *dev, struct rtc_time *tm)/* load 32-bit read-only counter */ regmap_raw_read (info->map,PM800_RTC_COUNTER1 , buf,4 ); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; base = ticks - data;dev_dbg (info->dev,"set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
@@ -165,11 +168,13 @@ static int pm80x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)int ret;regmap_raw_read (info->map,PM800_RTC_EXPIRE2_1 , buf,4 ); - base = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + base = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ];dev_dbg (info->dev,"%x-%x-%x-%x\n" , buf[0 ], buf[1 ], buf[2 ], buf[3 ]);regmap_raw_read (info->map,PM800_RTC_EXPIRE1_1 , buf,4 ); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; ticks = base + data;dev_dbg (info->dev,"get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
@@ -192,12 +197,14 @@ static int pm80x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)regmap_update_bits (info->map,PM800_RTC_CONTROL ,PM800_ALARM1_EN ,0 );regmap_raw_read (info->map,PM800_RTC_EXPIRE2_1 , buf,4 ); - base = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + base = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ];dev_dbg (info->dev,"%x-%x-%x-%x\n" , buf[0 ], buf[1 ], buf[2 ], buf[3 ]);/* load 32-bit read-only counter */ regmap_raw_read (info->map,PM800_RTC_COUNTER1 , buf,4 ); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; ticks = base + data;dev_dbg (info->dev,"get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 95/343 rtc: pm8xxx: fix unintended sign extension
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit e42280886018c6f77f0a90190f7cba344b0df3e0 ]
Shifting a u8 by 24 will cause the value to be promoted to an integer. If the top bit of the u8 is set then the following conversion to an unsigned long will sign extend the value causing the upper 32 bits to be set in the result.
Fix this by casting the u8 value to an unsigned long before the shift.
Detected by CoverityScan, CID#1309693 ("Unintended sign extension")
--- drivers/rtc/rtc-pm8xxx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/rtc/rtc-pm8xxx.c +4 -2
@@ -186,7 +186,8 @@ static int pm8xxx_rtc_read_time(struct device *dev, struct rtc_time *tm) } } - secs = value[0 ] | (value[1 ] <<8 ) | (value[2 ] <<16 ) | (value[3 ] <<24 ); + secs = value[0 ] | (value[1 ] <<8 ) | (value[2 ] <<16 ) | + ((unsigned long )value[3 ] <<24 );rtc_time_to_tm (secs, tm);
@@ -267,7 +268,8 @@ static int pm8xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)return rc; } - secs = value[0 ] | (value[1 ] <<8 ) | (value[2 ] <<16 ) | (value[3 ] <<24 ); + secs = value[0 ] | (value[1 ] <<8 ) | (value[2 ] <<16 ) | + ((unsigned long )value[3 ] <<24 );rtc_time_to_tm (secs, &alarm->time);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 96/343 fbdev: chipsfb: remove set but not used variable size
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 8e71fa5e4d86bedfd26df85381d65d6b4c860020 ]
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/video/fbdev/chipsfb.c: In function 'chipsfb_pci_init':drivers/video/fbdev/chipsfb.c:352:22: warning:
variable 'size' set but not used [-Wunused-but-set-variable]
--- drivers/video/fbdev/chipsfb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/fbdev/chipsfb.c +1 -2
@@ -350,7 +350,7 @@ static void init_chips(struct fb_info *p, unsigned long addr)static int chipsfb_pci_init (struct pci_dev *dp,const struct pci_device_id *ent) {struct fb_info *p; -unsigned long addr, size; +unsigned long addr;unsigned short cmd;int rc = -ENODEV ;
@@ -362,7 +362,6 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)if ((dp->resource[0 ].flags &IORESOURCE_MEM ) ==0 ) goto err_disable; addr =pci_resource_start (dp,0 ); - size =pci_resource_len (dp,0 );if (addr ==0 ) goto err_disable;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 97/343 iw_cxgb4: use tos when importing the endpoint
In reply to Greg Kroah-HartmanFrom: Steve Wise <[email protected]>
[ Upstream commit cb3ba0bde881f0cb7e3945d2a266901e2bd18c92 ]
import_ep() is passed the correct tos, but doesn't use it correctly.
--- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/cm.c +1 -1
@@ -2056,7 +2056,7 @@ static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip, }else { pdev =get_real_dev (n->dev); ep->l2t =cxgb4_l2t_get (cdev->rdev.lldi.l2t, - n, pdev,0 ); + n, pdev,rt_tos2priority (tos));if (!ep->l2t) goto out; ep->mtu =dst_mtu (dst);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 98/343 iw_cxgb4: use tos when finding ipv6 routes
In reply to Greg Kroah-HartmanFrom: Steve Wise <[email protected]>
[ Upstream commit c8a7eb554a83214c3d8ee5cb322da8c72810d2dc ]
When IPv6 support was added, the correct tos was not passed to cxgb_find_route6(). This potentially results in the wrong route entry.
--- drivers/infiniband/hw/cxgb4/cm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +3 -2
@@ -2147,7 +2147,8 @@ static int c4iw_reconnect(struct c4iw_ep *ep) laddr6->sin6_addr.s6_addr, raddr6->sin6_addr.s6_addr, laddr6->sin6_port, - raddr6->sin6_port,0 , + raddr6->sin6_port, + ep->com.cm_id->tos, raddr6->sin6_scope_id); iptype =6 ; ra = (__u8 *)&raddr6->sin6_addr;
@@ -3298,7 +3299,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) laddr6->sin6_addr.s6_addr, raddr6->sin6_addr.s6_addr, laddr6->sin6_port, - raddr6->sin6_port,0 , + raddr6->sin6_port, cm_id->tos, raddr6->sin6_scope_id); }if (!ep->dst) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 86/343 ARM: dts: lpc32xx: phy3250: fix SD card regulator voltage
In reply to Greg Kroah-HartmanFrom: Vladimir Zapolskiy <[email protected]>
[ Upstream commit dc141b99fc36cf910a1d8d5ee30f43f2442fd1bd ]
The fixed voltage regulator on Phytec phyCORE-LPC3250 board, which supplies SD/MMC card's power, has a constant output voltage level of either 3.15V or 3.3V, the actual value depends on JP4 position, the power rail is referenced as VCC_SDIO in the board hardware manual.
--- arch/arm/boot/dts/lpc3250-phy3250.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/lpc3250-phy3250.dts +2 -2
@@ -49,8 +49,8 @@ sd_reg: regulator@2 { compatible = "regulator-fixed"; regulator-name = "sd_reg"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; gpio = <&gpio 5 5 0>; enable-active-high; };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 87/343 iwlwifi: mvm: fix RSS config command
In reply to Greg Kroah-HartmanFrom: Sara Sharon <[email protected]>
[ Upstream commit 608dce95db10b8ee1a26dbce3f60204bb69812a5 ]
The hash mask is a bitmap, so we should use BIT() on the enum values.
--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +6 -6
@@ -107,12 +107,12 @@ static int iwl_send_rss_cfg_cmd(struct iwl_mvm *mvm)int i;struct iwl_rss_config_cmd cmd = { .flags =cpu_to_le32 (IWL_RSS_ENABLE ), - .hash_mask =IWL_RSS_HASH_TYPE_IPV4_TCP | -IWL_RSS_HASH_TYPE_IPV4_UDP | -IWL_RSS_HASH_TYPE_IPV4_PAYLOAD | -IWL_RSS_HASH_TYPE_IPV6_TCP | -IWL_RSS_HASH_TYPE_IPV6_UDP | -IWL_RSS_HASH_TYPE_IPV6_PAYLOAD , + .hash_mask =BIT (IWL_RSS_HASH_TYPE_IPV4_TCP ) | +BIT (IWL_RSS_HASH_TYPE_IPV4_UDP ) | +BIT (IWL_RSS_HASH_TYPE_IPV4_PAYLOAD ) | +BIT (IWL_RSS_HASH_TYPE_IPV6_TCP ) | +BIT (IWL_RSS_HASH_TYPE_IPV6_UDP ) | +BIT (IWL_RSS_HASH_TYPE_IPV6_PAYLOAD ), };if (mvm->trans->num_rx_queues ==1 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 88/343 staging: most: cdev: add missing check for cdev_add failure
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 5ae890780e1b4d08f2c0c5d4ea96fc3928fc0ee9 ]
Currently the call to cdev_add is missing a check for failure. Fix this by checking for failure and exiting via a new error path that ensures the allocated comp_channel struct is kfree'd.
Detected by CoverityScan, CID#1462359 ("Unchecked return value")
--- drivers/staging/most/aim-cdev/cdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/most/aim-cdev/cdev.c +4 -1
@@ -455,7 +455,9 @@ static int aim_probe(struct most_interface *iface, int channel_id, c->devno =MKDEV (major, current_minor);cdev_init (&c->cdev, &channel_fops); c->cdev.owner =THIS_MODULE ; -cdev_add (&c->cdev, c->devno,1 ); + retval =cdev_add (&c->cdev, c->devno,1 ); +if (retval <0 ) + goto err_free_c; c->iface = iface; c->cfg = cfg; c->channel_id = channel_id;
@@ -491,6 +493,7 @@ error_create_device:list_del (&c->list); error_alloc_kfifo:cdev_del (&c->cdev); +err_free_c:kfree (c); error_alloc_channel:ida_simple_remove (&minor_id, current_minor);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 89/343 rtc: ds1672: fix unintended sign extension
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit f0c04c276739ed8acbb41b4868e942a55b128dca ]
Shifting a u8 by 24 will cause the value to be promoted to an integer. If the top bit of the u8 is set then the following conversion to an unsigned long will sign extend the value causing the upper 32 bits to be set in the result.
Fix this by casting the u8 value to an unsigned long before the shift.
Detected by CoverityScan, CID#138801 ("Unintended sign extension")
--- drivers/rtc/rtc-ds1672.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/rtc/rtc-ds1672.c +2 -1
@@ -58,7 +58,8 @@ static int ds1672_get_datetime(struct i2c_client *client, struct rtc_time *tm)"%s: raw read data - counters=%02x,%02x,%02x,%02x\n" , __func__, buf[0], buf[1], buf[2], buf[3]); - time = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + time = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ];rtc_time_to_tm (time, tm);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 91/343 net: phy: fixed_phy: Fix fixed_phy not checking GPIO
In reply to Greg Kroah-HartmanFrom: Moritz Fischer <[email protected]>
[ Upstream commit 8f289805616e81f7c1690931aa8a586c76f4fa88 ]
Fix fixed_phy not checking GPIO if no link_update callback is registered.
In the original version all users registered a link_update callback so the issue was masked.
--- drivers/net/phy/fixed_phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/phy/fixed_phy.c +3 -3
@@ -67,11 +67,11 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)do { s =read_seqcount_begin (&fp->seqcount);/* Issue callback if user registered it. */ -if (fp->link_update) { +if (fp->link_update) fp->link_update (fp->phydev->attached_dev, &fp->status); -fixed_phy_update (fp); - } +/* Check the GPIO for change in status */ +fixed_phy_update (fp); state = fp->status; }while (read_seqcount_retry (&fp->seqcount, s));
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 93/343 rtc: 88pm860x: fix unintended sign extension
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit dc9e47160626cdb58d5c39a4f43dcfdb27a5c004 ]
Shifting a u8 by 24 will cause the value to be promoted to an integer. If the top bit of the u8 is set then the following conversion to an unsigned long will sign extend the value causing the upper 32 bits to be set in the result.
Fix this by casting the u8 value to an unsigned long before the shift.
Detected by CoverityScan, CID#144925-144928 ("Unintended sign extension")
--- drivers/rtc/rtc-88pm860x.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
drivers/rtc/rtc-88pm860x.c +14 -7
@@ -115,11 +115,13 @@ static int pm860x_rtc_read_time(struct device *dev, struct rtc_time *tm)pm860x_page_bulk_read (info->i2c,REG0_ADDR ,8 , buf);dev_dbg (info->dev,"%x-%x-%x-%x-%x-%x-%x-%x\n" , buf[0 ], buf[1 ], buf[2 ], buf[3 ], buf[4 ], buf[5 ], buf[6 ], buf[7 ]); - base = (buf[1 ] <<24 ) | (buf[3 ] <<16 ) | (buf[5 ] <<8 ) | buf[7 ]; + base = ((unsigned long )buf[1 ] <<24 ) | (buf[3 ] <<16 ) | + (buf[5 ] <<8 ) | buf[7 ];/* load 32-bit read-only counter */ pm860x_bulk_read (info->i2c,PM8607_RTC_COUNTER1 ,4 , buf); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; ticks = base + data;dev_dbg (info->dev,"get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
@@ -145,7 +147,8 @@ static int pm860x_rtc_set_time(struct device *dev, struct rtc_time *tm)/* load 32-bit read-only counter */ pm860x_bulk_read (info->i2c,PM8607_RTC_COUNTER1 ,4 , buf); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; base = ticks - data;dev_dbg (info->dev,"set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
@@ -170,10 +173,12 @@ static int pm860x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)pm860x_page_bulk_read (info->i2c,REG0_ADDR ,8 , buf);dev_dbg (info->dev,"%x-%x-%x-%x-%x-%x-%x-%x\n" , buf[0 ], buf[1 ], buf[2 ], buf[3 ], buf[4 ], buf[5 ], buf[6 ], buf[7 ]); - base = (buf[1 ] <<24 ) | (buf[3 ] <<16 ) | (buf[5 ] <<8 ) | buf[7 ]; + base = ((unsigned long )buf[1 ] <<24 ) | (buf[3 ] <<16 ) | + (buf[5 ] <<8 ) | buf[7 ];pm860x_bulk_read (info->i2c,PM8607_RTC_EXPIRE1 ,4 , buf); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; ticks = base + data;dev_dbg (info->dev,"get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
@@ -198,11 +203,13 @@ static int pm860x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)pm860x_page_bulk_read (info->i2c,REG0_ADDR ,8 , buf);dev_dbg (info->dev,"%x-%x-%x-%x-%x-%x-%x-%x\n" , buf[0 ], buf[1 ], buf[2 ], buf[3 ], buf[4 ], buf[5 ], buf[6 ], buf[7 ]); - base = (buf[1 ] <<24 ) | (buf[3 ] <<16 ) | (buf[5 ] <<8 ) | buf[7 ]; + base = ((unsigned long )buf[1 ] <<24 ) | (buf[3 ] <<16 ) | + (buf[5 ] <<8 ) | buf[7 ];/* load 32-bit read-only counter */ pm860x_bulk_read (info->i2c,PM8607_RTC_COUNTER1 ,4 , buf); - data = (buf[3 ] <<24 ) | (buf[2 ] <<16 ) | (buf[1 ] <<8 ) | buf[0 ]; + data = ((unsigned long )buf[3 ] <<24 ) | (buf[2 ] <<16 ) | + (buf[1 ] <<8 ) | buf[0 ]; ticks = base + data;dev_dbg (info->dev,"get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n" , base, data, ticks);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 92/343 rtc: ds1307: rx8130: Fix alarm handling
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit 3f929cad943380370b6db31fcb7a38d898d91089 ]
When the EXTENSION.WADA bit is set, register 0x19 contains a bitmap of week days, not a day of month. As Linux only handles a single alarm without repetition using day of month is more flexible, so clear this bit. (Otherwise a value depending on time.tm_wday would have to be written to register 0x19.)
Also optimize setting the AIE bit to use a single register write instead of a bulk write of three registers.
--- drivers/rtc/rtc-ds1307.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/rtc/rtc-ds1307.c +3 -4
@@ -733,8 +733,8 @@ static int rx8130_set_alarm(struct device *dev, struct rtc_wkalrm *t)if (ret <0 )return ret; - ctl[0 ] &= ~RX8130_REG_EXTENSION_WADA ; - ctl[1 ] |=RX8130_REG_FLAG_AF ; + ctl[0 ] &=RX8130_REG_EXTENSION_WADA ; + ctl[1 ] &= ~RX8130_REG_FLAG_AF ; ctl[2 ] &= ~RX8130_REG_CONTROL0_AIE ; ret = regmap_bulk_write(ds1307->regmap, RX8130_REG_EXTENSION, ctl,
@@ -757,8 +757,7 @@ static int rx8130_set_alarm(struct device *dev, struct rtc_wkalrm *t) ctl[2 ] |=RX8130_REG_CONTROL0_AIE ; -return regmap_bulk_write (ds1307->regmap,RX8130_REG_EXTENSION , ctl, -sizeof (ctl)); +return regmap_write (ds1307->regmap,RX8130_REG_CONTROL0 , ctl[2 ]); }static int rx8130_alarm_irq_enable (struct device *dev,unsigned int enabled)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 84/343 ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller variant
In reply to Greg Kroah-HartmanFrom: Vladimir Zapolskiy <[email protected]>
[ Upstream commit 7a0790a4121cbcd111cc537cdc801c46ccb789ee ]
ARM PrimeCell PL111 LCD controller is found on On NXP LPC3230 and LPC3250 SoCs variants, the original reference in compatible property to an older one ARM PrimeCell PL110 is invalid.
--- arch/arm/boot/dts/lpc32xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/lpc32xx.dtsi +1 -1
@@ -139,7 +139,7 @@ }; clcd: clcd@31040000 { - compatible = "arm,pl110", "arm,primecell"; + compatible = "arm,pl111", "arm,primecell"; reg = <0x31040000 0x1000>; interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk LPC32XX_CLK_LCD>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 100/343 pinctrl: sh-pfc: emev2: Add missing pinmux functions
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 1ecd8c9cb899ae277e6986ae134635cb1a50f5de ]
The err_rst_reqb, ext_clki, lowpwr, and ref_clko pin groups are present, but no pinmux functions refer to them, hence they can not be selected.
--- drivers/pinctrl/sh-pfc/pfc-emev2.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/pinctrl/sh-pfc/pfc-emev2.c +20 -0
@@ -1263,6 +1263,14 @@ static const char * const dtv_groups[] = { "dtv_b", }; +static const char *const err_rst_reqb_groups[] = { +"err_rst_reqb" , +}; + +static const char *const ext_clki_groups[] = { +"ext_clki" , +}; +static const char *const iic0_groups[] = {"iic0" , };
@@ -1285,6 +1293,10 @@ static const char * const lcd_groups[] = { "yuv3", }; +static const char *const lowpwr_groups[] = { +"lowpwr" , +}; +static const char *const ntsc_groups[] = {"ntsc_clk" ,"ntsc_data" ,
@@ -1298,6 +1310,10 @@ static const char * const pwm1_groups[] = { "pwm1", }; +static const char *const ref_clko_groups[] = { +"ref_clko" , +}; +static const char *const sd_groups[] = {"sd_cki" , };
@@ -1391,13 +1407,17 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (cam),SH_PFC_FUNCTION (cf),SH_PFC_FUNCTION (dtv), +SH_PFC_FUNCTION (err_rst_reqb), +SH_PFC_FUNCTION (ext_clki),SH_PFC_FUNCTION (iic0),SH_PFC_FUNCTION (iic1),SH_PFC_FUNCTION (jtag),SH_PFC_FUNCTION (lcd), +SH_PFC_FUNCTION (lowpwr),SH_PFC_FUNCTION (ntsc),SH_PFC_FUNCTION (pwm0),SH_PFC_FUNCTION (pwm1), +SH_PFC_FUNCTION (ref_clko),SH_PFC_FUNCTION (sd),SH_PFC_FUNCTION (sdi0), SH_PFC_FUNCTION(sdi1),
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 109/343 hwmon: (pmbus/tps53679) Fix driver info initialization in probe routine
In reply to Greg Kroah-HartmanFrom: Vadim Pasternak <[email protected]>
[ Upstream commit ff066653aeed8ee2d4dadb1e35774dd91ecbb19f ]
Fix tps53679_probe() by using dynamically allocated "pmbus_driver_info" structure instead of static. Usage of static structures causes overwritten of the field "vrm_version", in case the system is equipped with several tps53679 devices with the different "vrm_version". In such case the last probed device overwrites this field for all others.
--- drivers/hwmon/pmbus/tps53679.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/hwmon/pmbus/tps53679.c +8 -1
@@ -80,7 +80,14 @@ static struct pmbus_driver_info tps53679_info = {static int tps53679_probe (struct i2c_client *client,const struct i2c_device_id *id) { -return pmbus_do_probe (client, id, &tps53679_info); +struct pmbus_driver_info *info; + + info =devm_kmemdup (&client->dev, &tps53679_info,sizeof (*info), +GFP_KERNEL ); +if (!info) +return -ENOMEM ; + +return pmbus_do_probe (client, id, info); }static const struct i2c_device_id tps53679_id[] = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 110/343 KVM: PPC: Release all hardware TCE tables attached to a group
In reply to Greg Kroah-HartmanFrom: Alexey Kardashevskiy <[email protected]>
[ Upstream commit a67614cc05a5052b265ea48196dab2fce11f5f2e ]
The SPAPR TCE KVM device references all hardware IOMMU tables assigned to some IOMMU group to ensure that in-kernel KVM acceleration of H_PUT_TCE can work. The tables are references when an IOMMU group gets registered with the VFIO KVM device by the KVM_DEV_VFIO_GROUP_ADD ioctl; KVM_DEV_VFIO_GROUP_DEL calls into the dereferencing code
in kvm_spapr_tce_release_iommu_group() which walks through the list of LIOBNs, finds a matching IOMMU table and calls kref_put() when found.
However that code stops after the very first successful derefencing leaving other tables referenced till the SPAPR TCE KVM device is destroyed which normally happens on guest reboot or termination so if we do hotplug and unplug in a loop, we are leaking IOMMU tables here.
This removes a premature return to let kvm_spapr_tce_release_iommu_group() find and dereference all attached tables.
--- arch/powerpc/kvm/book3s_64_vio.c | 1 - 1 file changed, 1 deletion(-)
arch/powerpc/kvm/book3s_64_vio.c +0 -1
@@ -134,7 +134,6 @@ extern void kvm_spapr_tce_release_iommu_group(struct kvm *kvm,continue ;kref_put (&stit->kref, kvm_spapr_tce_liobn_put); -return ; } } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 111/343 staging: r8822be: check kzalloc return or bail
In reply to Greg Kroah-HartmanFrom: Nicholas Mc Guire <[email protected]>
[ Upstream commit e4b08e16b7d9d030b6475ef48f94d734a39f3c81 ]
The kzalloc() in halmac_parse_psd_data_88xx() can fail and return NULL so check the psd_set->data after allocation and if allocation failed return HALMAC_CMD_PROCESS_ERROR.
--- .../staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c +4 -1
@@ -2492,8 +2492,11 @@ halmac_parse_psd_data_88xx(struct halmac_adapter *halmac_adapter, u8 *c2h_buf, segment_size = (u8 )PSD_DATA_GET_SEGMENT_SIZE (c2h_buf); psd_set->data_size = total_size; -if (!psd_set->data) +if (!psd_set->data) { psd_set->data =kzalloc (psd_set->data_size,GFP_KERNEL ); +if (!psd_set->data) +return HALMAC_CMD_PROCESS_ERROR ; + }if (segment_id ==0 ) psd_set->segment_size = segment_size;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 112/343 dmaengine: mv_xor: Use correct device for DMA API
In reply to Greg Kroah-HartmanFrom: Robin Murphy <[email protected]>
[ Upstream commit 3e5daee5ecf314da33a890fabaa2404244cd2a36 ]
Using dma_dev->dev for mappings before it's assigned with the correct device is unlikely to work as expected, and with future dma-direct changes, passing a NULL device may end up crashing entirely. I don't know enough about this hardware or the mv_xor_prep_dma_interrupt() operation to implement the appropriate error-handling logic that would have revealed those dma_map_single() calls failing on arm64 for as long as the driver has been enabled there, but moving the assignment earlier will at least make the current code operate as intended.
--- drivers/dma/mv_xor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/mv_xor.c +1 -1
@@ -1059,6 +1059,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev, mv_chan->op_in_desc =XOR_MODE_IN_DESC ; dma_dev = &mv_chan->dmadev; + dma_dev->dev = &pdev->dev; mv_chan->xordev = xordev;/*
@@ -1091,7 +1092,6 @@ mv_xor_channel_add(struct mv_xor_device *xordev, dma_dev->device_free_chan_resources = mv_xor_free_chan_resources; dma_dev->device_tx_status = mv_xor_status; dma_dev->device_issue_pending = mv_xor_issue_pending; - dma_dev->dev = &pdev->dev;/* set prep routines based on capability */ if (dma_has_cap (DMA_INTERRUPT , dma_dev->cap_mask))
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 113/343 cdc-wdm: pass return value of recover_from_urb_loss
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 0742a338f5b3446a26de551ad8273fb41b2787f2 ]
'rv' is the correct return value, pass it upstream instead of 0
--- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/class/cdc-wdm.c +1 -1
@@ -1085,7 +1085,7 @@ static int wdm_post_reset(struct usb_interface *intf) rv =recover_from_urb_loss (desc);mutex_unlock (&desc->wlock);mutex_unlock (&desc->rlock); -return 0 ; +return rv; }static struct usb_driver wdm_driver = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 101/343 pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit a4b0350047f1b10207e25e72d7cd3f7826e93769 ]
The entry for "scifb2_data_c" in the SCIFB2 pin group array contains a typo, thus the group cannot be selected.
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -1
@@ -5209,7 +5209,7 @@ static const char * const scifb2_groups[] = {"scifb2_data_b" ,"scifb2_clk_b" ,"scifb2_ctrl_b" , -"scifb0_data_c" , +"scifb2_data_c" ,"scifb2_clk_c" , "scifb2_data_d", };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 102/343 pinctrl: sh-pfc: r8a7792: Fix vin1_data18_b pin group
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit b9fd50488b4939ce5b3a026d29e752e17c2d1800 ]
The vin1_data18_b pin group itself is present, but it is not listed in the VIN1 pin group array, and thus cannot be selected.
--- drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-r8a7792.c +1 -0
@@ -1916,6 +1916,7 @@ static const char * const vin1_groups[] = {"vin1_data8" ,"vin1_data24_b" ,"vin1_data20_b" , +"vin1_data18_b" ,"vin1_data16_b" ,"vin1_sync" , "vin1_field",
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 103/343 pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 0e6e448bdcf896d001a289a6112a704542d51516 ]
There are two pin groups for the FSIC SPDIF signal, but the FSIC pin group array lists only one, and it refers to a nonexistent group.
--- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +2 -1
@@ -3367,7 +3367,8 @@ static const char * const fsic_groups[] = {"fsic_sclk_out" ,"fsic_data_in" ,"fsic_data_out" , - "fsic_spdif", +"fsic_spdif_0" , + "fsic_spdif_1", }; static const char * const fsid_groups[] = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 104/343 PCI: endpoint: functions: Use memcpy_fromio()/memcpy_toio()
In reply to Greg Kroah-HartmanFrom: Wen Yang <[email protected]>
[ Upstream commit 726dabfde6aa35a4f1508e235ae37edbbf9fbc65 ]
Functions copying from/to IO addresses should use the memcpy_fromio()/memcpy_toio() API rather than plain memcpy().
Fix the issue detected through the sparse tool.
--- drivers/pci/endpoint/functions/pci-epf-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/endpoint/functions/pci-epf-test.c +2 -2
@@ -177,7 +177,7 @@ static int pci_epf_test_read(struct pci_epf_test *epf_test) goto err_map_addr; } -memcpy (buf, src_addr, reg->size); +memcpy_fromio (buf, src_addr, reg->size); crc32 =crc32_le (~0 , buf, reg->size);if (crc32 != reg->checksum)
@@ -231,7 +231,7 @@ static int pci_epf_test_write(struct pci_epf_test *epf_test)get_random_bytes (buf, reg->size); reg->checksum =crc32_le (~0 , buf, reg->size); -memcpy (dst_addr, buf, reg->size); +memcpy_toio (dst_addr, buf, reg->size);/* * wait 1ms inorder for the write to complete. Without this delay L3
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 105/343 usb: phy: twl6030-usb: fix possible use-after-free on remove
In reply to Greg Kroah-HartmanFrom: Sven Van Asbroeck <[email protected]>
[ Upstream commit 5895d311d28f2605e2f71c1a3e043ed38f3ac9d2 ]
In remove(), use cancel_delayed_work_sync() to cancel the delayed work. Otherwise there's a chance that this work will continue to run until after the device has been removed.
This issue was detected with the help of Coccinelle.
--- drivers/usb/phy/phy-twl6030-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/phy-twl6030-usb.c +1 -1
@@ -413,7 +413,7 @@ static int twl6030_usb_remove(struct platform_device *pdev) {struct twl6030_usb *twl =platform_get_drvdata (pdev); -cancel_delayed_work (&twl->get_status_work); +cancel_delayed_work_sync (&twl->get_status_work);twl6030_interrupt_mask (TWL6030_USBOTG_INT_MASK ,REG_INT_MSK_LINE_C ); twl6030_interrupt_mask(TWL6030_USBOTG_INT_MASK,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 106/343 block: dont use bio->bi_vcnt to figure out segment number
In reply to Greg Kroah-HartmanFrom: Ming Lei <[email protected]>
[ Upstream commit 1a67356e9a4829da2935dd338630a550c59c8489 ]
It is wrong to use bio->bi_vcnt to figure out how many segments there are in the bio even though CLONED flag isn't set on this bio, because this bio may be splitted or advanced.
So always use bio_segments() in blk_recount_segments(), and it shouldn't cause any performance loss now because the physical segment number is figured out in blk_queue_split() and BIO_SEG_VALID is set meantime since bdced438acd83ad83a6c ("block: setup bi_phys_segments after splitting").
--- block/blk-merge.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
block/blk-merge.c +1 -7
@@ -299,13 +299,7 @@ void blk_recalc_rq_segments(struct request *rq)void blk_recount_segments (struct request_queue *q,struct bio *bio) { -unsigned short seg_cnt; - -/* estimate segment number by bi_vcnt for non-cloned bio */ -if (bio_flagged (bio,BIO_CLONED )) - seg_cnt =bio_segments (bio); -else - seg_cnt = bio->bi_vcnt; +unsigned short seg_cnt =bio_segments (bio);if (test_bit (QUEUE_FLAG_NO_SG_MERGE , &q->queue_flags) && (seg_cnt <queue_max_segments (q)))
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 107/343 keys: Timestamp new keys
In reply to Greg Kroah-HartmanFrom: David Howells <[email protected]>
[ Upstream commit 7c1857bdbdf1e4c541e45eab477ee23ed4333ea4 ]
Set the timestamp on new keys rather than leaving it unset.
--- security/keys/key.c | 1 + 1 file changed, 1 insertion(+)
security/keys/key.c +1 -0
@@ -297,6 +297,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, key->gid = gid; key->perm = perm; key->restrict_link = restrict_link; + key->last_used_at =ktime_get_real_seconds ();if (!(flags &KEY_ALLOC_NOT_IN_QUOTA )) key->flags |=1 <<KEY_FLAG_IN_QUOTA ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 108/343 vfio_pci: Enable memory accesses before calling pci_map_rom
In reply to Greg Kroah-HartmanFrom: Eric Auger <[email protected]>
[ Upstream commit 0cfd027be1d6def4a462cdc180c055143af24069 ]
pci_map_rom/pci_get_rom_size() performs memory access in the ROM. In case the Memory Space accesses were disabled, readw() is likely to trigger a synchronous external abort on some platforms.
In case memory accesses were disabled, re-enable them before the call and disable them back again just after.
--- drivers/vfio/pci/vfio_pci.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
drivers/vfio/pci/vfio_pci.c +14 -5
@@ -717,6 +717,7 @@ static long vfio_pci_ioctl(void *device_data, {void __iomem *io;size_t size; +u16 orig_cmd; info.offset =VFIO_PCI_INDEX_TO_OFFSET (info.index); info.flags =0 ;
@@ -732,15 +733,23 @@ static long vfio_pci_ioctl(void *device_data,break ; } -/* Is it really there? */ +/* +* Is it really there? Enable memory decode for +* implicit access in pci_map_rom(). +*/ +pci_read_config_word (pdev,PCI_COMMAND , &orig_cmd); +pci_write_config_word (pdev,PCI_COMMAND , + orig_cmd |PCI_COMMAND_MEMORY ); + io =pci_map_rom (pdev, &size); -if (!io || !size) { +if (io) { + info.flags =VFIO_REGION_INFO_FLAG_READ ; +pci_unmap_rom (pdev, io); + }else { info.size =0 ; -break ; } -pci_unmap_rom (pdev, io); - info.flags =VFIO_REGION_INFO_FLAG_READ ; +pci_write_config_word (pdev,PCI_COMMAND , orig_cmd);break ; }case VFIO_PCI_VGA_REGION_INDEX :
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 99/343 drm/etnaviv: potential NULL dereference
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 9e05352340d3a3e68c144136db9810b26ebb88c3 ]
The etnaviv_gem_prime_get_sg_table() is supposed to return error pointers. Otherwise it can lead to a NULL dereference when it's called from drm_gem_map_dma_buf().
--- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +1 -1
@@ -26,7 +26,7 @@ struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj)int npages = obj->size >>PAGE_SHIFT ;if (WARN_ON (!etnaviv_obj->pages))/* should have already pinned! */ -return NULL ; +return ERR_PTR (-EINVAL );return drm_prime_pages_to_sg (etnaviv_obj->pages, npages); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 115/343 regulator: pv88080: Fix array out-of-bounds access
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
[ Upstream commit 3c413f594c4f9df40061445667ca11a12bc8ee34 ]
Fix off-by-one while iterating current_limits array. The valid index should be 0 ~ n_current_limits -1.
--- drivers/regulator/pv88080-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/pv88080-regulator.c +1 -1
@@ -279,7 +279,7 @@ static int pv88080_set_current_limit(struct regulator_dev *rdev, int min,int i;/* search for closest to maximum */ -for (i = info->n_current_limits; i >=0 ; i--) { +for (i = info->n_current_limits -1 ; i >=0 ; i--) {if (min <= info->current_limits[i] && max >= info->current_limits[i]) { return regmap_update_bits(rdev->regmap,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 124/343 NFS: Fix a soft lockup in the delegation recovery code
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit 6f9449be53f3ce383caed797708b332ede8d952c ]
Fix a soft lockup when NFS client delegation recovery is attempted but the inode is in the process of being freed. When the igrab(inode) call fails, and we have to restart the recovery process, we need to ensure that we won't attempt to recover the same delegation again.
--- fs/nfs/delegation.c | 20 ++++++++++++-------- fs/nfs/delegation.h | 1 + 2 files changed, 13 insertions(+), 8 deletions(-)
fs/nfs/delegation.c +12 -8
@@ -234,6 +234,8 @@ static struct inode *nfs_delegation_grab_inode(struct nfs_delegation *delegationspin_lock (&delegation->lock);if (delegation->inode !=NULL ) inode =igrab (delegation->inode); +if (!inode) +set_bit (NFS_DELEGATION_INODE_FREEING , &delegation->flags);spin_unlock (&delegation->lock);return inode; }
@@ -863,10 +865,11 @@ restart:list_for_each_entry_rcu (server, &clp->cl_superblocks, client_link) {list_for_each_entry_rcu (delegation, &server->delegations, super_list) { -if (test_bit (NFS_DELEGATION_RETURNING , - &delegation->flags)) -continue ; -if (test_bit (NFS_DELEGATION_NEED_RECLAIM , +if (test_bit (NFS_DELEGATION_INODE_FREEING , + &delegation->flags) || +test_bit (NFS_DELEGATION_RETURNING , + &delegation->flags) || +test_bit (NFS_DELEGATION_NEED_RECLAIM , &delegation->flags) ==0 )continue ;if (!nfs_sb_active (server->super))
@@ -971,10 +974,11 @@ restart:list_for_each_entry_rcu (server, &clp->cl_superblocks, client_link) {list_for_each_entry_rcu (delegation, &server->delegations, super_list) { -if (test_bit (NFS_DELEGATION_RETURNING , - &delegation->flags)) -continue ; -if (test_bit (NFS_DELEGATION_TEST_EXPIRED , +if (test_bit (NFS_DELEGATION_INODE_FREEING , + &delegation->flags) || +test_bit (NFS_DELEGATION_RETURNING , + &delegation->flags) || +test_bit (NFS_DELEGATION_TEST_EXPIRED , &delegation->flags) ==0 )continue ;if (!nfs_sb_active (server->super))
fs/nfs/delegation.h +1 -0
@@ -34,6 +34,7 @@ enum {NFS_DELEGATION_RETURNING ,NFS_DELEGATION_REVOKED ,NFS_DELEGATION_TEST_EXPIRED , + NFS_DELEGATION_INODE_FREEING, };int nfs_inode_set_delegation (struct inode *inode,struct rpc_cred *cred,struct nfs_openres *res);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 125/343 clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit e7e7e0d7beafebd11b0c065cd5fbc1e5759c5aab ]
If the clock tree is not fully populated when the timer-sun5i init code is called, attempts to get the clock rate for the timer would fail and return 0.
Make the init code for both clock events and clocksource check the returned clock rate and fail gracefully if the result is 0, instead of causing a divide by 0 exception later on.
--- drivers/clocksource/timer-sun5i.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/clocksource/timer-sun5i.c +10 -0
@@ -202,6 +202,11 @@ static int __init sun5i_setup_clocksource(struct device_node *node, } rate =clk_get_rate (clk); +if (!rate) { +pr_err ("Couldn't get parent clock rate\n" ); + ret = -EINVAL ; + goto err_disable_clk; + } cs->timer.base = base; cs->timer.clk = clk;
@@ -275,6 +280,11 @@ static int __init sun5i_setup_clockevent(struct device_node *node, void __iomem } rate =clk_get_rate (clk); +if (!rate) { +pr_err ("Couldn't get parent clock rate\n" ); + ret = -EINVAL ; + goto err_disable_clk; + } ce->timer.base = base; ce->timer.ticks_per_jiffy =DIV_ROUND_UP (rate,HZ );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 126/343 clocksource/drivers/exynos_mct: Fix error path in timer resources initialization
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit b9307420196009cdf18bad55e762ac49fb9a80f4 ]
While freeing interrupt handlers in error path, don't assume that all requested interrupts are per-processor interrupts and properly release standard interrupts too.
--- drivers/clocksource/exynos_mct.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/clocksource/exynos_mct.c +13 -1
@@ -563,7 +563,19 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem *return 0 ; out_irq: -free_percpu_irq (mct_irqs[MCT_L0_IRQ ], &percpu_mct_tick); +if (mct_int_type ==MCT_INT_PPI ) { +free_percpu_irq (mct_irqs[MCT_L0_IRQ ], &percpu_mct_tick); + }else { +for_each_possible_cpu (cpu) { +struct mct_clock_event_device *pcpu_mevt = +per_cpu_ptr (&percpu_mct_tick, cpu); + +if (pcpu_mevt->evt.irq !=-1 ) { +free_irq (pcpu_mevt->evt.irq, pcpu_mevt); + pcpu_mevt->evt.irq =-1 ; + } + } + }return err; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 127/343 platform/x86: wmi: fix potential null pointer dereference
In reply to Greg Kroah-HartmanFrom: Mattias Jacobsson <[email protected]>
[ Upstream commit c355ec651a8941864549f2586f969d0eb7bf499a ]
In the function wmi_dev_match() the variable id is dereferenced without first performing a NULL check. The variable can for example be NULL if a WMI driver is registered without specifying the id_table field in struct wmi_driver.
Add a NULL check and return that the driver can't handle the device if the variable is NULL.
--- drivers/platform/x86/wmi.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/x86/wmi.c +3 -0
@@ -748,6 +748,9 @@ static int wmi_dev_match(struct device *dev, struct device_driver *driver)struct wmi_block *wblock =dev_to_wblock (dev);const struct wmi_device_id *id = wmi_driver->id_table; +if (id ==NULL ) +return 0 ; +while (id->guid_string) {uuid_le driver_guid;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 128/343 NFS/pnfs: Bulk destroy of layouts needs to be safe w.r.t. umount
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit 5085607d209102b37b169bc94d0aa39566a9842a ]
If a bulk layout recall or a metadata server reboot coincides with a umount, then holding a reference to an inode is unsafe unless we also hold a reference to the super block.
--- fs/nfs/pnfs.c | 33 +++++++++++++++++++++++---------- fs/nfs/pnfs.h | 1 + 2 files changed, 24 insertions(+), 10 deletions(-)
fs/nfs/pnfs.c +23 -10
@@ -725,22 +725,35 @@ static int pnfs_layout_bulk_destroy_byserver_locked(struct nfs_client *clp, struct nfs_server *server, struct list_head *layout_list) + __must_hold(&clp->cl_lock) + __must_hold(RCU) { struct pnfs_layout_hdr *lo, *next;struct inode *inode;list_for_each_entry_safe (lo, next, &server->layouts, plh_layouts) { -if (test_bit (NFS_LAYOUT_INVALID_STID , &lo->plh_flags)) +if (test_bit (NFS_LAYOUT_INVALID_STID , &lo->plh_flags) || +test_bit (NFS_LAYOUT_INODE_FREEING , &lo->plh_flags) || + !list_empty (&lo->plh_bulk_destroy))continue ; +/* If the sb is being destroyed, just bail */ +if (!nfs_sb_active (server->super)) +break ; inode =igrab (lo->plh_inode); -if (inode ==NULL ) -continue ; -list_del_init (&lo->plh_layouts); -if (pnfs_layout_add_bulk_destroy_list (inode, layout_list)) -continue ; -rcu_read_unlock (); -spin_unlock (&clp->cl_lock); -iput (inode); +if (inode !=NULL ) { +list_del_init (&lo->plh_layouts); +if (pnfs_layout_add_bulk_destroy_list (inode, + layout_list)) +continue ; +rcu_read_unlock (); +spin_unlock (&clp->cl_lock); +iput (inode); + }else { +rcu_read_unlock (); +spin_unlock (&clp->cl_lock); +set_bit (NFS_LAYOUT_INODE_FREEING , &lo->plh_flags); + } +nfs_sb_deactive (server->super);spin_lock (&clp->cl_lock);rcu_read_lock ();return -EAGAIN ;
@@ -778,7 +791,7 @@ pnfs_layout_free_bulk_destroy_list(struct list_head *layout_list,/* Free all lsegs that are attached to commit buckets */ nfs_commit_inode (inode,0 );pnfs_put_layout_hdr (lo); -iput (inode); +nfs_iput_and_deactive (inode); }return ret; }
fs/nfs/pnfs.h +1 -0
@@ -99,6 +99,7 @@ enum {NFS_LAYOUT_RETURN_REQUESTED ,/* Return this layout ASAP */ NFS_LAYOUT_INVALID_STID ,/* layout stateid id is invalid */ NFS_LAYOUT_FIRST_LAYOUTGET ,/* Serialize first layoutget */ + NFS_LAYOUT_INODE_FREEING, /* The inode is being freed */ }; enum layoutdriver_policy_flags {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 90/343 thermal: mediatek: fix register index error
In reply to Greg Kroah-HartmanFrom: Michael Kao <[email protected]>
[ Upstream commit eb9aecd90d1a39601e91cd08b90d5fee51d321a6 ]
The index of msr and adcpnp should match the sensor which belongs to the selected bank in the for loop.
--- drivers/thermal/mtk_thermal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/thermal/mtk_thermal.c +4 -2
@@ -407,7 +407,8 @@ static int mtk_thermal_bank_temperature(struct mtk_thermal_bank *bank)u32 raw;for (i =0 ; i < conf->bank_data[bank->id].num_sensors; i++) { - raw =readl (mt->thermal_base + conf->msr[i]); + raw =readl (mt->thermal_base + + conf->msr[conf->bank_data[bank->id].sensors[i]]); temp = raw_to_mcelsius(mt, conf->bank_data[bank->id].sensors[i],
@@ -544,7 +545,8 @@ static void mtk_thermal_init_bank(struct mtk_thermal *mt, int num,for (i =0 ; i < conf->bank_data[num].num_sensors; i++)writel (conf->sensor_mux_values[conf->bank_data[num].sensors[i]], - mt->thermal_base + conf->adcpnp[i]); + mt->thermal_base + + conf->adcpnp[conf->bank_data[num].sensors[i]]);writel ((1 << conf->bank_data[num].num_sensors) -1 , mt->thermal_base +TEMP_MONCTL0 );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 117/343 net: dsa: qca8k: Enable delay for RGMII_ID mode
In reply to Greg Kroah-HartmanFrom: Vinod Koul <[email protected]>
[ Upstream commit a968b5e9d5879f9535d6099505f9e14abcafb623 ]
RGMII_ID specifies that we should have internal delay, so resurrect the delay addition routine but under the RGMII_ID mode.
--- drivers/net/dsa/qca8k.c | 12 ++++++++++++ drivers/net/dsa/qca8k.h | 1 + 2 files changed, 13 insertions(+)
drivers/net/dsa/qca8k.c +12 -0
@@ -459,6 +459,18 @@ qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode)qca8k_write (priv,QCA8K_REG_PORT5_PAD_CTRL ,QCA8K_PORT_PAD_RGMII_RX_DELAY_EN );break ; +case PHY_INTERFACE_MODE_RGMII_ID : +/* RGMII_ID needs internal delay. This is enabled through +* PORT5_PAD_CTRL for all ports, rather than individual port +* registers +*/ +qca8k_write (priv, reg, +QCA8K_PORT_PAD_RGMII_EN | +QCA8K_PORT_PAD_RGMII_TX_DELAY (QCA8K_MAX_DELAY ) | +QCA8K_PORT_PAD_RGMII_RX_DELAY (QCA8K_MAX_DELAY )); +qca8k_write (priv,QCA8K_REG_PORT5_PAD_CTRL , +QCA8K_PORT_PAD_RGMII_RX_DELAY_EN ); +break ;case PHY_INTERFACE_MODE_SGMII :qca8k_write (priv, reg,QCA8K_PORT_PAD_SGMII_EN );break ;
drivers/net/dsa/qca8k.h +1 -0
@@ -40,6 +40,7 @@ ((0x8 + (x & 0x3)) << 22)#define QCA8K_PORT_PAD_RGMII_RX_DELAY (x) \ ((0x10 + (x & 0x3)) << 20) +#define QCA8K_MAX_DELAY 3#define QCA8K_PORT_PAD_RGMII_RX_DELAY_EN BIT(24)#define QCA8K_PORT_PAD_SGMII_EN BIT(7)#define QCA8K_REG_MODULE_EN 0x030
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 116/343 regulator: pv88090: Fix array out-of-bounds access
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
[ Upstream commit a5455c9159414748bed4678184bf69989a4f7ba3 ]
Fix off-by-one while iterating current_limits array. The valid index should be 0 ~ n_current_limits -1.
--- drivers/regulator/pv88090-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/pv88090-regulator.c +1 -1
@@ -157,7 +157,7 @@ static int pv88090_set_current_limit(struct regulator_dev *rdev, int min,int i;/* search for closest to maximum */ -for (i = info->n_current_limits; i >=0 ; i--) { +for (i = info->n_current_limits -1 ; i >=0 ; i--) {if (min <= info->current_limits[i] && max >= info->current_limits[i]) { return regmap_update_bits(rdev->regmap,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 118/343 drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 13649101a25c53c87f4ab98a076dfe61f3636ab1 ]
Currently, the expression for calculating RON is always going to result in zero no matter the value of ram->mr[1] because the ! operator has higher precedence than the shift >> operator. I believe the missing parentheses around the expression before appying the ! operator will result in the desired result.
[ Note, not tested ]
Detected by CoveritScan, CID#1324005 ("Operands don't affect result")
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c +1 -1
@@ -87,7 +87,7 @@ nvkm_gddr3_calc(struct nvkm_ram *ram)WR = (ram->next->bios.timing[2 ] &0x007f0000 ) >>16 ;/* XXX: Get these values from the VBIOS instead */ DLL = !(ram->mr[1 ] &0x1 ); -RON = !(ram->mr[1 ] &0x300 ) >>8 ; +RON = !((ram->mr[1 ] &0x300 ) >>8 );break ;default :return -ENOSYS ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 119/343 drm/nouveau/pmu: dont print reply values if exec is false
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ]
Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually updated.
Detected by CoverityScan, CID#1271291 ("Uninitialized scaler variable")
--- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c +2 -2
@@ -88,10 +88,10 @@ nvkm_memx_fini(struct nvkm_memx **pmemx, bool exec)if (exec) {nvkm_pmu_send (pmu, reply,PROC_MEMX ,MEMX_MSG_EXEC , memx->base, finish); +nvkm_debug (subdev,"Exec took %uns, PMU_IN %08x\n" , + reply[0 ], reply[1 ]); } -nvkm_debug (subdev,"Exec took %uns, PMU_IN %08x\n" , - reply[0 ], reply[1 ]);kfree (memx);return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 120/343 ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit 8d1667200850f8753c0265fa4bd25c9a6e5f94ce ]
The apq8016 driver leaves the of-node refcount at aborting from the loop of for_each_child_of_node() in the error path. Not only the iterator node of for_each_child_of_node(), the children nodes referred from it for codec and cpu have to be properly unreferenced.
--- sound/soc/qcom/apq8016_sbc.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
sound/soc/qcom/apq8016_sbc.c +16 -5
@@ -163,41 +163,52 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card)if (!cpu || !codec) {dev_err (dev,"Can't find cpu/codec DT node\n" ); -return ERR_PTR (-EINVAL ); + ret = -EINVAL ; + goto error; } link->cpu_of_node =of_parse_phandle (cpu,"sound-dai" ,0 );if (!link->cpu_of_node) {dev_err (card->dev,"error getting cpu phandle\n" ); -return ERR_PTR (-EINVAL ); + ret = -EINVAL ; + goto error; } ret =snd_soc_of_get_dai_name (cpu, &link->cpu_dai_name);if (ret) {dev_err (card->dev,"error getting cpu dai name\n" ); -return ERR_PTR (ret); + goto error; } ret =snd_soc_of_get_dai_link_codecs (dev, codec, link);if (ret <0 ) {dev_err (card->dev,"error getting codec dai name\n" ); -return ERR_PTR (ret); + goto error; } link->platform_of_node = link->cpu_of_node; ret =of_property_read_string (np,"link-name" , &link->name);if (ret) {dev_err (card->dev,"error getting codec dai_link name\n" ); -return ERR_PTR (ret); + goto error; } link->stream_name = link->name; link->init = apq8016_sbc_dai_init; link++; + +of_node_put (cpu); +of_node_put (codec); }return data; + + error: +of_node_put (np); +of_node_put (cpu); +of_node_put (codec); +return ERR_PTR (ret); }static const struct snd_soc_dapm_widget apq8016_sbc_dapm_widgets[] = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 121/343 fs/nfs: Fix nfs_parse_devname to not modify its argument
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
[ Upstream commit 40cc394be1aa18848b8757e03bd8ed23281f572e ]
In the rare and unsupported case of a hostname list nfs_parse_devname will modify dev_name. There is no need to modify dev_name as the all that is being computed is the length of the hostname, so the computed length can just be shorted.
--- fs/nfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/super.c +1 -1
@@ -1925,7 +1925,7 @@ static int nfs_parse_devname(const char *dev_name,/* kill possible hostname list: not supported */ comma =strchr (dev_name,',' );if (comma !=NULL && comma < end) - *comma =0 ; + len = comma - dev_name; }if (len > maxnamlen)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 122/343 staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xx
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit e8edc32d70a4e09160835792eb5d1af71a0eec14 ]
Clang warns:
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:2472:11:
warning: implicit conversion from enumeration type 'enum halmac_cmd_process_status' to different enumeration type 'enum halmac_ret_status' [-Wenum-conversion]
return HALMAC_CMD_PROCESS_ERROR;
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~1 warning generated.
Fix this by using the proper enum for allocation failures, HALMAC_RET_MALLOC_FAIL, which is used in the rest of this file.
--- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c +1 -1
@@ -2495,7 +2495,7 @@ halmac_parse_psd_data_88xx(struct halmac_adapter *halmac_adapter, u8 *c2h_buf,if (!psd_set->data) { psd_set->data =kzalloc (psd_set->data_size,GFP_KERNEL );if (!psd_set->data) -return HALMAC_CMD_PROCESS_ERROR ; +return HALMAC_RET_MALLOC_FAIL ; }if (segment_id ==0 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 123/343 powerpc/64s: Fix logic when handling unknown CPU features
In reply to Greg Kroah-HartmanFrom: Michael Ellerman <[email protected]>
[ Upstream commit 8cfaf106918a8c13abb24c641556172afbb9545c ]
In cpufeatures_process_feature(), if a provided CPU feature is unknown and enable_unknown is false, we erroneously print that the feature is being enabled and return true, even though no feature has been enabled, and may also set feature bits based on the last entry in the match table.
Fix this so that we only set feature bits from the match table if we have actually enabled a feature from that table, and when failing to enable an unknown feature, always print the "not enabling" message and return false.
Coincidentally, some older gccs (<GCC 7), when invoked with -fsanitize-coverage=trace-pc, cause a spurious uninitialised variable warning in this function:
arch/powerpc/kernel/dt_cpu_ftrs.c: In function ‘cpufeatures_process_feature’:
arch/powerpc/kernel/dt_cpu_ftrs.c:686:7: warning: ‘m’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (m->cpu_ftr_bit_mask)
An upcoming patch will enable support for kcov, which requires this option. This patch avoids the warning.
--- arch/powerpc/kernel/dt_cpu_ftrs.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
arch/powerpc/kernel/dt_cpu_ftrs.c +7 -10
@@ -705,8 +705,10 @@ static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f) m = &dt_cpu_feature_match_table[i];if (!strcmp (f->name, m->name)) { known = true; -if (m->enable (f)) +if (m->enable (f)) { + cur_cpu_spec->cpu_features |= m->cpu_ftr_bit_mask;break ; + }pr_info ("not enabling: %s (disabled or unsupported by kernel)\n" , f->name);
@@ -714,17 +716,12 @@ static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f) } } -if (!known && enable_unknown) { -if (!feat_try_enable_unknown (f)) { -pr_info ("not enabling: %s (unknown and unsupported by kernel)\n" , - f->name); -return false; - } +if (!known && (!enable_unknown || !feat_try_enable_unknown (f))) { +pr_info ("not enabling: %s (unknown and unsupported by kernel)\n" , + f->name); +return false; } -if (m->cpu_ftr_bit_mask) - cur_cpu_spec->cpu_features |= m->cpu_ftr_bit_mask; -if (known)pr_debug ("enabling: %s\n" , f->name);else
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 114/343 regulator: pv88060: Fix array out-of-bounds access
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
[ Upstream commit 7cd415f875591bc66c5ecb49bf84ef97e80d7b0e ]
Fix off-by-one while iterating current_limits array. The valid index should be 0 ~ n_current_limits -1.
--- drivers/regulator/pv88060-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/pv88060-regulator.c +1 -1
@@ -135,7 +135,7 @@ static int pv88060_set_current_limit(struct regulator_dev *rdev, int min,int i;/* search for closest to maximum */ -for (i = info->n_current_limits; i >=0 ; i--) { +for (i = info->n_current_limits -1 ; i >=0 ; i--) {if (min <= info->current_limits[i] && max >= info->current_limits[i]) { return regmap_update_bits(rdev->regmap,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 130/343 ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit ca70ea43f80c98582f5ffbbd1e6f4da2742da0c4 ]
MCPM does a soft reset of the CPUs and uses common cpu_resume() routine to perform low-level platform initialization. This results in a try to install HYP stubs for the second time for each CPU and results in false HYP/SVC mode mismatch detection. The HYP stubs are already installed at the beginning of the kernel initialization on the boot CPU (head.S) or in the secondary_startup() for other CPUs. To fix this issue MCPM code should use a cpu_resume() routine without HYP stubs installation.
This change fixes HYP/SVC mode mismatch on Samsung Exynos5422-based Odroid XU3/XU4/HC1 boards.
--- arch/arm/common/mcpm_entry.c | 2 +- arch/arm/include/asm/suspend.h | 1 + arch/arm/kernel/sleep.S | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-)
arch/arm/common/mcpm_entry.c +1 -1
@@ -379,7 +379,7 @@ static int __init nocache_trampoline(unsigned long _arg)unsigned int cluster =MPIDR_AFFINITY_LEVEL (mpidr,1 );phys_reset_t phys_reset; -mcpm_set_entry_vector (cpu, cluster, cpu_resume); +mcpm_set_entry_vector (cpu, cluster, cpu_resume_no_hyp);setup_mm_for_reboot ();__mcpm_cpu_going_down (cpu, cluster);
arch/arm/include/asm/suspend.h +1 -0
@@ -10,6 +10,7 @@ struct sleep_save_sp { };extern void cpu_resume (void ); +extern void cpu_resume_no_hyp (void );extern void cpu_resume_arm (void );extern int cpu_suspend (unsigned long ,int (*)(unsigned long ));
arch/arm/kernel/sleep.S +12 -0
@@ -120,6 +120,14 @@ ENDPROC(cpu_resume_after_mmu) .text .align +#ifdef CONFIG_MCPM + .arm +THUMB( .thumb ) +ENTRY(cpu_resume_no_hyp) +ARM_BE8(setend be) @ ensure we are in BE mode + b no_hyp +#endif + #ifdef CONFIG_MMU .arm ENTRY(cpu_resume_arm)
@@ -135,6 +143,7 @@ ARM_BE8(setend be) @ ensure we are in BE mode bl __hyp_stub_install_secondary #endif safe_svcmode_maskall r1 +no_hyp: mov r1, #0 ALT_SMP(mrc p15, 0, r0, c0, c0, 5) ALT_UP_B(1f)
@@ -163,6 +172,9 @@ ENDPROC(cpu_resume) #ifdef CONFIG_MMU ENDPROC(cpu_resume_arm) +#endif +#ifdef CONFIG_MCPM +ENDPROC(cpu_resume_no_hyp) #endif .align 2
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 139/343 scsi: megaraid_sas: reduce module load time
In reply to Greg Kroah-HartmanFrom: Steve Sistare <[email protected]>
[ Upstream commit 31b6a05f86e690e1818116fd23c3be915cc9d9ed ]
megaraid_sas takes 1+ seconds to load while waiting for firmware:
[2.822603] megaraid_sas 0000:03:00.0: Waiting for FW to come to ready state [3.871003] megaraid_sas 0000:03:00.0: FW now in Ready state
This is due to the following loop in megasas_transition_to_ready(), which waits a minimum of 1 second, even though the FW becomes ready in tens of millisecs:
/*
* The cur_state should not last for more than max_wait secs
*/
for (i = 0; i < max_wait; i++) {
...
msleep(1000);
...
dev_info(&instance->pdev->dev, "FW now in Ready state\n");This is a regression, caused by a change of the msleep granularity from 1 to 1000 due to concern about waiting too long on systems with coarse jiffies.
To fix, increase iterations and use msleep(20), which results in:
[2.670627] megaraid_sas 0000:03:00.0: Waiting for FW to come to ready state [2.739386] megaraid_sas 0000:03:00.0: FW now in Ready state
--- drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +2 -2
@@ -3823,12 +3823,12 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)/* * The cur_state should not last for more than max_wait secs */ -for (i =0 ; i < max_wait; i++) { +for (i =0 ; i < max_wait *50 ; i++) { curr_abs_state = instance->instancet->read_fw_status_reg (instance->reg_set);if (abs_state == curr_abs_state) { -msleep (1000 ); +msleep (20 ); }else break ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 140/343 drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 5ac188b12e7cbdd92dee60877d1fac913fc1d074 ]
If riocm_get_channel() fails, then we should just return -EINVAL. Calling riocm_put_channel() will trigger a NULL dereference and generally we should call put() if the get() didn't succeed.
--- drivers/rapidio/rio_cm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/rapidio/rio_cm.c +3 -1
@@ -1215,7 +1215,9 @@ static int riocm_ch_listen(u16 ch_id)riocm_debug (CHOP ,"(ch_%d)" , ch_id); ch =riocm_get_channel (ch_id); -if (!ch || !riocm_cmp_exch (ch,RIO_CM_CHAN_BOUND ,RIO_CM_LISTEN )) +if (!ch) +return -EINVAL ; +if (!riocm_cmp_exch (ch,RIO_CM_CHAN_BOUND ,RIO_CM_LISTEN )) ret = -EINVAL ;riocm_put_channel (ch);return ret;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 141/343 xen, cpu_hotplug: Prevent an out of bounds access
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 201676095dda7e5b31a5e1d116d10fc22985075e ]
The "cpu" variable comes from the sscanf() so Smatch marks it as untrusted data. We can't pass a higher value than "nr_cpu_ids" to cpu_possible() or it results in an out of bounds access.
--- drivers/xen/cpu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/cpu_hotplug.c +1 -1
@@ -54,7 +54,7 @@ static int vcpu_online(unsigned int cpu) }static void vcpu_hotplug (unsigned int cpu) { -if (!cpu_possible (cpu)) +if (cpu >= nr_cpu_ids || !cpu_possible (cpu))return ;switch (vcpu_online (cpu)) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 142/343 net: sh_eth: fix a missing check of of_get_phy_mode
In reply to Greg Kroah-HartmanFrom: Kangjie Lu <[email protected]>
[ Upstream commit 035a14e71f27eefa50087963b94cbdb3580d08bf ]
of_get_phy_mode may fail and return a negative error code; the fix checks the return value of of_get_phy_mode and returns NULL of it fails.
--- drivers/net/ethernet/renesas/sh_eth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/ethernet/renesas/sh_eth.c +5 -1
@@ -3046,12 +3046,16 @@ static struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev)struct device_node *np = dev->of_node;struct sh_eth_plat_data *pdata;const char *mac_addr; +int ret; pdata =devm_kzalloc (dev,sizeof (*pdata),GFP_KERNEL );if (!pdata)return NULL ; - pdata->phy_interface =of_get_phy_mode (np); + ret =of_get_phy_mode (np); +if (ret <0 ) +return NULL ; + pdata->phy_interface = ret; mac_addr =of_get_mac_address (np);if (mac_addr)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 143/343 regulator: lp87565: Fix missing register for LP87565_BUCK_0
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
[ Upstream commit d1a6cbdf1e597917cb642c655512d91b71a35d22 ]
LP87565_BUCK_0 is missed, fix it.
--- drivers/regulator/lp87565-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/lp87565-regulator.c +1 -1
@@ -188,7 +188,7 @@ static int lp87565_regulator_probe(struct platform_device *pdev)struct lp87565 *lp87565 =dev_get_drvdata (pdev->dev.parent);struct regulator_config config = { };struct regulator_dev *rdev; -int i, min_idx =LP87565_BUCK_1 , max_idx =LP87565_BUCK_3 ; +int i, min_idx =LP87565_BUCK_0 , max_idx =LP87565_BUCK_3 ;platform_set_drvdata (pdev, lp87565);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 144/343 media: ivtv: update *pos correctly in ivtv_read_pos()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit f8e579f3ca0973daef263f513da5edff520a6c0d ]
We had intended to update *pos, but the current code is a no-op.
--- drivers/media/pci/ivtv/ivtv-fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-fileops.c +1 -1
@@ -420,7 +420,7 @@ static ssize_t ivtv_read_pos(struct ivtv_stream *s, char __user *ubuf, size_t coIVTV_DEBUG_HI_FILE ("read %zd from %s, got %zd\n" , count, s->name, rc);if (rc >0 ) - pos += rc; + *pos += rc;return rc; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 145/343 media: cx18: update *pos correctly in cx18_read_pos()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 7afb0df554292dca7568446f619965fb8153085d ]
We should be updating *pos. The current code is a no-op.
--- drivers/media/pci/cx18/cx18-fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/cx18/cx18-fileops.c +1 -1
@@ -484,7 +484,7 @@ static ssize_t cx18_read_pos(struct cx18_stream *s, char __user *ubuf,CX18_DEBUG_HI_FILE ("read %zd from %s, got %zd\n" , count, s->name, rc);if (rc >0 ) - pos += rc; + *pos += rc;return rc; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 146/343 media: wl128x: Fix an error code in fm_download_firmware()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit ef4bb63dc1f7213c08e13f6943c69cd27f69e4a3 ]
We forgot to set "ret" on this error path.
--- drivers/media/radio/wl128x/fmdrv_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/media/radio/wl128x/fmdrv_common.c +3 -2
@@ -1271,8 +1271,9 @@ static int fm_download_firmware(struct fmdev *fmdev, const u8 *fw_name)switch (action->type) {case ACTION_SEND_COMMAND :/* Send */ -if (fmc_send_cmd (fmdev,0 ,0 , action->data, - action->size,NULL ,NULL )) + ret =fmc_send_cmd (fmdev,0 ,0 , action->data, + action->size,NULL ,NULL ); +if (ret) goto rel_fw; cmd_cnt++;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 147/343 media: cx23885: check allocation return
In reply to Greg Kroah-HartmanFrom: Nicholas Mc Guire <[email protected]>
[ Upstream commit a3d7f22ef34ec4206b50ee121384d5c8bebd5591 ]
Checking of kmalloc() seems to have been committed - as cx23885_dvb_register() is checking for != 0 return, returning -ENOMEM should be fine here. While at it address the coccicheck suggestion to move to kmemdup rather than using kmalloc+memcpy.
--- drivers/media/pci/cx23885/cx23885-dvb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/media/pci/cx23885/cx23885-dvb.c +3 -2
@@ -1460,8 +1460,9 @@ static int dvb_register(struct cx23885_tsport *port)if (fe0->dvb.frontend !=NULL ) {struct i2c_adapter *tun_i2c; - fe0->dvb.frontend->sec_priv =kmalloc (sizeof (dib7000p_ops),GFP_KERNEL ); -memcpy (fe0->dvb.frontend->sec_priv, &dib7000p_ops,sizeof (dib7000p_ops)); + fe0->dvb.frontend->sec_priv =kmemdup (&dib7000p_ops,sizeof (dib7000p_ops),GFP_KERNEL ); +if (!fe0->dvb.frontend->sec_priv) +return -ENOMEM ; tun_i2c = dib7000p_ops.get_i2c_master (fe0->dvb.frontend,DIBX000_I2C_INTERFACE_TUNER ,1 );if (!dvb_attach (dib0070_attach, fe0->dvb.frontend, tun_i2c, &dib7070p_dib0070_config))return -ENODEV ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 148/343 regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
[ Upstream commit e69b394703e032e56a140172440ec4f9890b536d ]
selector 0xB (1011) should be 2.6V rather than 2.7V, fit ix.
Table 5-4. LDOA1 Output Voltage Options
VID Bits VOUT VID Bits VOUT VID Bits VOUT VID Bits VOUT
0000 1.35 0100 1.8 1000 2.3 1100 2.85 0001 1.5 0101 1.9 1001 2.4 1101 3.0 0010 1.6 0110 2.0 1010 2.5 1110 3.3 0011 1.7 0111 2.1 1011 2.6 1111 Not Used
--- drivers/regulator/tps65086-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/tps65086-regulator.c +2 -2
@@ -90,8 +90,8 @@ static const struct regulator_linear_range tps65086_buck345_25mv_ranges[] = {static const struct regulator_linear_range tps65086_ldoa1_ranges[] = {REGULATOR_LINEAR_RANGE (1350000 ,0x0 ,0x0 ,0 ),REGULATOR_LINEAR_RANGE (1500000 ,0x1 ,0x7 ,100000 ), -REGULATOR_LINEAR_RANGE (2300000 ,0x8 ,0xA ,100000 ), -REGULATOR_LINEAR_RANGE (2700000 ,0xB ,0xD ,150000 ), +REGULATOR_LINEAR_RANGE (2300000 ,0x8 ,0xB ,100000 ), +REGULATOR_LINEAR_RANGE (2850000 ,0xC ,0xD ,150000 ),REGULATOR_LINEAR_RANGE (3300000 ,0xE ,0xE ,0 ), };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 131/343 ARM: 8848/1: virt: Align GIC version check with arm64 counterpart
In reply to Greg Kroah-HartmanFrom: Vladimir Murzin <[email protected]>
[ Upstream commit 9db043d36bd379f4cc99054c079de0dabfc38d03 ]
arm64 has got relaxation on GIC version check at early boot stage due to update of the GIC architecture let's align ARM with that.
To help backports (even though the code was correct at the time of writing)
--- arch/arm/kernel/hyp-stub.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/kernel/hyp-stub.S +2 -2
@@ -180,8 +180,8 @@ ARM_BE8(orr r7, r7, #(1 << 25)) @ HSCTLR.EE @ Check whether GICv3 system registers are available mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1 ubfx r7, r7, #28, #4 - cmp r7, #1 - bne 2f + teq r7, #0 + beq 2f @ Enable system register accesses mrc p15, 4, r7, c12, c9, 5 @ ICC_HSRE
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 149/343 jfs: fix bogus variable self-initialization
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit a5fdd713d256887b5f012608701149fa939e5645 ]
A statement was originally added in 2006 to shut up a gcc warning, now but now clang warns about it:
fs/jfs/jfs_txnmgr.c:1932:15: error: variable 'pxd' is uninitialized when used within its own initialization
[-Werror,-Wuninitialized]
pxd_t pxd = pxd; /* truncated extent of xad */
~~~ ^~~
Modern versions of gcc are fine without the silly assignment, so just drop it. Tested with gcc-4.6 (released 2011), 4.7, 4.8, and 4.9.
--- fs/jfs/jfs_txnmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/jfs/jfs_txnmgr.c +1 -2
@@ -1928,8 +1928,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,* header ? */ if (tlck->type & tlckTRUNCATE) { -/* This odd declaration suppresses a bogus gcc warning */ -pxd_t pxd = pxd;/* truncated extent of xad */ +pxd_t pxd;/* truncated extent of xad */ int twm;/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 150/343 tipc: tipc clang warning
In reply to Greg Kroah-HartmanFrom: Jon Maloy <[email protected]>
[ Upstream commit 737889efe9713a0f20a75fd0de952841d9275e6b ]
When checking the code with clang -Wsometimes-uninitialized we get the following warning:
if (!tipc_link_is_establishing(l)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/tipc/node.c:847:46: note: uninitialized use occurs here
tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr);net/tipc/node.c:831:2: note: remove the 'if' if its condition is always true
if (!tipc_link_is_establishing(l)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~net/tipc/node.c:821:31: note: initialize the variable 'maddr' to silence this warning
struct tipc_media_addr *maddr;
We fix this by initializing 'maddr' to NULL. For the matter of clarity, we also test if 'xmitq' is non-empty before we use it and 'maddr' further down in the function. It will never happen that 'xmitq' is non- empty at the same time as 'maddr' is NULL, so this is a sufficient test.
--- net/tipc/node.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
net/tipc/node.c +4 -3
@@ -688,10 +688,10 @@ static void __tipc_node_link_down(struct tipc_node *n, int *bearer_id,static void tipc_node_link_down (struct tipc_node *n,int bearer_id,bool delete) {struct tipc_link_entry *le = &n->links[bearer_id]; +struct tipc_media_addr *maddr =NULL ;struct tipc_link *l = le->link; -struct tipc_media_addr *maddr; -struct sk_buff_head xmitq;int old_bearer_id = bearer_id; +struct sk_buff_head xmitq;if (!l)return ;
@@ -713,7 +713,8 @@ static void tipc_node_link_down(struct tipc_node *n, int bearer_id, bool delete)tipc_node_write_unlock (n);if (delete)tipc_mon_remove_peer (n->net, n->addr, old_bearer_id); -tipc_bearer_xmit (n->net, bearer_id, &xmitq, maddr); +if (!skb_queue_empty (&xmitq)) +tipc_bearer_xmit (n->net, bearer_id, &xmitq, maddr);tipc_sk_rcv (n->net, &le->inputq); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 151/343 m68k: mac: Fix VIA timer counter accesses
In reply to Greg Kroah-HartmanFrom: Finn Thain <[email protected]>
[ Upstream commit 0ca7ce7db771580433bf24454f7a1542bd326078 ]
This resolves some bugs that affect VIA timer counter accesses. Avoid lost interrupts caused by reading the counter low byte register. Make allowance for the fact that the counter will be decremented to 0xFFFF before being reloaded.
--- arch/m68k/mac/via.c | 102 +++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 49 deletions(-)
arch/m68k/mac/via.c +53 -49
@@ -54,16 +54,6 @@ static __u8 rbv_clear;static int gIER,gIFR,gBufA,gBufB; -/* -* Timer defs. -*/ - -#define TICK_SIZE 10000 -#define MAC_CLOCK_TICK (783300/HZ)/* ticks per HZ */ -#define MAC_CLOCK_LOW (MAC_CLOCK_TICK&0xFF) -#define MAC_CLOCK_HIGH (MAC_CLOCK_TICK>>8) - -/* * On Macs with a genuine VIA chip there is no way to mask an individual slot * interrupt. This limitation also seems to apply to VIA clone logic cores in
@@ -278,22 +268,6 @@ void __init via_init(void) } } -/* -* Start the 100 Hz clock -*/ - -void __init via_init_clock (irq_handler_t func) -{ - via1[vACR] |=0x40 ; - via1[vT1LL] =MAC_CLOCK_LOW ; - via1[vT1LH] =MAC_CLOCK_HIGH ; - via1[vT1CL] =MAC_CLOCK_LOW ; - via1[vT1CH] =MAC_CLOCK_HIGH ; - -if (request_irq (IRQ_MAC_TIMER_1 , func,0 ,"timer" , func)) -pr_err ("Couldn't register %s interrupt\n" ,"timer" ); -} -/* * Debugging dump, used in various places to see what's going on. */
@@ -321,29 +295,6 @@ void via_debug_dump(void) } } -/* -* This is always executed with interrupts disabled. -* -* TBI: get time offset between scheduling timer ticks -*/ - -u32 mac_gettimeoffset (void ) -{ -unsigned long ticks, offset =0 ; - -/* read VIA1 timer 2 current value */ - ticks = via1[vT1CL] | (via1[vT1CH] <<8 ); -/* The probability of underflow is less than 2% */ -if (ticks >MAC_CLOCK_TICK -MAC_CLOCK_TICK /50 ) -/* Check for pending timer interrupt in VIA1 IFR */ -if (via1[vIFR] &0x40 ) offset =TICK_SIZE ; - - ticks =MAC_CLOCK_TICK - ticks; - ticks = ticks *10000L /MAC_CLOCK_TICK ; - -return (ticks + offset) *1000 ; -} -/* * Flush the L2 cache on Macs that have it by flipping * the system into 24-bit mode for an instant.
@@ -612,3 +563,56 @@ int via2_scsi_drq_pending(void)return via2[gIFR] & (1 <<IRQ_IDX (IRQ_MAC_SCSIDRQ )); }EXPORT_SYMBOL (via2_scsi_drq_pending); + +/* timer and clock source */ + +#define VIA_CLOCK_FREQ 783360/* VIA "phase 2" clock in Hz */ +#define VIA_TIMER_INTERVAL (1000000 / HZ)/* microseconds per jiffy */ +#define VIA_TIMER_CYCLES (VIA_CLOCK_FREQ / HZ)/* clock cycles per jiffy */ + +#define VIA_TC (VIA_TIMER_CYCLES - 2)/* including 0 and -1 */ +#define VIA_TC_LOW (VIA_TC & 0xFF) +#define VIA_TC_HIGH (VIA_TC >> 8) + +void __init via_init_clock (irq_handler_t timer_routine) +{ +if (request_irq (IRQ_MAC_TIMER_1 , timer_routine,0 ,"timer" ,NULL )) { +pr_err ("Couldn't register %s interrupt\n" ,"timer" ); +return ; + } + + via1[vT1LL] =VIA_TC_LOW ; + via1[vT1LH] =VIA_TC_HIGH ; + via1[vT1CL] =VIA_TC_LOW ; + via1[vT1CH] =VIA_TC_HIGH ; + via1[vACR] |=0x40 ; +} + +u32 mac_gettimeoffset (void ) +{ +unsigned long flags; +u8 count_high; +u16 count, offset =0 ; + +/* +* Timer counter wrap-around is detected with the timer interrupt flag +* but reading the counter low byte (vT1CL) would reset the flag. +* Also, accessing both counter registers is essentially a data race. +* These problems are avoided by ignoring the low byte. Clock accuracy +* is 256 times worse (error can reach 0.327 ms) but CPU overhead is +* reduced by avoiding slow VIA register accesses. +*/ + +local_irq_save (flags); + count_high = via1[vT1CH]; +if (count_high ==0xFF ) + count_high =0 ; +if (count_high >0 && (via1[vIFR] &VIA_TIMER_1_INT )) + offset =VIA_TIMER_CYCLES ; +local_irq_restore (flags); + + count = count_high <<8 ; + count =VIA_TIMER_CYCLES - count + offset; + +return ((count *VIA_TIMER_INTERVAL ) /VIA_TIMER_CYCLES ) *1000 ; +}
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 152/343 arm64: dts: allwinner: a64: Add missing PIO clocks
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
[ Upstream commit 562bf19611c000cb7219431c3cc78aa60c2b371e ]
The pinctrl binding mandates that we have the three clocks fed into the PIO described.
Even though the old case is still supported for backward compatibility, we should update our DTs to fix this.
--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +2 -1
@@ -274,7 +274,8 @@ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&ccu 58>; + clocks = <&ccu 58>, <&osc24M>, <&rtc 0>; + clock-names = "apb", "hosc", "losc"; gpio-controller; #gpio-cells = <3>; interrupt-controller;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 153/343 ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()
In reply to Greg Kroah-HartmanFrom: Tony Lindgren <[email protected]>
[ Upstream commit 7f0d078667a494466991aa7133f49594f32ff6a2 ]
Commit 747834ab8347 ("ARM: OMAP2+: hwmod: revise hardreset behavior") made the call to _enable() conditional based on no oh->rst_lines_cnt. This caused the return value to be potentially uninitialized. Curiously we see no compiler warnings for this, probably as this gets inlined.
We call _setup_reset() from _setup() and only _setup_postsetup() if the return value is zero. Currently the return value can be uninitialized for cases where oh->rst_lines_cnt is set and HWMOD_INIT_NO_RESET is not set.
--- arch/arm/mach-omap2/omap_hwmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/omap_hwmod.c +1 -1
@@ -2530,7 +2530,7 @@ static void _setup_iclk_autoidle(struct omap_hwmod *oh)*/ static int _setup_reset (struct omap_hwmod *oh) { -int r; +int r =0 ;if (oh->_state != _HWMOD_STATE_INITIALIZED)return -EINVAL ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 132/343 regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
[ Upstream commit c25d47888f0fb3d836d68322d4aea2caf31a75a6 ]
The wm831x_dcdc_ilim entries needs to be uA because it is used to compare with min_uA and max_uA.
While at it also make the array const and change to use unsigned int.
--- drivers/regulator/wm831x-dcdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/wm831x-dcdc.c +2 -2
@@ -327,8 +327,8 @@ static int wm831x_buckv_get_voltage_sel(struct regulator_dev *rdev) }/* Current limit options */ -static u16 wm831x_dcdc_ilim[] = { -125 ,250 ,375 ,500 ,625 ,750 ,875 ,1000 +static const unsigned int wm831x_dcdc_ilim[] = { +125000 ,250000 ,375000 ,500000 ,625000 ,750000 ,875000 ,1000000 }; static int wm831x_buckv_set_current_limit(struct regulator_dev *rdev,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 133/343 netfilter: nft_set_hash: fix lookups with fixed size hash on big endian
In reply to Greg Kroah-HartmanFrom: Pablo Neira Ayuso <[email protected]>
[ Upstream commit 3b02b0adc242a72b5e46019b6a9e4f84823592f6 ]
Call jhash_1word() for the 4-bytes key case from the insertion and deactivation path, otherwise big endian arch set lookups fail.
--- net/netfilter/nft_set_hash.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
net/netfilter/nft_set_hash.c +19 -4
@@ -442,6 +442,23 @@ static bool nft_hash_lookup_fast(const struct net *net,return false; } +static u32 nft_jhash (const struct nft_set *set,const struct nft_hash *priv, +const struct nft_set_ext *ext) +{ +const struct nft_data *key =nft_set_ext_key (ext); +u32 hash, k1; + +if (set->klen ==4 ) { + k1 = *(u32 *)key; + hash =jhash_1word (k1, priv->seed); + }else { + hash =jhash (key, set->klen, priv->seed); + } + hash =reciprocal_scale (hash, priv->buckets); + +return hash; +} +static int nft_hash_insert (const struct net *net,const struct nft_set *set,const struct nft_set_elem *elem,struct nft_set_ext **ext)
@@ -451,8 +468,7 @@ static int nft_hash_insert(const struct net *net, const struct nft_set *set,u8 genmask =nft_genmask_next (net);u32 hash; - hash =jhash (nft_set_ext_key (&this->ext), set->klen, priv->seed); - hash =reciprocal_scale (hash, priv->buckets); + hash =nft_jhash (set, priv, &this->ext);hlist_for_each_entry (he, &priv->table[hash], node) { if (!memcmp(nft_set_ext_key(&this->ext), nft_set_ext_key(&he->ext), set->klen) &&
@@ -491,8 +507,7 @@ static void *nft_hash_deactivate(const struct net *net,u8 genmask =nft_genmask_next (net);u32 hash; - hash =jhash (nft_set_ext_key (&this->ext), set->klen, priv->seed); - hash =reciprocal_scale (hash, priv->buckets); + hash =nft_jhash (set, priv, &this->ext);hlist_for_each_entry (he, &priv->table[hash], node) { if (!memcmp(nft_set_ext_key(&this->ext), &elem->key.val, set->klen) ||
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 134/343 NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit 108bb4afd351d65826648a47f11fa3104e250d9b ]
If the attempt to instantiate the mirror's layout DS pointer failed, then that pointer may hold a value of type ERR_PTR(), so we need to check that before we dereference it.
--- fs/nfs/flexfilelayout/flexfilelayout.h | 32 +++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-)
fs/nfs/flexfilelayout/flexfilelayout.h +19 -13
@@ -131,16 +131,6 @@ FF_LAYOUT_LSEG(struct pnfs_layout_segment *lseg) generic_hdr); } -static inline struct nfs4_deviceid_node * -FF_LAYOUT_DEVID_NODE (struct pnfs_layout_segment *lseg,u32 idx) -{ -if (idx >=FF_LAYOUT_LSEG (lseg)->mirror_array_cnt || -FF_LAYOUT_LSEG (lseg)->mirror_array[idx] ==NULL || -FF_LAYOUT_LSEG (lseg)->mirror_array[idx]->mirror_ds ==NULL ) -return NULL ; -return &FF_LAYOUT_LSEG (lseg)->mirror_array[idx]->mirror_ds->id_node; -} -static inline struct nfs4_ff_layout_ds *FF_LAYOUT_MIRROR_DS (struct nfs4_deviceid_node *node) {
@@ -150,9 +140,25 @@ FF_LAYOUT_MIRROR_DS(struct nfs4_deviceid_node *node)static inline struct nfs4_ff_layout_mirror *FF_LAYOUT_COMP (struct pnfs_layout_segment *lseg,u32 idx) { -if (idx >=FF_LAYOUT_LSEG (lseg)->mirror_array_cnt) -return NULL ; -return FF_LAYOUT_LSEG (lseg)->mirror_array[idx]; +struct nfs4_ff_layout_segment *fls =FF_LAYOUT_LSEG (lseg); + +if (idx < fls->mirror_array_cnt) +return fls->mirror_array[idx]; +return NULL ; +} + +static inline struct nfs4_deviceid_node * +FF_LAYOUT_DEVID_NODE (struct pnfs_layout_segment *lseg,u32 idx) +{ +struct nfs4_ff_layout_mirror *mirror =FF_LAYOUT_COMP (lseg, idx); + +if (mirror !=NULL ) { +struct nfs4_ff_layout_ds *mirror_ds = mirror->mirror_ds; + +if (!IS_ERR_OR_NULL (mirror_ds)) +return &mirror_ds->id_node; + } +return NULL ; } static inline u32
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 135/343 net: aquantia: fixed instack structure overflow
In reply to Greg Kroah-HartmanFrom: Igor Russkikh <[email protected]>
[ Upstream commit 8006e3730b6e900319411e35cee85b4513d298df ]
This is a real stack undercorruption found by kasan build.
The issue did no harm normally because it only overflowed 2 bytes after bitary array which on most architectures were mapped into err local.
--- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 4 ++-- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c +2 -2
@@ -182,8 +182,8 @@ static int hw_atl_a0_hw_rss_set(struct aq_hw_s *self,u32 i =0U ;u32 num_rss_queues =max (1U , self->aq_nic_cfg->num_rss_queues);int err =0 ; -u16 bitary[(HW_ATL_A0_RSS_REDIRECTION_MAX * -HW_ATL_A0_RSS_REDIRECTION_BITS /16U )]; +u16 bitary[1 + (HW_ATL_A0_RSS_REDIRECTION_MAX * +HW_ATL_A0_RSS_REDIRECTION_BITS /16U )];memset (bitary,0 ,sizeof (bitary));
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +2 -2
@@ -183,8 +183,8 @@ static int hw_atl_b0_hw_rss_set(struct aq_hw_s *self,u32 i =0U ;u32 num_rss_queues =max (1U , self->aq_nic_cfg->num_rss_queues);int err =0 ; -u16 bitary[(HW_ATL_B0_RSS_REDIRECTION_MAX * -HW_ATL_B0_RSS_REDIRECTION_BITS /16U )]; +u16 bitary[1 + (HW_ATL_B0_RSS_REDIRECTION_MAX * +HW_ATL_B0_RSS_REDIRECTION_BITS /16U )];memset (bitary,0 ,sizeof (bitary));
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 136/343 powerpc/mm: Check secondary hash page table
In reply to Greg Kroah-HartmanFrom: Rashmica Gupta <[email protected]>
[ Upstream commit 790845e2f12709d273d08ea7a2af7c2593689519 ]
We were always calling base_hpte_find() with primary = true, even when we wanted to check the secondary table.
mpe: I broke this when refactoring Rashmica's original patch.
--- arch/powerpc/mm/dump_hashpagetable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/dump_hashpagetable.c +1 -1
@@ -343,7 +343,7 @@ static unsigned long hpte_find(struct pg_state *st, unsigned long ea, int psize)/* Look in secondary table */ if (slot ==-1 ) - slot =base_hpte_find (ea, psize, true, &v, &r); + slot =base_hpte_find (ea, psize, false, &v, &r);/* No entry found */ if (slot ==-1 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 137/343 nios2: ksyms: Add missing symbol exports
In reply to Greg Kroah-HartmanFrom: Guenter Roeck <[email protected]>
[ Upstream commit 0f8ed994575429d6042cf5d7ef70081c94091587 ]
Building nios2:allmodconfig fails as follows (each symbol is only listed once).
ERROR: "__ashldi3" [drivers/md/dm-writecache.ko] undefined!
ERROR: "__ashrdi3" [fs/xfs/xfs.ko] undefined!
ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
ERROR: "__lshrdi3" [drivers/md/dm-zoned.ko] undefined!
ERROR: "flush_icache_range" [drivers/misc/lkdtm/lkdtm.ko] undefined!
ERROR: "empty_zero_page" [drivers/md/dm-mod.ko] undefined!
The problem is seen with gcc 7.3.0.
Export the missing symbols.
--- arch/nios2/kernel/nios2_ksyms.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/nios2/kernel/nios2_ksyms.c +12 -0
@@ -9,12 +9,20 @@#include <linux/export.h> #include <linux/string.h> +#include <asm/cacheflush.h> +#include <asm/pgtable.h> +/* string functions */ EXPORT_SYMBOL (memcpy);EXPORT_SYMBOL (memset);EXPORT_SYMBOL (memmove); +/* memory management */ + +EXPORT_SYMBOL (empty_zero_page); +EXPORT_SYMBOL (flush_icache_range); +/* * libgcc functions - functions that are used internally by the * compiler... (prototypes are not correct though, but that
@@ -31,3 +39,7 @@ DECLARE_EXPORT(__udivsi3);DECLARE_EXPORT (__umoddi3);DECLARE_EXPORT (__umodsi3);DECLARE_EXPORT (__muldi3); +DECLARE_EXPORT (__ucmpdi2); +DECLARE_EXPORT (__lshrdi3); +DECLARE_EXPORT (__ashldi3); +DECLARE_EXPORT (__ashrdi3);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 138/343 x86/mm: Remove unused variable cpu
In reply to Greg Kroah-HartmanFrom: Qian Cai <[email protected]>
[ Upstream commit 3609e31bc8dc03b701390f79c74fc7fe92b95039 ]
The commit a2055abe9c67 ("x86/mm: Pass flush_tlb_info to flush_tlb_others() etc") removed the unnecessary cpu parameter from uv_flush_tlb_others() but left an unused variable.
arch/x86/mm/tlb.c: In function 'native_flush_tlb_others':arch/x86/mm/tlb.c:688:16: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]
unsigned int cpu;
^~~--- arch/x86/mm/tlb.c | 3 --- 1 file changed, 3 deletions(-)
arch/x86/mm/tlb.c +0 -3
@@ -651,9 +651,6 @@ void native_flush_tlb_others(const struct cpumask *cpumask,* that UV should be updated so that smp_call_function_many(), * etc, are optimal on UV. */ -unsigned int cpu; - - cpu =smp_processor_id (); cpumask =uv_flush_tlb_others (cpumask, info);if (cpumask) smp_call_function_many(cpumask, flush_tlb_func_remote,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 129/343 mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
[ Upstream commit 1e20186e706da8446f9435f2924cd65ab1397e73 ]
We need to handle mmc_of_parse() errors during probe otherwise the MMC driver could start without proper initialization (e.g. power sequence).
--- drivers/mmc/host/sdhci-brcmstb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-brcmstb.c +3 -1
@@ -55,7 +55,9 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) }sdhci_get_of_property (pdev); -mmc_of_parse (host->mmc); + res =mmc_of_parse (host->mmc); +if (res) + goto err;/* * Supply the existing CAPS, but clear the UHS modes. This
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 156/343 spi: tegra114: clear packed bit for unpacked mode
In reply to Greg Kroah-HartmanFrom: Sowjanya Komatineni <[email protected]>
[ Upstream commit 7b3d10cdf54b8bc1dc0da21faed9789ac4da3684 ]
Packed bit is not cleared when not using packed mode. This results in transfer timeouts for the unpacked mode transfers followed by the packed mode transfers.
--- drivers/spi/spi-tegra114.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/spi/spi-tegra114.c +2 -0
@@ -730,6 +730,8 @@ static int tegra_spi_start_transfer_one(struct spi_device *spi,if (tspi->is_packed) command1 |=SPI_PACKED ; +else + command1 &= ~SPI_PACKED ; command1 &= ~(SPI_CS_SEL_MASK |SPI_TX_EN |SPI_RX_EN ); tspi->cur_direction =0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 165/343 scsi: target/core: Fix a race condition in the LUN lookup code
In reply to Greg Kroah-HartmanFrom: Bart Van Assche <[email protected]>
[ Upstream commit 63f7479439c95bcd49b7dd4af809862c316c71a3 ]
The rcu_dereference(deve->se_lun) expression occurs twice in the LUN lookup functions. Since these expressions are not serialized against deve->se_lun assignments each of these expressions may yield a different result. Avoid that the wrong LUN pointer is stored in se_cmd by reading deve->se_lun only once.
--- drivers/target/target_core_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/target/target_core_device.c +2 -2
@@ -85,7 +85,7 @@ transport_lookup_cmd_lun(struct se_cmd *se_cmd, u64 unpacked_lun) goto out_unlock; } - se_cmd->se_lun =rcu_dereference (deve->se_lun); + se_cmd->se_lun = se_lun; se_cmd->pr_res_key = deve->pr_res_key; se_cmd->orig_fe_lun = unpacked_lun; se_cmd->se_cmd_flags |=SCF_SE_LUN_CMD ;
@@ -176,7 +176,7 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u64 unpacked_lun) goto out_unlock; } - se_cmd->se_lun =rcu_dereference (deve->se_lun); + se_cmd->se_lun = se_lun; se_cmd->pr_res_key = deve->pr_res_key; se_cmd->orig_fe_lun = unpacked_lun; se_cmd->se_cmd_flags |=SCF_SE_LUN_CMD ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 166/343 ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 9ee8578d953023cc57e7e736ae48502c707c0210 ]
Since commit 1c459de1e645 ("ARM: pxa: ssp: use devm_ functions") kfree, iounmap, clk_put etc are not needed anymore in remove path.
--- arch/arm/plat-pxa/ssp.c | 6 ------ 1 file changed, 6 deletions(-)
arch/arm/plat-pxa/ssp.c +0 -6
@@ -230,18 +230,12 @@ static int pxa_ssp_probe(struct platform_device *pdev)static int pxa_ssp_remove (struct platform_device *pdev) { -struct resource *res;struct ssp_device *ssp; ssp =platform_get_drvdata (pdev);if (ssp ==NULL )return -ENODEV ; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); -release_mem_region (res->start,resource_size (res)); - -clk_put (ssp->clk); -mutex_lock (&ssp_lock);list_del (&ssp->node);mutex_unlock (&ssp_lock);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 167/343 net: hns3: fix for vport->bw_limit overflow problem
In reply to Greg Kroah-HartmanFrom: Yunsheng Lin <[email protected]>
[ Upstream commit 2566f10676ba996b745e138f54f3e2f974311692 ]
When setting vport->bw_limit to hdev->tm_info.pg_info[0].bw_limit in hclge_tm_vport_tc_info_update, vport->bw_limit can be as big as HCLGE_ETHER_MAX_RATE (100000), which can not fit into u16 (65535).
So this patch fixes it by using u32 for vport->bw_limit.
--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +1 -1
@@ -480,7 +480,7 @@ struct hclge_vport {u16 alloc_rss_size;u16 qs_offset; -u16 bw_limit;/* VSI BW Limit (0 = disabled) */ +u32 bw_limit;/* VSI BW Limit (0 = disabled) */ u8 dwrr;int vport_id;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 168/343 hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses
In reply to Greg Kroah-HartmanFrom: Guenter Roeck <[email protected]>
[ Upstream commit e95fd518d05bfc087da6fcdea4900a57cfb083bd ]
Super-IO accesses may fail on a system with no or unmapped LPC bus.
Also, other drivers may attempt to access the LPC bus at the same time, resulting in undefined behavior.
Use request_muxed_region() to ensure that IO access on the requested address space is supported, and to ensure that access by multiple drivers is synchronized.
--- drivers/hwmon/w83627hf.c | 42 +++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-)
drivers/hwmon/w83627hf.c +37 -5
@@ -130,17 +130,23 @@ superio_select(struct w83627hf_sio_data *sio, int ld)outb (ld, sio->sioaddr +1 ); } -static inline void +static inline int superio_enter (struct w83627hf_sio_data *sio) { +if (!request_muxed_region (sio->sioaddr,2 ,DRVNAME )) +return -EBUSY ; +outb (0x87 , sio->sioaddr);outb (0x87 , sio->sioaddr); + +return 0 ; }static inline void superio_exit (struct w83627hf_sio_data *sio) {outb (0xAA , sio->sioaddr); +release_region (sio->sioaddr,2 ); }#define W627_DEVID 0x52
@@ -1278,7 +1284,7 @@ static DEVICE_ATTR_RO(name);static int __init w83627hf_find (int sioaddr,unsigned short *addr,struct w83627hf_sio_data *sio_data) { -int err = -ENODEV ; +int err;u16 val;static __initconst char *const names[] = {
@@ -1290,7 +1296,11 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr, }; sio_data->sioaddr = sioaddr; -superio_enter (sio_data); + err =superio_enter (sio_data); +if (err) +return err; + + err = -ENODEV ; val = force_id ? force_id :superio_inb (sio_data,DEVID );switch (val) {case W627_DEVID :
@@ -1644,9 +1654,21 @@ static int w83627thf_read_gpio5(struct platform_device *pdev)struct w83627hf_sio_data *sio_data =dev_get_platdata (&pdev->dev);int res =0xff , sel; -superio_enter (sio_data); +if (superio_enter (sio_data)) { +/* +* Some other driver reserved the address space for itself. +* We don't want to fail driver instantiation because of that, +* so display a warning and keep going. +*/ +dev_warn (&pdev->dev, +"Can not read VID data: Failed to enable SuperIO access\n" ); +return res; + } +superio_select (sio_data,W83627HF_LD_GPIO5 ); + res =0xff ; +/* Make sure these GPIO pins are enabled */ if (!(superio_inb (sio_data,W83627THF_GPIO5_EN ) & (1 <<3 ))) {dev_dbg (&pdev->dev,"GPIO5 disabled, no VID function\n" );
@@ -1677,7 +1699,17 @@ static int w83687thf_read_vid(struct platform_device *pdev)struct w83627hf_sio_data *sio_data =dev_get_platdata (&pdev->dev);int res =0xff ; -superio_enter (sio_data); +if (superio_enter (sio_data)) { +/* +* Some other driver reserved the address space for itself. +* We don't want to fail driver instantiation because of that, +* so display a warning and keep going. +*/ +dev_warn (&pdev->dev, +"Can not read VID data: Failed to enable SuperIO access\n" ); +return res; + } +superio_select (sio_data,W83627HF_LD_HWM );/* Make sure these GPIO pins are enabled */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 169/343 platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit 98e2630284ab741804bd0713e932e725466f2f84 ]
Currently the kfree of output.pointer can be potentially freeing an uninitalized pointer in the case where out_data is NULL. Fix this by reworking the case where out_data is not-null to perform the ACPI status check and also the kfree of outpoint.pointer in one block and hence ensuring the pointer is only freed when it has been used.
Also replace the if (ptr != NULL) idiom with just if (ptr).
--- drivers/platform/x86/alienware-wmi.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/platform/x86/alienware-wmi.c +8 -9
@@ -505,23 +505,22 @@ static acpi_status alienware_wmax_command(struct wmax_basic_args *in_args, input.length = (acpi_size )sizeof (*in_args); input.pointer = in_args; -if (out_data !=NULL ) { +if (out_data) { output.length =ACPI_ALLOCATE_BUFFER ; output.pointer =NULL ; status =wmi_evaluate_method (WMAX_CONTROL_GUID ,0 , command, &input, &output); - }else +if (ACPI_SUCCESS (status)) { + obj = (union acpi_object *)output.pointer; +if (obj && obj->type ==ACPI_TYPE_INTEGER ) + *out_data = (u32 )obj->integer.value; + } +kfree (output.pointer); + }else { status =wmi_evaluate_method (WMAX_CONTROL_GUID ,0 , command, &input,NULL ); - -if (ACPI_SUCCESS (status) && out_data !=NULL ) { - obj = (union acpi_object *)output.pointer; -if (obj && obj->type ==ACPI_TYPE_INTEGER ) - *out_data = (u32 ) obj->integer.value; } -kfree (output.pointer);return status; - }/*
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 170/343 tipc: set sysctl_tipc_rmem and named_timeout right range
In reply to Greg Kroah-HartmanFrom: Jie Liu <[email protected]>
[ Upstream commit 4bcd4ec1017205644a2697bccbc3b5143f522f5f ]
We find that sysctl_tipc_rmem and named_timeout do not have the right minimum setting. sysctl_tipc_rmem should be larger than zero, like sysctl_tcp_rmem. And named_timeout as a timeout setting should be not less than zero.
--- net/tipc/sysctl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
net/tipc/sysctl.c +6 -2
@@ -37,6 +37,8 @@#include <linux/sysctl.h> +static int zero; +static int one =1 ;static struct ctl_table_header *tipc_ctl_hdr;static struct ctl_table tipc_table[] = {
@@ -45,14 +47,16 @@ static struct ctl_table tipc_table[] = { .data = &sysctl_tipc_rmem, .maxlen = sizeof(sysctl_tipc_rmem), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = &one, }, { .procname = "named_timeout", .data = &sysctl_tipc_named_timeout, .maxlen = sizeof(sysctl_tipc_named_timeout), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, }, {} };
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 171/343 selftests/ipc: Fix msgque compiler warnings
In reply to Greg Kroah-HartmanFrom: Kees Cook <[email protected]>
[ Upstream commit a147faa96f832f76e772b1e448e94ea84c774081 ]
This fixes the various compiler warnings when building the msgque selftest. The primary change is using sys/msg.h instead of linux/msg.h directly to gain the API declarations.
--- tools/testing/selftests/ipc/msgque.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
tools/testing/selftests/ipc/msgque.c +6 -5
@@ -1,9 +1,10 @@// SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE#include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> -#include <linux/msg.h> +#include <sys/msg.h> #include <fcntl.h> #include "../kselftest.h"
@@ -73,7 +74,7 @@ int restore_queue(struct msgque_data *msgque)return 0 ; destroy: -if (msgctl (id,IPC_RMID ,0 )) +if (msgctl (id,IPC_RMID ,NULL ))printf ("Failed to destroy queue: %d\n" , -errno);return ret; }
@@ -120,7 +121,7 @@ int check_and_destroy_queue(struct msgque_data *msgque) ret =0 ; err: -if (msgctl (msgque->msq_id,IPC_RMID ,0 )) { +if (msgctl (msgque->msq_id,IPC_RMID ,NULL )) {printf ("Failed to destroy queue: %d\n" , -errno);return -errno; }
@@ -129,7 +130,7 @@ err:int dump_queue (struct msgque_data *msgque) { -struct msqid64_ds ds; +struct msqid_ds ds;int kern_id;int i, ret;
@@ -246,7 +247,7 @@ int main(int argc, char **argv)return ksft_exit_pass (); err_destroy: -if (msgctl (msgque.msq_id,IPC_RMID ,0 )) { +if (msgctl (msgque.msq_id,IPC_RMID ,NULL )) {printf ("Failed to destroy queue: %d\n" , -errno);return ksft_exit_fail (); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 172/343 powerpc: vdso: Make vdso32 installation conditional in vdso_install
In reply to Greg Kroah-HartmanFrom: Ben Hutchings <[email protected]>
[ Upstream commit ff6d27823f619892ab96f7461764840e0d786b15 ]
The 32-bit vDSO is not needed and not normally built for 64-bit little-endian configurations. However, the vdso_install target still builds and installs it. Add the same config condition as is normally used for the build.
--- arch/powerpc/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/Makefile +2 -0
@@ -385,7 +385,9 @@ vdso_install: ifeq ($(CONFIG_PPC64),y) $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@ endif +ifdef CONFIG_VDSO32 $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@ +endif archclean: $(Q)$(MAKE) $(clean)=$(boot)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 173/343 ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect
In reply to Greg Kroah-HartmanFrom: Vladimir Oltean <[email protected]>
[ Upstream commit c7861adbe37f576931650ad8ef805e0c47564b9a ]
Each eTSEC MAC has its own TBI (SGMII) PCS and private MDIO bus. But due to a DTS oversight, both SGMII-compatible MACs of the LS1021 SoC are pointing towards the same internal PCS. Therefore nobody is controlling the internal PCS of eTSEC0.
Upon initial ndo_open, the SGMII link is ok by virtue of U-boot initialization. But upon an ifdown/ifup sequence, the code path from ndo_open -> init_phy -> gfar_configure_serdes does not get executed for the PCS of eTSEC0 (and is executed twice for MAC eTSEC1). So the SGMII link remains down for eTSEC0. On the LS1021A-TWR board, to signal this failure condition, the PHY driver keeps printing '803x_aneg_done: SGMII link is not ok'.
Also, it changes compatible of mdio0 to "fsl,etsec2-mdio" to match mdio1 device.
--- arch/arm/boot/dts/ls1021a-twr.dts | 9 ++++++++- arch/arm/boot/dts/ls1021a.dtsi | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ls1021a-twr.dts +8 -1
@@ -143,7 +143,7 @@ }; &enet0 { - tbi-handle = <&tbi1>; + tbi-handle = <&tbi0>; phy-handle = <&sgmii_phy2>; phy-connection-type = "sgmii"; status = "okay";
@@ -222,6 +222,13 @@ sgmii_phy2: ethernet-phy@2 { reg = <0x2>; }; + tbi0: tbi-phy@1f { + reg = <0x1f>; + device_type = "tbi-phy"; + }; +}; + +&mdio1 { tbi1: tbi-phy@1f { reg = <0x1f>; device_type = "tbi-phy";
arch/arm/boot/dts/ls1021a.dtsi +10 -1
@@ -562,13 +562,22 @@ }; mdio0: mdio@2d24000 { - compatible = "gianfar"; + compatible = "fsl,etsec2-mdio"; device_type = "mdio"; #address-cells = <1>; #size-cells = <0>; reg = <0x0 0x2d24000 0x0 0x4000>; }; + mdio1: mdio@2d64000 { + compatible = "fsl,etsec2-mdio"; + device_type = "mdio"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0 0x2d64000 0x0 0x4000>, + <0x0 0x2d50030 0x0 0x4>; + }; + ptp_clock@2d10e00 { compatible = "fsl,etsec-ptp"; reg = <0x0 0x2d10e00 0x0 0xb0>;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 157/343 spi: tegra114: fix for unpacked mode transfers
In reply to Greg Kroah-HartmanFrom: Sowjanya Komatineni <[email protected]>
[ Upstream commit 1a89ac5b91895127f7c586ec5075c3753ca25501 ]
Fixes: computation of actual bytes to fill/receive in/from FIFO in unpacked mode when transfer length is not a multiple of requested bits per word.
unpacked mode transfers fails when the transfer includes partial bytes in the last word.
Total words to be written/read to/from FIFO is computed based on transfer length and bits per word. Unpacked mode includes 0 padding bytes for partial words to align with bits per word and these extra bytes are also accounted for calculating bytes left to transfer in the current driver.
This causes extra bytes access of tx/rx buffers along with buffer index position crossing actual length where remain_len becomes negative and due to unsigned type, negative value is a 32 bit representation of signed value and transferred bytes never meets the actual transfer length resulting in transfer timeout and a hang.
This patch fixes this with proper computation of the actual bytes to fill in FIFO during transmit and the actual bytes to read from FIFO during receive ignoring 0 padded bytes.
--- drivers/spi/spi-tegra114.c | 43 +++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-)
drivers/spi/spi-tegra114.c +36 -7
@@ -307,10 +307,16 @@ static unsigned tegra_spi_fill_tx_fifo_from_client_txbuf( x |= (u32)(*tx_buf++) << (i *8 );tegra_spi_writel (tspi, x,SPI_TX_FIFO ); } + + tspi->cur_tx_pos += written_words * tspi->bytes_per_word; }else { +unsigned int write_bytes; max_n_32bit =min (tspi->curr_dma_words, tx_empty_count); written_words = max_n_32bit; nbytes = written_words * tspi->bytes_per_word; +if (nbytes > t->len - tspi->cur_pos) + nbytes = t->len - tspi->cur_pos; + write_bytes = nbytes;for (count =0 ; count < max_n_32bit; count++) {u32 x =0 ;
@@ -319,8 +325,10 @@ static unsigned tegra_spi_fill_tx_fifo_from_client_txbuf( x |= (u32)(*tx_buf++) << (i *8 );tegra_spi_writel (tspi, x,SPI_TX_FIFO ); } + + tspi->cur_tx_pos += write_bytes; } - tspi->cur_tx_pos += written_words * tspi->bytes_per_word; +return written_words; }
@@ -344,20 +352,27 @@ static unsigned int tegra_spi_read_rx_fifo_to_client_rxbuf(for (i =0 ; len && (i <4 ); i++, len--) *rx_buf++ = (x >> i*8 ) &0xFF ; } - tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word; read_words += tspi->curr_dma_words; + tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word; }else {u32 rx_mask = ((u32 )1 << t->bits_per_word) -1 ; +u8 bytes_per_word = tspi->bytes_per_word; +unsigned int read_bytes; + len = rx_full_count * bytes_per_word; +if (len > t->len - tspi->cur_pos) + len = t->len - tspi->cur_pos; + read_bytes = len;for (count =0 ; count < rx_full_count; count++) {u32 x =tegra_spi_readl (tspi,SPI_RX_FIFO ) & rx_mask; -for (i =0 ; (i < tspi->bytes_per_word); i++) +for (i =0 ; len && (i < bytes_per_word); i++, len--) *rx_buf++ = (x >> (i*8 )) &0xFF ; } - tspi->cur_rx_pos += rx_full_count * tspi->bytes_per_word; read_words += rx_full_count; + tspi->cur_rx_pos += read_bytes; } +return read_words; }
@@ -372,12 +387,17 @@ static void tegra_spi_copy_client_txbuf_to_spi_txbuf(unsigned len = tspi->curr_dma_words * tspi->bytes_per_word;memcpy (tspi->tx_dma_buf, t->tx_buf + tspi->cur_pos, len); + tspi->cur_tx_pos += tspi->curr_dma_words * tspi->bytes_per_word; }else {unsigned int i;unsigned int count;u8 *tx_buf = (u8 *)t->tx_buf + tspi->cur_tx_pos;unsigned consume = tspi->curr_dma_words * tspi->bytes_per_word; +unsigned int write_bytes; +if (consume > t->len - tspi->cur_pos) + consume = t->len - tspi->cur_pos; + write_bytes = consume;for (count =0 ; count < tspi->curr_dma_words; count++) {u32 x =0 ;
@@ -386,8 +406,9 @@ static void tegra_spi_copy_client_txbuf_to_spi_txbuf( x |= (u32)(*tx_buf++) << (i *8 ); tspi->tx_dma_buf[count] = x; } + + tspi->cur_tx_pos += write_bytes; } - tspi->cur_tx_pos += tspi->curr_dma_words * tspi->bytes_per_word;/* Make the dma buffer to read by dma */ dma_sync_single_for_device(tspi->dev, tspi->tx_dma_phys,
@@ -405,20 +426,28 @@ static void tegra_spi_copy_spi_rxbuf_to_client_rxbuf(unsigned len = tspi->curr_dma_words * tspi->bytes_per_word;memcpy (t->rx_buf + tspi->cur_rx_pos, tspi->rx_dma_buf, len); + tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word; }else {unsigned int i;unsigned int count;unsigned char *rx_buf = t->rx_buf + tspi->cur_rx_pos;u32 rx_mask = ((u32 )1 << t->bits_per_word) -1 ; +unsigned consume = tspi->curr_dma_words * tspi->bytes_per_word; +unsigned int read_bytes; +if (consume > t->len - tspi->cur_pos) + consume = t->len - tspi->cur_pos; + read_bytes = consume;for (count =0 ; count < tspi->curr_dma_words; count++) {u32 x = tspi->rx_dma_buf[count] & rx_mask; -for (i =0 ; (i < tspi->bytes_per_word); i++) +for (i =0 ; consume && (i < tspi->bytes_per_word); + i++, consume--) *rx_buf++ = (x >> (i*8 )) &0xFF ; } + + tspi->cur_rx_pos += read_bytes; } - tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word;/* Make the dma buffer to read by dma */ dma_sync_single_for_device(tspi->dev, tspi->rx_dma_phys,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 175/343 6lowpan: Off by one handling ->nexthdr
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit f57c4bbf34439531adccd7d3a4ecc14f409c1399 ]
NEXTHDR_MAX is 255. What happens here is that we take a u8 value "hdr->nexthdr" from the network and then look it up in lowpan_nexthdr_nhcs[]. The problem is that if hdr->nexthdr is 0xff then we read one element beyond the end of the array so the array needs to be one element larger.
--- net/6lowpan/nhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/6lowpan/nhc.c +1 -1
@@ -18,7 +18,7 @@#include "nhc.h" static struct rb_root rb_root =RB_ROOT ; -static struct lowpan_nhc *lowpan_nexthdr_nhcs[NEXTHDR_MAX ]; +static struct lowpan_nhc *lowpan_nexthdr_nhcs[NEXTHDR_MAX +1 ];static DEFINE_SPINLOCK (lowpan_nhc_lock);static int lowpan_nhc_insert (struct lowpan_nhc *nhc)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 176/343 dmaengine: axi-dmac: Dont check the number of frames for alignment
In reply to Greg Kroah-HartmanFrom: Alexandru Ardelean <[email protected]>
[ Upstream commit 648865a79d8ee3d1aa64aab5eb2a9d12eeed14f9 ]
In 2D transfers (for the AXI DMAC), the number of frames (numf) represents Y_LENGTH, and the length of a frame is X_LENGTH. 2D transfers are useful for video transfers where screen resolutions ( X * Y ) are typically aligned for X, but not for Y.
There is no requirement for Y_LENGTH to be aligned to the bus-width (or anything), and this is also true for AXI DMAC.
Checking the Y_LENGTH for alignment causes false errors when initiating DMA transfers. This change fixes this by checking only that the Y_LENGTH is non-zero.
--- drivers/dma/dma-axi-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/dma-axi-dmac.c +1 -1
@@ -451,7 +451,7 @@ static struct dma_async_tx_descriptor *axi_dmac_prep_interleaved(if (chan->hw_2d) {if (!axi_dmac_check_len (chan, xt->sgl[0 ].size) || - !axi_dmac_check_len (chan, xt->numf)) + xt->numf ==0 )return NULL ;if (xt->sgl[0 ].size + dst_icg > chan->max_length || xt->sgl[0 ].size + src_icg > chan->max_length)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 177/343 ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit 328e9f6973be2ee67862cb17bf6c0c5c5918cd72 ]
The error from snd_usb_mixer_apply_create_quirk() is ignored in the current usb-audio driver code, which will continue the probing even after the error. Let's take it more serious.
--- sound/usb/mixer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/usb/mixer.c +3 -1
@@ -2632,7 +2632,9 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, (err = snd_usb_mixer_status_create(mixer)) < 0) goto _error; -snd_usb_mixer_apply_create_quirk (mixer); + err =snd_usb_mixer_apply_create_quirk (mixer); +if (err <0 ) + goto _error; err =snd_device_new (chip->card,SNDRV_DEV_CODEC , mixer, &dev_ops);if (err <0 )
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 178/343 NFS: Dont interrupt file writeout due to fatal errors
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit 14bebe3c90b326d2a0df78aed5e9de090c71d878 ]
When flushing out dirty pages, the fact that we may hit fatal errors is not a reason to stop writeback. Those errors are reported through fsync(), not through the flush mechanism.
--- fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/write.c +1 -1
@@ -643,7 +643,7 @@ out:return ret; out_launder:nfs_write_error_remove_page (req); -return ret; +return 0 ; } static int nfs_do_writepage(struct page *page, struct writeback_control *wbc,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 179/343 irqchip/gic-v3-its: fix some definitions of inner cacheability attributes
In reply to Greg Kroah-HartmanFrom: Hongbo Yao <[email protected]>
[ Upstream commit 0f29456d08042134aff6e562d07a6365c841c4ad ]
Some definitions of Inner Cacheability attibutes need to be corrected.
--- include/linux/irqchip/arm-gic-v3.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
include/linux/irqchip/arm-gic-v3.h +6 -6
@@ -152,7 +152,7 @@#define GICR_PROPBASER_nCnB GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, nCnB)#define GICR_PROPBASER_nC GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, nC)#define GICR_PROPBASER_RaWt GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, RaWt) -#define GICR_PROPBASER_RaWb GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, RaWt) +#define GICR_PROPBASER_RaWb GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, RaWb)#define GICR_PROPBASER_WaWt GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, WaWt)#define GICR_PROPBASER_WaWb GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, WaWb)#define GICR_PROPBASER_RaWaWt GIC_BASER_CACHEABILITY(GICR_PROPBASER, INNER, RaWaWt)
@@ -179,7 +179,7 @@#define GICR_PENDBASER_nCnB GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, nCnB)#define GICR_PENDBASER_nC GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, nC)#define GICR_PENDBASER_RaWt GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, RaWt) -#define GICR_PENDBASER_RaWb GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, RaWt) +#define GICR_PENDBASER_RaWb GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, RaWb)#define GICR_PENDBASER_WaWt GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, WaWt)#define GICR_PENDBASER_WaWb GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, WaWb)#define GICR_PENDBASER_RaWaWt GIC_BASER_CACHEABILITY(GICR_PENDBASER, INNER, RaWaWt)
@@ -238,7 +238,7 @@#define GICR_VPROPBASER_nCnB GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, nCnB)#define GICR_VPROPBASER_nC GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, nC)#define GICR_VPROPBASER_RaWt GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, RaWt) -#define GICR_VPROPBASER_RaWb GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, RaWt) +#define GICR_VPROPBASER_RaWb GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, RaWb)#define GICR_VPROPBASER_WaWt GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, WaWt)#define GICR_VPROPBASER_WaWb GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, WaWb)#define GICR_VPROPBASER_RaWaWt GIC_BASER_CACHEABILITY(GICR_VPROPBASER, INNER, RaWaWt)
@@ -264,7 +264,7 @@#define GICR_VPENDBASER_nCnB GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nCnB)#define GICR_VPENDBASER_nC GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nC)#define GICR_VPENDBASER_RaWt GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, RaWt) -#define GICR_VPENDBASER_RaWb GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, RaWt) +#define GICR_VPENDBASER_RaWb GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, RaWb)#define GICR_VPENDBASER_WaWt GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, WaWt)#define GICR_VPENDBASER_WaWb GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, WaWb)#define GICR_VPENDBASER_RaWaWt GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, RaWaWt)
@@ -337,7 +337,7 @@#define GITS_CBASER_nCnB GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, nCnB)#define GITS_CBASER_nC GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, nC)#define GITS_CBASER_RaWt GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, RaWt) -#define GITS_CBASER_RaWb GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, RaWt) +#define GITS_CBASER_RaWb GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, RaWb)#define GITS_CBASER_WaWt GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, WaWt)#define GITS_CBASER_WaWb GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, WaWb)#define GITS_CBASER_RaWaWt GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, RaWaWt)
@@ -361,7 +361,7 @@#define GITS_BASER_nCnB GIC_BASER_CACHEABILITY(GITS_BASER, INNER, nCnB)#define GITS_BASER_nC GIC_BASER_CACHEABILITY(GITS_BASER, INNER, nC)#define GITS_BASER_RaWt GIC_BASER_CACHEABILITY(GITS_BASER, INNER, RaWt) -#define GITS_BASER_RaWb GIC_BASER_CACHEABILITY(GITS_BASER, INNER, RaWt) +#define GITS_BASER_RaWb GIC_BASER_CACHEABILITY(GITS_BASER, INNER, RaWb)#define GITS_BASER_WaWt GIC_BASER_CACHEABILITY(GITS_BASER, INNER, WaWt)#define GITS_BASER_WaWb GIC_BASER_CACHEABILITY(GITS_BASER, INNER, WaWb)#define GITS_BASER_RaWaWt GIC_BASER_CACHEABILITY(GITS_BASER, INNER, RaWaWt)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 180/343 scsi: qla2xxx: Fix a format specifier
In reply to Greg Kroah-HartmanFrom: Bart Van Assche <[email protected]>
[ Upstream commit 19ce192cd718e02f880197c0983404ca48236807 ]
Since mcmd->sess->port_name is eight bytes long, use %8phC to format that port name instead of %phC.
--- drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_target.c +1 -1
@@ -2179,7 +2179,7 @@ void qlt_xmit_tm_rsp(struct qla_tgt_mgmt_cmd *mcmd) mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode == ELS_TPRLO) {ql_dbg (ql_dbg_disc, vha,0x2106 , -"TM response logo %phC status %#x state %#x" , +"TM response logo %8phC status %#x state %#x" , mcmd->sess->port_name, mcmd->fc_tm_rsp, mcmd->flags);qlt_schedule_sess_for_deletion_lock (mcmd->sess);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 158/343 spi: tegra114: terminate dma and reset on transfer timeout
In reply to Greg Kroah-HartmanFrom: Sowjanya Komatineni <[email protected]>
[ Upstream commit 32bd1a9551cae34e6889afa235c7afdfede9aeac ]
Fixes: terminate DMA and perform controller reset on transfer timeout to clear the FIFO's and errors.
--- drivers/spi/spi-tegra114.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/spi/spi-tegra114.c +9 -0
@@ -869,7 +869,16 @@ static int tegra_spi_transfer_one_message(struct spi_master *master,if (WARN_ON (ret ==0 )) {dev_err (tspi->dev,"spi transfer timeout, err %d\n" , ret); +if (tspi->is_curr_dma_xfer && + (tspi->cur_direction &DATA_DIR_TX )) +dmaengine_terminate_all (tspi->tx_dma_chan); +if (tspi->is_curr_dma_xfer && + (tspi->cur_direction &DATA_DIR_RX )) +dmaengine_terminate_all (tspi->rx_dma_chan); ret = -EIO ; +reset_control_assert (tspi->rst); +udelay (2 ); +reset_control_deassert (tspi->rst); goto complete_xfer; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 159/343 spi: tegra114: flush fifos
In reply to Greg Kroah-HartmanFrom: Sowjanya Komatineni <[email protected]>
[ Upstream commit c4fc9e5b28ff787e35137c2cc13316bb11d7657b ]
Fixes: Flush TX and RX FIFOs before start of new transfer and on FIFO overflow or underrun errors.
--- drivers/spi/spi-tegra114.c | 39 +++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-)
drivers/spi/spi-tegra114.c +30 -9
@@ -499,22 +499,37 @@ static int tegra_spi_start_rx_dma(struct tegra_spi_data *tspi, int len)return 0 ; } -static int tegra_spi_start_dma_based_transfer ( -struct tegra_spi_data *tspi,struct spi_transfer *t) +static int tegra_spi_flush_fifos (struct tegra_spi_data *tspi) { -u32 val; -unsigned int len; -int ret =0 ; +unsigned long timeout = jiffies +HZ ;u32 status; -/* Make sure that Rx and Tx fifo are empty */ status =tegra_spi_readl (tspi,SPI_FIFO_STATUS );if ((status &SPI_FIFO_EMPTY ) !=SPI_FIFO_EMPTY ) { -dev_err (tspi->dev,"Rx/Tx fifo are not empty status 0x%08x\n" , - (unsigned )status); -return -EIO ; + status |=SPI_RX_FIFO_FLUSH |SPI_TX_FIFO_FLUSH ; +tegra_spi_writel (tspi, status,SPI_FIFO_STATUS ); +while ((status &SPI_FIFO_EMPTY ) !=SPI_FIFO_EMPTY ) { + status =tegra_spi_readl (tspi,SPI_FIFO_STATUS ); +if (time_after (jiffies, timeout)) { +dev_err (tspi->dev, +"timeout waiting for fifo flush\n" ); +return -EIO ; + } + +udelay (1 ); + } } +return 0 ; +} + +static int tegra_spi_start_dma_based_transfer ( +struct tegra_spi_data *tspi,struct spi_transfer *t) +{ +u32 val; +unsigned int len; +int ret =0 ; + val =SPI_DMA_BLK_SET (tspi->curr_dma_words -1 );tegra_spi_writel (tspi, val,SPI_DMA_BLK );
@@ -779,6 +794,9 @@ static int tegra_spi_start_transfer_one(struct spi_device *spi,dev_dbg (tspi->dev,"The def 0x%x and written 0x%x\n" , tspi->def_command1_reg, (unsigned )command1); + ret =tegra_spi_flush_fifos (tspi); +if (ret <0 ) +return ret;if (total_fifo_words >SPI_FIFO_DEPTH ) ret =tegra_spi_start_dma_based_transfer (tspi, t);else
@@ -876,6 +894,7 @@ static int tegra_spi_transfer_one_message(struct spi_master *master, (tspi->cur_direction & DATA_DIR_RX))dmaengine_terminate_all (tspi->rx_dma_chan); ret = -EIO ; +tegra_spi_flush_fifos (tspi);reset_control_assert (tspi->rst);udelay (2 );reset_control_deassert (tspi->rst);
@@ -929,6 +948,7 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_spi_data *tspi) tspi->status_reg);dev_err (tspi->dev,"CpuXfer 0x%08x:0x%08x\n" , tspi->command1_reg, tspi->dma_control_reg); +tegra_spi_flush_fifos (tspi);reset_control_assert (tspi->rst);udelay (2 );reset_control_deassert (tspi->rst);
@@ -1001,6 +1021,7 @@ static irqreturn_t handle_dma_based_xfer(struct tegra_spi_data *tspi) tspi->status_reg);dev_err (tspi->dev,"DmaXfer 0x%08x:0x%08x\n" , tspi->command1_reg, tspi->dma_control_reg); +tegra_spi_flush_fifos (tspi);reset_control_assert (tspi->rst);udelay (2 );reset_control_deassert (tspi->rst);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 160/343 spi: tegra114: configure dma burst size to fifo trig level
In reply to Greg Kroah-HartmanFrom: Sowjanya Komatineni <[email protected]>
[ Upstream commit f4ce428c41fb22e3ed55496dded94df44cb920fa ]
Fixes: Configure DMA burst size to be same as SPI TX/RX trigger levels to avoid mismatch.
SPI FIFO trigger levels are calculated based on the transfer length. So this patch moves DMA slave configuration to happen before start of DMAs.
--- drivers/spi/spi-tegra114.c | 52 ++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 22 deletions(-)
drivers/spi/spi-tegra114.c +30 -22
@@ -529,6 +529,8 @@ static int tegra_spi_start_dma_based_transfer(u32 val;unsigned int len;int ret =0 ; +u8 dma_burst; +struct dma_slave_config dma_sconfig = {0 }; val =SPI_DMA_BLK_SET (tspi->curr_dma_words -1 );tegra_spi_writel (tspi, val,SPI_DMA_BLK );
@@ -540,12 +542,16 @@ static int tegra_spi_start_dma_based_transfer( len = tspi->curr_dma_words *4 ;/* Set attention level based on length of transfer */ -if (len &0xF ) +if (len &0xF ) { val |=SPI_TX_TRIG_1 |SPI_RX_TRIG_1 ; -else if (((len) >>4 ) &0x1 ) + dma_burst =1 ; + }else if (((len) >>4 ) &0x1 ) { val |=SPI_TX_TRIG_4 |SPI_RX_TRIG_4 ; -else + dma_burst =4 ; + }else { val |=SPI_TX_TRIG_8 |SPI_RX_TRIG_8 ; + dma_burst =8 ; + }if (tspi->cur_direction &DATA_DIR_TX ) val |=SPI_IE_TX ;
@@ -556,7 +562,18 @@ static int tegra_spi_start_dma_based_transfer(tegra_spi_writel (tspi, val,SPI_DMA_CTL ); tspi->dma_control_reg = val; + dma_sconfig.device_fc = true;if (tspi->cur_direction &DATA_DIR_TX ) { + dma_sconfig.dst_addr = tspi->phys +SPI_TX_FIFO ; + dma_sconfig.dst_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ; + dma_sconfig.dst_maxburst = dma_burst; + ret =dmaengine_slave_config (tspi->tx_dma_chan, &dma_sconfig); +if (ret <0 ) { +dev_err (tspi->dev, +"DMA slave config failed: %d\n" , ret); +return ret; + } +tegra_spi_copy_client_txbuf_to_spi_txbuf (tspi, t); ret =tegra_spi_start_tx_dma (tspi, len);if (ret <0 ) {
@@ -567,6 +584,16 @@ static int tegra_spi_start_dma_based_transfer( }if (tspi->cur_direction &DATA_DIR_RX ) { + dma_sconfig.src_addr = tspi->phys +SPI_RX_FIFO ; + dma_sconfig.src_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ; + dma_sconfig.src_maxburst = dma_burst; + ret =dmaengine_slave_config (tspi->rx_dma_chan, &dma_sconfig); +if (ret <0 ) { +dev_err (tspi->dev, +"DMA slave config failed: %d\n" , ret); +return ret; + } +/* Make the dma buffer to read by dma */ dma_sync_single_for_device (tspi->dev, tspi->rx_dma_phys, tspi->dma_buf_size,DMA_FROM_DEVICE );
@@ -626,7 +653,6 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi,u32 *dma_buf;dma_addr_t dma_phys;int ret; -struct dma_slave_config dma_sconfig; dma_chan =dma_request_slave_channel_reason (tspi->dev, dma_to_memory ?"rx" :"tx" );
@@ -646,19 +672,6 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi,return -ENOMEM ; } -if (dma_to_memory) { - dma_sconfig.src_addr = tspi->phys +SPI_RX_FIFO ; - dma_sconfig.src_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ; - dma_sconfig.src_maxburst =0 ; - }else { - dma_sconfig.dst_addr = tspi->phys +SPI_TX_FIFO ; - dma_sconfig.dst_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ; - dma_sconfig.dst_maxburst =0 ; - } - - ret =dmaengine_slave_config (dma_chan, &dma_sconfig); -if (ret) - goto scrub;if (dma_to_memory) { tspi->rx_dma_chan = dma_chan; tspi->rx_dma_buf = dma_buf;
@@ -669,11 +682,6 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi, tspi->tx_dma_phys = dma_phys; }return 0 ; - -scrub: -dma_free_coherent (tspi->dev, tspi->dma_buf_size, dma_buf, dma_phys); -dma_release_channel (dma_chan); -return ret; } static void tegra_spi_deinit_dma_param(struct tegra_spi_data *tspi,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 161/343 soc/fsl/qe: Fix an error code in qe_pin_request()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 5674a92ca4b7e5a6a19231edd10298d30324cd27 ]
We forgot to set "err" on this error path.
--- drivers/soc/fsl/qe/gpio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/soc/fsl/qe/gpio.c +3 -1
@@ -152,8 +152,10 @@ struct qe_pin *qe_pin_request(struct device_node *np, int index)if (err <0 ) goto err0; gc =gpio_to_chip (err); -if (WARN_ON (!gc)) +if (WARN_ON (!gc)) { + err = -ENODEV ; goto err0; + }if (!of_device_is_compatible (gc->of_node,"fsl,mpc8323-qe-pario-bank" )) {pr_debug ("%s: tried to get a non-qe pin\n" , __func__);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 162/343 spi: bcm2835aux: fix driver to not allow 65535 (=-1) cs-gpios
In reply to Greg Kroah-HartmanFrom: Martin Sperl <[email protected]>
[ Upstream commit 509c583620e9053e43d611bf1614fc3d3abafa96 ]
The original driver by default defines num_chipselects as -1. This actually allicates an array of 65535 entries in of_spi_register_master.
There is a side-effect for buggy device trees that (contrary to dt-binding documentation) have no cs-gpio defined.
This mode was never supported by the driver due to limitations of native cs and additional code complexity and is explicitly not stated to be implemented.
To keep backwards compatibility with such buggy DTs we limit the number of chip_selects to 1, as for all practical purposes it is only ever realistic to use a single chip select in native cs mode without negative side-effects.
--- drivers/spi/spi-bcm2835aux.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/spi/spi-bcm2835aux.c +12 -1
@@ -416,7 +416,18 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)platform_set_drvdata (pdev, master); master->mode_bits = (SPI_CPOL |SPI_CS_HIGH |SPI_NO_CS ); master->bits_per_word_mask =SPI_BPW_MASK (8 ); - master->num_chipselect =-1 ; +/* even though the driver never officially supported native CS +* allow a single native CS for legacy DT support purposes when +* no cs-gpio is configured. +* Known limitations for native cs are: +* * multiple chip-selects: cs0-cs2 are all simultaniously asserted +* whenever there is a transfer - this even includes SPI_NO_CS +* * SPI_CS_HIGH: is ignores - cs are always asserted low +* * cs_change: cs is deasserted after each spi_transfer +* * cs_delay_usec: cs is always deasserted one SCK cycle after +* a spi_transfer +*/ + master->num_chipselect =1 ; master->transfer_one = bcm2835aux_spi_transfer_one; master->handle_err = bcm2835aux_spi_handle_err; master->prepare_message = bcm2835aux_spi_prepare_message;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 163/343 ehea: Fix a copy-paste err in ehea_init_port_res
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit c8f191282f819ab4e9b47b22a65c6c29734cefce ]
pr->tx_bytes should be assigned to tx_bytes other than rx_bytes.
--- drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ibm/ehea/ehea_main.c +1 -1
@@ -1475,7 +1475,7 @@ static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr,memset (pr,0 ,sizeof (struct ehea_port_res )); - pr->tx_bytes = rx_bytes; + pr->tx_bytes = tx_bytes; pr->tx_packets = tx_packets; pr->rx_bytes = rx_bytes; pr->rx_packets = rx_packets;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 164/343 scsi: qla2xxx: Unregister chrdev if module initialization fails
In reply to Greg Kroah-HartmanFrom: Bart Van Assche <[email protected]>
[ Upstream commit c794d24ec9eb6658909955772e70f34bef5b5b91 ]
If module initialization fails after the character device has been registered, unregister the character device. Additionally, avoid duplicating error path code.
--- drivers/scsi/qla2xxx/qla_os.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +21 -13
@@ -6714,8 +6714,7 @@ qla2x00_module_init(void)/* Initialize target kmem_cache and mem_pools */ ret =qlt_init ();if (ret <0 ) { -kmem_cache_destroy (srb_cachep); -return ret; + goto destroy_cache; }else if (ret >0 ) {/* * If initiator mode is explictly disabled by qlt_init(),
@@ -6736,11 +6735,10 @@ qla2x00_module_init(void) qla2xxx_transport_template =fc_attach_transport (&qla2xxx_transport_functions);if (!qla2xxx_transport_template) { -kmem_cache_destroy (srb_cachep);ql_log (ql_log_fatal,NULL ,0x0002 ,"fc_attach_transport failed...Failing load!.\n" ); -qlt_exit (); -return -ENODEV ; + ret = -ENODEV ; + goto qlt_exit; } apidev_major =register_chrdev (0 ,QLA2XXX_APIDEV , &apidev_fops);
@@ -6752,27 +6750,37 @@ qla2x00_module_init(void) qla2xxx_transport_vport_template =fc_attach_transport (&qla2xxx_transport_vport_functions);if (!qla2xxx_transport_vport_template) { -kmem_cache_destroy (srb_cachep); -qlt_exit (); -fc_release_transport (qla2xxx_transport_template);ql_log (ql_log_fatal,NULL ,0x0004 ,"fc_attach_transport vport failed...Failing load!.\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto unreg_chrdev; }ql_log (ql_log_info,NULL ,0x0005 ,"QLogic Fibre Channel HBA Driver: %s.\n" , qla2x00_version_str); ret =pci_register_driver (&qla2xxx_pci_driver);if (ret) { -kmem_cache_destroy (srb_cachep); -qlt_exit (); -fc_release_transport (qla2xxx_transport_template); -fc_release_transport (qla2xxx_transport_vport_template);ql_log (ql_log_fatal,NULL ,0x0006 ,"pci_register_driver failed...ret=%d Failing load!.\n" , ret); + goto release_vport_transport; }return ret; + +release_vport_transport: +fc_release_transport (qla2xxx_transport_vport_template); + +unreg_chrdev: +if (apidev_major >=0 ) +unregister_chrdev (apidev_major,QLA2XXX_APIDEV ); +fc_release_transport (qla2xxx_transport_template); + +qlt_exit: +qlt_exit (); + +destroy_cache: +kmem_cache_destroy (srb_cachep); +return ret; }/**
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 155/343 media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
[ Upstream commit 2e7682ebfc750177a4944eeb56e97a3f05734528 ]
'vb' null check should be done before dereferencing it in tw5864_handle_frame, otherwise a NULL pointer dereference may occur.
--- drivers/media/pci/tw5864/tw5864-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/pci/tw5864/tw5864-video.c +2 -2
@@ -1395,13 +1395,13 @@ static void tw5864_handle_frame(struct tw5864_h264_frame *frame) input->vb =NULL ;spin_unlock_irqrestore (&input->slock, flags); - v4l2_buf =to_vb2_v4l2_buffer (&vb->vb.vb2_buf); -if (!vb) {/* Gone because of disabling */ dev_dbg (&dev->pci->dev,"vb is empty, dropping frame\n" );return ; } + v4l2_buf =to_vb2_v4l2_buffer (&vb->vb.vb2_buf); +/* * Check for space. * Mind the overhead of startcode emulation prevention.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 182/343 packet: in recvmsg msg_name return at least sizeof sockaddr_ll
In reply to Greg Kroah-HartmanFrom: Willem de Bruijn <[email protected]>
[ Upstream commit b2cf86e1563e33a14a1c69b3e508d15dc12f804c ]
Packet send checks that msg_name is at least sizeof sockaddr_ll. Packet recv must return at least this length, so that its output can be passed unmodified to packet send.
This ceased to be true since adding support for lladdr longer than sll_addr. Since, the return value uses true address length.
Always return at least sizeof sockaddr_ll, even if address length is shorter. Zero the padding bytes.
Change v1->v2: do not overwrite zeroed padding again. use copy_len.
--- net/packet/af_packet.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
net/packet/af_packet.c +11 -2
@@ -3407,20 +3407,29 @@ static int packet_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,sock_recv_ts_and_drops (msg, sk, skb);if (msg->msg_name) { +int copy_len; +/* If the address length field is there to be filled * in, we fill it in now. */ if (sock->type ==SOCK_PACKET ) {__sockaddr_check_size (sizeof (struct sockaddr_pkt )); msg->msg_namelen =sizeof (struct sockaddr_pkt ); + copy_len = msg->msg_namelen; }else {struct sockaddr_ll *sll = &PACKET_SKB_CB (skb)->sa.ll; msg->msg_namelen = sll->sll_halen + offsetof(struct sockaddr_ll , sll_addr); + copy_len = msg->msg_namelen; +if (msg->msg_namelen <sizeof (struct sockaddr_ll )) { +memset (msg->msg_name + + offsetof(struct sockaddr_ll , sll_addr), +0 ,sizeof (sll->sll_addr)); + msg->msg_namelen =sizeof (struct sockaddr_ll ); + } } -memcpy (msg->msg_name, &PACKET_SKB_CB (skb)->sa, - msg->msg_namelen); +memcpy (msg->msg_name, &PACKET_SKB_CB (skb)->sa, copy_len); }if (pkt_sk (sk)->auxdata) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 191/343 net: ena: fix ena_com_fill_hash_function() implementation
In reply to Greg Kroah-HartmanFrom: Sameeh Jubran <[email protected]>
[ Upstream commit 11bd7a00c0d8ffe33d1e926f8e789b4aea787186 ]
ena_com_fill_hash_function() didn't configure the rss->hash_func.
--- drivers/net/ethernet/amazon/ena/ena_com.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/amazon/ena/ena_com.c +1 -0
@@ -2087,6 +2087,7 @@ int ena_com_fill_hash_function(struct ena_com_dev *ena_dev,return -EINVAL ; } + rss->hash_func = func; rc =ena_com_set_hash_function (ena_dev);/* Restore the old function */
Signature · 1 line
2.20.1