07 Aug, 2010

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (30 commits)
    PCI: update for owner removal from struct device_attribute
    PCI: Fix warnings when CONFIG_DMI unset
    PCI: Do not run NVidia quirks related to MSI with MSI disabled
    x86/PCI: use for_each_pci_dev()
    PCI: use for_each_pci_dev()
    PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()
    PCI: export SMBIOS provided firmware instance and label to sysfs
    PCI: Allow read/write access to sysfs I/O port resources
    x86/PCI: use host bridge _CRS info on ASRock ALiveSATA2-GLAN
    PCI: remove unused HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_{SIZE|BOUNDARY}
    PCI: disable mmio during bar sizing
    PCI: MSI: Remove unsafe and unnecessary hardware access
    PCI: Default PCIe ASPM control to on and require !EMBEDDED to disable
    PCI: kernel oops on access to pci proc file while hot-removal
    PCI: pci-sysfs: remove casts from void*
    ACPI: Disable ASPM if the platform won't provide _OSC control for PCIe
    PCI hotplug: make sure child bridges are enabled at hotplug time
    PCI hotplug: shpchp: Removed check for hotplug of display devices
    PCI hotplug: pciehp: Fixed return value sign for pciehp_unconfigure_device
    PCI: Don't enable aspm before drivers have had a chance to veto it
    ...

    Linus Torvalds
     

31 Jul, 2010

1 commit

  • In 2.6.34, we transformed the PCI DMA API into the generic device
    mode. The PCI DMA API is just the wrapper of the DMA API.

    So we don't need HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE or
    HAVE_ARCH_PCI_SET_DMA_SEGMENT_BOUNDARY (which enable architectures to
    have the own implementations). Both haven't been used anyway.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jesse Barnes

    FUJITA Tomonori
     

19 Jul, 2010

1 commit

  • One of the arguments during the suspend blockers discussion was that
    the mainline kernel didn't contain any mechanisms making it possible
    to avoid races between wakeup and system suspend.

    Generally, there are two problems in that area. First, if a wakeup
    event occurs exactly when /sys/power/state is being written to, it
    may be delivered to user space right before the freezer kicks in, so
    the user space consumer of the event may not be able to process it
    before the system is suspended. Second, if a wakeup event occurs
    after user space has been frozen, it is not generally guaranteed that
    the ongoing transition of the system into a sleep state will be
    aborted.

    To address these issues introduce a new global sysfs attribute,
    /sys/power/wakeup_count, associated with a running counter of wakeup
    events and three helper functions, pm_stay_awake(), pm_relax(), and
    pm_wakeup_event(), that may be used by kernel subsystems to control
    the behavior of this attribute and to request the PM core to abort
    system transitions into a sleep state already in progress.

    The /sys/power/wakeup_count file may be read from or written to by
    user space. Reads will always succeed (unless interrupted by a
    signal) and return the current value of the wakeup events counter.
    Writes, however, will only succeed if the written number is equal to
    the current value of the wakeup events counter. If a write is
    successful, it will cause the kernel to save the current value of the
    wakeup events counter and to abort the subsequent system transition
    into a sleep state if any wakeup events are reported after the write
    has returned.

    [The assumption is that before writing to /sys/power/state user space
    will first read from /sys/power/wakeup_count. Next, user space
    consumers of wakeup events will have a chance to acknowledge or
    veto the upcoming system transition to a sleep state. Finally, if
    the transition is allowed to proceed, /sys/power/wakeup_count will
    be written to and if that succeeds, /sys/power/state will be written
    to as well. Still, if any wakeup events are reported to the PM core
    by kernel subsystems after that point, the transition will be
    aborted.]

    Additionally, put a wakeup events counter into struct dev_pm_info and
    make these per-device wakeup event counters available via sysfs,
    so that it's possible to check the activity of various wakeup event
    sources within the kernel.

    To illustrate how subsystems can use pm_wakeup_event(), make the
    low-level PCI runtime PM wakeup-handling code use it.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Jesse Barnes
    Acked-by: Greg Kroah-Hartman
    Acked-by: markgross
    Reviewed-by: Alan Stern

    Rafael J. Wysocki
     

23 Jun, 2010

