1. 04 12月, 2006 1 次提交
  2. 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
  3. 11 11月, 2005 1 次提交
  4. 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
  5. 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