<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/pci, branch v2.6.30</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>PCI: use fixed-up device class when configuring device</title>
<updated>2009-06-04T10:29:43+00:00</updated>
<author>
<name>Yu Zhao</name>
<email>yu.zhao@intel.com</email>
</author>
<published>2009-05-27T16:25:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f79b1b146b52765ee38bfb91bb14eb850fa98017'/>
<id>f79b1b146b52765ee38bfb91bb14eb850fa98017</id>
<content type='text'>
The device class may be changed after the fixup, so re-read the class
value from pci_dev when configuring the device.  Otherwise some devices
such as JMicron SATA controller won't work.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: Grant Grundler &lt;grundler@parisc-linux.org&gt;
Tested-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;
Signed-off-by: Yu Zhao &lt;yu.zhao@intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The device class may be changed after the fixup, so re-read the class
value from pci_dev when configuring the device.  Otherwise some devices
such as JMicron SATA controller won't work.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: Grant Grundler &lt;grundler@parisc-linux.org&gt;
Tested-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;
Signed-off-by: Yu Zhao &lt;yu.zhao@intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI Hotplug: acpiphp: don't store a pci_dev in acpiphp_func</title>
<updated>2009-05-27T09:04:24+00:00</updated>
<author>
<name>Alex Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-05-21T22:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9d911d7903926a65ef49ec671bacd86bcee5eb51'/>
<id>9d911d7903926a65ef49ec671bacd86bcee5eb51</id>
<content type='text'>
An oops can occur if a user attempts to use both PCI logical
hotplug and the ACPI physical hotplug driver (acpiphp) in this
sequence, where $slot/address == $device.

In other words, if acpiphp has claimed a PCI device, and that
device is logically removed, then acpiphp may oops when it
attempts to access it again.

	# echo 1 &gt; /sys/bus/pci/devices/$device/remove
	# echo 0 &gt; /sys/bus/pci/slots/$slot/power

Unable to handle kernel NULL pointer dereference (address 0000000000000000)
Call Trace:
 [&lt;a000000100016390&gt;] show_stack+0x50/0xa0
 [&lt;a000000100016c60&gt;] show_regs+0x820/0x860
 [&lt;a00000010003b390&gt;] die+0x190/0x2a0
 [&lt;a000000100066a40&gt;] ia64_do_page_fault+0x8e0/0xa40
 [&lt;a00000010000c7a0&gt;] ia64_native_leave_kernel+0x0/0x270
 [&lt;a0000001003b2660&gt;] pci_remove_bus_device+0x120/0x260
 [&lt;a0000002060549f0&gt;] acpiphp_disable_slot+0x410/0x540 [acpiphp]
 [&lt;a0000002060505c0&gt;] disable_slot+0xc0/0x120 [acpiphp]
 [&lt;a0000002040d21c0&gt;] power_write_file+0x1e0/0x2a0 [pci_hotplug]
 [&lt;a0000001003bb820&gt;] pci_slot_attr_store+0x60/0xa0
 [&lt;a000000100240f70&gt;] sysfs_write_file+0x230/0x2c0
 [&lt;a000000100195750&gt;] vfs_write+0x190/0x2e0
 [&lt;a0000001001961a0&gt;] sys_write+0x80/0x100
 [&lt;a00000010000c600&gt;] ia64_ret_from_syscall+0x0/0x20
 [&lt;a000000000010720&gt;] __kernel_syscall_via_break+0x0/0x20