1 commit

  • virtio-pci resets the device at startup by writing to the status
    register, but this does not clear the pci config space,
    specifically msi enable status which affects register
    layout.

    This breaks things like kdump when they try to use e.g. virtio-blk.

    Fix by forcing msi off at startup. Since pci.c already has
    a routine to do this, we export and use it instead of duplicating code.

    Signed-off-by: Michael S. Tsirkin
    Tested-by: Vivek Goyal
    Acked-by: Jesse Barnes
    Cc: linux-pci@vger.kernel.org
    Signed-off-by: Rusty Russell
    Cc: stable@kernel.org

    Michael S. Tsirkin
     

22 May, 2010

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (36 commits)
    PCI: hotplug: pciehp: Removed check for hotplug of display devices
    PCI: read memory ranges out of Broadcom CNB20LE host bridge
    PCI: Allow manual resource allocation for PCI hotplug bridges
    x86/PCI: make ACPI MCFG reserved error messages ACPI specific
    PCI hotplug: Use kmemdup
    PM/PCI: Update PCI power management documentation
    PCI: output FW warning in pci_read/write_vpd
    PCI: fix typos pci_device_dis/enable to pci_dis/enable_device in comments
    PCI quirks: disable msi on AMD rs4xx internal gfx bridges
    PCI: Disable MSI for MCP55 on P5N32-E SLI
    x86/PCI: irq and pci_ids patch for additional Intel Cougar Point DeviceIDs
    PCI: aerdrv: trivial cleanup for aerdrv_core.c
    PCI: aerdrv: trivial cleanup for aerdrv.c
    PCI: aerdrv: introduce default_downstream_reset_link
    PCI: aerdrv: rework find_aer_service
    PCI: aerdrv: remove is_downstream
    PCI: aerdrv: remove magical ROOT_ERR_STATUS_MASKS
    PCI: aerdrv: redefine PCI_ERR_ROOT_*_SRC
    PCI: aerdrv: rework do_recovery
    PCI: aerdrv: rework get_e_source()
    ...

    Linus Torvalds
     

21 May, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
    vlynq: make whole Kconfig-menu dependant on architecture
    add descriptive comment for TIF_MEMDIE task flag declaration.
    EEPROM: max6875: Header file cleanup
    EEPROM: 93cx6: Header file cleanup
    EEPROM: Header file cleanup
    agp: use NULL instead of 0 when pointer is needed
    rtc-v3020: make bitfield unsigned
    PCI: make bitfield unsigned
    jbd2: use NULL instead of 0 when pointer is needed
    cciss: fix shadows sparse warning
    doc: inode uses a mutex instead of a semaphore.
    uml: i386: Avoid redefinition of NR_syscalls
    fix "seperate" typos in comments
    cocbalt_lcdfb: correct sections
    doc: Change urls for sparse
    Powerpc: wii: Fix typo in comment
    i2o: cleanup some exit paths
    Documentation/: it's -> its where appropriate
    UML: Fix compiler warning due to missing task_struct declaration
    UML: add kernel.h include to signal.c
    ...

    Linus Torvalds
     

19 May, 2010

1 commit


12 May, 2010

1 commit

  • This patch (as1353) removes a couple of unnecessary assignments from
    the PCI core. The should_wakeup flag is naturally initialized to 0;
    there's no need to clear it.

    Acked-by: Rafael J. Wysocki
    Signed-off-by: Alan Stern
    Signed-off-by: Jesse Barnes

    Alan Stern
     

23 Apr, 2010

2 commits

  • Jiri Kosina
     
  • If the firmware puts a device back into D0 state at resume time, we'll
    update its state in resume_noirq and thus skip the platform resume code.
    Calling that code twice should be safe and we ought to avoid getting to
    that point anyway, so remove the check and also allow the platform pci
    code to be called for D0.

    Fixes USB not being powered after resume on recent Lenovo machines.

    Acked-by: Alex Chiang
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Matthew Garrett
    Signed-off-by: Jesse Barnes

    Matthew Garrett
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

20 Mar, 2010

