1. 09 3月, 2012 6 次提交
  2. 06 5月, 2011 1 次提交
  3. 17 2月, 2010 1 次提交
    • B
      powerpc/eeh: Fix a bug when pci structure is null · 8d3d50bf
      Breno Leitao 提交于
      During a EEH recover, the pci_dev structure can be null, mainly if an
      eeh event is detected during cpi config operation. In this case, the
      pci_dev will not be known (and will be null) the kernel will crash
      with the following message:
      
      Unable to handle kernel paging request for data at address 0x000000a0
      Faulting instruction address: 0xc00000000006b8b4
      Oops: Kernel access of bad area, sig: 11 [#1]
      
      NIP [c00000000006b8b4] .eeh_event_handler+0x10c/0x1a0
      LR [c00000000006b8a8] .eeh_event_handler+0x100/0x1a0
      Call Trace:
      [c0000003a80dff00] [c00000000006b8a8] .eeh_event_handler+0x100/0x1a0
      [c0000003a80dff90] [c000000000031f1c] .kernel_thread+0x54/0x70
      
      The bug occurs because pci_name() tries to access a null pointer.
      This patch just guarantee that pci_name() is not called on Null pointers.
      Signed-off-by: NBreno Leitao <leitao@linux.vnet.ibm.com>
      Signed-off-by: NLinas Vepstas <linasvepstas@gmail.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8d3d50bf
  4. 09 2月, 2010 1 次提交
  5. 30 10月, 2009 1 次提交
  6. 17 6月, 2009 1 次提交
  7. 15 4月, 2009 1 次提交
    • M
      powerpc/pseries: Set error_state to pci_channel_io_normal in eeh_report_reset() · c58dc575
      Mike Mason 提交于
      While adding native EEH support to Emulex and Qlogic drivers, it was
      discovered that dev->error_state was set to pci_io_channel_normal too
      late in the recovery process. These drivers rely on error_state to
      determine if they can access the device in their slot_reset callback,
      thus error_state needs to be set to pci_io_channel_normal in
      eeh_report_reset(). Below is a detailed explanation (courtesy of Richard
      Lary) as to why this is necessary.
      
      Background:
      PCI MMIO or DMA accesses to a frozen slot generate additional EEH
      errors. If the number of additional EEH errors exceeds EEH_MAX_FAILS the
      adapter will be shutdown. To avoid triggering excessive EEH errors and
      an undesirable adapter shutdown, some drivers use the
      pci_channel_offline(dev) wrapper function to return a Boolean value
      based on the value of pci_dev->error_state to determine if PCI MMIO or
      DMA accesses are safe. If the wrapper returns TRUE, drivers must not
      make PCI MMIO or DMA access to their hardware.
      
      The pci_dev structure member error_state reflects one of three values,
      1) pci_channel_io_normal, 2) pci_channel_io_frozen, 3)
      pci_channel_io_perm_failure.  Function pci_channel_offline(dev) returns
      TRUE if error_state is pci_channel_io_frozen or pci_channel_io_perm_failure.
      
      The EEH driver sets pci_dev->error_state to pci_channel_io_frozen at the
      point where the PCI slot is frozen. Currently, the EEH driver restores
      dev->error_state to pci_channel_io_normal in eeh_report_resume() before
      calling the driver's resume callback. However, when the EEH driver calls
      the driver's slot_reset callback() from eeh_report_reset(), it
      incorrectly indicates the error state is still pci_channel_io_frozen.
      
      Waiting until eeh_report_resume() to restore dev->error_state to
      pci_channel_io_normal is too late for Emulex and QLogic FC drivers and
      any other drivers which are designed to use common code paths in these
      two cases: i) those called after the driver's slot_reset callback() and
      ii) those called after the PCI slot is frozen but before the driver's
      slot_reset callback is called. Case i) all driver paths executed to
      reinitialize the hardware after a reset and case ii) all code paths
      executed by driver kernel threads that run asynchronous to the main
      driver thread, such as interrupt handlers and worker threads to process
      driver work queues.
      
      Emulex and QLogic FC drivers are designed with common code paths which
      require that pci_channel_offline(dev) reflect the true state of the
      hardware. The state transitions that the hardware takes from Normal
      Operations to Slot Frozen to Reset to Normal Operations are documented
      in the Power Architecture™ Platform Requirements+ (PAPR+) in Table 75.
      PE State Control.
      
      PAPR defines the following 3 states:
      
      0 -- Not reset, Not EEH stopped, MMIO load/store allowed, DMA allowed
           (Normal Operations)
      1 -- Reset, Not EEH stopped, MMIO load/store disabled, DMA disabled
      2 -- Not reset, EEH stopped, MMIO load/store disabled, DMA disabled
           (Slot Frozen)
      
      An EEH error places the slot in state 2 (Frozen) and the adapter driver
      is notified that an EEH error was detected. If the adapter driver
      returns PCI_ERS_RESULT_NEED_RESET, the EEH driver calls
      eeh_reset_device() to place the slot into state 1 (Reset) and
      eeh_reset_device completes by placing the slot into State 0 (Normal
      Operations). Upon return from eeh_reset_device(), the EEH driver calls
      eeh_report_reset, which then calls the adapter's slot_reset callback. At
      the time the adapter's slot_reset callback is called, the true state of
      the hardware is Normal Operations and should be accurately reflected by
      setting dev->error_state to pci_channel_io_normal.
      
      The current implementation of EEH driver does not do so and requires
      this change to correct this deficiency.
      Signed-off-by: NMike Mason <mmlnx@us.ibm.com>
      Acked-by: NLinas Vepstas <linasvepstas@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c58dc575
  8. 11 2月, 2009 1 次提交
  9. 20 8月, 2008 1 次提交
  10. 16 6月, 2008 1 次提交
  11. 11 12月, 2007 1 次提交
  12. 03 12月, 2007 1 次提交
  13. 08 11月, 2007 2 次提交
  14. 14 6月, 2007 1 次提交
  15. 10 5月, 2007 1 次提交
  16. 09 5月, 2007 2 次提交
  17. 13 4月, 2007 1 次提交
  18. 22 3月, 2007 6 次提交
  19. 24 1月, 2007 1 次提交
  20. 08 12月, 2006 1 次提交
  21. 21 9月, 2006 2 次提交
  22. 31 7月, 2006 1 次提交
  23. 01 7月, 2006 1 次提交
  24. 21 6月, 2006 1 次提交
  25. 19 5月, 2006 1 次提交
  26. 22 4月, 2006 1 次提交
    • L
      [PATCH] powerpc/pseries: clear PCI failure counter if no new failures · ac325acd
      Linas Vepstas 提交于
      The current PCI error recovery system keeps track of the number of PCI card
      resets, and refuses to bring a card back up if this number is too large.
      The goal of doing this was to avoid an infinite loop of resets if a card is
      obviously dead.  However, if the failures are rare, but the machine has a
      high uptime, this mechanism might still be triggered; this is too harsh.
      
      This patch will avoids this problem by decrementing the fail count after an
      hour.  Thus, as long as a pci card BSOD's less than 6 times an hour, it
      will continue to be reset indefinitely.  If it's failure rate is greater
      than that, it will be taken off-line permanently.
      
      This patch is larger than it might otherwise be because it changes
      indentation by removing a pointless while-loop.  The while loop is not
      needed, as the handler is invoked once fo each event (by schedule_work());
      the loop is leftover cruft from an earlier implementation.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ac325acd
  27. 01 4月, 2006 1 次提交