1. 01 12月, 2016 10 次提交
  2. 15 9月, 2016 3 次提交
  3. 09 9月, 2016 2 次提交
    • U
      scsi: cxlflash: Remove the device cleanly in the system shutdown path · babf985d
      Uma Krishnan 提交于
      Commit 704c4b0d ("cxlflash: Shutdown notify support for CXL Flash
      cards") was recently introduced to notify the AFU when a system is going
      down. Due to the position of the cxlflash driver in the device stack,
      cxlflash devices are _always_ removed during a reboot/shutdown. This can
      lead to a crash if the cxlflash shutdown hook is invoked _after_ the
      shutdown hook for the owning virtual PHB. Furthermore, the current
      implementation of shutdown/remove hooks for cxlflash are not tolerant to
      being invoked when the device is not enabled. This can also lead to a
      crash in situations where the remove hook is invoked after the device
      has been removed via the vPHBs shutdown hook. An example of this
      scenario would be an EEH reset failure while a reboot/shutdown is in
      progress.
      
      To solve both problems, the shutdown hook for cxlflash is updated to
      simply remove the device. This path already includes the AFU
      notification and thus this solution will continue to perform the
      original intent. At the same time, the remove hook is updated to protect
      against being called when the device is not enabled.
      
      Fixes: 704c4b0d ("cxlflash: Shutdown notify support for CXL Flash
      cards")
      Signed-off-by: NUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Acked-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      babf985d
    • U
      scsi: cxlflash: Scan host only after the port is ready for I/O · bbbfae96
      Uma Krishnan 提交于
      When a port link is established, the AFU sends a 'link up' interrupt.
      After the link is up, corresponding initialization steps are performed
      on the card. Following that, when the card is ready for I/O, the AFU
      sends 'login succeeded' interrupt. Today, cxlflash invokes
      scsi_scan_host() upon receipt of both interrupts.
      
      SCSI commands sent to the port prior to the 'login succeeded' interrupt
      will fail with 'port not available' error. This is not desirable.
      Moreover, when async_scan is active for the host, subsequent scan calls
      are terminated with error. Due to this, the scsi_scan_host() call
      performed after 'login succeeded' interrupt could portentially return
      error and the devices may not be scanned properly.
      
      To avoid this problem, scsi_scan_host() should be called only after the
      'login succeeded' interrupt.
      Signed-off-by: NUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Acked-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      bbbfae96
  4. 27 7月, 2016 1 次提交
  5. 13 7月, 2016 3 次提交
  6. 29 3月, 2016 2 次提交
    • M
      cxlflash: Move to exponential back-off when cmd_room is not available · ea765431
      Manoj N. Kumar 提交于
      While profiling the cxlflash_queuecommand() path under a heavy load it
      was found that number of retries to find cmd_room was fairly high.
      
      There are two problems with the current back-off:
      a) It starts with a udelay of 0
      b) It backs-off linearly
      
      Tried several approaches (a higher multiple 10*n, 100*n, as well as n^2,
      2^n) and found that the exponential back-off(2^n) approach had the least
      overall cost. Cost as being defined as overall time spent waiting.
      
      The fix is to change the linear back-off to an exponential back-off.
      This solution also takes care of the problem with the initial
      delay (starts with 1 usec).
      Signed-off-by: NManoj N. Kumar <manoj@linux.vnet.ibm.com>
      Acked-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      ea765431
    • M
      cxlflash: Fix regression issue with re-ordering patch · 9526f360
      Manoj N. Kumar 提交于
      While running 'sg_reset -H' back to back the following exception was seen:
      
      [  735.115695] Faulting instruction address: 0xd0000000098c0864
      cpu 0x0: Vector: 300 (Data Access) at [c000000ffffafa80]
          pc: d0000000098c0864: cxlflash_async_err_irq+0x84/0x5c0 [cxlflash]
          lr: c00000000013aed0: handle_irq_event_percpu+0xa0/0x310
          sp: c000000ffffafd00
         msr: 9000000000009033
         dar: 2010000
       dsisr: 40000000
        current = 0xc000000001510880
        paca    = 0xc00000000fb80000   softe: 0        irq_happened: 0x01
          pid   = 0, comm = swapper/0
      
      Linux version 4.5.0-491-26f710d+
      
      enter ? for help
      [c000000ffffafe10] c00000000013aed0 handle_irq_event_percpu+0xa0/0x310
      [c000000ffffafed0] c00000000013b1a8 handle_irq_event+0x68/0xc0
      [c000000ffffaff00] c0000000001404ec handle_fasteoi_irq+0xec/0x2a0
      [c000000ffffaff30] c00000000013a084 generic_handle_irq+0x54/0x80
      [c000000ffffaff60] c000000000011130 __do_irq+0x80/0x1d0
      [c000000ffffaff90] c000000000024d40 call_do_irq+0x14/0x24
      [c000000001573a20] c000000000011318 do_IRQ+0x98/0x140
      [c000000001573a70] c000000000002594 hardware_interrupt_common+0x114/0x180
      
      This exception is being hit because the async_err interrupt path performs
      an MMIO to read the interrupt status register. The MMIO region in this
      case is not available.
      
      Commit 6ded8b3c ("cxlflash: Unmap problem state area before detaching
      master context") re-ordered the sequence in which term_mc() and stop_afu()
      are called. This introduces a window for interrupts to come in with the
      problem space area unmapped, that did not exist previously.
      
      The fix is to separate the disabling of all AFU interrupts to a distinct
      function, term_intr() so that it is the first thing that is done in the
      tear down process.
      
      To keep the initialization process symmetric, separate the AFU interrupt
      setup also to a distinct function: init_intr().
      
      Fixes: 6ded8b3c ("cxlflash: Unmap problem state area before detaching master context")
      Signed-off-by: NManoj N. Kumar <manoj@linux.vnet.ibm.com>
      Acked-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      9526f360
  7. 09 3月, 2016 5 次提交
  8. 07 1月, 2016 5 次提交
  9. 30 10月, 2015 9 次提交