1. 03 5月, 2007 12 次提交
    • M
      MSI: Simplify BUG() handling in pci_disable_msix() · 54bc6c0b
      Michael Ellerman 提交于
      Although it might be nice to do a printk before BUG'ing, it's really not
      necessary, and it complicates the code.
      
      The behaviour has changed slightly, in that before we set a flag if the irq
      had an action, and continued freeing the other irqs. But as I see it that's
      all irrelevant because we end up BUG'ing anyway.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Acked-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      54bc6c0b
    • M
      MSI: Simplify BUG() handling in pci_disable_msi() · e387b9ee
      Michael Ellerman 提交于
      Although it might be nice to do a printk before BUG'ing, it's really not
      necessary, and it complicates the code.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Acked-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e387b9ee
    • S
      pci: do not mark exported functions as __devinit · 96bde06a
      Sam Ravnborg 提交于
      Functions marked __devinit will be removed after kernel init.  But being
      exported they are potentially called by a module much later.
      
      So the safer choice seems to be to keep the function even in the non
      CONFIG_HOTPLUG case.
      
      This silence the follwoing section mismatch warnings:
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_device from __ksymtab_gpl between '__ksymtab_pci_bus_add_device' (at offset 0x20) and '__ksymtab_pci_walk_bus'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_create_bus from __ksymtab_gpl between '__ksymtab_pci_create_bus' (at offset 0x40) and '__ksymtab_pci_stop_bus_device'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_max_busnr from __ksymtab_gpl between '__ksymtab_pci_bus_max_busnr' (at offset 0xc0) and '__ksymtab_pci_assign_resource_fixed'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_claim_resource from __ksymtab_gpl between '__ksymtab_pci_claim_resource' (at offset 0xe0) and '__ksymtab_pcie_port_bus_type'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_devices from __ksymtab between '__ksymtab_pci_bus_add_devices' (at offset 0x70) and '__ksymtab_pci_bus_alloc_resource'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_scan_bus_parented from __ksymtab between '__ksymtab_pci_scan_bus_parented' (at offset 0x90) and '__ksymtab_pci_root_buses'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_assign_resources from __ksymtab between '__ksymtab_pci_bus_assign_resources' (at offset 0x4d0) and '__ksymtab_pci_bus_size_bridges'
      WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_size_bridges from __ksymtab between '__ksymtab_pci_bus_size_bridges' (at offset 0x4e0) and '__ksymtab_pci_setup_cardbus'
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      96bde06a
    • J
      PCI: Require vendor and device for new_id · 6ba18636
      Jean Delvare 提交于
      Currently, there is no minimum number of fields required when adding
      a new device ID to a PCI driver through the new_id sysfs file. It is
      possible to add a new ID with only the vendor ID set, causing the
      driver to attempt to attach to all PCI devices from that vendor. This
      has been reported to happen accidentally:
        http://lists.lm-sensors.org/pipermail/lm-sensors/2007-March/019366.html
      It is even possible to not even set the vendor ID field, causing the
      driver to attempt to attach to _all_ the PCI devices.
      
      This sounds dangerous and I fail to see any valid use of this
      "feature". Thus I suggest that we now require at least the first two
      fields (vendor ID and device ID) to be set. For what it's worth, this
      is what the USB subsystem does.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6ba18636
    • J
      PCI: fix sysfs rom file creation for BIOS ROM shadows · 40ee9e9f
      Jesse Barnes 提交于
      At one time, if a BIOS ROM shadow was detected for the boot video
      device (stored at offset 0xc0000), we'd set a special resource flag,
      IORESOURCE_ROM_SHADOW, so that the sysfs ROM file code could handle
      it properly.  That broke along the way somewhere though, so current
      kernels will be missing 'rom' files in sysfs if the video device
      doesn't have an explicit ROM BAR.
      
      This patch fixes the regression by moving the video fixup quirk to a
      little later in the boot cycle (to avoid having its work undone by
      PCI resource allocation) and checking in the PCI sysfs code whether
      a rom file should be created due to a shadow resource, which is also
      moved to a little later in the boot cycle so it will occur after the
      video fixup.  Tested and works on my i386 test box.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      40ee9e9f
    • R
      PCI: kernel-doc fix · 8d7d86e9
      Randy Dunlap 提交于
      Warning(linux-2621-rc3g7/drivers/pci/pci.c:1283): No description found for parameter 'dev'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8d7d86e9
    • J
      PCI: Cleanup the includes of <linux/pci.h> · 6473d160
      Jean Delvare 提交于
      I noticed that many source files include <linux/pci.h> while they do
      not appear to need it. Here is an attempt to clean it all up.
      
      In order to find all possibly affected files, I searched for all
      files including <linux/pci.h> but without any other occurence of "pci"
      or "PCI". I removed the include statement from all of these, then I
      compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
      false positives manually.
      
      My tests covered 66% of the affected files, so there could be false
      positives remaining. Untested files are:
      
      arch/alpha/kernel/err_common.c
      arch/alpha/kernel/err_ev6.c
      arch/alpha/kernel/err_ev7.c
      arch/ia64/sn/kernel/huberror.c
      arch/ia64/sn/kernel/xpnet.c
      arch/m68knommu/kernel/dma.c
      arch/mips/lib/iomap.c
      arch/powerpc/platforms/pseries/ras.c
      arch/ppc/8260_io/enet.c
      arch/ppc/8260_io/fcc_enet.c
      arch/ppc/8xx_io/enet.c
      arch/ppc/syslib/ppc4xx_sgdma.c
      arch/sh64/mach-cayman/iomap.c
      arch/xtensa/kernel/xtensa_ksyms.c
      arch/xtensa/platform-iss/setup.c
      drivers/i2c/busses/i2c-at91.c
      drivers/i2c/busses/i2c-mpc.c
      drivers/media/video/saa711x.c
      drivers/misc/hdpuftrs/hdpu_cpustate.c
      drivers/misc/hdpuftrs/hdpu_nexus.c
      drivers/net/au1000_eth.c
      drivers/net/fec_8xx/fec_main.c
      drivers/net/fec_8xx/fec_mii.c
      drivers/net/fs_enet/fs_enet-main.c
      drivers/net/fs_enet/mac-fcc.c
      drivers/net/fs_enet/mac-fec.c
      drivers/net/fs_enet/mac-scc.c
      drivers/net/fs_enet/mii-bitbang.c
      drivers/net/fs_enet/mii-fec.c
      drivers/net/ibm_emac/ibm_emac_core.c
      drivers/net/lasi_82596.c
      drivers/parisc/hppb.c
      drivers/sbus/sbus.c
      drivers/video/g364fb.c
      drivers/video/platinumfb.c
      drivers/video/stifb.c
      drivers/video/valkyriefb.c
      include/asm-arm/arch-ixp4xx/dma.h
      sound/oss/au1550_ac97.c
      
      I would welcome test reports for these files. I am fine with removing
      the untested files from the patch if the general opinion is that these
      changes aren't safe. The tested part would still be nice to have.
      
      Note that this patch depends on another header fixup patch I submitted
      to LKML yesterday:
        [PATCH] scatterlist.h needs types.h
        http://lkml.org/lkml/2007/3/01/141Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6473d160
    • K
      PCI: fix multiple definition of `queue_pushbutton_work' · e325e1f0
      Kristen Carlson Accardi 提交于
      Fix duplicate names in shpchp and pciehp.
      Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      e325e1f0
    • K
      pciehp: Adapt to device driver model · 92333526
      Kenji Kaneshige 提交于
      This patch adapts PCIEHP driver to PCI device driver model.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      92333526
    • K
      pciehp: Event handling rework · 5d386e1a
      Kenji Kaneshige 提交于
      The event handler of PCIEHP driver is unnecessarily very complex. In
      addition, current event handler can only a fixed number of events at
      the same time, and some of events would be lost if several number of
      events happened at the same time.
      
      This patch simplify the event handler using 'work queue', and it also
      fix the above-mentioned issue.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5d386e1a
    • B
      pci: New PCI-E reset API · f7bdd12d
      Brian King 提交于
      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: NBrian King <brking@linux.vnet.ibm.com>
      Acked-by: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f7bdd12d
    • M
      PCI: Flush MSI-X table writes · 988cbb15
      Mitch Williams 提交于
      This patch fixes a kernel bug which is triggered when using the
      irqbalance daemon with MSI-X hardware.
      
      Because both MSI-X interrupt messages and MSI-X table writes are posted,
      it's possible for them to cross while in-flight.  This results in
      interrupts being received long after the kernel thinks they're disabled,
      and in interrupts being sent to stale vectors after rebalancing.
      
      This patch performs a read flush after writes to the MSI-X table for
      mask and unmask operations.  Since the SMP affinity is set while
      the interrupt is masked, and since it's unmasked immediately after,
      no additional flushes are required in the various affinity setting
      routines.
      
      This patch has been validated with (unreleased) network hardware which
      uses MSI-X.
      
      Revised with input from Eric Biederman.
      Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
      Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      988cbb15
  2. 01 5月, 2007 2 次提交
    • L
      libata: honour host controllers that want just one host · dc87c398
      Linus Torvalds 提交于
      The Marvell IDE interface on my machine would hit a BUG_ON() in
      lib/iomem.c because it was calling ata_pci_init_one() specifying just a
      single port on the host, but that would actually end up trying to
      initialize two ports, the second one with bogus information.
      
      This fixes "ata_pci_init_one()" so that it actually passes down the
      n_ports variable that it got from the low-level driver to the host
      allocation routine ("ata_host_alloc_pinfo()"), which results in the ATA
      layer actually having the correct port number information.
      
      And in order to make it all work, I also needed to fix a few places that
      had incorrectly hard-coded the fact that a host always had exactly two
      ports (both ata_pci_init_bmdma() and ata_request_legacy_irqs() would
      just always iterate over both ports).
      Acked-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dc87c398
    • J
      power management: implement pm_ops.valid for everybody · e8c9c502
      Johannes Berg 提交于
      Almost all users of pm_ops only support mem sleep, don't check in .valid and
      don't reject any others in .prepare so users can be confused if they check
      /sys/power/state, especially when new states are added (these would then
      result in s-t-r although they're supposed to be something different).
      
      This patch implements a generic pm_valid_only_mem function that is then
      exported for users and puts it to use in almost all existing pm_ops.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: David Brownell <david-b@pacbell.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: linux-pm@lists.linux-foundation.org
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Greg KH <greg@kroah.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8c9c502
  3. 30 4月, 2007 26 次提交