4 commits

  • pcix_get_mmrbc() returns the maximum memory read byte count (mmrbc), if
    successful, or an appropriate error value, if not.

    Distinguishing errors from correct values and understanding the meaning of an
    error can be somewhat confusing in that:

    correct values: 512, 1024, 2048, 4096
    errors: -EINVAL -22
    PCIBIOS_FUNC_NOT_SUPPORTED 0x81
    PCIBIOS_BAD_VENDOR_ID 0x83
    PCIBIOS_DEVICE_NOT_FOUND 0x86
    PCIBIOS_BAD_REGISTER_NUMBER 0x87
    PCIBIOS_SET_FAILED 0x88
    PCIBIOS_BUFFER_TOO_SMALL 0x89

    The PCIBIOS_ errors are returned from the PCI functions generated by the
    PCI_OP_READ() and PCI_OP_WRITE() macros.

    In a similar manner, pcix_set_mmrbc() also returns the PCIBIOS_ error values
    returned from pci_read_config_[word|dword]() and pci_write_config_word().

    Following pcix_get_max_mmrbc()'s example, the following patch simply returns
    -EINVAL for all PCIBIOS_ errors encountered by pcix_get_mmrbc(), and -EINVAL
    or -EIO for those encountered by pcix_set_mmrbc().

    This simplification was chosen in light of the fact that none of the current
    callers of these functions are interested in the specific type of error
    encountered. In the future, should this change, one could simply create a
    function that maps each PCIBIOS_ error to a corresponding unique errno value,
    which could be called by pcix_get_max_mmrbc(), pcix_get_mmrbc(), and
    pcix_set_mmrbc().

    Additionally, this patch eliminates some unnecessary variables.

    Cc: stable@kernel.org
    Signed-off-by: Dean Nelson
    Signed-off-by: Jesse Barnes

    Dean Nelson
     
  • An e1000 driver on a system with a PCI-X bus was always being returned
    a value of 135 from both pcix_get_mmrbc() and pcix_set_mmrbc(). This
    value reflects an error return of PCIBIOS_BAD_REGISTER_NUMBER from
    pci_bus_read_config_dword(,, cap + PCI_X_CMD,).

    This is because for a dword, the following portion of the PCI_OP_READ()
    macro:

    if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER;

    expands to:

    if (pos & 3) return PCIBIOS_BAD_REGISTER_NUMBER;

    And is always true for 'cap + PCI_X_CMD', which is 0xe4 + 2 = 0xe6. ('cap' is
    the result of calling pci_find_capability(, PCI_CAP_ID_PCIX).)

    The same problem exists for pci_bus_write_config_dword(,, cap + PCI_X_CMD,).
    In both cases, instead of calling _dword(), _word() should be called.

    Cc: stable@kernel.org
    Signed-off-by: Dean Nelson
    Signed-off-by: Jesse Barnes

    Dean Nelson
     
  • When pci_register_set_vga_state() was made __init, the EXPORT_SYMBOL() was
    retained, which now leaves us with a section mismatch.

    Signed-off-by: Paul Mundt
    Cc: Mike Travis
    Signed-off-by: Andrew Morton
    Signed-off-by: Jesse Barnes

    Paul Mundt
     
  • For the PCI_X_STATUS register, pcix_get_max_mmrbc() is returning an incorrect
    value, which is based on:

    (stat & PCI_X_STATUS_MAX_READ) >> 12

    Valid return values are 512, 1024, 2048, 4096, which correspond to a 'stat'
    (masked and right shifted by 21) of 0, 1, 2, 3, respectively.

    A right shift by 11 would generate the correct return value when 'stat' (masked
    and right shifted by 21) has a value of 1 or 2. But for a value of 0 or 3 it's
    not possible to generate the correct return value by only right shifting.

    Fix is based on pcix_get_mmrbc()'s similar dealings with the PCI_X_CMD register.

    Cc: stable@kernel.org
    Signed-off-by: Dean Nelson
    Signed-off-by: Jesse Barnes

    Dean Nelson
     

16 Mar, 2010

1 commit


13 Mar, 2010

