<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/access.c, branch linux-2.6.31.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-06-16T21:29:33Z</updated>
<entry>
<title>PCI: Add pci_bus_set_ops</title>
<updated>2009-06-16T21:29:33Z</updated>
<author>
<name>Huang Ying</name>
</author>
<published>2009-04-24T02:45:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a72b46c3849cdb05993015991bde548ab8b6d7ac'/>
<id>urn:sha1:a72b46c3849cdb05993015991bde548ab8b6d7ac</id>
<content type='text'>
pci_bus_set_ops changes pci_ops associated with a pci_bus. This can be
used by debug tools such as PCIE AER error injection to fake some PCI
configuration registers.

Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>docbooks: add/fix PCI kernel-doc</title>
<updated>2009-04-22T21:49:33Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2009-04-10T22:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cffb2fafb726c898fec1c5ae33717741f94fda83'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>PCI: Fix oops in pci_vpd_truncate</title>
<updated>2009-04-07T15:05:38Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2009-03-31T22:23:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d407e32efe060afa2b9a797a91376ebc65b4ce11'/>
<id>urn:sha1:d407e32efe060afa2b9a797a91376ebc65b4ce11</id>
<content type='text'>
pci_vpd_truncate() should check for dev-&gt;vpd-&gt;attr, otherwise this might
happen:

  sky2 driver version 1.22
  Unable to handle kernel paging request for data at address 0x0000000c
  Faulting instruction address: 0xc01836fc
  Oops: Kernel access of bad area, sig: 11 [#1]
  [...]
  NIP [c01836fc] pci_vpd_truncate+0x38/0x40
  LR [c029be18] sky2_probe+0x14c/0x518
  Call Trace:
  [ef82bde0] [c029bda4] sky2_probe+0xd8/0x518 (unreliable)
  [ef82be20] [c018a11c] local_pci_probe+0x24/0x34
  [ef82be30] [c018a14c] pci_call_probe+0x20/0x30
  [ef82be50] [c018a330] __pci_device_probe+0x64/0x78
  [ef82be60] [c018a44c] pci_device_probe+0x30/0x58
  [ef82be80] [c01aa270] really_probe+0x78/0x1a0
  [ef82bea0] [c01aa460] __driver_attach+0xa4/0xa8
  [ef82bec0] [c01a96ac] bus_for_each_dev+0x60/0x9c
  [ef82bef0] [c01aa0b4] driver_attach+0x24/0x34
  [ef82bf00] [c01a9e08] bus_add_driver+0x12c/0x1cc
  [ef82bf20] [c01aa87c] driver_register+0x6c/0x110
  [ef82bf30] [c018a770] __pci_register_driver+0x4c/0x9c
  [ef82bf50] [c03782c8] sky2_init_module+0x30/0x40
  [ef82bf60] [c0001dbc] do_one_initcall+0x34/0x1a0
  [ef82bfd0] [c0362240] do_initcalls+0x38/0x58

This happens with CONFIG_SKY2=y, and "ip=on" kernel command line, so
pci_vpd_truncate() is called before late_initcall(pci_sysfs_init),
therefore -&gt;attr isn't yet initialized.

Acked-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: add interface to set visible size of VPD</title>
<updated>2009-01-07T19:13:18Z</updated>
<author>
<name>Stephen Hemminger</name>
</author>
<published>2008-12-18T17:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db5679437a2b938c9127480a3923633721583a4f'/>
<id>urn:sha1:db5679437a2b938c9127480a3923633721583a4f</id>
<content type='text'>
The VPD on all devices may not be 32K. Unfortunately, there is no
generic way to find the size, so this adds a simple API hook
to reset it.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: revise VPD access interface</title>
<updated>2009-01-07T19:13:17Z</updated>
<author>
<name>Stephen Hemminger</name>
</author>
<published>2008-12-18T17:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=287d19ce2e67c15e79a187b3bdcbbea1a0a51a7d'/>
<id>urn:sha1:287d19ce2e67c15e79a187b3bdcbbea1a0a51a7d</id>
<content type='text'>
Change PCI VPD API which was only used by sysfs to something usable
in drivers.
   * move iteration over multiple words to the low level
   * use conventional types for arguments
   * add exportable wrapper

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: handle long delays in VPD access</title>
<updated>2009-01-07T19:13:16Z</updated>
<author>
<name>Stephen Hemminger</name>
</author>
<published>2008-12-18T17:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1120f8b8169fb2cb51219d326892d963e762edb6'/>
<id>urn:sha1:1120f8b8169fb2cb51219d326892d963e762edb6</id>
<content type='text'>
Accessing the VPD area can take a long time.  The existing
VPD access code fails consistently on my hardware. There are comments
in the SysKonnect vendor driver that it can take up to 13ms per word.

Change the access routines to:
  * use a mutex rather than spinning with IRQ's disabled and lock held
  * have a much longer timeout
  * call cond_resched while spinning

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev.</title>
<updated>2008-07-02T18:25:54Z</updated>
<author>
<name>Benjamin Li</name>
</author>
<published>2008-07-02T17:59:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99cb233d60cbe644203f19938c729ea2bb004d70'/>
<id>urn:sha1:99cb233d60cbe644203f19938c729ea2bb004d70</id>
<content type='text'>
For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the
VPD end tag will hang the device.  This problem was initially
observed when a vpd entry was created in sysfs
('/sys/bus/pci/devices/&lt;id&gt;/vpd').   A read to this sysfs entry
will dump 32k of data.  Reading a full 32k will cause an access
beyond the VPD end tag causing the device to hang.  Once the device
is hung, the bnx2 driver will not be able to reset the device.
We believe that it is legal to read beyond the end tag and
therefore the solution is to limit the read/write length.

A majority of this patch is from Matthew Wilcox who gave code for
reworking the PCI vpd size information.  A PCI quirk added for the
Broadcom NIC's to limit the read/write's.

Signed-off-by: Benjamin Li &lt;benli@broadcom.com&gt;
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: Expose PCI VPD through sysfs</title>
<updated>2008-04-21T04:47:07Z</updated>
<author>
<name>Ben Hutchings</name>
</author>
<published>2008-03-05T16:52:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94e6108803469a37ee1e3c92dafdd1d59298602f'/>
<id>urn:sha1:94e6108803469a37ee1e3c92dafdd1d59298602f</id>
<content type='text'>
Vital Product Data (VPD) may be exposed by PCI devices in several
ways.  It is generally unsafe to read this information through the
existing interfaces to user-land because of stateful interfaces.

This adds:
- abstract operations for VPD access (struct pci_vpd_ops)
- VPD state information in struct pci_dev (struct pci_vpd)
- an implementation of the VPD access method specified in PCI 2.2
  (in access.c)
- a 'vpd' binary file in sysfs directories for PCI devices with VPD
  operations defined

It adds a probe for PCI 2.2 VPD in pci_scan_device() and release of
VPD state in pci_release_dev().

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[PATCH] severing module.h-&gt;sched.h</title>
<updated>2006-12-04T07:00:22Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2006-10-18T05:47:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6a570333e554b48ad589e7137c77c57809eee81'/>
<id>urn:sha1:f6a570333e554b48ad589e7137c77c57809eee81</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>PCI: Block on access to temporarily unavailable pci device</title>
<updated>2006-12-01T22:36:58Z</updated>
<author>
<name>Matthew Wilcox</name>
</author>
<published>2006-10-19T15:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ea7e98fd8d02351c43ef4ab35d70f3aaa26c31d'/>
<id>urn:sha1:7ea7e98fd8d02351c43ef4ab35d70f3aaa26c31d</id>
<content type='text'>
The existing implementation of pci_block_user_cfg_access() was recently
criticised for providing out of date information and for returning errors
on write, which applications won't be expecting.

This reimplementation uses a global wait queue and a bit per device.
I've open-coded prepare_to_wait() / finish_wait() as I could optimise
it significantly by knowing that the pci_lock protected us at all points.

It looked a bit funny to be doing a spin_unlock_irqsave(); schedule(),
so I used spin_lock_irq() for the _user versions of pci_read_config and
pci_write_config.  Not carrying a flags pointer around made the code
much less nasty.

Attempts to block an already blocked device hit a BUG() and attempts to
unblock an already unblocked device hit a WARN().  If we need to block
access to a device from userspace, it's because it's unsafe for even
another bit of the kernel to access the device.  An attempt to block
a device for a second time means we're about to access the device to
perform some other operation, which could provoke undefined behaviour
from the device.

Signed-off-by: Matthew Wilcox &lt;matthew@wil.cx&gt;
Acked-by: Adam Belay &lt;abelay@novell.com&gt;
Acked-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
