public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Pali Rohár" <pali@kernel.org>,
	"Tomasz Maciej Nowak" <tmn505@gmail.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Sasha Levin" <sashal@kernel.org>,
	linux-pci@vger.kernel.org
Subject: [PATCH AUTOSEL 4.9 15/80] PCI: aardvark: Don't blindly enable ASPM L0s and don't write to read-only register
Date: Wed, 17 Jun 2020 21:27:14 -0400	[thread overview]
Message-ID: <20200618012819.609778-15-sashal@kernel.org> (raw)
In-Reply-To: <20200618012819.609778-1-sashal@kernel.org>

From: Pali Rohár <pali@kernel.org>

[ Upstream commit 90c6cb4a355e7befcb557d217d1d8b8bd5875a05 ]

Trying to change Link Status register does not have any effect as this
is a read-only register. Trying to overwrite bits for Negotiated Link
Width does not make sense.

In future proper change of link width can be done via Lane Count Select
bits in PCIe Control 0 register.

Trying to unconditionally enable ASPM L0s via ASPM Control bits in Link
Control register is wrong. There should be at least some detection if
endpoint supports L0s as isn't mandatory.

Moreover ASPM Control bits in Link Control register are controlled by
pcie/aspm.c code which sets it according to system ASPM settings,
immediately after aardvark driver probes. So setting these bits by
aardvark driver has no long running effect.

Remove code which touches ASPM L0s bits from this driver and let
kernel's ASPM implementation to set ASPM state properly.

Some users are reporting issues that this code is problematic for some
Intel wifi cards and removing it fixes them, see e.g.:
https://bugzilla.kernel.org/show_bug.cgi?id=196339

If problems with Intel wifi cards occur even after this commit, then
pcie/aspm.c code could be modified / hooked to not enable ASPM L0s state
for affected problematic cards.

Link: https://lore.kernel.org/r/20200430080625.26070-3-pali@kernel.org
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pci/host/pci-aardvark.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index 1dbd09c91a7c..736d9f58438e 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -363,10 +363,6 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
 
 	advk_pcie_wait_for_link(pcie);
 
-	reg = PCIE_CORE_LINK_L0S_ENTRY |
-		(1 << PCIE_CORE_LINK_WIDTH_SHIFT);
-	advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG);
-
 	reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG);
 	reg |= PCIE_CORE_CMD_MEM_ACCESS_EN |
 		PCIE_CORE_CMD_IO_ACCESS_EN |
-- 
2.25.1


  parent reply	other threads:[~2020-06-18  1:45 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18  1:27 [PATCH AUTOSEL 4.9 01/80] power: supply: bq24257_charger: Replace depends on REGMAP_I2C with select Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 02/80] clk: sunxi: Fix incorrect usage of round_down() Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 03/80] i2c: piix4: Detect secondary SMBus controller on AMD AM4 chipsets Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 04/80] iio: pressure: bmp280: Tolerate IRQ before registering Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 05/80] iio: light: isl29125: fix iio_triggered_buffer_{predisable,postenable} positions Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 06/80] clk: qcom: msm8916: Fix the address location of pll->config_reg Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 07/80] backlight: lp855x: Ensure regulators are disabled on probe failure Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 08/80] ARM: integrator: Add some Kconfig selections Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 09/80] ALSA: isa/wavefront: prevent out of bounds write in ioctl Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 10/80] Smack: slab-out-of-bounds in vsscanf Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 11/80] scsi: qla2xxx: Fix issue with adapter's stopping state Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 12/80] iio: bmp280: fix compensation of humidity Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 13/80] i2c: pxa: clear all master action bits in i2c_pxa_stop_message() Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 14/80] usblp: poison URBs upon disconnect Sasha Levin
