<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/pci/hotplug/shpchp_ctrl.c, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-09-24T13:50:53Z</updated>
<entry>
<title>PCI: Remove assignment from "if" conditions</title>
<updated>2014-09-24T13:50:53Z</updated>
<author>
<name>Quentin Lambert</name>
<email>lambert.quentin@gmail.com</email>
</author>
<published>2014-09-07T18:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=79e50e72986c9fcb06d707ce587cfd24fefa33e3'/>
<id>urn:sha1:79e50e72986c9fcb06d707ce587cfd24fefa33e3</id>
<content type='text'>
The following Coccinelle semantic patch was used to find and correct cases
of assignments in "if" conditions:

@@
expression var, expr;
statement S;
@@

+ var = expr;
  if(
- (var = expr)
+ var
  ) S

Signed-off-by: Quentin Lambert &lt;lambert.quentin@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Add space before open parenthesis</title>
<updated>2014-09-24T13:43:03Z</updated>
<author>
<name>Quentin Lambert</name>
<email>lambert.quentin@gmail.com</email>
</author>
<published>2014-09-07T18:02:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=382a9c9adc1cd540f5b714b65db315fc1c0b553d'/>
<id>urn:sha1:382a9c9adc1cd540f5b714b65db315fc1c0b553d</id>
<content type='text'>
Add space before open parenthesis as is conventional.

No functional change.

[bhelgaas: fix a few more in ibmphp, shpchp]
Signed-off-by: Quentin Lambert &lt;lambert.quentin@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>Merge tag 'pci-v3.16-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci</title>
<updated>2014-06-12T20:20:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-12T20:20:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7550cfab3d4053b54f16e2fe337affde71d1eb51'/>
<id>urn:sha1:7550cfab3d4053b54f16e2fe337affde71d1eb51</id>
<content type='text'>
Pull more PCI updates from Bjorn Helgaas:
 "Here are some more things I'd like to see in v3.16-rc1:

   - DMA alias iterator, part of some work to fix IOMMU issues
   - MVEBU, Tegra, DesignWare changes that I forgot to include before
   - Some whitespace code cleanup

  Details:

  IOMMU
    - Add DMA alias iterator (Alex Williamson)
    - Add DMA alias quirks for ASMedia, ITE, Tundra bridges (Alex Williamson)
    - Add DMA alias quirks for Marvell, Ricoh devices (Alex Williamson)
    - Add DMA alias quirk for HighPoint devices (Jérôme Carretero)

  MSI
    - Fix leak in free_msi_irqs() (Alexei Starovoitov)

  Marvell MVEBU
    - Remove unnecessary use of 'conf_lock' spinlock (Andrew Murray)
    - Avoid setting an undefined window size (Jason Gunthorpe)
    - Allow several windows with the same target/attribute (Thomas Petazzoni)
    - Split PCIe BARs into multiple MBus windows when needed (Thomas Petazzoni)
    - Fix off-by-one in the computed size of the mbus windows (Willy Tarreau)

  NVIDIA Tegra
    - Use new OF interrupt mapping when possible (Lucas Stach)

  Synopsys DesignWare
    - Remove unnecessary use of 'conf_lock' spinlock (Andrew Murray)
    - Use new OF interrupt mapping when possible (Lucas Stach)
    - Split Exynos and i.MX bindings (Lucas Stach)
    - Fix comment for setting number of lanes (Mohit Kumar)
    - Fix iATU programming for cfg1, io and mem viewport (Mohit Kumar)

  Miscellaneous
    - EXPORT_SYMBOL cleanup (Ryan Desfosses)
    - Whitespace cleanup (Ryan Desfosses)
    - Merge multi-line quoted strings (Ryan Desfosses)"

* tag 'pci-v3.16-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (21 commits)
  PCI: Add function 1 DMA alias quirk for HighPoint RocketRaid 642L
  PCI/MSI: Fix memory leak in free_msi_irqs()
  PCI: Merge multi-line quoted strings
  PCI: Whitespace cleanup
  PCI: Move EXPORT_SYMBOL so it immediately follows function/variable
  PCI: Add bridge DMA alias quirk for ITE bridge
  PCI: designware: Split Exynos and i.MX bindings
  PCI: Add bridge DMA alias quirk for ASMedia and Tundra bridges
  PCI: Add support for PCIe-to-PCI bridge DMA alias quirks
  PCI: Add function 1 DMA alias quirk for Marvell devices
  PCI: Add function 0 DMA alias quirk for Ricoh devices
  PCI: Add support for DMA alias quirks
  PCI: Convert pci_dev_flags definitions to bit shifts
  PCI: Add DMA alias iterator
  PCI: mvebu: Use '%pa' for printing 'phys_addr_t' type
  PCI: mvebu: Remove unnecessary use of 'conf_lock' spinlock
  PCI: designware: Remove unnecessary use of 'conf_lock' spinlock
  PCI: designware: Use new OF interrupt mapping when possible
  PCI: designware: Fix iATU programming for cfg1, io and mem viewport
  PCI: designware: Fix comment for setting number of lanes
  ...
</content>
</entry>
<entry>
<title>PCI: Merge multi-line quoted strings</title>
<updated>2014-06-11T02:20:42Z</updated>
<author>
<name>Ryan Desfosses</name>
<email>ryan@desfo.org</email>
</author>
<published>2014-04-19T00:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=227f06470502c4fea3d93df1f12a77e3e37f6263'/>
<id>urn:sha1:227f06470502c4fea3d93df1f12a77e3e37f6263</id>
<content type='text'>
Merge quoted strings that are broken across lines into a single entity.
The compiler merges them anyway, but checkpatch complains about it, and
merging them makes it easier to grep for strings.