The root cause of this oops is that the logical remove ("echo 1 &gt;
/sys/bus/pci/devices/$device/remove") destroyed the pci_dev. The
pci_dev struct itself wasn't deallocated because acpiphp kept a
reference, but some of its fields became invalid.

acpiphp doesn't have any real reason to keep a pointer to a
pci_dev around. It can always derive it using pci_get_slot().

If a logical remove destroys the pci_dev, acpiphp won't find it
and is thus prevented from causing mischief.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Tested-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Reported-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An oops can occur if a user attempts to use both PCI logical
hotplug and the ACPI physical hotplug driver (acpiphp) in this
sequence, where $slot/address == $device.

In other words, if acpiphp has claimed a PCI device, and that
device is logically removed, then acpiphp may oops when it
attempts to access it again.

	# echo 1 &gt; /sys/bus/pci/devices/$device/remove
	# echo 0 &gt; /sys/bus/pci/slots/$slot/power

Unable to handle kernel NULL pointer dereference (address 0000000000000000)
Call Trace:
 [&lt;a000000100016390&gt;] show_stack+0x50/0xa0
 [&lt;a000000100016c60&gt;] show_regs+0x820/0x860
 [&lt;a00000010003b390&gt;] die+0x190/0x2a0
 [&lt;a000000100066a40&gt;] ia64_do_page_fault+0x8e0/0xa40
 [&lt;a00000010000c7a0&gt;] ia64_native_leave_kernel+0x0/0x270
 [&lt;a0000001003b2660&gt;] pci_remove_bus_device+0x120/0x260
 [&lt;a0000002060549f0&gt;] acpiphp_disable_slot+0x410/0x540 [acpiphp]
 [&lt;a0000002060505c0&gt;] disable_slot+0xc0/0x120 [acpiphp]
 [&lt;a0000002040d21c0&gt;] power_write_file+0x1e0/0x2a0 [pci_hotplug]
 [&lt;a0000001003bb820&gt;] pci_slot_attr_store+0x60/0xa0
 [&lt;a000000100240f70&gt;] sysfs_write_file+0x230/0x2c0
 [&lt;a000000100195750&gt;] vfs_write+0x190/0x2e0
 [&lt;a0000001001961a0&gt;] sys_write+0x80/0x100
 [&lt;a00000010000c600&gt;] ia64_ret_from_syscall+0x0/0x20
 [&lt;a000000000010720&gt;] __kernel_syscall_via_break+0x0/0x20

The root cause of this oops is that the logical remove ("echo 1 &gt;
/sys/bus/pci/devices/$device/remove") destroyed the pci_dev. The
pci_dev struct itself wasn't deallocated because acpiphp kept a
reference, but some of its fields became invalid.

acpiphp doesn't have any real reason to keep a pointer to a
pci_dev around. It can always derive it using pci_get_slot().

If a logical remove destroys the pci_dev, acpiphp won't find it
and is thus prevented from causing mischief.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Tested-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Reported-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI PM: Fix initialization and kexec breakage for some devices</title>
<updated>2009-05-19T22:26:07+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2009-05-17T18:17:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b3bad72e494fb2ff0c81be4ca2ddb94adf6a47c2'/>
<id>b3bad72e494fb2ff0c81be4ca2ddb94adf6a47c2</id>
<content type='text'>
Recent PCI PM changes introduced a bug that causes some devices to be
mishandled after kexec and during early initialization.  The failure
scenario in the kexec case is the following:

* Assume a PCI device is not power-manageable by the platform and has
  PCI_PM_CTRL_NO_SOFT_RESET set in PMCSR.
* The device is put into D3 before kexec (using the native PCI PM).
* After kexec, pci_setup_device() sets the device's power state to
  PCI_UNKNOWN.
* pci_set_power_state(dev, PCI_D0) is called by the device's driver.
* __pci_start_power_transition(dev, PCI_D0) is called and since the
  device is not power-manageable by the platform, it causes
  pci_update_current_state(dev, PCI_D0) to be called.  As a result
  the device's current_state field is updated to PCI_D3, in
  accordance with the contents of its PCI PM registers.
* pci_raw_set_power_state() is called and it changes the device power
  state to D0.  *However*, it should also call pci_restore_bars() to
  reinitialize the device, but it doesn't, because the device's
  current_state field has been modified earlier.

To prevent this from happening, modify pci_platform_power_transition()
so that it doesn't use pci_update_current_state() to update the
current_state field for devices that aren't power-manageable by the
platform.  Instead, this field should be updated directly for devices
that don't support the native PCI PM.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recent PCI PM changes introduced a bug that causes some devices to be
mishandled after kexec and during early initialization.  The failure
scenario in the kexec case is the following:

* Assume a PCI device is not power-manageable by the platform and has
  PCI_PM_CTRL_NO_SOFT_RESET set in PMCSR.
* The device is put into D3 before kexec (using the native PCI PM).
* After kexec, pci_setup_device() sets the device's power state to
  PCI_UNKNOWN.
* pci_set_power_state(dev, PCI_D0) is called by the device's driver.
* __pci_start_power_transition(dev, PCI_D0) is called and since the
  device is not power-manageable by the platform, it causes
  pci_update_current_state(dev, PCI_D0) to be called.  As a result
  the device's current_state field is updated to PCI_D3, in
  accordance with the contents of its PCI PM registers.
* pci_raw_set_power_state() is called and it changes the device power
  state to D0.  *However*, it should also call pci_restore_bars() to
  reinitialize the device, but it doesn't, because the device's
  current_state field has been modified earlier.

To prevent this from happening, modify pci_platform_power_transition()
so that it doesn't use pci_update_current_state() to update the
current_state field for devices that aren't power-manageable by the
platform.  Instead, this field should be updated directly for devices
that don't support the native PCI PM.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6</title>
<updated>2009-05-15T23:47:55+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-05-15T23:47:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=72357d59559e3b9293bdea9c0d755862504f2bf3'/>
<id>72357d59559e3b9293bdea9c0d755862504f2bf3</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI MSI: Fix MSI-X with NIU cards
  PCI: Fix pci-e port driver slot_reset bad default return value
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI MSI: Fix MSI-X with NIU cards
  PCI: Fix pci-e port driver slot_reset bad default return value
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI MSI: Fix MSI-X with NIU cards</title>
<updated>2009-05-12T00:02:27+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2009-05-08T13:13:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8d181018532dd709ec1f789e374cda92d7b01ce1'/>
<id>8d181018532dd709ec1f789e374cda92d7b01ce1</id>
<content type='text'>
The NIU device refuses to allow accesses to MSI-X registers before MSI-X
is enabled.  This patch fixes the problem by moving the read of the mask
register to after MSI-X is enabled.

Reported-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: David S. Miller &lt;davem@davemloft.net&gt;
Reviewed-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The NIU device refuses to allow accesses to MSI-X registers before MSI-X
is enabled.  This patch fixes the problem by moving the read of the mask
register to after MSI-X is enabled.

Reported-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: David S. Miller &lt;davem@davemloft.net&gt;
Reviewed-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>intel-iommu: PAE memory corruption fix</title>
<updated>2009-05-11T14:51:01+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2009-05-10T22:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fd18de50b9e7965f93d231e7390436fb8900c0e6'/>
<id>fd18de50b9e7965f93d231e7390436fb8900c0e6</id>
<content type='text'>
PAGE_MASK is 0xFFFFF000 on i386 -- even with PAE.

So it's not sufficient to ensure that you use phys_addr_t or uint64_t
everywhere you handle physical addresses -- you also have to avoid using
the construct 'addr &amp; PAGE_MASK', because that will strip the high 32
bits of the address.

This patch avoids that problem by using PHYSICAL_PAGE_MASK instead of
PAGE_MASK where appropriate. It leaves '&amp; PAGE_MASK' in a few instances
that don't matter -- where it's being used on the virtual bus addresses
we're dishing out, which are 32-bit anyway.

Since PHYSICAL_PAGE_MASK is not present on other architectures, we have
to define it (to PAGE_MASK) if it's not already defined.

Maybe it would be better just to fix PAGE_MASK for i386/PAE?

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PAGE_MASK is 0xFFFFF000 on i386 -- even with PAE.

So it's not sufficient to ensure that you use phys_addr_t or uint64_t
everywhere you handle physical addresses -- you also have to avoid using
the construct 'addr &amp; PAGE_MASK', because that will strip the high 32
bits of the address.

This patch avoids that problem by using PHYSICAL_PAGE_MASK instead of
PAGE_MASK where appropriate. It leaves '&amp; PAGE_MASK' in a few instances
that don't matter -- where it's being used on the virtual bus addresses
we're dishing out, which are 32-bit anyway.

Since PHYSICAL_PAGE_MASK is not present on other architectures, we have
to define it (to PAGE_MASK) if it's not already defined.

Maybe it would be better just to fix PAGE_MASK for i386/PAE?

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: Fix pci-e port driver slot_reset bad default return value</title>
<updated>2009-05-05T19:20:57+00:00</updated>
<author>
<name>Zhang, Yanmin</name>
<email>yanmin_zhang@linux.intel.com</email>
</author>
<published>2009-04-30T06:48:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=029091df01116aff8dea89ce96a0a2534401803a'/>
<id>029091df01116aff8dea89ce96a0a2534401803a</id>
<content type='text'>
When an upstream port reports an AER error to root port, kernel
starts error recovery procedures. The default return value of
function pcie_portdrv_slot_reset is PCI_ERS_RESULT_NONE. If all
port service drivers of the downstream port under the upstream
port have no slot_reset method in pci_error_handlers, AER recovery
would stop without resume. Below patch against 2.6.30-rc3 fixes it.

Signed-off-by: Zhang Yanmin &lt;yanmin.zhang@linux.intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an upstream port reports an AER error to root port, kernel
starts error recovery procedures. The default return value of
function pcie_portdrv_slot_reset is PCI_ERS_RESULT_NONE. If all
port service drivers of the downstream port under the upstream
port have no slot_reset method in pci_error_handlers, AER recovery
would stop without resume. Below patch against 2.6.30-rc3 fixes it.

Signed-off-by: Zhang Yanmin &lt;yanmin.zhang@linux.intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: only save/restore existent registers in the PCIe capability</title>
<updated>2009-04-22T22:59:41+00:00</updated>
<author>
<name>Yu Zhao</name>
<email>yu.zhao@intel.com</email>
</author>
<published>2009-04-09T06:57:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1b6b8ce2ac372ea1f2065b89228ede105eb68dc5'/>
<id>1b6b8ce2ac372ea1f2065b89228ede105eb68dc5</id>
<content type='text'>
PCIe 1.1 base neither requires the endpoint to implement the entire
PCIe capability structure nor specifies default values of registers
that are not implemented by the device. So we only save and restore
registers that must be implemented by different device types if the
device PCIe capability version is 1.

PCIe 1.1 Capability Structure Expansion ECN and PCIe 2.0 requires
all registers in the PCIe capability to be either implemented or
hardwired to 0. Their PCIe capability version is 2.

Signed-off-by: Yu Zhao &lt;yu.zhao@intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PCIe 1.1 base neither requires the endpoint to implement the entire
PCIe capability structure nor specifies default values of registers
that are not implemented by the device. So we only save and restore
registers that must be implemented by different device types if the
device PCIe capability version is 1.

PCIe 1.1 Capability Structure Expansion ECN and PCIe 2.0 requires
all registers in the PCIe capability to be either implemented or
hardwired to 0. Their PCIe capability version is 2.

Signed-off-by: Yu Zhao &lt;yu.zhao@intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docbooks: add/fix PCI kernel-doc</title>
<updated>2009-04-22T21:49:33+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2009-04-10T22:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cffb2fafb726c898fec1c5ae33717741f94fda83'/>
<id>cffb2fafb726c898fec1c5ae33717741f94fda83</id>
<content type='text'>
Add drivers/pci/*.c source files to DocBook/kernel-api.tmpl
and update those pci/*.c source files that need kernel-doc fixes.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add drivers/pci/*.c source files to DocBook/kernel-api.tmpl
and update those pci/*.c source files that need kernel-doc fixes.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: cleanup debug output resources</title>
<updated>2009-04-22T21:49:25+00:00</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2009-04-14T01:28:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=681bf597215c62bd6f5ae1180a58a38997122b5b'/>
<id>681bf597215c62bd6f5ae1180a58a38997122b5b</id>
<content type='text'>
Remove outputs for 0 sized resources and indicate prefetchability.

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove outputs for 0 sized resources and indicate prefetchability.

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
