01 Feb, 2006

1 commit


10 Jan, 2006

3 commits

  • Various PCI bus errors can be signaled by newer PCI controllers.
    Recovering from those errors requires an infrastructure to notify
    affected device drivers of the error, and a way of walking through a
    reset sequence. This patch adds a set of callbacks to be used by error
    recovery routines to notify device drivers of the various stages of
    recovery.

    Signed-off-by: Linas Vepstas
    Signed-off-by: Greg Kroah-Hartman

    linas
     
  • The powerpc PCI code sets up the PCI tree without doing config space
    accesses in most cases, from the firmware tree. However, it still wants
    to call pci_cfg_space_size() under some conditions, thus it needs to
    be made non-static (though I don't see a point to export it to modules).

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     
  • Store the value of the INTERRUPT_PIN in the pci_dev structure
    so that it can be retrieved later.

    Signed-off-by: Kristen Carlson Accardi
    Signed-off-by: Greg Kroah-Hartman

    Kristen Accardi
     

11 Nov, 2005

3 commits

  • Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • A nice feature of sysfs is that it can create the symlink from the
    driver to the module that is contained in it.

    It requires that the device_driver.owner is set, what is not the
    case for many PCI drivers.

    This patch allows pci_register_driver to set automatically the
    device_driver.owner for any PCI driver.

    Credits to Al Viro who suggested the method.

    Signed-off-by: Laurent Riffard
    Signed-off-by: Greg Kroah-Hartman
    --

    drivers/ide/setup-pci.c | 12 +++++++-----
    drivers/pci/pci-driver.c | 9 +++++----
    include/linux/ide.h | 3 ++-
    include/linux/pci.h | 10 ++++++++--
    4 files changed, 22 insertions(+), 12 deletions(-)

    Laurent riffard
     
  • Some devices have more than one capability of the same type. For
    example, the PCI header for the PathScale InfiniPath looks like:

    04:01.0 InfiniBand: Unknown device 1fc1:000d (rev 02)
    Subsystem: Unknown device 1fc1:000d
    Flags: bus master, fast devsel, latency 0, IRQ 193
    Memory at fea00000 (64-bit, non-prefetchable) [size=2M]
    Capabilities: [c0] HyperTransport: Slave or Primary Interface
    Capabilities: [f8] HyperTransport: Interrupt Discovery and Configuration

    There are _two_ HyperTransport capabilities, and the PathScale driver
    wants to look at both of them.

    The current pci_find_capability() API doesn't work for this, since it
    only allows us to get to the first capability of a given type. The
    patch below introduces a new pci_find_next_capability(), which can be
    used in a loop like

    for (pos = pci_find_capability(pdev, );
    pos;
    pos = pci_find_next_capability(pdev, pos, )) {
    /* ... */
    }

    Signed-off-by: Roland Dreier
    Signed-off-by: Matthew Wilcox
    Signed-off-by: Greg Kroah-Hartman

    Roland Dreier
     

29 Oct, 2005

1 commit

  • Some PCI adapters (eg. ipr scsi adapters) have an exposure today in that they
    issue BIST to the adapter to reset the card. If, during the time it takes to
    complete BIST, userspace attempts to access PCI config space, the host bus
    bridge will master abort the access since the ipr adapter does not respond on
    the PCI bus for a brief period of time when running BIST. On PPC64 hardware,
    this master abort results in the host PCI bridge isolating that PCI device
    from the rest of the system, making the device unusable until Linux is
    rebooted. This patch is an attempt to close that exposure by introducing some
    blocking code in the PCI code. When blocked, writes will be humored and reads
    will return the cached value. Ben Herrenschmidt has also mentioned that he
    plans to use this in PPC power management.

    Signed-off-by: Brian King
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    drivers/pci/access.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++
    drivers/pci/pci-sysfs.c | 20 +++++-----
    drivers/pci/pci.h | 7 +++
    drivers/pci/proc.c | 28 +++++++--------
    drivers/pci/syscall.c | 14 +++----
    include/linux/pci.h | 7 +++
    6 files changed, 134 insertions(+), 31 deletions(-)

    Brian King
     

10 Sep, 2005

5 commits


09 Sep, 2005

7 commits

  • Simple cleanup to eliminate X copies of the pci_enable_intx() function
    in libata. Moved ahci.c's pci_intx() to pci.c and use it throughout
    libata and msi.c.

    Signed-off-by: Brett Russ
    Signed-off-by: Greg Kroah-Hartman

    Brett M Russ
     
  • - support PCI PM CAP version 3 (as defined in PCI PM Interface Spec v1.2)

    - pci/probe.c sets the PM state initially to 4 which is D3cold. add a
    PCI_UNKNOWN

    - minor cleanups

    Signed-off-by: Daniel Ritz
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Daniel Ritz
     
  • The PCI error recovery infrastructure needs to be able to contact all
    the drivers affected by a PCI error event, which may mean traversing
    all the devices under a given PCI-PCI bridge. This patch adds a
    function to the PCI core that traverses all the PCI devices on a PCI
    bus and under any PCI-PCI bridges on that bus (and so on), calling a
    given function for each device. This provides a way for the error
    recovery code to iterate through all devices that are affected by an
    error event.

    This version is not implemented as a recursive function. Instead,
    when we reach a PCI-PCI bridge, we set the pointers to start doing the
    devices on the bus under the bridge, and when we reach the end of a
    bus's devices, we use the bus->self pointer to go back up to the next
    higher bus and continue doing its devices.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Greg Kroah-Hartman

    Paul Mackerras
     
  • Some PCI devices (e.g. 3c905B, 3c556B) lose all configuration
    (including BARs) when transitioning from D3hot->D0. This leaves such
    a device in an inaccessible state. The patch below causes the BARs
    to be restored when enabling such a device, so that its driver will
    be able to access it.

    The patch also adds pci_restore_bars as a new global symbol, and adds a
    correpsonding EXPORT_SYMBOL_GPL for that.

    Some firmware (e.g. Thinkpad T21) leaves devices in D3hot after a
    (re)boot. Most drivers call pci_enable_device very early, so devices
    left in D3hot that lose configuration during the D3hot->D0 transition
    will be inaccessible to their drivers.

    Drivers could be modified to account for this, but it would
    be difficult to know which drivers need modification. This is
    especially true since often many devices are covered by the same
    driver. It likely would be necessary to replicate code across dozens
    of drivers.

    The patch below should trigger only when transitioning from D3hot->D0
    (or at boot), and only for devices that have the "no soft reset" bit
    cleared in the PM control register. I believe it is safe to include
    this patch as part of the PCI infrastructure.

    The cleanest implementation of pci_restore_bars was to call
    pci_update_resource. Unfortunately, that does not currently exist
    for the sparc64 architecture. The patch below includes a null
    implemenation of pci_update_resource for sparc64.

    Some have expressed interest in making general use of the the
    pci_restore_bars function, so that has been exported to GPL licensed
    modules.

    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    John W. Linville
     
  • This cleans up some of the #ifdef CONFIG_PCI stuff up, and moves the pci register
    info out to a separate file, where it belongs. Eventually we can stop including
    this file from within pci.h, but lots of code needs to be audited first.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This patch removes CONFIG_PCI_NAMES.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • Make PCI fixup data const, so it'll end up in a r/o section.

    This also fixes the conversion into ECOFF which gets broken by too many
    changes between r/w and r/o sections. Call it a hack but it's a change
    that's correct by itself.

    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    akpm@osdl.org
     

17 Aug, 2005

1 commit

  • On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
    driver and SHPC driver in MSI mode are used together.

    This patch will prevent MSI from being enabled for the SHPC as part of
    an early pci quirk, as well as on any pci device which sets the no_msi
    bit.

    Signed-off-by: Kristen Carlson Accardi
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Kristen Accardi
     

09 Aug, 2005

1 commit


05 Aug, 2005

1 commit

  • Some PCI devices (e.g. 3c905B, 3c556B) lose all configuration
    (including BARs) when transitioning from D3hot->D0. This leaves such
    a device in an inaccessible state. The patch below causes the BARs
    to be restored when enabling such a device, so that its driver will
    be able to access it.

    The patch also adds pci_restore_bars as a new global symbol, and adds a
    correpsonding EXPORT_SYMBOL_GPL for that.

    Some firmware (e.g. Thinkpad T21) leaves devices in D3hot after a
    (re)boot. Most drivers call pci_enable_device very early, so devices
    left in D3hot that lose configuration during the D3hot->D0 transition
    will be inaccessible to their drivers.

    Drivers could be modified to account for this, but it would
    be difficult to know which drivers need modification. This is
    especially true since often many devices are covered by the same
    driver. It likely would be necessary to replicate code across dozens
    of drivers.

    The patch below should trigger only when transitioning from D3hot->D0
    (or at boot), and only for devices that have the "no soft reset" bit
    cleared in the PM control register. I believe it is safe to include
    this patch as part of the PCI infrastructure.

    The cleanest implementation of pci_restore_bars was to call
    pci_update_resource. Unfortunately, that does not currently exist
    for the sparc64 architecture. The patch below includes a null
    implemenation of pci_update_resource for sparc64.

    Some have expressed interest in making general use of the the
    pci_restore_bars function, so that has been exported to GPL licensed
    modules.

    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    John W. Linville
     

30 Jul, 2005

1 commit


02 Jul, 2005

2 commits

  • The dynamic pci id logic has been bothering me for a while, and now that
    I started to look into how to move some of this to the driver core, I
    thought it was time to clean it all up.

    It ends up making the code smaller, and easier to follow, and fixes a
    few bugs at the same time (dynamic ids were not being matched
    everywhere, and so could be missed on some call paths for new devices,
    semaphore not needed to be grabbed when adding a new id and calling the
    driver core, etc.)

    I also renamed the function pci_match_device() to pci_match_id() as
    that's what it really does.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This patch increases the number of resource pointers in the
    pci_bus structure. This is needed to store >4 resource ranges
    for host bridges and transparent PCI bridges. With this change,
    all PCI buses will have more resource pointers, but most PCI
    buses will only use the first 3 or 4, the remaining being NULL.
    The PCI core already deals with this correctly.

    Signed-off-by: Rajesh Shah
    Signed-off-by: Greg Kroah-Hartman

    rajesh.shah@intel.com
     

28 Jun, 2005

4 commits

  • With CONFIG_PCI=n:

    In file included from include/linux/pci.h:917,
    from lib/iomap.c:6:
    include/asm/pci.h:104: warning: `enum pci_dma_burst_strategy' declared inside parameter list
    include/asm/pci.h:104: warning: its scope is only this definition or declaration, which is probably not what you want.
    include/asm/pci.h: In function `pci_dma_burst_advice':
    include/asm/pci.h:106: dereferencing pointer to incomplete type
    include/asm/pci.h:106: `PCI_DMA_BURST_INFINITY' undeclared (first use in this function)
    include/asm/pci.h:106: (Each undeclared identifier is reported only once
    include/asm/pci.h:106: for each function it appears in.)
    make[1]: *** [lib/iomap.o] Error 1

    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Andrew Morton
     
  • After seeing, at best, "guesses" as to the following kind
    of information in several drivers, I decided that we really
    need a way for platforms to specifically give advice in this
    area for what works best with their PCI controller implementation.

    Basically, this new interface gives DMA bursting advice on
    PCI. There are three forms of the advice:

    1) Burst as much as possible, it is not necessary to end bursts
    on some particular boundary for best performance.

    2) Burst on some byte count multiple. A DMA burst to some multiple of
    number of bytes may be done, but it is important to end the burst
    on an exact multiple for best performance.

    The best example of this I am aware of are the PPC64 PCI
    controllers, where if you end a burst mid-cacheline then
    chip has to refetch the data and the IOMMU translations
    which hurts performance a lot.

    3) Burst on a single byte count multiple. Bursts shall end
    exactly on the next multiple boundary for best performance.

    Sparc64 and Alpha's PCI controllers operate this way. They
    disconnect any device which tries to burst across a cacheline
    boundary.

    Actually, newer sparc64 PCI controllers do not have this behavior.
    That is why the "pdev" is passed into the interface, so I can
    add code later to check which PCI controller the system is using
    and give advice accordingly.

    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    David S. Miller
     
  • This is an updated version of Ben's fix-pci-mmap-on-ppc-and-ppc64.patch
    which is in 2.6.12-rc4-mm1.

    It fixes the patch to work on PPC iSeries, removes some debug printks
    at Ben's request, and incorporates your
    fix-pci-mmap-on-ppc-and-ppc64-fix.patch also.

    Originally from Benjamin Herrenschmidt

    This patch was discussed at length on linux-pci and so far, the last
    iteration of it didn't raise any comment. It's effect is a nop on
    architecture that don't define the new pci_resource_to_user() callback
    anyway. It allows architecture like ppc who put weird things inside of
    PCI resource structures to convert to some different value for user
    visible ones. It also fixes mmap'ing of IO space on those archs.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Michael Ellerman
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • When you hot-plug a (root) bridge hierarchy, it may have p2p bridges and
    devices attached to it that have not been configured by firmware. In this
    case, we need to configure the devices before starting them. This patch
    separates device start from device scan so that we can introduce the
    configuration step in the middle.

    I kept the existing semantics for pci_scan_bus() since there are a huge number
    of callers to that function.

    Also, I have no way of testing the changes I made to the parisc files, so this
    needs review by those folks. Sorry for the massive cross-post, this touches
    files in many different places.

    Signed-off-by: Rajesh Shah
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Rajesh Shah
     

04 May, 2005

2 commits


17 Apr, 2005

2 commits

  • I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately
    that turned out not to be the case as Russel King pointed out. Here are
    fixes for Documentation and common code (mainly system devices).

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds