<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/pci, branch v4.11</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>PCI: hisi: Fix DT binding (hisi-pcie-almost-ecam)</title>
<updated>2017-04-12T15:46:47+00:00</updated>
<author>
<name>Dongdong Liu</name>
<email>liudongdong3@huawei.com</email>
</author>
<published>2017-03-23T13:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b9c1153f7a9cb2d53b845615a0edd510f7fe8341'/>
<id>b9c1153f7a9cb2d53b845615a0edd510f7fe8341</id>
<content type='text'>
The "hisilicon,pcie-almost-ecam" binding goes against the usual DT
conventions, and is non-sensical in that it describes the IP based on
what it isn't.  Fix the DT binding with "hisilicon,hip06-pcie-ecam"
and "hisilicon,hip07-pcie-ecam".

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Dongdong Liu &lt;liudongdong3@huawei.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "hisilicon,pcie-almost-ecam" binding goes against the usual DT
conventions, and is non-sensical in that it describes the IP based on
what it isn't.  Fix the DT binding with "hisilicon,hip06-pcie-ecam"
and "hisilicon,hip07-pcie-ecam".

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Dongdong Liu &lt;liudongdong3@huawei.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: dwc: Fix dw_pcie_ops NULL pointer dereference</title>
<updated>2017-04-04T13:24:25+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2017-04-03T22:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=794a8604fe6e4a311373cde57a86ad4aab9d32b8'/>
<id>794a8604fe6e4a311373cde57a86ad4aab9d32b8</id>
<content type='text'>
Fix a crash from dereferencing a NULL dw_pcie_ops pointer.  For example,
on ARTPEC-6:

  Unable to handle kernel NULL pointer dereference at virtual address 00000004
  pgd = c0204000
  [00000004] *pgd=00000000
  Internal error: Oops: 5 [#1] SMP ARM
  Modules linked in:
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc3-next-20170321 #1
  Hardware name: Axis ARTPEC-6 Platform
  task: db098000 task.stack: db096000
  PC is at dw_pcie_writel_dbi+0x2c/0xd0

Prior to 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into
host-only and core structures"), every driver had a struct pcie_host_ops
with function pointers, typically used as:

  if (pp-&gt;ops-&gt;readl_rc)
    return pp-&gt;ops-&gt;readl_rc(...);

442ec4c04d12 split struct pcie_host_ops into two pieces: struct
dw_pcie_host_ops and struct dw_pcie_ops, so the above became:

  if (pci-&gt;ops-&gt;readl_dbi)
    return pci-&gt;ops-&gt;readl_dbi(...);

But pcie-artpec6.c and pcie-designware-plat.c don't need the dw_pcie_ops
pointers and didn't supply a pci-&gt;ops struct, which leads to NULL pointer
dereferences.

Supply an empty struct dw_pcie_ops to avoid the NULL pointer dereferences.

[bhelgaas: changelog]
Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures")
Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Acked-by: Joao Pinto &lt;jpinto@synopsys.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a crash from dereferencing a NULL dw_pcie_ops pointer.  For example,
on ARTPEC-6:

  Unable to handle kernel NULL pointer dereference at virtual address 00000004
  pgd = c0204000
  [00000004] *pgd=00000000
  Internal error: Oops: 5 [#1] SMP ARM
  Modules linked in:
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc3-next-20170321 #1
  Hardware name: Axis ARTPEC-6 Platform
  task: db098000 task.stack: db096000
  PC is at dw_pcie_writel_dbi+0x2c/0xd0

Prior to 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into
host-only and core structures"), every driver had a struct pcie_host_ops
with function pointers, typically used as:

  if (pp-&gt;ops-&gt;readl_rc)
    return pp-&gt;ops-&gt;readl_rc(...);

442ec4c04d12 split struct pcie_host_ops into two pieces: struct
dw_pcie_host_ops and struct dw_pcie_ops, so the above became:

  if (pci-&gt;ops-&gt;readl_dbi)
    return pci-&gt;ops-&gt;readl_dbi(...);

But pcie-artpec6.c and pcie-designware-plat.c don't need the dw_pcie_ops
pointers and didn't supply a pci-&gt;ops struct, which leads to NULL pointer
dereferences.

Supply an empty struct dw_pcie_ops to avoid the NULL pointer dereferences.

[bhelgaas: changelog]
Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures")
Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Acked-by: Joao Pinto &lt;jpinto@synopsys.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: dwc: Select PCI_HOST_COMMON for hisi</title>
<updated>2017-04-03T21:17:11+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-04-03T21:17:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6665f8a307696a0edd4c1233b4cc0f5ed6083525'/>
<id>6665f8a307696a0edd4c1233b4cc0f5ed6083525</id>
<content type='text'>
Without PCI_HOST_COMMON support enabled, we get a link error:

  drivers/pci/dwc/built-in.o: In function `hisi_pcie_map_bus':
  pcie-hisi.c:(.text+0x8860): undefined reference to `pci_ecam_map_bus'
  drivers/pci/dwc/built-in.o: In function `hisi_pcie_almost_ecam_probe':
  pcie-hisi.c:(.text+0x88b4): undefined reference to `pci_host_common_probe'

Add an explicit 'select', as the other users have.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Jingoo Han &lt;jingoohan1@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without PCI_HOST_COMMON support enabled, we get a link error:

  drivers/pci/dwc/built-in.o: In function `hisi_pcie_map_bus':
  pcie-hisi.c:(.text+0x8860): undefined reference to `pci_ecam_map_bus'
  drivers/pci/dwc/built-in.o: In function `hisi_pcie_almost_ecam_probe':
  pcie-hisi.c:(.text+0x88b4): undefined reference to `pci_host_common_probe'

Add an explicit 'select', as the other users have.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Jingoo Han &lt;jingoohan1@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: thunder-pem: Fix legacy firmware PEM-specific resources</title>
<updated>2017-04-03T20:10:21+00:00</updated>
<author>
<name>Tomasz Nowicki</name>
<email>tn@semihalf.com</email>
</author>
<published>2017-03-31T15:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=feb199ebef488a9f2c3550fb10524f3dac9d8abe'/>
<id>feb199ebef488a9f2c3550fb10524f3dac9d8abe</id>
<content type='text'>
SZ_16M PEM resource size includes PEM-specific register and its children
resources. Reservation of the whole SZ_16M range leads to child device
driver failure when pcieport driver is requesting resources:

  pcieport 0004:1f:00.0: can't enable device: BAR 0 [mem 0x87e0c0f00000-0x87e0c0ffffff 64bit] not claimed

So we cannot reserve full 16M here and instead we want to reserve
PEM-specific register only which is SZ_64K.

At the end increase PEM resource to SZ_16M since this is what
thunder_pem_init() call expects for proper initialization.

Fixes: 9abb27c7594a ("PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller")
Signed-off-by: Tomasz Nowicki &lt;tn@semihalf.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v4.10+</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SZ_16M PEM resource size includes PEM-specific register and its children
resources. Reservation of the whole SZ_16M range leads to child device
driver failure when pcieport driver is requesting resources:

  pcieport 0004:1f:00.0: can't enable device: BAR 0 [mem 0x87e0c0f00000-0x87e0c0ffffff 64bit] not claimed

So we cannot reserve full 16M here and instead we want to reserve
PEM-specific register only which is SZ_64K.

At the end increase PEM resource to SZ_16M since this is what
thunder_pem_init() call expects for proper initialization.

Fixes: 9abb27c7594a ("PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller")
Signed-off-by: Tomasz Nowicki &lt;tn@semihalf.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v4.10+</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller</title>
<updated>2017-03-23T22:11:26+00:00</updated>
<author>
<name>Tomasz Nowicki</name>
<email>tn@semihalf.com</email>
</author>
<published>2017-03-23T22:10:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9abb27c7594a62bbf6385e20b7f5a90b4eceae2f'/>
<id>9abb27c7594a62bbf6385e20b7f5a90b4eceae2f</id>
<content type='text'>
During early days of PCI quirks support, ThunderX firmware did not provide
PNP0c02 node with PCI configuration space and PEM-specific register ranges.
This means that for legacy FW we are not reserving these resources and
cannot gather PEM-specific resources for further PEM initialization.

To support already deployed legacy FW, calculate PEM-specific ranges and
provide resources reservation as fallback scenario into PEM driver when we
could not gather PEM reg base from ACPI tables.

Tested-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Tomasz Nowicki &lt;tn@semihalf.com&gt;
Signed-off-by: Vadim Lomovtsev &lt;Vadim.Lomovtsev@caviumnetworks.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Robert Richter &lt;rrichter@cavium.com&gt;
CC: stable@vger.kernel.org	# v4.10+</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During early days of PCI quirks support, ThunderX firmware did not provide
PNP0c02 node with PCI configuration space and PEM-specific register ranges.
This means that for legacy FW we are not reserving these resources and
cannot gather PEM-specific resources for further PEM initialization.

To support already deployed legacy FW, calculate PEM-specific ranges and
provide resources reservation as fallback scenario into PEM driver when we
could not gather PEM reg base from ACPI tables.

Tested-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Tomasz Nowicki &lt;tn@semihalf.com&gt;
Signed-off-by: Vadim Lomovtsev &lt;Vadim.Lomovtsev@caviumnetworks.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Robert Richter &lt;rrichter@cavium.com&gt;
CC: stable@vger.kernel.org	# v4.10+</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: thunder-pem: Use Cavium assigned hardware ID for ThunderX host controller</title>
<updated>2017-03-23T22:10:10+00:00</updated>
<author>
<name>Tomasz Nowicki</name>
<email>tn@semihalf.com</email>
</author>
<published>2017-03-23T22:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=81caa91b72fd6a0b8dfc5eb10942c34f7efd2bc5'/>
<id>81caa91b72fd6a0b8dfc5eb10942c34f7efd2bc5</id>
<content type='text'>
"CAV" is the only PNP/ACPI hardware ID vendor prefix assigned to Cavium so
fix this as it should be from day one.

Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
Tested-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Tomasz Nowicki &lt;tn@semihalf.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Robert Richter &lt;rrichter@cavium.com&gt;
CC: stable@vger.kernel.org	# v4.10+</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"CAV" is the only PNP/ACPI hardware ID vendor prefix assigned to Cavium so
fix this as it should be from day one.

Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller")
Tested-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Tomasz Nowicki &lt;tn@semihalf.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Robert Richter &lt;rrichter@cavium.com&gt;
CC: stable@vger.kernel.org	# v4.10+</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: iproc: Save host bridge window resource in struct iproc_pcie</title>
<updated>2017-03-09T17:27:07+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2017-03-09T17:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6e347b5e05ea2ac4ac467a5a1cfaebb2c7f06f80'/>
<id>6e347b5e05ea2ac4ac467a5a1cfaebb2c7f06f80</id>
<content type='text'>
The host bridge memory window resource is inserted into the iomem_resource
tree and cannot be deallocated until the host bridge itself is removed.

Previously, the window was on the stack, which meant the iomem_resource
entry pointed into the stack and was corrupted as soon as the probe
function returned, which caused memory corruption and errors like this:

  pcie_iproc_bcma bcma0:8: resource collision: [mem 0x40000000-0x47ffffff] conflicts with PCIe MEM space [mem 0x40000000-0x47ffffff]

Move the memory window resource from the stack into struct iproc_pcie so
its lifetime matches that of the host bridge.

Fixes: c3245a566400 ("PCI: iproc: Request host bridge window resources")
Reported-and-tested-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v4.8+</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The host bridge memory window resource is inserted into the iomem_resource
tree and cannot be deallocated until the host bridge itself is removed.

Previously, the window was on the stack, which meant the iomem_resource
entry pointed into the stack and was corrupted as soon as the probe
function returned, which caused memory corruption and errors like this:

  pcie_iproc_bcma bcma0:8: resource collision: [mem 0x40000000-0x47ffffff] conflicts with PCIe MEM space [mem 0x40000000-0x47ffffff]

Move the memory window resource from the stack into struct iproc_pcie so
its lifetime matches that of the host bridge.

Fixes: c3245a566400 ("PCI: iproc: Request host bridge window resources")
Reported-and-tested-by: Rafał Miłecki &lt;zajec5@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v4.8+</pre>
</div>
</content>
</entry>
<entry>
<title>PCI/ASPM: Always set link-&gt;downstream to avoid NULL dereference on remove</title>
<updated>2017-03-07T20:23:30+00:00</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2017-03-01T08:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3bd7db63a841e8c5297bb18ad801df67d5e38ad2'/>
<id>3bd7db63a841e8c5297bb18ad801df67d5e38ad2</id>
<content type='text'>
We call pcie_aspm_exit_link_state() when we remove a device.  If the device
is the last PCIe function to be removed below a bridge and the bridge has
an ASPM link_state struct, we disable ASPM on the link.  Disabling ASPM
requires link-&gt;downstream (used in pcie_config_aspm_link()).

We previously set link-&gt;downstream in pcie_aspm_cap_init(), but only if the
device was not blacklisted.  Removing the blacklisted device caused a NULL
pointer dereference in the pcie_aspm_exit_link_state() -&gt;
pcie_config_aspm_link() path:

  # echo 1 &gt; /sys/bus/pci/devices/0000\:0b\:00.0/remove
  ...
   BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
   IP: pcie_config_aspm_link+0x5d/0x2b0
   Call Trace:
    pcie_aspm_exit_link_state+0x75/0x130
    pci_stop_bus_device+0xa4/0xb0
    pci_stop_and_remove_bus_device_locked+0x1a/0x30
    remove_store+0x50/0x70
    dev_attr_store+0x18/0x30
    sysfs_kf_write+0x44/0x60
    kernfs_fop_write+0x10e/0x190
    __vfs_write+0x28/0x110
    ? rcu_read_lock_sched_held+0x5d/0x80
    ? rcu_sync_lockdep_assert+0x2c/0x60
    ? __sb_start_write+0x173/0x1a0
    ? vfs_write+0xb3/0x180
    vfs_write+0xc4/0x180
    SyS_write+0x49/0xa0
    do_syscall_64+0xa6/0x1c0
    entry_SYSCALL64_slow_path+0x25/0x25
   ---[ end trace bd187ee0267df5d9 ]---

To avoid this, set link-&gt;downstream in alloc_pcie_link_state(), so every
pcie_link_state structure has a valid link-&gt;downstream pointer.

[bhelgaas: changelog]
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Rajat Jain &lt;rajatja@google.com&gt;
CC: stable@vger.kernel.org</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We call pcie_aspm_exit_link_state() when we remove a device.  If the device
is the last PCIe function to be removed below a bridge and the bridge has
an ASPM link_state struct, we disable ASPM on the link.  Disabling ASPM
requires link-&gt;downstream (used in pcie_config_aspm_link()).

We previously set link-&gt;downstream in pcie_aspm_cap_init(), but only if the
device was not blacklisted.  Removing the blacklisted device caused a NULL
pointer dereference in the pcie_aspm_exit_link_state() -&gt;
pcie_config_aspm_link() path:

  # echo 1 &gt; /sys/bus/pci/devices/0000\:0b\:00.0/remove
  ...
   BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
   IP: pcie_config_aspm_link+0x5d/0x2b0
   Call Trace:
    pcie_aspm_exit_link_state+0x75/0x130
    pci_stop_bus_device+0xa4/0xb0
    pci_stop_and_remove_bus_device_locked+0x1a/0x30
    remove_store+0x50/0x70
    dev_attr_store+0x18/0x30
    sysfs_kf_write+0x44/0x60
    kernfs_fop_write+0x10e/0x190
    __vfs_write+0x28/0x110
    ? rcu_read_lock_sched_held+0x5d/0x80
    ? rcu_sync_lockdep_assert+0x2c/0x60
    ? __sb_start_write+0x173/0x1a0
    ? vfs_write+0xb3/0x180
    vfs_write+0xc4/0x180
    SyS_write+0x49/0xa0
    do_syscall_64+0xa6/0x1c0
    entry_SYSCALL64_slow_path+0x25/0x25
   ---[ end trace bd187ee0267df5d9 ]---

To avoid this, set link-&gt;downstream in alloc_pcie_link_state(), so every
pcie_link_state structure has a valid link-&gt;downstream pointer.

[bhelgaas: changelog]
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Rajat Jain &lt;rajatja@google.com&gt;
CC: stable@vger.kernel.org</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: Prevent VPD access for QLogic ISP2722</title>
<updated>2017-03-07T20:16:57+00:00</updated>
<author>
<name>Ethan Zhao</name>
<email>ethan.zhao@oracle.com</email>
</author>
<published>2017-02-27T08:08:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0d5370d1d85251e5893ab7c90a429464de2e140b'/>
<id>0d5370d1d85251e5893ab7c90a429464de2e140b</id>
<content type='text'>
QLogic ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter has the VPD
access issue too, while read the common pci-sysfs access interface shown as

 /sys/devices/pci0000:00/0000:00:03.2/0000:0b:00.0/vpd

with simple 'cat' could cause system hang and panic:

  Kernel panic - not syncing: An NMI occurred. Depending on your system the reason for the NMI is logged in any one of the following resources:
  1. Integrated Management Log (IML)
  2. OA Syslog
  3. OA Forward Progress Log
  4. iLO Event Log
  CPU: 0 PID: 15070 Comm: udevadm Not tainted 4.1.12
  Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 12/27/2015
   0000000000000086 000000007f0cdf51 ffff880c4fa05d58 ffffffff817193de
   ffffffffa00b42d8 0000000000000075 ffff880c4fa05dd8 ffffffff81714072
   0000000000000008 ffff880c4fa05de8 ffff880c4fa05d88 000000007f0cdf51
  Call Trace:
   &lt;NMI&gt;  [&lt;ffffffff817193de&gt;] dump_stack+0x63/0x81
   [&lt;ffffffff81714072&gt;] panic+0xd0/0x20e
   [&lt;ffffffffa00b390d&gt;] hpwdt_pretimeout+0xdd/0xe0 [hpwdt]
   [&lt;ffffffff81021fc9&gt;] ? sched_clock+0x9/0x10
   [&lt;ffffffff8101c101&gt;] nmi_handle+0x91/0x170
   [&lt;ffffffff8101c10c&gt;] ? nmi_handle+0x9c/0x170
   [&lt;ffffffff8101c5fe&gt;] io_check_error+0x1e/0xa0
   [&lt;ffffffff8101c719&gt;] default_do_nmi+0x99/0x140
   [&lt;ffffffff8101c8b4&gt;] do_nmi+0xf4/0x170
   [&lt;ffffffff817232c5&gt;] end_repeat_nmi+0x1a/0x1e
   [&lt;ffffffff815d724b&gt;] ? pci_conf1_read+0xeb/0x120
   [&lt;ffffffff815d724b&gt;] ? pci_conf1_read+0xeb/0x120
   [&lt;ffffffff815d724b&gt;] ? pci_conf1_read+0xeb/0x120
   &lt;&lt;EOE&gt;&gt;  [&lt;ffffffff815db4b3&gt;] raw_pci_read+0x23/0x40
   [&lt;ffffffff815db4fc&gt;] pci_read+0x2c/0x30
   [&lt;ffffffff8136f612&gt;] pci_user_read_config_word+0x72/0x110
   [&lt;ffffffff8136f746&gt;] pci_vpd_pci22_wait+0x96/0x130
   [&lt;ffffffff8136ff9b&gt;] pci_vpd_pci22_read+0xdb/0x1a0
   [&lt;ffffffff8136ea30&gt;] pci_read_vpd+0x20/0x30
   [&lt;ffffffff8137d590&gt;] read_vpd_attr+0x30/0x40
   [&lt;ffffffff8128e037&gt;] sysfs_kf_bin_read+0x47/0x70
   [&lt;ffffffff8128d24e&gt;] kernfs_fop_read+0xae/0x180
   [&lt;ffffffff8120dd97&gt;] __vfs_read+0x37/0x100
   [&lt;ffffffff812ba7e4&gt;] ? security_file_permission+0x84/0xa0
   [&lt;ffffffff8120e366&gt;] ? rw_verify_area+0x56/0xe0
   [&lt;ffffffff8120e476&gt;] vfs_read+0x86/0x140
   [&lt;ffffffff8120f3f5&gt;] SyS_read+0x55/0xd0
   [&lt;ffffffff81720f2e&gt;] system_call_fastpath+0x12/0x71
  Shutting down cpus with NMI
  Kernel Offset: disabled
  drm_kms_helper: panic occurred, switching back to text console

So blacklist the access to its VPD.

Signed-off-by: Ethan Zhao &lt;ethan.zhao@oracle.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v4.6+</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QLogic ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter has the VPD
access issue too, while read the common pci-sysfs access interface shown as

 /sys/devices/pci0000:00/0000:00:03.2/0000:0b:00.0/vpd

with simple 'cat' could cause system hang and panic:

  Kernel panic - not syncing: An NMI occurred. Depending on your system the reason for the NMI is logged in any one of the following resources:
  1. Integrated Management Log (IML)
  2. OA Syslog
  3. OA Forward Progress Log
  4. iLO Event Log
  CPU: 0 PID: 15070 Comm: udevadm Not tainted 4.1.12
  Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 12/27/2015
   0000000000000086 000000007f0cdf51 ffff880c4fa05d58 ffffffff817193de
   ffffffffa00b42d8 0000000000000075 ffff880c4fa05dd8 ffffffff81714072
   0000000000000008 ffff880c4fa05de8 ffff880c4fa05d88 000000007f0cdf51
  Call Trace:
   &lt;NMI&gt;  [&lt;ffffffff817193de&gt;] dump_stack+0x63/0x81
   [&lt;ffffffff81714072&gt;] panic+0xd0/0x20e
   [&lt;ffffffffa00b390d&gt;] hpwdt_pretimeout+0xdd/0xe0 [hpwdt]
   [&lt;ffffffff81021fc9&gt;] ? sched_clock+0x9/0x10
   [&lt;ffffffff8101c101&gt;] nmi_handle+0x91/0x170
   [&lt;ffffffff8101c10c&gt;] ? nmi_handle+0x9c/0x170
   [&lt;ffffffff8101c5fe&gt;] io_check_error+0x1e/0xa0
   [&lt;ffffffff8101c719&gt;] default_do_nmi+0x99/0x140
   [&lt;ffffffff8101c8b4&gt;] do_nmi+0xf4/0x170
   [&lt;ffffffff817232c5&gt;] end_repeat_nmi+0x1a/0x1e
   [&lt;ffffffff815d724b&gt;] ? pci_conf1_read+0xeb/0x120
   [&lt;ffffffff815d724b&gt;] ? pci_conf1_read+0xeb/0x120
   [&lt;ffffffff815d724b&gt;] ? pci_conf1_read+0xeb/0x120
   &lt;&lt;EOE&gt;&gt;  [&lt;ffffffff815db4b3&gt;] raw_pci_read+0x23/0x40
   [&lt;ffffffff815db4fc&gt;] pci_read+0x2c/0x30
   [&lt;ffffffff8136f612&gt;] pci_user_read_config_word+0x72/0x110
   [&lt;ffffffff8136f746&gt;] pci_vpd_pci22_wait+0x96/0x130
   [&lt;ffffffff8136ff9b&gt;] pci_vpd_pci22_read+0xdb/0x1a0
   [&lt;ffffffff8136ea30&gt;] pci_read_vpd+0x20/0x30
   [&lt;ffffffff8137d590&gt;] read_vpd_attr+0x30/0x40
   [&lt;ffffffff8128e037&gt;] sysfs_kf_bin_read+0x47/0x70
   [&lt;ffffffff8128d24e&gt;] kernfs_fop_read+0xae/0x180
   [&lt;ffffffff8120dd97&gt;] __vfs_read+0x37/0x100
   [&lt;ffffffff812ba7e4&gt;] ? security_file_permission+0x84/0xa0
   [&lt;ffffffff8120e366&gt;] ? rw_verify_area+0x56/0xe0
   [&lt;ffffffff8120e476&gt;] vfs_read+0x86/0x140
   [&lt;ffffffff8120f3f5&gt;] SyS_read+0x55/0xd0
   [&lt;ffffffff81720f2e&gt;] system_call_fastpath+0x12/0x71
  Shutting down cpus with NMI
  Kernel Offset: disabled
  drm_kms_helper: panic occurred, switching back to text console

So blacklist the access to its VPD.

Signed-off-by: Ethan Zhao &lt;ethan.zhao@oracle.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v4.6+</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: exynos: Initialize elbi_base even when using PHY framework</title>
<updated>2017-03-07T18:46:38+00:00</updated>
<author>
<name>Jaehoon Chung</name>
<email>jh80.chung@samsung.com</email>
</author>
<published>2017-03-07T10:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=544714d8e17c33822319d5a1a00e5ddc4db502b6'/>
<id>544714d8e17c33822319d5a1a00e5ddc4db502b6</id>
<content type='text'>
Even when using the PHY framework, we need the elbi_base.  Before this
patch, we didn't initialize elbi_base, which caused NULL pointer
dereferences later.

Fixes: e7cd7ef58e1f ("PCI: exynos: Support the PHY generic framework")
Signed-off-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even when using the PHY framework, we need the elbi_base.  Before this
patch, we didn't initialize elbi_base, which caused NULL pointer
dereferences later.

Fixes: e7cd7ef58e1f ("PCI: exynos: Support the PHY generic framework")
Signed-off-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</pre>
</div>
</content>
</entry>
</feed>
