Lucas Stach | 21 Jul 20:17 2014
Picon

[PATCH v2] PCI: imx6: fix boot hang when link already enabled

This fixes a boot hang observed when the bootloader
already enabled the PCIe link for it's own use. The
fundamental problem is that Freescale forgot to wire
up the core reset, so software doesn't have a sane way
to get the core into a defined state.

According to the DW PCIe core reference manual configuration
of the core may only happen when the LTSSM is disabled, so
this is one of the first things we need to do. Apparently
this isn't safe to do when the LTSSM is in any other state
than "detect" as we observe an instant machine hang when
trying to do so while the link is already up.

As a workaround force LTSSM into detect state right before
hitting the disable switch.

Reported-by: Fabio Estevam <fabio.estevam <at> freescale.com>
Signed-off-by: Lucas Stach <l.stach <at> pengutronix.de>
---
v2: messed up the first submission by omitting a chunk

Fabios delay workaround worked because of the following
conditions:
1. The driver gets probed and pulls the peripheral reset GPIO
2. Peripheral is held in reset, so won't answer any link
negotiation requests
3. The LTSSM times out and falls back into detect state
after 24ms (that's why a 30ms delay helps)
4. After LTSSM entered detect state it's safe to hit the
disable switch
(Continue reading)

Lucas Stach | 21 Jul 20:12 2014
Picon

[PATCH] PCI: imx6: fix boot hang when link already enabled

This fixes a boot hang observed when the bootloader
already enabled the PCIe link for it's own use. The
fundamental problem is that Freescale forgot to wire
up the core reset, so software doesn't have a sane way
to get the core into a defined state.

According to the DW PCIe core reference manual configuration
of the core may only happen when the LTSSM is disabled, so
this is one of the first things we do. Apparently this isn't
safe to do when the LTSSM is in any other state than
"detect" as we observe an instant machine hang when trying to
do so while the link is already up.

As a workaround force LTSSM into detect state right before
hitting the disable switch.

Reported-by: Fabio Estevam <fabio.estevam <at> freescale.com>
Signed-off-by: Lucas Stach <l.stach <at> pengutronix.de>
---
Fabios delay workaround worked because of the following
conditions:
1. The driver gets probed and pulls the peripheral reset GPIO
2. Peripheral is held in reset, so won't answer any link
negotiation requests
3. The LTSSM times out and falls back into detect state
after 24ms (that's why a 30ms delay helps)
4. After LTSSM entered detect state it's safe to hit the
disable switch
---
 drivers/pci/host/pci-imx6.c | 9 +++++++++
(Continue reading)

Tuomas Tynkkynen | 21 Jul 18:30 2014

[PATCH] PCI/AER: Forward declare struct pci_dev to avoid warning

Forward declaring struct pci_dev in aer.h avoids this warning:

In file included from include/ras/ras_event.h:11:0,
                 from drivers/ras/ras.c:13:
include/linux/aer.h:38:44: warning: 'struct pci_dev’ declared inside parameter list [enabled by default]
include/linux/aer.h:38:44: warning: its scope is only this definition or declaration, which is
probably not what you want [enabled by default]

Signed-off-by: Tuomas Tynkkynen <ttynkkynen <at> nvidia.com>
---
 include/linux/aer.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/aer.h b/include/linux/aer.h
index 4dbaa70..d9ec8dd 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
 <at>  <at>  -7,6 +7,8  <at>  <at> 
 #ifndef _AER_H_
 #define _AER_H_
 
+struct pci_dev;
+
 #define AER_NONFATAL			0
 #define AER_FATAL			1
 #define AER_CORRECTABLE			2
--

-- 
1.8.1.5

(Continue reading)

Viresh Kumar | 21 Jul 06:28 2014

Re: [PATCH 1/2] PCI: spear: Fix Section mismatch compilation warning for probe()

On 21 July 2014 07:45, Rob Herring <robherring2 <at> gmail.com> wrote:
> The Fixes tag is new and the format is documented in SubmittingPatches

Yeah, just saw that for the first time :)

> IIRC. I believe it is also supposed to be quotes rather than
> parentheses around the commit message if we want to be really picky.

Actually both: ("$subject")

I never saw the doc and picked how it was done by Rafael for cpufreq stuff.
Though he was correctly adding 12 digits of the sha key, but the quotes
were missing :)

I will take care of this now.

