13 Oct, 2007

1 commit


23 Aug, 2007

2 commits


01 Aug, 2007

1 commit


25 Jul, 2007

1 commit

  • Some odd ACPI implementations choke if certain controller is disabled
    when ACPI suspend is invoked but we still need to make sure the PCI
    device is enabled during resume. Simply using pci_enable_device()
    unbalances device enable count. Export __pci_reenable_device().

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

17 Jul, 2007

1 commit

  • Before calling init_hwif_default, ide_unregister gets lock ide_lock and
    disables irq. init_hwif_default calls ide_default_io_base which calls
    pci_get_device and later pci_get_subsys tries to apply for semaphore
    pci_bus_sem and goes to sleep.

    Mostly, pci_get_device should be called when irq is turned on.

    ide_default_io_base just needs find if list pci_devices is empty.

    Signed-off-by: Zhang Yanmin
    Cc: Greg KH
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang, Yanmin
     

13 Jul, 2007

1 commit


12 Jul, 2007

8 commits

  • As suggested by Andrew, add pci_try_set_mwi(), which does not require
    return-value checking.

    - add pci_try_set_mwi() without __must_check
    - make it return 0 on success, errno if the "try" failed or error
    - review callers

    Signed-off-by: Randy Dunlap
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • Signed-off-by: Rolf Eike Beer
    Signed-off-by: Greg Kroah-Hartman

    Rolf Eike Beer
     
  • Currently there are 97 occurrences where drivers need the pci
    revision ID. We can do this once for all devices. Even the pci
    subsystem needs the revision several times for quirks. The extra
    u8 member pads out nicely in the pci_dev struct.

    Signed-off-by: Auke Kok
    Signed-off-by: Greg Kroah-Hartman

    Auke Kok
     
  • Remove pointless and never-called enable_wake() hook from pci_driver and
    from documentation. Evidently this was introduced in the 2.4.6 kernel,
    but there's no evidence it was ever called; and it was rarely implemented.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • We've now fixed up most users of pci_find_slot, and the remainder are either
    hard and need someone with the hardware and info to work on it, or patches
    exist but are not yet merged.

    Time therefore for some gentle encouragement

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

    Alan Cox
     
  • Currently pcibios_add_platform_entries() returns void, but could fail,
    so instead have it return an int and propagate errors up to
    pci_create_sysfs_dev_files().

    Fixes:
    arch/powerpc/kernel/pci_64.c: In function 'pcibios_add_platform_entries':
    arch/powerpc/kernel/pci_64.c:878: warning: ignoring return value of
    'device_create_file', declared with attribute warn_unused_result
    arch/powerpc/kernel/pci_32.c: In function 'pcibios_add_platform_entries':
    arch/powerpc/kernel/pci_32.c:1043: warning: ignoring return value of
    'device_create_file', declared with attribute warn_unused_result

    Signed-off-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • I'm not sure if this is going to fly, weak symbols work on the compilers I'm
    using, but whether they work for all of the affected architectures I can't say.
    I've cc'ed as many arch maintainers/lists as I could find.

    But assuming they do, we can use a weak empty definition of
    pcibios_add_platform_entries() to avoid having an empty definition on every
    arch.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • This patch introduces an interface to read and write PCI-X / PCI-Express
    maximum read byte count values from PCI config space. There is a second
    function that returns the maximum _designed_ read byte count, which marks the
    maximum value for a device, since some drivers try to set MMRBC to the
    highest allowed value and rely on such a function.

    Based on patch set by Stephen Hemminger

    Cc: Stephen Hemminger
    Signed-off-by: Peter Oruba
    Signed-off-by: Greg Kroah-Hartman

    Peter Oruba
     

10 Jul, 2007

1 commit


02 Jul, 2007

1 commit


03 May, 2007

6 commits

  • Unless we finally completely remove it, people will always add new users.

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

    Adrian Bunk
     
  • Now that we keep a list of msi descriptors, we don't need first_msi_irq
    in the pci dev.

    If we somehow have zero MSIs configured list_entry() will give us weird
    oopes or nice memory corruption bugs. So be paranoid. Add BUG_ONs and also
    a check in pci_msi_check_device() to make sure nvec > 0.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • The msi descriptors are linked together with what looks a lot like
    a linked list, but isn't a struct list_head list. Make it one.

    The only complication is that previously we walked a list of irqs, and
    got the descriptor for each with get_irq_msi(). Now we have a list of
    descriptors and need to get the irq out of it, so it needs to be in the
    actual struct msi_desc. We use 0 to indicate no irq is setup.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • There are currently several places in the kernel where we kmalloc()
    a struct pci_dev and start initialising it. It'd be preferable to
    have an allocator so we can ensure the pci_dev is correctly initialised
    in one place.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • Balance declarations of pci_request_regions() and pci_release_regions() with
    empty inline definitions for the CONFIG_PCI=n case -- otherwise my patch to
    drivers/net/3c59x.c in the -mm tree doesn't compile. :-)

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Greg Kroah-Hartman

    Sergei Shtylyov
     
  • Adds a new API which can be used to issue various types
    of PCI-E reset, including PCI-E warm reset and PCI-E hot reset.
    This is needed for an ipr PCI-E adapter which does not properly
    implement BIST. Running BIST on this adapter results in PCI-E
    errors. The only reliable reset mechanism that exists on this
    hardware is PCI Fundamental reset (warm reset). Since driving
    this type of reset is architecture unique, this provides the
    necessary hooks for architectures to add this support.

    Signed-off-by: Brian King
    Acked-by: Linas Vepstas
    Signed-off-by: Greg Kroah-Hartman

    Brian King
     

29 Apr, 2007

1 commit


28 Apr, 2007

1 commit

  • Make multithreaded probing work per subsystem instead of per driver.

    It doesn't make much sense to probe the same device for multiple drivers in
    parallel (after all, only one driver can bind to the device). Instead, create
    a probing thread for each device that probes the drivers one after another.
    Also make the decision to use multi-threaded probe per bus instead of per
    device and adapt the pci code.

    Signed-off-by: Cornelia Huck
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     

13 Mar, 2007

1 commit

  • Because we do not reserve space for the pci-x and pci-e state in struct
    pci dev we need to dynamically allocate it. However because we need
    to support restore being called multiple times after a single save
    it is never safe to free the buffers we have allocated to hold the
    state.

    So this patch modifies the save routines to first check to see
    if we have already allocated a state buffer before allocating
    a new one. Then the restore routines are modified to not free
    the state after restoring it. Simple and it fixes some subtle
    error path handling bugs, that are hard to test for.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman
    Acked-by: Auke Kok
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

05 Mar, 2007

1 commit

  • In some cases when we are not using msi we need a way to ensure that the
    hardware does not have an msi capability enabled. Currently the code has been
    calling disable_msi_mode to try and achieve that. However disable_msi_mode
    has several other side effects and is only available when msi support is
    compiled in so it isn't really appropriate.

    Instead this patch implements pci_msi_off which disables all msi and msix
    capabilities unconditionally with no additional side effects.

    pci_disable_device was redundantly clearing the bus master enable flag and
    clearing the msi enable bit. A device that is not allowed to perform bus
    mastering operations cannot generate intx or msi interrupt messages as those
    are essentially a special case of dma, and require bus mastering. So the call
    in pci_disable_device to disable msi capabilities was redundant.

    quirk_pcie_pxh also called disable_msi_mode and is updated to use pci_msi_off.

    Signed-off-by: Eric W. Biederman
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

17 Feb, 2007

1 commit

  • CARDBUS_MEM_SIZE was increased to 64MB on 2.6.20-rc2, but larger size might
    result in allocation failure for the reserving itself on some platforms
    (for example typical 32bit MIPS). Make it (and CARDBUS_IO_SIZE too)
    customizable by "pci=" option for such platforms.

    Signed-off-by: Atsushi Nemoto
    Cc: Daniel Ritz
    Cc: Ralf Baechle
    Cc: Ivan Kokshaysky
    Cc: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Atsushi Nemoto
     

12 Feb, 2007

1 commit

  • * Split the implementation-agnostic stuff in separate files.
    * Make sure that targets using non-default request_irq() pull
    kernel/irq/devres.o
    * Introduce new symbols (HAS_IOPORT and HAS_IOMEM) defaulting to positive;
    allow architectures to turn them off (we needed these symbols anyway for
    dependencies of quite a few drivers).
    * protect the ioport-related parts of lib/devres.o with CONFIG_HAS_IOPORT.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

10 Feb, 2007

1 commit

  • Implement device resource management, in short, devres. A device
    driver can allocate arbirary size of devres data which is associated
    with a release function. On driver detach, release function is
    invoked on the devres data, then, devres data is freed.

    devreses are typed by associated release functions. Some devreses are
    better represented by single instance of the type while others need
    multiple instances sharing the same release function. Both usages are
    supported.

    devreses can be grouped using devres group such that a device driver
    can easily release acquired resources halfway through initialization
    or selectively release resources (e.g. resources for port 1 out of 4
    ports).

    This patch adds devres core including documentation and the following
    managed interfaces.

    * alloc/free : devm_kzalloc(), devm_kzfree()
    * IO region : devm_request_region(), devm_release_region()
    * IRQ : devm_request_irq(), devm_free_irq()
    * DMA : dmam_alloc_coherent(), dmam_free_coherent(),
    dmam_declare_coherent_memory(), dmam_pool_create(),
    dmam_pool_destroy()
    * PCI : pcim_enable_device(), pcim_pin_device(), pci_is_managed()
    * iomap : devm_ioport_map(), devm_ioport_unmap(), devm_ioremap(),
    devm_ioremap_nocache(), devm_iounmap(), pcim_iomap_table(),
    pcim_iomap(), pcim_iounmap()

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

08 Feb, 2007

9 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (41 commits)
    Revert "PCI: remove duplicate device id from ata_piix"
    msi: Make MSI useable more architectures
    msi: Kill the msi_desc array.
    msi: Remove attach_msi_entry.
    msi: Fix msi_remove_pci_irq_vectors.
    msi: Remove msi_lock.
    msi: Kill msi_lookup_irq
    MSI: Combine pci_(save|restore)_msi/msix_state
    MSI: Remove pci_scan_msi_device()
    MSI: Replace pci_msi_quirk with calls to pci_no_msi()
    PCI: remove duplicate device id from ipr
    PCI: remove duplicate device id from ata_piix
    PCI: power management: remove noise on non-manageable hw
    PCI: cleanup MSI code
    PCI: make isa_bridge Alpha-only
    PCI: remove quirk_sis_96x_compatible()
    PCI: Speed up the Intel SMBus unhiding quirk
    PCI Quirk: 1k I/O space IOBL_ADR fix on P64H2
    shpchp: delete trailing whitespace
    shpchp: remove DBG_XXX_ROUTINE
    ...

    Linus Torvalds
     
  • The function msi_lookup_irq was horrible. As a side effect of running
    it changed dev->irq, and then the callers would need to change it
    back. In addition it does a global scan through all of the irqs,
    which seems to be the sole justification of the msi_lock.

    To remove the neede for msi_lookup_irq I added first_msi_irq to struct
    pci_dev. Then depending on the context I replaced msi_lookup_irq with
    dev->first_msi_irq, dev->msi_enabled, or dev->msix_enabled.

    msi_enabled and msix_enabled were already present in pci_dev for other
    reasons.

    Signed-off-by: Eric W. Biederman
    Acked-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • pci_scan_msi_device() doesn't do anything anymore, so remove it.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • Since isa_bridge is neither assigned any value !NULL nor used on !Alpha,
    there's no reason for providing it.

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

    Adrian Bunk
     
  • On Fri, Nov 17, 2006 at 09:32:36AM -0500, Alan Cox wrote:
    >
    > Soon we should deprecate pci_find_device as well

    So let's mark it as __deprecated now, which also has the side effect
    that noone can later whine that removing it might break some shiny
    external modules.

    Oh, and if anything starts complaining "But this adds some warnings to
    my kernel build!", he should either first fix the 200 kB (sic) of
    warnings I'm getting in 2.6.19-rc5-mm2 starting at MODPOST or go to hell.

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • This patch removes the no longer used pci_find_device_reverse().

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • Add very simple routine to indicate the pci channel error state.

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

    Linas Vepstas
     
  • This patch adds the following changes into generic PCI code especially
    for PCI legacy I/O port free drivers.

    - Added new pci_request_selected_regions() and
    pci_release_selected_regions() for PCI legacy I/O port free
    drivers in order to request/release only the selected regions.

    - Added helper routine pci_select_bars() which makes proper mask
    of BARs from the specified resource type. This would be very
    helpful for users of pci_enable_device_bars().

    Signed-off-by: Kenji Kaneshige
    Signed-off-by: Hidetoshi Seto
    Cc: Inaky Perez-Gonzalez
    Signed-off-by: Greg Kroah-Hartman

    Hidetoshi Seto
     
  • This adds the module name to all PCI drivers, if they are built into the
    kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/

    It also fixes up the IDE core, which was calling __pci_register_driver()
    directly.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

21 Dec, 2006

1 commit