No functional change.

[bhelgaas: changelog, do the same for everything under drivers/pci]
Signed-off-by: Ryan Desfosses &lt;ryan@desfo.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Whitespace cleanup</title>
<updated>2014-06-11T02:20:19Z</updated>
<author>
<name>Ryan Desfosses</name>
<email>ryan@desfo.org</email>
</author>
<published>2014-04-19T00:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c78bc61f5ef3bc87e7f94f67ec737d2273f120b'/>
<id>urn:sha1:3c78bc61f5ef3bc87e7f94f67ec737d2273f120b</id>
<content type='text'>
Fix various whitespace errors.

No functional change.

[bhelgaas: fix other similar problems]
Signed-off-by: Ryan Desfosses &lt;ryan@desfo.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: shpchp: Check bridge's secondary (not primary) bus speed</title>
<updated>2014-05-15T18:42:49Z</updated>
<author>
<name>Marcel Apfelbaum</name>
<email>marcel.a@redhat.com</email>
</author>
<published>2014-05-15T18:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93fa9d32670f5592c8e56abc9928fc194e1e72fc'/>
<id>urn:sha1:93fa9d32670f5592c8e56abc9928fc194e1e72fc</id>
<content type='text'>
When a new device is added below a hotplug bridge, the bridge's secondary
bus speed and the device's bus speed must match.  The shpchp driver
previously checked the bridge's *primary* bus speed, not the secondary bus
speed.

This caused hot-add errors like:

  shpchp 0000:00:03.0: Speed of bus ff and adapter 0 mismatch

Check the secondary bus speed instead.

[bhelgaas: changelog]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=75251
Fixes: 3749c51ac6c1 ("PCI: Make current and maximum bus speeds part of the PCI core")
Signed-off-by: Marcel Apfelbaum &lt;marcel.a@redhat.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
CC: stable@vger.kernel.org	# v2.6.34+
</content>
</entry>
<entry>
<title>PCI: shpchp: Use per-slot workqueues to avoid deadlock</title>
<updated>2013-01-14T17:23:22Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2013-01-11T19:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f652e7d2916fe2fcf9e7d709aa5b7476b431e2dd'/>
<id>urn:sha1:f652e7d2916fe2fcf9e7d709aa5b7476b431e2dd</id>
<content type='text'>
When we have an SHPC-capable bridge with a second SHPC-capable bridge
below it, pushing the upstream bridge's attention button causes a
deadlock.

The deadlock happens because we use the shpchp_wq workqueue to run
shpchp_pushbutton_thread(), which uses shpchp_disable_slot() to remove
devices below the upstream bridge.  When we remove the downstream bridge,
we call shpc_remove(), the shpchp driver's .remove() method.  That calls
flush_workqueue(shpchp_wq), which deadlocks because the
shpchp_pushbutton_thread() work item is still running.

This patch avoids the deadlock by creating a workqueue for every slot
and removing the single shared workqueue.

Here's the call path that leads to the deadlock:

  shpchp_queue_pushbutton_work
    queue_work(shpchp_wq)		# shpchp_pushbutton_thread
    ...

  shpchp_pushbutton_thread
    shpchp_disable_slot
      remove_board
        shpchp_unconfigure_device
          pci_stop_and_remove_bus_device
            ...
              shpc_remove		# shpchp driver .remove method
                hpc_release_ctlr
                  cleanup_slots
                    flush_workqueue(shpchp_wq)

This change is based on code inspection, since we don't have hardware
with this topology.

Based-on-patch-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org</content>
</entry>
<entry>
<title>PCI: shpchp: Handle push button event asynchronously</title>
<updated>2013-01-14T17:23:07Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2013-01-11T19:07:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d347e75847c1fb299c97736638f45e6ea39702d4'/>
<id>urn:sha1:d347e75847c1fb299c97736638f45e6ea39702d4</id>
<content type='text'>
Use non-ordered workqueue for attention button events.

Attention button events on each slot can be handled asynchronously. So
we should use non-ordered workqueue. This patch also removes ordered
workqueue in shpchp as a result.

486b10b9f4 ("PCI: pciehp: Handle push button event asynchronously") made
the same change to pciehp.  I split this out from a patch by Yijing Wang
&lt;wangyijing@huawei.com&gt; so we fix one thing at a time and to make the
shpchp history correspond more closely with the pciehp history.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;</content>
</entry>
<entry>
<title>PCI: shpchp: remove dead code</title>
<updated>2012-06-20T23:28:53Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2012-06-20T22:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67454b6602c3519d15193630e6765a5f02f39160'/>
<id>urn:sha1:67454b6602c3519d15193630e6765a5f02f39160</id>
<content type='text'>
"slots_not_empty" is initialized to zero and can't be set again before
reaching this point, so this return statement is dead.  Remove it.

Found by Coverity (CID 114324).

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>shpchp: update workqueue usage</title>
<updated>2010-10-18T06:33:02Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-10-18T06:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e24dcbef93dbbf529fbedfc6ce8ab22d2cef35f0'/>
<id>urn:sha1:e24dcbef93dbbf529fbedfc6ce8ab22d2cef35f0</id>
<content type='text'>
* Rename shpchp_wq to shpchp_ordered_wq and add non-ordered shpchp_wq
  which is used instead of the system workqueue.  This is to remove
  the use of flush_scheduled_work() which is deprecated and scheduled
  for removal.

* With cmwq in place, there's no point in creating workqueues lazily.
  Create both shpchp_wq and shpchp_ordered_wq upfront.

* Include workqueue.h from shpchp.h.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
</feed>