--
viresh
Rafael J. Wysocki | 21 Jul 02:29 2014
Picon

[PATCH] PCI / PM: Allow PCI devices to be put into D3cold during system suspend

From: Rafael J. Wysocki <rafael.j.wysocki <at> intel.com>

Commit 448bd857d48e (PCI/PM: add PCIe runtime D3cold support) added
a check to prevent PCI devices from being put into D3cold during
system suspend without giving any particular reason (which was
overlooked during review).

Also that check causes the "freeze" sleep state to draw more power
than it can potentially, so drop the check.

Fixes: 448bd857d48e (PCI/PM: add PCIe runtime D3cold support)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki <at> intel.com>
---
 drivers/pci/pci.c |    4 ----
 1 file changed, 4 deletions(-)

Index: linux-pm/drivers/pci/pci.c
===================================================================
--- linux-pm.orig/drivers/pci/pci.c
+++ linux-pm/drivers/pci/pci.c
 <at>  <at>  -1907,10 +1907,6  <at>  <at>  int pci_prepare_to_sleep(struct pci_dev
 	if (target_state == PCI_POWER_ERROR)
 		return -EIO;

-	/* D3cold during system suspend/hibernate is not supported */
-	if (target_state > PCI_D3hot)
-		target_state = PCI_D3hot;
-
 	pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev));

(Continue reading)

Rafael J. Wysocki | 21 Jul 02:02 2014
Picon

[PATCH] PCI / PM: Drop unused runtime PM support code for PCIe ports

From: Rafael J. Wysocki <rafael.j.wysocki <at> intel.com>

Since commit de7d5f729c72 (PCI/PM: Disable runtime PM of PCIe ports)
the runtime PM support code for PCIe ports in portdrv_pci.c has never
been used, so drop it entirely.

If we are to support runtime PM of PCIe ports, it will have to be
done in a different way most likely anyway.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki <at> intel.com>
---
 drivers/pci/pcie/portdrv_pci.c |   74 -----------------------------------------
 1 file changed, 74 deletions(-)

Index: linux-pm/drivers/pci/pcie/portdrv_pci.c
===================================================================
--- linux-pm.orig/drivers/pci/pcie/portdrv_pci.c
+++ linux-pm/drivers/pci/pcie/portdrv_pci.c
 <at>  <at>  -93,77 +93,6  <at>  <at>  static int pcie_port_resume_noirq(struct
 	return 0;
 }

-#ifdef CONFIG_PM_RUNTIME
-struct d3cold_info {
-	bool no_d3cold;
-	unsigned int d3cold_delay;
-};
-
-static int pci_dev_d3cold_info(struct pci_dev *pdev, void *data)
-{
(Continue reading)

Viresh Kumar | 20 Jul 13:59 2014

[PATCH 1/2] PCI: spear: Fix Section mismatch compilation warning for probe()

Following compilation warning occurs when compiled with:
CONFIG_DEBUG_SECTION_MISMATCH=y

 WARNING: drivers/pci/host/built-in.o(.data+0xc0): Section mismatch in
 reference from the variable spear13xx_pcie_driver to the function
 .init.text:spear13xx_pcie_probe()

Both .probe() and pcie_init() are marked with __init, but spear13xx_pcie_driver
isn't. And so section mismatch.

Fix it by marking spear13xx_pcie_driver with __initdata.

Fixes: 51b66a6 (PCI: spear: Add PCIe driver for ST Microelectronics SPEAr13xx)
Reported-by: Olof Johansson <olof <at> lixom.net>
Signed-off-by: Viresh Kumar <viresh.kumar <at> linaro.org>
---
Olof/Arnd,

Let me know if a PULL request is required for this, otherwise just apply them
directly.

 drivers/pci/host/pcie-spear13xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
index 99738e4..67315ea 100644
--- a/drivers/pci/host/pcie-spear13xx.c
+++ b/drivers/pci/host/pcie-spear13xx.c
 <at>  <at>  -382,7 +382,7  <at>  <at>  static const struct of_device_id spear13xx_pcie_of_match[] = {
 };
(Continue reading)

weiyj_lk | 20 Jul 07:34 2014

[PATCH -next] ACPI / hotplug / PCI: Fix sparse non static symbol warning

From: Wei Yongjun <yongjun_wei <at> trendmicro.com.cn>

Fixes the following sparse warning:

drivers/pci/hotplug/acpiphp_glue.c:923:6: warning:
 symbol 'acpiphp_drop_bridge' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei <at> trendmicro.com.cn>
---
 drivers/pci/hotplug/acpiphp_glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 24a43d4..70741c8 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
 <at>  <at>  -920,7 +920,7  <at>  <at>  void acpiphp_enumerate_slots(struct pci_bus *bus)
 	kfree(bridge);
 }

-void acpiphp_drop_bridge(struct acpiphp_bridge *bridge)
+static void acpiphp_drop_bridge(struct acpiphp_bridge *bridge)
 {
 	if (pci_is_root_bus(bridge->pci_bus)) {
 		struct acpiphp_root_context *root_context;

Alex Williamson | 16 Jul 21:14 2014
Picon

[PATCH] PCI: Add device specific (non)reset for AMD GPUs

There are numerous ATI/AMD GPUs available that report that they
support a PM reset (NoSoftRst-) but for which such a reset has no
apparent effect on the device.  These devices continue to display the
same framebuffer across PM reset and the fan speed remains constant,
while a proper bus reset causes the display to lose sync and the fan
to reset to high speed.  Create a device specific reset for ATI vendor
devices that tries to catch these devices and report that
pci_reset_function() is not supported.

Signed-off-by: Alex Williamson <alex.williamson <at> redhat.com>
---

This patch makes the series "vfio-pci: Reset improvements" far more
useful for users with one of these GPUs.  If pci_reset_function()
indicates that it's supported and successful, then I have no reason
to resort to a bus/slot reset in the vfio-pci code.  Since it doesn't
seem to do anything anyway, let's just forget that PM reset exists
for these devices.

 drivers/pci/quirks.c |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 460c354..bed9c63 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
 <at>  <at>  -3289,6 +3289,57  <at>  <at>  static int reset_chelsio_generic_dev(struct pci_dev *dev, int probe)
 	return 0;
 }

(Continue reading)

Alex Williamson | 16 Jul 21:01 2014
Picon

[PATCH 0/3] vfio-pci: Reset improvements

This series is intended to improve the state of devices returned back
to the host from vfio-pci or re-used by another user.  First we make
sure that busmaster is disabled in the saved state, so the device
cannot continue to do DMA, then we add some serialization, move our
reference counting under it to fix an unlikely bug should we fail to
initialize a device, and add the ability to do bus/slot reset on
device release.  To do this, we require all devices affected by the
bus/slot reset to be bound to vfio-pci, therefore users sequestering
devices with pci-stub will need to bind them to vfio-pci to see this
change.

The effect of these changes are perhaps most noticeable with GPU
assignment to a VM, where killing QEMU results in a static image on
the framebuffer since no reset of the device was done.  Returning
the GPU to a host device at this point was suspect.  Other devices,
like USB controllers, also don't necessarily appreciate being abruptly
disconnected from their IOMMU domain and would generate IOMMU faults
in the event the user process is killed.  Both of these cases should
be resolved here, assuming all the devices on the bus are bound to
vfio-pci and at least one of the devices in use does not support
a function-local reset.

Please test and comment.  Thanks,

Alex

---

Alex Williamson (3):
      vfio-pci: Attempt bus/slot reset on release
(Continue reading)

Alexander Gordeev | 16 Jul 20:05 2014
Picon

[PATCH v2 RESEND 00/23] scsi: Use pci_enable_msix_range() instead of pci_enable_msix()

Hello,

This is a series of mostly trivial patches. Once accepted,
we could phase out pci_enable_msix() interface.

As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.

Thanks!

Cc: iss_storagedev <at> hp.com
Cc: intel-linux-scu <at> intel.com
Cc: support <at> lsi.com
Cc: DL-MPTFusionLinux <at> lsi.com
Cc: qla2xxx-upstream <at> qlogic.com
Cc: iscsi-driver <at> qlogic.com
Cc: pv-drivers <at> vmware.com
Cc: linux-scsi <at> vger.kernel.org
Cc: linux-pci <at> vger.kernel.org

Alexander Gordeev (23):
  be2iscsi: Use pci_enable_msix_exact() instead of pci_enable_msix()
  bfa: Do not call pci_enable_msix() after it failed once
  bfa: Cleanup bfad_setup_intr() function
  bfa: Use pci_enable_msix_exact() instead of pci_enable_msix()
  csiostor: Remove superfluous call to pci_disable_msix()
(Continue reading)


Gmane