3 commits

  • We can use pci-dma-compat.h to implement pci_set_dma_mask and
    pci_set_consistent_dma_mask as we do with the other PCI DMA API.

    We can remove HAVE_ARCH_PCI_SET_DMA_MASK too.

    Signed-off-by: FUJITA Tomonori
    Cc: Jesse Barnes
    Cc: Greg KH
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • dma_set_coherent_mask corresponds to pci_set_consistent_dma_mask. This is
    necessary to move to the generic device model DMA API from the PCI bus
    specific API in the long term.

    dma_set_coherent_mask works in the exact same way that
    pci_set_consistent_dma_mask does. So this patch also changes
    pci_set_consistent_dma_mask to call dma_set_coherent_mask.

    Signed-off-by: FUJITA Tomonori
    Cc: James Bottomley
    Cc: David S. Miller
    Cc: Jesse Barnes
    Cc: Benjamin Herrenschmidt
    Cc: Russell King
    Cc: Greg KH
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • This changes pci_set_dma_mask to call the generic DMA API, dma_set_mask.

    pci_set_dma_mask (in drivers/pci/pci.c) does the same things that
    dma_set_mask does on all the architectures that use pci_set_dma_mask;
    calls dma_supprted and sets dev->dma_mask. So we safely change
    pci_set_dma_mask to simply call dma_set_mask.

    Signed-off-by: FUJITA Tomonori
    Cc: James Bottomley
    Cc: David S. Miller
    Cc: Jesse Barnes
    Acked-by: Benjamin Herrenschmidt
    Cc: Russell King
    Cc: Greg KH
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

09 Mar, 2010

1 commit


08 Mar, 2010

2 commits

  • In the future, we are going to be changing the lock type for struct
    device (once we get the lockdep infrastructure properly worked out) To
    make that changeover easier, and to possibly burry the lock in a
    different part of struct device, let's create some functions to lock and
    unlock a device so that no out-of-core code needs to be changed in the
    future.

    This patch creates the device_lock/unlock/trylock() functions, and
    converts all in-tree users to them.

    Cc: Thomas Gleixner
    Cc: Jean Delvare
    Cc: Dave Young
    Cc: Ming Lei
    Cc: Jiri Kosina
    Cc: Phil Carmody
    Cc: Arjan van de Ven
    Cc: Cornelia Huck
    Cc: Rafael J. Wysocki
    Cc: Pavel Machek
    Cc: Len Brown
    Cc: Magnus Damm
    Cc: Alan Stern
    Cc: Randy Dunlap
    Cc: Stefan Richter
    Cc: David Brownell
    Cc: Vegard Nossum
    Cc: Jesse Barnes
    Cc: Alex Chiang
    Cc: Kenji Kaneshige
    Cc: Andrew Morton
    Cc: Andrew Patterson
    Cc: Yu Zhao
    Cc: Dominik Brodowski
    Cc: Samuel Ortiz
    Cc: Wolfram Sang
    Cc: CHENG Renquan
    Cc: Oliver Neukum
    Cc: Frans Pop
    Cc: David Vrabel
    Cc: Kay Sievers
    Cc: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • * 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (30 commits)
    x86, mrst: Fix whitespace breakage in apb_timer.c
    x86, mrst: Fix APB timer per cpu clockevent
    x86, mrst: Remove X86_MRST dependency on PCI_IOAPIC
    x86, olpc: Use pci subarch init for OLPC
    x86, pci: Add arch_init to x86_init abstraction
    x86, mrst: Add Kconfig dependencies for Moorestown
    x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n
    x86, numaq: Make CONFIG_X86_NUMAQ depend on CONFIG_PCI
    x86, pci: Add sanity check for PCI fixed bar probing
    x86, legacy_irq: Remove duplicate vector assigment
    x86, legacy_irq: Remove left over nr_legacy_irqs
    x86, mrst: Platform clock setup code
    x86, apbt: Moorestown APB system timer driver
    x86, mrst: Add vrtc platform data setup code
    x86, mrst: Add platform timer info parsing code
    x86, mrst: Fill in PCI functions in x86_init layer
    x86, mrst: Add dummy legacy pic to platform setup
    x86/PCI: Moorestown PCI support
    x86, ioapic: Add dummy ioapic functions
    x86, ioapic: Early enable ioapic for timer irq
    ...

    Fixed up semantic conflict of new clocksources due to commit
    17622339af25 ("clocksource: add argument to resume callback").

    Linus Torvalds
     

06 Mar, 2010

1 commit

  • Make the run-time power management of PCI devices be inactive by
    default by calling pm_runtime_forbid() for each PCI device during its
    initialization. This setting may be overriden by the user space with
    the help of the /sys/devices/.../power/control interface.

    That's necessary to avoid breakage on systems where ACPI-based
    wake-up is known to fail for some devices.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     

01 Mar, 2010

1 commit


27 Feb, 2010

1 commit

  • Set power.async_suspend for all PCI devices and PCIe port services,
    so that they can be suspended and resumed in parallel with other
    devices they don't depend on in a known way (i.e. devices which are
    not their parents or children).

    This only affects the "regular" suspend and resume stages, which
    means in particular that the restoration of the PCI devices' standard
    configuration registers during resume will still be carried out
    synchronously (at the "early" resume stage).

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

24 Feb, 2010

1 commit


23 Feb, 2010

4 commits

  • Introduce run-time PM callbacks for the PCI bus type. Make the new
    callbacks work in analogy with the existing system sleep PM
    callbacks, so that the drivers already converted to struct dev_pm_ops
    can use their suspend and resume routines for run-time PM without
    modifications.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • Although the majority of PCI devices can generate PMEs that in
    principle may be used to wake up devices suspended at run time,
    platform support is generally necessary to convert PMEs into wake-up
    events that can be delivered to the kernel. If ACPI is used for this
    purpose, PME signals generated by a PCI device will trigger the ACPI
    GPE associated with the device to generate an ACPI wake-up event that
    we can set up a handler for, provided that everything is configured
    correctly.

    Unfortunately, the subset of PCI devices that have GPEs associated
    with them is quite limited. The devices without dedicated GPEs have
    to rely on the GPEs associated with other devices (in the majority of
    cases their upstream bridges and, possibly, the root bridge) to
    generate ACPI wake-up events in response to PME signals from them.

    Add ACPI platform support for PCI PME wake-up:
    o Add a framework making is possible to use ACPI system notify
    handlers for run-time PM.
    o Add new PCI platform callback ->run_wake() to struct
    pci_platform_pm_ops allowing us to enable/disable the platform to
    generate wake-up events for given device. Implemet this callback
    for the ACPI platform.
    o Define ACPI wake-up handlers for PCI devices and PCI root buses and
    make the PCI-ACPI binding code register wake-up notifiers for all
    PCI devices present in the ACPI tables.
    o Add function pci_dev_run_wake() which can be used by PCI drivers to
    check if given device is capable of generating wake-up events at
    run time.

    Developed in cooperation with Matthew Garrett .

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • Add function pci_check_pme_status() that will check the PME status
    bit of given device and clear it along with the PME enable bit. It
    will be necessary for PCI run-time power management.

    Based on a patch from Shaohua Li

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     
  • Currently, drivers/pci/quirks.c is built unconditionally, but if
    CONFIG_PCI_QUIRKS is unset, the only things actually built in this
    file are definitions of global variables and empty functions (due to
    the #ifdef CONFIG_PCI_QUIRKS embracing all of the code inside the
    file). This is not particularly nice and if someone overlooks
    the #ifdef CONFIG_PCI_QUIRKS, build errors are introduced.

    To clean that up, move the definitions of the global variables in
    quirks.c that are always built to pci.c, move the definitions of
    the empty functions (compiled when CONFIG_PCI_QUIRKS is unset) to
    headers (additionally make these functions static inline) and modify
    drivers/pci/Makefile so that quirks.c is only built if
    CONFIG_PCI_QUIRKS is set.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     

20 Feb, 2010

1 commit


06 Feb, 2010

1 commit

  • Update pci_set_vga_state to call arch dependent functions to enable Legacy
    VGA I/O transactions to be redirected to correct target.

    [akpm@linux-foundation.org: make pci_register_set_vga_state() __init]
    Signed-off-by: Mike Travis
    LKML-Reference:
    Cc: Thomas Gleixner
    Cc: Robin Holt
    Cc: Jack Steiner
    Cc: Ingo Molnar
    Cc: Jesse Barnes
    Cc: David Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: H. Peter Anvin

    Mike Travis
     

05 Jan, 2010

1 commit

  • It turns out that some PCI devices require extra delays when changing
    power state from D3 to D0 (and the other way around). Although this
    is against the PCI specification, we can handle it quite easily by
    allowing drivers to define arbitrary D3 delays for devices known to
    require extra time for switching power states.

    Introduce additional field d3_delay in struct pci_dev and use it to
    store the value of the device's D0->D3 delay, in miliseconds. Make
    the PCI PM core code use the per-device d3_delay unless
    pci_pm_d3_delay is greater (in which case the latter is used).
    [This also allows the driver to specify d3_delay shorter than the
    10 ms required by the PCI standard if the device is known to be able
    to handle that.]

    Make the sky2 driver set d3_delay to 150 for devices handled by it.

    Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14730 which is a
    listed regression from 2.6.30.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jesse Barnes

    Rafael J. Wysocki
     

01 Jan, 2010

1 commit

  • After commit b9c3b266411d27f1a6466c19d146d08db576bfea ("PCI: support
    device-specific reset methods") the kernel build is broken if
    CONFIG_PCI_QUIRKS is unset.

    Fix this by moving pci_dev_specific_reset() to drivers/pci/quirks.c and
    providing an empty replacement for !CONFIG_PCI_QUIRKS builds.

    Signed-off-by: Rafael J. Wysocki
    Reported-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

17 Dec, 2009

3 commits

  • The cardbus code creates PCI devices without ever going through the
    necessary fixup bits and pieces that normal PCI devices go through.

    There's in fact a commented out call to pcibios_fixup_bus() in there,
    it's commented because ... it doesn't work.

    I could make pcibios_fixup_bus() do the right thing on powerpc easily
    but I felt it cleaner instead to provide a specific hook pci_fixup_cardbus
    for which a weak empty implementation is provided by the PCI core.

    This fixes cardbus on powerbooks and probably all other PowerPC
    platforms which was broken completely for ever on some platforms and
    since 2.6.31 on others such as PowerBooks when we made the DMA ops
    mandatory (since those are setup by the fixups).

    Acked-by: Dominik Brodowski
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Jesse Barnes

    Benjamin Herrenschmidt
     
  • Changing occurrences of variants of PCI-X and PCIe to the PCI-SIG
    terms listed in the "Trademark and Logo Usage Guidelines".
    http://www.pcisig.com/developers/procedures/logos/Trademark_and_Logo_Usage_Guidelines_updated_112206.pdf

    Patch is limited to drivers/pci/ and changes concern comments only.

    Signed-off-by: Stefan Assmann
    Signed-off-by: Jesse Barnes

    Stefan Assmann
     
  • Add a new type of quirk for resetting devices at pci_dev_reset time.
    This is necessary to handle device with nonstandard reset procedures,
    especially useful for guest drivers.

    Signed-off-by: Yu Zhao
    Signed-off-by: Dexuan Cui
    Signed-off-by: Jesse Barnes

    Dexuan Cui
     

05 Dec, 2009

3 commits

  • Remove a stray space in pci_save_state().

    Signed-off-by: Kleber Sacilotto de Souza
    Signed-off-by: Jesse Barnes

    Kleber Sacilotto de Souza
     
  • Commit ae21ee65e8bc228416bbcc8a1da01c56a847a60c "PCI: acs p2p upsteram
    forwarding enabling" doesn't actually enable ACS.

    Add a function to pci core to allow an IOMMU to request that ACS
    be enabled. The existing mechanism of using iommu_found() in the pci
    core to know when ACS should be enabled doesn't actually work due to
    initialization order; iommu has only been detected not initialized.

    Have Intel and AMD IOMMUs request ACS, and Xen does as well during early
    init of dom0.

    Cc: Allen Kay
    Cc: David Woodhouse
    Cc: Jeremy Fitzhardinge
    Cc: Joerg Roedel
    Signed-off-by: Chris Wright
    Signed-off-by: Jesse Barnes

    Chris Wright
     
  • The pcie_flr routine writes the device control register with the FLR bit
    set clearing all other fields for the FLR duration. Among other fields,
    the Max_Payload_Size is also cleared which can cause errors if there are
    transactions lurking in the HW pipeline. The patch replaces the blank
    write with read-modify-write of the control register keeping the other
    fields intact.

    Signed-off-by: Shmulik Ravid
    Signed-off-by: Jesse Barnes

    Shmulik Ravid