1. 03 2月, 2008 2 次提交
    • S
      PCI: fix section mismatch warnings referring to pci_do_scan_bus · 4105717b
      Sam Ravnborg 提交于
      Fix following warnings:
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xb054): Section mismatch in reference from the function cpci_configure_slot() to the function .devinit.text:pci_do_scan_bus()
      WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x153ab): Section mismatch in reference from the function shpchp_configure_device() to the function .devinit.text:pci_do_scan_bus()
      WARNING: o-x86_64/drivers/pci/built-in.o(__ksymtab+0xc0): Section mismatch in reference from the variable __ksymtab_pci_do_scan_bus to the function .devinit.text:pci_do_scan_bus()
      
      PCI hotplug were the only user of pci_do_scan_bus()
      so moving this function to a separate file that is build
      only when we enable CONFIG_HOTPLUG_PCI.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4105717b
    • G
      Revert "PCI: PCIE ASPM support" · cc3a1378
      Greg Kroah-Hartman 提交于
      This reverts commit 6c723d5b.
      
      It caused build errors on non-x86 platforms, config file confusion, and
      even some boot errors on some x86-64 boxes.  All around, not quite ready
      for prime-time :(
      
      Cc: Shaohua Li <shaohua.li@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cc3a1378
  2. 02 2月, 2008 6 次提交
  3. 25 1月, 2008 1 次提交
    • G
      driver core: add way to get to bus device klist · b249072e
      Greg Kroah-Hartman 提交于
      This allows an easier way to get to the device klist associated with a
      struct bus_type (you have three to choose from...)  This will make it
      easier to move these fields to be dynamic in a future patch.
      
      The only user of this is the PCI core which horribly abuses this
      interface to rearrange the order of the pci devices.  This should be
      done using the existing bus device walking functions, but that's left
      for future patches.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b249072e
  4. 28 12月, 2007 1 次提交
    • L
      [PCI] Do not enable CRS Software Visibility by default · ad7edfe0
      Linus Torvalds 提交于
      It appears that some PCI-E bridges do the wrong thing in the presense of
      CRS Software Visibility and MMCONFIG.  In particular, it looks like an
      ATI bridge (device ID 7936) will return 0001 in the vendor ID field of
      any bridged devices indefinitely.
      
      Not enabling CRS SV avoids the problem, and as we currently do not
      really make good use of the feature anyway (we just time out rather than
      do any threaded discovery as suggested by the CRS specs), we're better
      off just not enabling it.
      
      This should fix a slew of problem reports with random devices (generally
      graphics adapters or fairly high-performance networking cards, since it
      only affected PCI-E) not getting properly recognized on these AMD systems.
      
      If we really want to use CRS-SV, we may end up eventually needing a
      whitelist of systems where this should be enabled, along with some kind
      of "pcibios_enable_crs()" query to call the system-specific code.
      Suggested-by: NLoic Prylli <loic@myri.com>
      Tested-by: NKai Ruhnau <kai@tragetaschen.dyndns.org>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ad7edfe0
  5. 18 12月, 2007 1 次提交
  6. 10 12月, 2007 1 次提交
  7. 22 10月, 2007 1 次提交
    • K
      Intel IOMMU: PCI generic helper function · 994a65e2
      Keshavamurthy, Anil S 提交于
      When devices are under a p2p bridge, upstream transactions get replaced by the
      device id of the bridge as it owns the PCIE transaction.  Hence its necessary
      to setup translations on behalf of the bridge as well.  Due to this limitation
      all devices under a p2p share the same domain in a DMAR.
      
      We just cache the type of device, if its a native PCIe device
      or not for later use.
      
      [akpm@linux-foundation.org: BUG_ON -> WARN_ON+recover]
      Signed-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      994a65e2
  8. 13 10月, 2007 4 次提交
    • G
      PCI: modify PCI bridge control ISA flag for clarity · 11949255
      Gary Hade 提交于
      Modify PCI Bridge Control ISA flag for clarity
      
      This patch changes PCI_BRIDGE_CTL_NO_ISA to PCI_BRIDGE_CTL_ISA
      and modifies it's clarifying comment and locations where used.
      The change reduces the chance of future confusion since it makes
      the set/unset meaning of the bit the same in both the bridge
      control register and bridge_ctl field of the pci_bus struct.
      Signed-off-by: NGary Hade <garyhade@us.ibm.com>
      Acked-by: NLinas Vepstas <linas@austin.ibm.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      11949255
    • G
      PCI: avoid P2P prefetch window for expansion ROMs · fd64cb46
      Gary Hade 提交于
      Avoid creating P2P prefetch window for expansion ROMs
      
      Because of the future possibility that P2P prefetch windows will contain
      address ranges above 4GB some BIOSes are providing space in the P2P
      non-prefetch windows for expansion ROMs.  This is due to expansion ROM
      BAR 32-bit limitation.  When expansion ROM BARs without BIOS assigned
      address(es) are currently found behind a P2P bridge, the kernel attempts
      to create a P2P prefetch window for them even though space for them has
      already been provided in the non-prefetch window.  _CRS on some systems
      with certain resource conservation conscious BIOSes may not provide the
      extra 1MB or more memory resource needed for the expansion ROM motivated
      prefetch window causing resource allocation errors.
      
      This change corrects the problem by removing IORESOURCE_PREFETCH from
      the expansion ROM flags initialization.  It also removes
      IORESOURCE_CACHEABLE which seems inappropriate if only non-cacheable
      memory is available.
      Signed-off-by: NGary Hade <gary.hade@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fd64cb46
    • G
      PCI: skip ISA ioresource alignment on some systems · 036fff4c
      Gary Hade 提交于
      Skip ISA ioresource alignment on some systems
      
      To conserve limited PCI i/o resource on some IBM multi-node systems, the
      BIOS allocates (via _CRS) and expects the kernel to use addresses in
      ranges currently excluded by pcibios_align_resource() [i386/pci/i386.c].
      This change allows the kernel to use the currently excluded address
      ranges on the IBM x3800, x3850, and x3950.
      Signed-off-by: NGary Hade <gary.hade@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      036fff4c
    • Y
      PCI: fix IDE legacy mode resources · fd6e7321
      Yoichi Yuasa 提交于
      I got the following error on MIPS Cobalt.
      
      PCI: Unable to reserve I/O region #1:8@f00001f0 for device 0000:00:09.1
      pata_via 0000:00:09.1: failed to request/iomap BARs for port 0 (errno=-16)
      PCI: Unable to reserve I/O region #3:8@f0000170 for device 0000:00:09.1
      pata_via 0000:00:09.1: failed to request/iomap BARs for port 1 (errno=-16)
      pata_via 0000:00:09.1: no available native port
      
      The legacy mode IDE resources set the following order.
      
      pci_setup_device()
          Legacy mode ATA controllers have fixed addresses.
          IDE resources: 0x1F0-0x1F7, 0x3F6, 0x170-0x177, 0x376
          |
          V
      pcibios_fixup_bus()
          MIPS Cobalt PCI bus regions have the -0x10000000 offset from PCI resources.
          pcibios_fixup_bus() fix PCI bus regions.
          0x1F0 - 0x10000000 = 0xF00001F0
          |
          V
      ata_pci_init_one()
          PCI: Unable to reserve I/O region #1:8@f00001f0 for device 0000:00:09.1
      
      In some architectures, PCI bus regions have the offset from PCI resources. 
      For this reason, pci_setup_device() should set PCI bus regions to
      dev->resource[].
      
      [akpm@linux-foundation.org: use struct initialiser]
      Signed-off-by: NYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Greg KH <greg@kroah.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fd6e7321
  9. 11 9月, 2007 1 次提交
    • R
      PCI: remove devinit from pci_read_bridge_bases · e365c3e7
      Ralf Baechle 提交于
      On MIPS with PCI && !HOTPLUG, I'm currently getting the following modpost
      warning:
      
        MODPOST vmlinux.o
      WARNING: vmlinux.o(.text+0x1ce128): Section mismatch: reference to .init.text:pci_read_bridge_bases (between 'pcibios_fixup_bus' and 'pcibios_enable_device')
      
      On MIPS I have the call chains pci_scan_child_bus -> pcibios_fixup_bus ->
      pci_read_bridge_bases.  pci_scan_child_bus can't be __devinit because it
      it is an exported symbol, thus pcibios_fixup_bus and pci_read_bridge_bases
      can't be either.
      
      For some reason I don't see this issue on x86; I blame compiler differences.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e365c3e7
  10. 23 8月, 2007 1 次提交
    • B
      PCI: lets kill the 'PCI hidden behind bridge' message · d55bef51
      Bernhard Kaindl 提交于
      Adrian Bunk wrote:
      > Alois Nešpor wrote
      >> PCI: Bus #0b (-#0e) is hidden behind transparent bridge #0a (-#0b) (try 'pci=assign-busses')
      >> Please report the result to linux-kernel to fix this permanently"
      >>
      >> dmesg:
      >> "Yenta: Raising subordinate bus# of parent bus (#0a) from #0b to #0e"
      >> without pci=assign-busses and nothing with pci=assign-busses.
      > 
      > Bernhard?
      
      Ok, lets kill the message. As Alois Nešpor also saw, that's fixed up by Yenta,
      so PCI does not have to warn about it. PCI could still warn about it if
      is_cardbus is 0 in that instance of pci_scan_bridge(), but so far I have
      not seen a report where this would have been the case so I think we can
      spare the kernel of that check (removes ~300 lines of asm) unless debugging
      is done.
      
      History: The whole check was added in the days before we had the fixup
      for this in Yenta and pci=assign-busses was the only way to get CardBus
      cards detected on many (not all) of the machines which give this warning.
      
      In theory, there could be cases when this warning would be triggered and
      it's not cardbus, then the warning should still apply, but I think this
      should only be the case when working on a completely broken PCI setup,
      but one may have already enabled the debug code in drivers/pci and the
      patched check would then trigger.
      
      I do not sign this off yet because it's completely untested so far, but
      everyone is free to test it (with the #ifdef DEBUG replaced by #if 1 and
      pr_debug( changed to printk(.
      
      We may also dump the whole check (remove everything within the #ifdef from
      the source) if that's perferred.
      
      On Alois Nešpor's machine this would then (only when debugging) this message:
      
      "PCI: Bus #0b (-#0e) is partially hidden behind transparent bridge #0a (-#0b)"
      
      "partially" should be in the message on his machine because #0b of #0b-#0e 
      is reachable behind #0a-#0b, but not #0c-#0e.
      
      But that differentiation is now moot anyway because the fixup in Yenta takes
      care of it as far as I could see so far, which means that unless somebody
      is debugging a totally broken PCI setup, this message is not needed anymore,
      not even for debugging PCI.
      
      
      Ok, here the patch with the following changes:
      
      * Refined to say that the bus is only partially hidden when the parent
        bus numbers are not totally way off (outside of) the child bus range
      * remove the reference to pci=assign-busses and the plea to report it
      
      We could add a pure source code-only comment to keep a reference to
      pci=assign-busses the in case when this is triggered by someone who
      is debugging the cause of this message and looking the way to solve it.
      
      From: Bernhard Kaindl <bk@suse.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d55bef51
  11. 17 7月, 2007 1 次提交
  12. 12 7月, 2007 3 次提交
  13. 03 5月, 2007 4 次提交
    • M
      MSI: Use a list instead of the custom link structure · 4aa9bc95
      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: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4aa9bc95
    • M
      PCI: Convert to alloc_pci_dev() · bab41e9b
      Michael Ellerman 提交于
      Convert code that allocs a struct pci_dev to use alloc_pci_dev().
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bab41e9b
    • M
      PCI: Create alloc_pci_dev(), the one true way to create a struct pci_dev · 65891215
      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: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65891215
    • 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
  14. 24 4月, 2007 1 次提交
  15. 04 3月, 2007 1 次提交
  16. 08 2月, 2007 2 次提交
  17. 31 12月, 2006 1 次提交
  18. 21 12月, 2006 1 次提交
    • R
      PCI legacy resource fix · fb0f2b40
      Ralf Baechle 提交于
      Since commit 368c73d4 the kernel will try
      to update the non-writeable BAR registers 0..3 of PIIX4 IDE adapters if
      pci_assign_unassigned_resources() is used to do full resource assignment of
      the bus.  This fails because in the PIIX4 these BAR registers have
      implicitly assumed values and read back as zero; it used to work because
      the kernel used to just write zero to that register the read back value did
      match what was written.
      
      The fix is a new resource flag IORESOURCE_PCI_FIXED used to mark a resource
      as non-movable.  This will also be useful to keep other import system
      resources from being moved around - for example system consoles on PCI
      busses.
      
      [akpm@osdl.org: cleanup]
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fb0f2b40
  19. 08 12月, 2006 1 次提交
    • C
      [PATCH] add numa node information to struct device · 87348136
      Christoph Hellwig 提交于
      For node-aware skb allocations we need information about the node in struct
      net_device or struct device.  Davem suggested to put it into struct device
      which this patch does.
      
      In particular:
      
       - struct device gets a new int numa_node member if CONFIG_NUMA is set
       - there are two new helpers, dev_to_node and set_dev_node to
         transparently deal with the non-numa case
       - for pci devices the node-info is set to the value we get from
         pcibus_to_node.
      
      Note that for some architectures pcibus_to_node doesn't work yet at the time
      we call it currently.  This is harmless and will just mean skb allocations
      aren't node-local on this architectures until the implementation of
      pcibus_to_node on these architectures have been updated (There are patches for
      x86 and x86_64 floating around)
      
      [akpm@osdl.org: cleanup]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      87348136
  20. 02 12月, 2006 1 次提交
    • A
      PCI: quirks: fix the festering mess that claims to handle IDE quirks · 368c73d4
      Alan Cox 提交于
      The number of permutations of crap we do is amazing and almost all of it
      has the wrong effect in 2.6.
      
      At the heart of this is the PCI SFF magic which says that compatibility
      mode PCI IDE controllers use ISA IRQ routing and hard coded addresses
      not the BAR values. The old quirks variously clears them, sets them,
      adjusts them and then IDE ignores the result.
      
      In order to drive all this garbage out and to do it portably we need to
      handle the SFF rules directly and properly. Because we know the device
      BAR 0-3 are not used in compatibility mode we load them with the values
      that are implied (and indeed which many controllers actually
      thoughtfully put there in this mode anyway).
      
      This removes special cases in the IDE layer and libata which now knows
      that bar 0/1/2/3 always contain the correct address. It means our
      resource allocation map is accurate from boot, not "mostly accurate"
      after ide is loaded, and it shoots lots of code. There is also lots more
      code and magic constant knowledge to shoot once this is in and settled.
      
      Been in my test tree for a while both with drivers/ide and with libata.
      Wants some -mm shakedown in case I've missed something dumb or there are
      corner cases lurking.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      368c73d4
  21. 19 10月, 2006 1 次提交
    • M
      PCI: optionally sort device lists breadth-first · 6b4b78fe
      Matt Domsch 提交于
      Problem:
      New Dell PowerEdge servers have 2 embedded ethernet ports, which are
      labeled NIC1 and NIC2 on the chassis, in the BIOS setup screens, and
      in the printed documentation.  Assuming no other add-in ethernet ports
      in the system, Linux 2.4 kernels name these eth0 and eth1
      respectively.  Many people have come to expect this naming.  Linux 2.6
      kernels name these eth1 and eth0 respectively (backwards from
      expectations).  I also have reports that various Sun and HP servers
      have similar behavior.
      
      
      Root cause:
      Linux 2.4 kernels walk the pci_devices list, which happens to be
      sorted in breadth-first order (or pcbios_find_device order on i386,
      which most often is breadth-first also).  2.6 kernels have both the
      pci_devices list and the pci_bus_type.klist_devices list, the latter
      is what is walked at driver load time to match the pci_id tables; this
      klist happens to be in depth-first order.
      
      On systems where, for physical routing reasons, NIC1 appears on a
      lower bus number than NIC2, but NIC2's bridge is discovered first in
      the depth-first ordering, NIC2 will be discovered before NIC1.  If the
      list were sorted breadth-first, NIC1 would be discovered before NIC2.
      
      A PowerEdge 1955 system has the following topology which easily
      exhibits the difference between depth-first and breadth-first device
      lists.
      
      -[0000:00]-+-00.0  Intel Corporation 5000P Chipset Memory Controller Hub
                 +-02.0-[0000:03-08]--+-00.0-[0000:04-07]--+-00.0-[0000:05-06]----00.0-[0000:06]----00.0  Broadcom Corporation NetXtreme II BCM5708S Gigabit Ethernet (labeled NIC2, 2.4 kernel name eth1, 2.6 kernel name eth0)
                 +-1c.0-[0000:01-02]----00.0-[0000:02]----00.0  Broadcom Corporation NetXtreme II BCM5708S Gigabit Ethernet (labeled NIC1, 2.4 kernel name eth0, 2.6 kernel name eth1)
      
      
      Other factors, such as device driver load order and the presence of
      PCI slots at various points in the bus hierarchy further complicate
      this problem; I'm not trying to solve those here, just restore the
      device order, and thus basic behavior, that 2.4 kernels had.
      
      
      Solution:
      
      The solution can come in multiple steps.
      
      Suggested fix #1: kernel
      Patch below optionally sorts the two device lists into breadth-first
      ordering to maintain compatibility with 2.4 kernels.  It adds two new
      command line options:
        pci=bfsort
        pci=nobfsort
      to force the sort order, or not, as you wish.  It also adds DMI checks
      for the specific Dell systems which exhibit "backwards" ordering, to
      make them "right".
      
      
      Suggested fix #2: udev rules from userland
      Many people also have the expectation that embedded NICs are always
      discovered before add-in NICs (which this patch does not try to do).
      Using the PCI IRQ Routing Table provided by system BIOS, it's easy to
      determine which PCI devices are embedded, or if add-in, which PCI slot
      they're in.  I'm working on a tool that would allow udev to name
      ethernet devices in ascending embedded, slot 1 .. slot N order,
      subsort by PCI bus/dev/fn breadth-first.  It'll be possible to use it
      independent of udev as well for those distributions that don't use
      udev in their installers.
      
      Suggested fix #3: system board routing rules
      One can constrain the system board layout to put NIC1 ahead of NIC2
      regardless of breadth-first or depth-first discovery order.  This adds
      a significant level of complexity to board routing, and may not be
      possible in all instances (witness the above systems from several
      major manufacturers).  I don't want to encourage this particular train
      of thought too far, at the expense of not doing #1 or #2 above.
      
      
      Feedback appreciated.  Patch tested on a Dell PowerEdge 1955 blade
      with 2.6.18.
      
      You'll also note I took some liberty and temporarily break the klist
      abstraction to simplify and speed up the sort algorithm.  I think
      that's both safe and appropriate in this instance.
      Signed-off-by: NMatt Domsch <Matt_Domsch@dell.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      6b4b78fe
  22. 27 9月, 2006 1 次提交
  23. 11 7月, 2006 1 次提交
    • L
      [PATCH] pci: initialize struct pci_dev.error_state · 82081797
      Linas Vepstas 提交于
      The pci channel state is currently uninitialized, thus there are two ways
      of indicating that "everything's OK": 0 and 1.  This is a bit of a burden.
      
      If a devce driver wants to check if the pci channel is in a working or a
      disconnected state, the driver writer must perform checks similar to
      
         if((pdev->error_state != 0) &&
            (pdev->error_state != pci_channel_io_normal)) {
               whatever();
         }
      
      which is rather akward.  The first check is needed because stuct pci_dev is
      inited to all-zeros.  The scond is needed because the error recovery will
      set the state to pci_channel_io_normal (which is not zero).
      
      This patch fixes this awkwardness.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      82081797
  24. 22 6月, 2006 2 次提交