If the main loop in linehandle_create() encounters an error, it
unwinds completely by freeing all previously requested GPIO
descriptors. However, if the error occurs in the beginning of
the loop before that GPIO is requested, then the exit code
attempts to free a null descriptor. If extrachecks is enabled,
gpiod_free() triggers a WARN_ON.
Instead, keep a separate count of legitimate GPIOs so that only
those are freed.
Cc: stable(a)vger.kernel.org
Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines")
Signed-off-by: Timur Tabi <timur(a)codeaurora.org>
---
drivers/gpio/gpiolib.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 43aeb07343ec..d07771797707 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -497,7 +497,7 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
struct gpiohandle_request handlereq;
struct linehandle_state *lh;
struct file *file;
- int fd, i, ret;
+ int fd, i, count = 0, ret;
u32 lflags;
if (copy_from_user(&handlereq, ip, sizeof(handlereq)))
@@ -558,6 +558,7 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
if (ret)
goto out_free_descs;
lh->descs[i] = desc;
+ count = i;
if (lflags & GPIOHANDLE_REQUEST_ACTIVE_LOW)
set_bit(FLAG_ACTIVE_LOW, &desc->flags);
@@ -628,7 +629,7 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
out_put_unused_fd:
put_unused_fd(fd);
out_free_descs:
- for (; i >= 0; i--)
+ for (i = 0; i < count; i++)
gpiod_free(lh->descs[i]);
kfree(lh->label);
out_free_lh:
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
The __clear_user function is defined to return the number of bytes that
could not be cleared. From the underlying memset / bzero implementation
this means setting register a2 to that number on return. Currently if a
page fault is triggered within the memset_partial block, the value
loaded into a2 on return is meaningless.
The label .Lpartial_fixup\@ is jumped to on page fault. Currently it
masks the remaining count of bytes (a2) with STORMASK, meaning that the
least significant 2 (32bit) or 3 (64bit) bits of the remaining count are
always clear.
Secondly, .Lpartial_fixup\@ expects t1 to contain the end address of the
copy. This is set up by the initial block:
PTR_ADDU t1, a0 /* end address */
However, the .Lmemset_partial\@ block then reuses register t1 to
calculate a jump through a block of word copies. This leaves it no
longer containing the end address of the copy operation if a page fault
occurs, and the remaining bytes calculation is incorrect.
Fix these issues by removing the and of a2 with STORMASK, and replace t1
with register t2 in the .Lmemset_partial\@ block.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable(a)vger.kernel.org
Signed-off-by: Matt Redfearn <matt.redfearn(a)mips.com>
---
arch/mips/lib/memset.S | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S
index 90bcdf1224ee..3257dca58cad 100644
--- a/arch/mips/lib/memset.S
+++ b/arch/mips/lib/memset.S
@@ -161,19 +161,19 @@
.Lmemset_partial\@:
R10KCBARRIER(0(ra))
- PTR_LA t1, 2f /* where to start */
+ PTR_LA t2, 2f /* where to start */
#ifdef CONFIG_CPU_MICROMIPS
LONG_SRL t7, t0, 1
#endif
#if LONGSIZE == 4
- PTR_SUBU t1, FILLPTRG
+ PTR_SUBU t2, FILLPTRG
#else
.set noat
LONG_SRL AT, FILLPTRG, 1
- PTR_SUBU t1, AT
+ PTR_SUBU t2, AT
.set at
#endif
- jr t1
+ jr t2
PTR_ADDU a0, t0 /* dest ptr */
.set push
@@ -250,7 +250,6 @@
.Lpartial_fixup\@:
PTR_L t0, TI_TASK($28)
- andi a2, STORMASK
LONG_L t0, THREAD_BUADDR(t0)
LONG_ADDU a2, t1
jr ra
--
2.7.4
This is a note to let you know that I've just added the patch titled
ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 74402055a2d3ec998a1ded599e86185a27d9bbf4 Mon Sep 17 00:00:00 2001
From: Adam Ford <aford173(a)gmail.com>
Date: Thu, 25 Jan 2018 14:10:37 -0600
Subject: ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux
From: Adam Ford <aford173(a)gmail.com>
commit 74402055a2d3ec998a1ded599e86185a27d9bbf4 upstream.
The pinmuxing was missing for I2C1 which was causing intermittent issues
with the PMIC which is connected to I2C1. The bootloader did not quite
configure the I2C1 either, so when running at 2.6MHz, it was generating
errors at time.
This correctly sets the I2C1 pinmuxing so it can operate at 2.6MHz
Fixes: 687c27676151 ("ARM: dts: Add minimal support for LogicPD Torpedo
DM3730 devkit")
Signed-off-by: Adam Ford <aford173(a)gmail.com>
Signed-off-by: Tony Lindgren <tony(a)atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
+++ b/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
@@ -90,6 +90,8 @@
};
&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
clock-frequency = <2600000>;
twl: twl@48 {
@@ -137,6 +139,12 @@
OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4) /* mcbsp1_fsr.gpio_157 */
>;
};
+ i2c1_pins: pinmux_i2c1_pins {
+ pinctrl-single,pins = <
+ OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */
+ OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */
+ >;
+ };
};
&omap3_pmx_core2 {
Patches currently in stable-queue which might be from aford173(a)gmail.com are
queue-4.4/arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
This is the start of the stable review cycle for the 4.4.124 release.
There are 97 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 Mar 25 09:41:34 UTC 2018.
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.4.124-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.4.124-rc1
Leon Romanovsky <leonro(a)mellanox.com>
RDMA/ucma: Fix access to non-initialized CM_ID object
Vignesh R <vigneshr(a)ti.com>
dmaengine: ti-dma-crossbar: Fix event mapping for TPCC_EVT_MUX_60_63
Sergej Sawazki <sergej(a)taudac.com>
clk: si5351: Rename internal plls to avoid name collisions
Benjamin Coddington <bcodding(a)redhat.com>
nfsd4: permit layoutget of executable-only files
Anton Vasilyev <vasilyev(a)ispras.ru>
RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS
Alexey Kodanev <alexey.kodanev(a)oracle.com>
ip6_vti: adjust vti mtu according to mtu of lower device
Jerry Snitselaar <jsnitsel(a)redhat.com>
iommu/vt-d: clean up pr_irq if request_threaded_irq fails
Florian Fainelli <f.fainelli(a)gmail.com>
pinctrl: Really force states during suspend/resume
Robert Walker <robert.walker(a)arm.com>
coresight: Fix disabling of CoreSight TPIU
Sahara <keun-o.park(a)darkmatter.ae>
pty: cancel pty slave port buf's work in tty_release
Peter Ujfalusi <peter.ujfalusi(a)ti.com>
drm/omap: DMM: Check for DMM readiness after successful transaction commit
Bjorn Helgaas <bhelgaas(a)google.com>
vgacon: Set VGA struct resource types
Artemy Kovalyov <artemyko(a)mellanox.com>
IB/umem: Fix use of npages/nmap fields
Parav Pandit <parav(a)mellanox.com>
RDMA/cma: Use correct size when writing netlink stats
Erez Shitrit <erezsh(a)mellanox.com>
IB/ipoib: Avoid memory leak if the SA returns a different DGID
Daniel Drake <drake(a)endlessm.com>
mmc: avoid removing non-removable hosts during suspend
Shawn Nematbakhsh <shawnn(a)chromium.org>
platform/chrome: Use proper protocol transfer function
Arnd Bergmann <arnd(a)arndb.de>
cros_ec: fix nul-termination for firmware build info
Ron Economos <w6rz(a)comcast.net>
media: [RESEND] media: dvb-frontends: Add delay to Si2168 restart
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
media: bt8xx: Fix err 'bt878_probe()'
Tsang-Shian Lin <thlin(a)realtek.com>
rtlwifi: rtl_pci: Fix the bug when inactiveps is enabled.
Geert Uytterhoeven <geert(a)linux-m68k.org>
RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo()
Prakash Kamliya <pkamliya(a)codeaurora.org>
drm/msm: fix leak in failed get_pages
Gustavo A. R. Silva <garsilva(a)embeddedor.com>
media: c8sectpfe: fix potential NULL pointer dereference in c8sectpfe_timer_interrupt
Loic Poulain <loic.poulain(a)linaro.org>
Bluetooth: hci_qca: Avoid setup failure on missing rampatch
Kim Phillips <kim.phillips(a)arm.com>
perf tests kmod-path: Don't fail if compressed modules aren't supported
Moritz Fischer <mdf(a)kernel.org>
rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL
Moritz Fischer <mdf(a)kernel.org>
rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks
Dan Carpenter <dan.carpenter(a)oracle.com>
cifs: small underflow in cnvrtDosUnixTm()
Timmy Li <lixiaoping3(a)huawei.com>
net: hns: fix ethtool_get_strings overflow in hns driver
Alexey Khoroshilov <khoroshilov(a)ispras.ru>
sm501fb: don't return zero on failure path in sm501fb_start()
Maksim Salau <maksim.salau(a)gmail.com>
video: fbdev: udlfb: Fix buffer on stack
Dmitry Monakhov <dmonakhov(a)openvz.org>
tcm_fileio: Prevent information leak for short reads
Sergei Trofimovich <slyfox(a)gentoo.org>
ia64: fix module loading for gcc-5.4
Shaohua Li <shli(a)fb.com>
md/raid10: skip spare disk as 'first' disk
Sebastian Reichel <sebastian.reichel(a)collabora.co.uk>
Input: twl4030-pwrbutton - use correct device for irq request
Michael Trimarchi <michael(a)amarulasolutions.com>
power: supply: pda_power: move from timer to delayed_work
Scott Wood <swood(a)redhat.com>
bnx2x: Align RX buffers
Mario Kleiner <mario.kleiner.de(a)gmail.com>
drm/nouveau/kms: Increase max retries in scanout position queries.
Hans de Goede <hdegoede(a)redhat.com>
ACPI / PMIC: xpower: Fix power_table addresses
Robert Lippert <roblip(a)gmail.com>
ipmi/watchdog: fix wdog hang on panic waiting for ipmi response
Kishon Vijay Abraham I <kishon(a)ti.com>
ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP
yangbo lu <yangbo.lu(a)nxp.com>
mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a
Pan Bian <bianpan2016(a)163.com>
staging: wilc1000: fix unchecked return value
Sameer Wadgaonkar <sameer.wadgaonkar(a)unisys.com>
staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y
Ming Lei <ming.lei(a)redhat.com>
mtip32xx: use runtime tag to initialize command header
Keerthy <j-keerthy(a)ti.com>
mfd: palmas: Reset the POWERHOLD mux during power off
Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
mac80211: don't parse encrypted management frames in ieee80211_frame_acked
Filipe Manana <fdmanana(a)suse.com>
Btrfs: send, fix file hole not being preserved due to inline extent
Pan Bian <bianpan2016(a)163.com>
rndis_wlan: add return value validation
Pan Bian <bianpan2016(a)163.com>
mt7601u: check return value of alloc_skb
Shrirang Bagul <shrirang.bagul(a)canonical.com>
iio: st_pressure: st_accel: Initialise sensor platform data properly
NeilBrown <neilb(a)suse.com>
NFS: don't try to cross a mountpount when there isn't one there.
Vlad Tsyrklevich <vlad(a)tsyrklevich.net>
infiniband/uverbs: Fix integer overflows
Finn Thain <fthain(a)telegraphics.com.au>
scsi: mac_esp: Replace bogus memory barrier with spinlock
Pan Bian <bianpan2016(a)163.com>
qlcnic: fix unchecked return value
Pan Bian <bianpan2016(a)163.com>
wan: pc300too: abort path on failure
Dan Carpenter <dan.carpenter(a)oracle.com>
mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR()
Jarno Rajahalme <jarno(a)ovn.org>
openvswitch: Delete conntrack entry clashing with an expectation.
Gao Feng <fgao(a)ikuai8.com>
netfilter: xt_CT: fix refcnt leak on error path
James Smart <jsmart2021(a)gmail.com>
Fix driver usage of 128B WQEs when WQ_CREATE is V1.
Dan Carpenter <dan.carpenter(a)oracle.com>
ASoC: Intel: Skylake: Uninitialized variable in probe_codec()
Maor Gottlieb <maorg(a)mellanox.com>
IB/mlx4: Change vma from shared to private
Maor Gottlieb <maorg(a)mellanox.com>
IB/mlx4: Take write semaphore when changing the vma struct
Dan Carpenter <dan.carpenter(a)oracle.com>
HSI: ssi_protocol: double free in ssip_pn_xmit()
Feras Daoud <ferasda(a)mellanox.com>
IB/ipoib: Update broadcast object if PKey value was changed in index 0
Feras Daoud <ferasda(a)mellanox.com>
IB/ipoib: Fix deadlock between ipoib_stop and mcast join flow
Mikhail Paulyshka <me(a)mixaill.tk>
ALSA: hda - Fix headset microphone detection for ASUS N551 and N751
Bernd Faust <berndfaust(a)gmail.com>
e1000e: fix timing for 82579 Gigabit Ethernet controller
Eric Dumazet <edumazet(a)google.com>
tcp: remove poll() flakes with FastOpen
Benjamin Coddington <bcodding(a)redhat.com>
NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete()
Guoqing Jiang <gqjiang(a)suse.com>
md/raid10: wait up frozen array in handle_write_completed
Suman Anna <s-anna(a)ti.com>
iommu/omap: Register driver before setting IOMMU ops
Abel Vesa <abelvesa(a)linux.com>
ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER
Alexey Kardashevskiy <aik(a)ozlabs.ru>
KVM: PPC: Book3S PR: Exit KVM on failed mapping
David Gibson <david(a)gibson.dropbear.id.au>
scsi: virtio_scsi: Always try to read VPD pages
Bharat Kumar Reddy Gooty <bharat.gooty(a)broadcom.com>
clk: ns2: Correct SDIO bits
Mohammed Shafi Shajakhan <mohammed(a)qti.qualcomm.com>
ath: Fix updating radar flags for coutry code India
Marek Vasut <marex(a)denx.de>
spi: dw: Disable clock after unregistering the host
Jasmin J <jasmin(a)anw.at>
media/dvb-core: Race condition when writing to CAM
David Ahern <dsa(a)cumulusnetworks.com>
net: ipv6: send unsolicited NA on admin up
Edgar Cherkasov <echerkasov(a)dev.rtsoft.ru>
i2c: i2c-scmi: add a MS HID
Hans de Goede <hdegoede(a)redhat.com>
genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs
Thomas Gleixner <tglx(a)linutronix.de>
cpufreq/sh: Replace racy task affinity logic
Thomas Gleixner <tglx(a)linutronix.de>
ACPI/processor: Replace racy task affinity logic
Thomas Gleixner <tglx(a)linutronix.de>
ACPI/processor: Fix error handling in __acpi_processor_start()
Deepa Dinamani <deepa.kernel(a)gmail.com>
time: Change posix clocks ops interfaces to use timespec64
Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Input: ar1021_i2c - fix too long name in driver's device table
Hans de Goede <hdegoede(a)redhat.com>
rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs
Hans de Goede <hdegoede(a)redhat.com>
x86: i8259: export legacy_pic symbol
Dong Aisheng <aisheng.dong(a)nxp.com>
regulator: anatop: set default voltage selector for pcie
Santeri Toivonen <santeri.toivonen(a)vatsul.com>
platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA
Yisheng Xie <xieyisheng1(a)huawei.com>
staging: android: ashmem: Fix possible deadlock in ashmem_ioctl
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Enable encryption during session setup phase
Steve French <smfrench(a)gmail.com>
SMB3: Validate negotiate request must always be signed
Jeremy Boone <jeremy.boone(a)nccgroup.trust>
tpm_tis: fix potential buffer overruns caused by bit glitches on the bus
Jeremy Boone <jeremy.boone(a)nccgroup.trust>
tpm: fix potential buffer overruns caused by bit glitches on the bus
-------------
Diffstat:
Makefile | 4 +-
arch/alpha/kernel/console.c | 1 +
arch/arm/kernel/ftrace.c | 11 ++--
arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +-
arch/ia64/kernel/module.c | 4 +-
arch/powerpc/kvm/book3s_64_mmu_host.c | 5 +-
arch/powerpc/kvm/book3s_pr.c | 6 ++-
arch/x86/kernel/i8259.c | 1 +
drivers/acpi/pmic/intel_pmic_xpower.c | 50 ++++++++---------
drivers/acpi/processor_driver.c | 10 +++-
drivers/acpi/processor_throttling.c | 62 +++++++++++++---------
drivers/block/mtip32xx/mtip32xx.c | 36 ++++++++-----
drivers/bluetooth/hci_qca.c | 3 ++
drivers/char/ipmi/ipmi_watchdog.c | 8 +--
drivers/char/tpm/tpm-interface.c | 5 ++
drivers/char/tpm/tpm2-cmd.c | 6 +++
drivers/char/tpm/tpm_tis.c | 5 +-
drivers/clk/bcm/clk-ns2.c | 2 +-
drivers/clk/clk-si5351.c | 2 +-
drivers/cpufreq/sh-cpufreq.c | 45 +++++++++-------
drivers/dma/ti-dma-crossbar.c | 10 +++-
drivers/gpu/drm/msm/msm_gem.c | 14 +++--
drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 5 ++
drivers/hsi/clients/ssi_protocol.c | 5 +-
drivers/hwtracing/coresight/coresight-tpiu.c | 13 +++--
drivers/i2c/busses/i2c-scmi.c | 4 ++
drivers/iio/accel/st_accel_core.c | 7 +--
drivers/iio/pressure/st_pressure_core.c | 8 +--
drivers/infiniband/core/cma.c | 5 +-
drivers/infiniband/core/iwpm_util.c | 1 +
drivers/infiniband/core/umem.c | 2 +-
drivers/infiniband/core/uverbs_cmd.c | 13 ++++-
drivers/infiniband/hw/mlx4/main.c | 6 ++-
drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +-
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 13 +++++
drivers/infiniband/ulp/ipoib/ipoib_main.c | 16 ++++++
drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 11 ++--
drivers/input/misc/twl4030-pwrbutton.c | 2 +-
drivers/input/touchscreen/ar1021_i2c.c | 2 +-
drivers/iommu/intel-svm.c | 9 ++--
drivers/iommu/omap-iommu.c | 21 ++++++--
drivers/md/raid10.c | 6 +++
drivers/media/dvb-core/dvb_ca_en50221.c | 23 ++++++++
drivers/media/dvb-frontends/si2168.c | 3 ++
drivers/media/pci/bt8xx/bt878.c | 3 +-
.../media/platform/sti/c8sectpfe/c8sectpfe-core.c | 4 +-
drivers/mfd/palmas.c | 14 +++++
drivers/mmc/core/core.c | 8 +++
drivers/mmc/host/omap_hsmmc.c | 4 +-
drivers/mmc/host/sdhci-of-esdhc.c | 14 +++++
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 +
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 2 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 2 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 2 +-
.../net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c | 2 +-
drivers/net/ethernet/intel/e1000e/netdev.c | 6 +++
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 +
drivers/net/wan/pc300too.c | 1 +
drivers/net/wireless/ath/regd.c | 19 ++++---
drivers/net/wireless/mediatek/mt7601u/mcu.c | 10 +++-
drivers/net/wireless/realtek/rtlwifi/pci.c | 7 +++
drivers/net/wireless/rndis_wlan.c | 4 ++
drivers/pinctrl/core.c | 24 ++++++---
drivers/platform/chrome/cros_ec_proto.c | 8 +--
drivers/platform/chrome/cros_ec_sysfs.c | 2 +-
drivers/platform/x86/asus-nb-wmi.c | 9 ++++
drivers/power/pda_power.c | 49 +++++++++--------
drivers/ptp/ptp_clock.c | 18 +++----
drivers/regulator/anatop-regulator.c | 5 ++
drivers/rtc/rtc-cmos.c | 17 ++++--
drivers/rtc/rtc-ds1374.c | 10 +++-
drivers/scsi/lpfc/lpfc_sli.c | 3 ++
drivers/scsi/mac_esp.c | 33 ++++++++----
drivers/scsi/virtio_scsi.c | 24 +++++++++
drivers/spi/spi-dw-mmio.c | 2 +-
drivers/staging/android/ashmem.c | 8 ++-
drivers/staging/unisys/visorhba/visorhba_main.c | 8 ++-
drivers/staging/wilc1000/linux_mon.c | 2 +
drivers/target/target_core_file.c | 23 +++++---
drivers/tty/tty_io.c | 2 +
drivers/video/console/vgacon.c | 34 +++++++++---
drivers/video/fbdev/sm501fb.c | 1 +
drivers/video/fbdev/udlfb.c | 14 ++++-
fs/btrfs/send.c | 23 +++++++-
fs/cifs/netmisc.c | 6 +--
fs/cifs/sess.c | 22 ++++----
fs/cifs/smb2pdu.c | 11 ++--
fs/nfs/pagelist.c | 6 ++-
fs/nfsd/nfs4proc.c | 6 +--
fs/nfsd/vfs.c | 24 +++++++--
include/linux/posix-clock.h | 10 ++--
kernel/irq/manage.c | 4 +-
kernel/time/posix-clock.c | 34 ++++++++----
net/ipv4/tcp_input.c | 16 +++---
net/ipv6/ip6_vti.c | 20 +++++++
net/ipv6/ndisc.c | 2 +
net/mac80211/status.c | 1 +
net/netfilter/xt_CT.c | 11 +++-
net/openvswitch/conntrack.c | 30 ++++++++++-
sound/pci/hda/patch_realtek.c | 12 ++++-
sound/soc/intel/skylake/skl.c | 2 +-
tools/perf/tests/kmod-path.c | 2 +
103 files changed, 811 insertions(+), 303 deletions(-)
The Dell Inspiron 5775 is a Raven Ridge. The Enable Slot command timed
out when a USB device gets plugged:
[ 212.156326] xhci_hcd 0000:03:00.3: Error while assigning device slot ID
[ 212.156340] xhci_hcd 0000:03:00.3: Max number of devices this xHCI host supports is 64.
[ 212.156348] usb usb2-port3: couldn't allocate usb_device
AMD suggests that a delay before xHC suspends can fix the issue.
I can confirm it fixes the issue, so use the suspend delay quirk for
Raven Ridge's xHC.
Cc: stable(a)vger.kernel.org
Signed-off-by: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
---
drivers/usb/host/xhci-pci.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index d9f831b67e57..93ce34bce7b5 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -126,7 +126,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info())
xhci->quirks |= XHCI_AMD_PLL_FIX;
- if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x43bb)
+ if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+ (pdev->device == 0x15e0 ||
+ pdev->device == 0x15e1 ||
+ pdev->device == 0x43bb))
xhci->quirks |= XHCI_SUSPEND_DELAY;
if (pdev->vendor == PCI_VENDOR_ID_AMD)
--
2.15.1
In order to enable a PLL, not only the PLL has to be powered up and
locked, but you also have to de-assert the reset signal. The last part
was missing. Add it so PLLs that were not enabled by the FW/bootloader
can be enabled from Linux.
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon(a)bootlin.com>
---
Changes in v2:
- simplify bcm2835_pll_off()
---
drivers/clk/bcm/clk-bcm2835.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index a07f6451694a..fa0d5c8611a0 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -602,9 +602,7 @@ static void bcm2835_pll_off(struct clk_hw *hw)
const struct bcm2835_pll_data *data = pll->data;
spin_lock(&cprman->regs_lock);
- cprman_write(cprman, data->cm_ctrl_reg,
- cprman_read(cprman, data->cm_ctrl_reg) |
- CM_PLL_ANARST);
+ cprman_write(cprman, data->cm_ctrl_reg, CM_PLL_ANARST);
cprman_write(cprman, data->a2w_ctrl_reg,
cprman_read(cprman, data->a2w_ctrl_reg) |
A2W_PLL_CTRL_PWRDN);
@@ -640,6 +638,10 @@ static int bcm2835_pll_on(struct clk_hw *hw)
cpu_relax();
}
+ cprman_write(cprman, data->a2w_ctrl_reg,
+ cprman_read(cprman, data->a2w_ctrl_reg) |
+ A2W_PLL_CTRL_PRST_DISABLE);
+
return 0;
}
--
2.14.1