1. 17 6月, 2009 1 次提交
  2. 23 4月, 2009 1 次提交
  3. 07 4月, 2009 2 次提交
    • A
      PCI: Fix oops in pci_vpd_truncate · d407e32e
      Anton Vorontsov 提交于
      pci_vpd_truncate() should check for dev->vpd->attr, otherwise this might
      happen:
      
        sky2 driver version 1.22
        Unable to handle kernel paging request for data at address 0x0000000c
        Faulting instruction address: 0xc01836fc
        Oops: Kernel access of bad area, sig: 11 [#1]
        [...]
        NIP [c01836fc] pci_vpd_truncate+0x38/0x40
        LR [c029be18] sky2_probe+0x14c/0x518
        Call Trace:
        [ef82bde0] [c029bda4] sky2_probe+0xd8/0x518 (unreliable)
        [ef82be20] [c018a11c] local_pci_probe+0x24/0x34
        [ef82be30] [c018a14c] pci_call_probe+0x20/0x30
        [ef82be50] [c018a330] __pci_device_probe+0x64/0x78
        [ef82be60] [c018a44c] pci_device_probe+0x30/0x58
        [ef82be80] [c01aa270] really_probe+0x78/0x1a0
        [ef82bea0] [c01aa460] __driver_attach+0xa4/0xa8
        [ef82bec0] [c01a96ac] bus_for_each_dev+0x60/0x9c
        [ef82bef0] [c01aa0b4] driver_attach+0x24/0x34
        [ef82bf00] [c01a9e08] bus_add_driver+0x12c/0x1cc
        [ef82bf20] [c01aa87c] driver_register+0x6c/0x110
        [ef82bf30] [c018a770] __pci_register_driver+0x4c/0x9c
        [ef82bf50] [c03782c8] sky2_init_module+0x30/0x40
        [ef82bf60] [c0001dbc] do_one_initcall+0x34/0x1a0
        [ef82bfd0] [c0362240] do_initcalls+0x38/0x58
      
      This happens with CONFIG_SKY2=y, and "ip=on" kernel command line, so
      pci_vpd_truncate() is called before late_initcall(pci_sysfs_init),
      therefore ->attr isn't yet initialized.
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d407e32e
    • A
      PCI: Fix oops in pci_vpd_truncate · d6141668
      Anton Vorontsov 提交于
      pci_vpd_truncate() should check for dev->vpd->attr, otherwise
      this might happen:
      
      sky2 driver version 1.22
      Unable to handle kernel paging request for data at address 0x0000000c
      Faulting instruction address: 0xc01836fc
      Oops: Kernel access of bad area, sig: 11 [#1]
      [...]
      NIP [c01836fc] pci_vpd_truncate+0x38/0x40
      LR [c029be18] sky2_probe+0x14c/0x518
      Call Trace:
      [ef82bde0] [c029bda4] sky2_probe+0xd8/0x518 (unreliable)
      [ef82be20] [c018a11c] local_pci_probe+0x24/0x34
      [ef82be30] [c018a14c] pci_call_probe+0x20/0x30
      [ef82be50] [c018a330] __pci_device_probe+0x64/0x78
      [ef82be60] [c018a44c] pci_device_probe+0x30/0x58
      [ef82be80] [c01aa270] really_probe+0x78/0x1a0
      [ef82bea0] [c01aa460] __driver_attach+0xa4/0xa8
      [ef82bec0] [c01a96ac] bus_for_each_dev+0x60/0x9c
      [ef82bef0] [c01aa0b4] driver_attach+0x24/0x34
      [ef82bf00] [c01a9e08] bus_add_driver+0x12c/0x1cc
      [ef82bf20] [c01aa87c] driver_register+0x6c/0x110
      [ef82bf30] [c018a770] __pci_register_driver+0x4c/0x9c
      [ef82bf50] [c03782c8] sky2_init_module+0x30/0x40
      [ef82bf60] [c0001dbc] do_one_initcall+0x34/0x1a0
      [ef82bfd0] [c0362240] do_initcalls+0x38/0x58
      
      This happens with CONFIG_SKY2=y, and "ip=on" kernel command line, so
      pci_vpd_truncate() is called before late_initcall(pci_sysfs_init),
      therefore ->attr isn't yet initialized.
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d6141668
  4. 08 1月, 2009 3 次提交
  5. 03 7月, 2008 1 次提交
    • B
      PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev. · 99cb233d
      Benjamin Li 提交于
      For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the
      VPD end tag will hang the device.  This problem was initially
      observed when a vpd entry was created in sysfs
      ('/sys/bus/pci/devices/<id>/vpd').   A read to this sysfs entry
      will dump 32k of data.  Reading a full 32k will cause an access
      beyond the VPD end tag causing the device to hang.  Once the device
      is hung, the bnx2 driver will not be able to reset the device.
      We believe that it is legal to read beyond the end tag and
      therefore the solution is to limit the read/write length.
      
      A majority of this patch is from Matthew Wilcox who gave code for
      reworking the PCI vpd size information.  A PCI quirk added for the
      Broadcom NIC's to limit the read/write's.
      Signed-off-by: NBenjamin Li <benli@broadcom.com>
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      99cb233d
  6. 21 4月, 2008 1 次提交
    • B
      PCI: Expose PCI VPD through sysfs · 94e61088
      Ben Hutchings 提交于
      Vital Product Data (VPD) may be exposed by PCI devices in several
      ways.  It is generally unsafe to read this information through the
      existing interfaces to user-land because of stateful interfaces.
      
      This adds:
      - abstract operations for VPD access (struct pci_vpd_ops)
      - VPD state information in struct pci_dev (struct pci_vpd)
      - an implementation of the VPD access method specified in PCI 2.2
        (in access.c)
      - a 'vpd' binary file in sysfs directories for PCI devices with VPD
        operations defined
      
      It adds a probe for PCI 2.2 VPD in pci_scan_device() and release of
      VPD state in pci_release_dev().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      94e61088
  7. 04 12月, 2006 1 次提交
  8. 02 12月, 2006 1 次提交
    • M
      PCI: Block on access to temporarily unavailable pci device · 7ea7e98f
      Matthew Wilcox 提交于
      The existing implementation of pci_block_user_cfg_access() was recently
      criticised for providing out of date information and for returning errors
      on write, which applications won't be expecting.
      
      This reimplementation uses a global wait queue and a bit per device.
      I've open-coded prepare_to_wait() / finish_wait() as I could optimise
      it significantly by knowing that the pci_lock protected us at all points.
      
      It looked a bit funny to be doing a spin_unlock_irqsave(); schedule(),
      so I used spin_lock_irq() for the _user versions of pci_read_config and
      pci_write_config.  Not carrying a flags pointer around made the code
      much less nasty.
      
      Attempts to block an already blocked device hit a BUG() and attempts to
      unblock an already unblocked device hit a WARN().  If we need to block
      access to a device from userspace, it's because it's unsafe for even
      another bit of the kernel to access the device.  An attempt to block
      a device for a second time means we're about to access the device to
      perform some other operation, which could provoke undefined behaviour
      from the device.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Acked-by: NAdam Belay <abelay@novell.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7ea7e98f
  9. 11 11月, 2005 1 次提交
  10. 29 10月, 2005 1 次提交
    • B
      [PATCH] PCI: Block config access during BIST · e04b0ea2
      Brian King 提交于
      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: NBrian King <brking@us.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       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(-)
      e04b0ea2
  11. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4