2020-06-18  1:27 ` Sasha Levin [this message]
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 16/80] ps3disk: use the default segment boundary Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 17/80] vfio/pci: fix memory leaks in alloc_perm_bits() Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 18/80] mfd: wm8994: Fix driver operation if loaded as modules Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 19/80] scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 20/80] clk: clk-flexgen: fix clock-critical handling Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 21/80] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 22/80] nfsd: Fix svc_xprt refcnt leak when setup callback client failed Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 23/80] powerpc/crashkernel: Take "mem=" option into account Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 24/80] yam: fix possible memory leak in yam_init_driver Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 25/80] fat: don't allow to mount if the FAT length == 0 Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 26/80] mksysmap: Fix the mismatch of '.L' symbols in System.map Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 27/80] scsi: sr: Fix sr_probe() missing deallocate of device minor Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 28/80] scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 29/80] staging: rtl8712: fix multiline derefernce warnings Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 30/80] iio: buffer: Don't allow buffers without any channels enabled to be activated Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 31/80] ALSA: usb-audio: Improve frames size computation Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 32/80] s390/qdio: put thinint indicator after early error Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 33/80] tty: hvc: Fix data abort due to race in hvc_open Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 34/80] staging: sm750fb: add missing case while setting FB_VISUAL Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 35/80] i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 36/80] serial: amba-pl011: Make sure we initialize the port.lock spinlock Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 37/80] drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 38/80] PCI: rcar: Fix incorrect programming of OB windows Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 39/80] PCI/ASPM: Allow ASPM on links to PCIe-to-PCI/PCI-X Bridges Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 40/80] power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()' Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 41/80] power: supply: smb347-charger: IRQSTAT_D is volatile Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 42/80] scsi: mpt3sas: Fix double free warnings Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 43/80] dlm: remove BUG() before panic() Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 44/80] clk: ti: composite: fix memory leak Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 45/80] tty: n_gsm: Fix SOF skipping Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 46/80] tty: n_gsm: Fix waking up upper tty layer when room available Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 47/80] powerpc/pseries/ras: Fix FWNMI_VALID off by one Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 48/80] powerpc/ps3: Fix kexec shutdown hang Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 49/80] vfio-pci: Mask cap zero Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 50/80] usb/ohci-platform: Fix a warning when hibernating Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 51/80] drm/msm/mdp5: Fix mdp5_init error path for failed mdp5_kms allocation Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 52/80] USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe() Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 53/80] tty: n_gsm: Fix bogus i++ in gsm_data_kick Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 54/80] clk: samsung: exynos5433: Add IGNORE_UNUSED flag to sclk_i2s1 Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 55/80] powerpc/64s/pgtable: fix an undefined behaviour Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 56/80] PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 57/80] IB/cma: Fix ports memory leak in cma_configfs Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 58/80] watchdog: da9062: No need to ping manually before setting timeout Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 59/80] usb: dwc2: gadget: move gadget resume after the core is in L0 state Sasha Levin
2020-06-18  1:27 ` [PATCH AUTOSEL 4.9 60/80] USB: gadget: udc: s3c2410_udc: Remove pointless NULL check in s3c2410_udc_nuke Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 61/80] usb: gadget: lpc32xx_udc: don't dereference ep pointer before null check Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 62/80] usb: gadget: fix potential double-free in m66592_probe Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 63/80] usb: gadget: Fix issue with config_ep_by_speed function Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 64/80] vfio/pci: fix memory leaks of eventfd ctx Sasha Levin
2020-06-18  1:34   ` Alex Williamson
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 65/80] clk: bcm2835: Fix return type of bcm2835_register_gate Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 66/80] net: sunrpc: Fix off-by-one issues in 'rpc_ntop6' Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 67/80] NFSv4.1 fix rpc_call_done assignment for BIND_CONN_TO_SESSION Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 68/80] extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()' Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 69/80] ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 70/80] openrisc: Fix issue with argument clobbering for clone/fork Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 71/80] gfs2: Allow lock_nolock mount to specify jid=X Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 72/80] scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 73/80] pinctrl: imxl: Fix an error handling path in 'imx1_pinctrl_core_probe()' Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 74/80] crypto: omap-sham - add proper load balancing support for multicore Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 75/80] lib/zlib: remove outdated and incorrect pre-increment optimization Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 76/80] include/linux/bitops.h: avoid clang shift-count-overflow warnings Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 77/80] elfnote: mark all .note sections SHF_ALLOC Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 78/80] selftests/vm/pkeys: fix alloc_random_pkey() to make it really random Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 79/80] selftests/net: in timestamping, strncpy needs to preserve null byte Sasha Levin
2020-06-18  1:28 ` [PATCH AUTOSEL 4.9 80/80] scsi: acornscsi: Fix an error handling path in acornscsi_probe() Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200618012819.609778-15-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=pali@kernel.org \
    --cc=robh@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tmn505@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox