1. 20 6月, 2018 4 次提交
  2. 19 6月, 2018 4 次提交
  3. 08 5月, 2018 6 次提交
  4. 09 3月, 2018 1 次提交
  5. 07 3月, 2018 1 次提交
  6. 28 2月, 2018 3 次提交
  7. 22 2月, 2018 2 次提交
    • S
      scsi: mpt3sas: wait for and flush running commands on shutdown/unload · c666d3be
      Sreekanth Reddy 提交于
      This patch finishes all outstanding SCSI IO commands (but not other commands,
      e.g., task management) in the shutdown and unload paths.
      
      It first waits for the commands to complete (this is done after setting
      'ioc->remove_host = 1 ', which prevents new commands to be queued) then it
      flushes commands that might still be running.
      
      This avoids triggering error handling (e.g., abort command) for all commands
      possibly completed by the adapter after interrupts disabled.
      
      [mauricfo: introduced something in commit message.]
      Signed-off-by: NSreekanth Reddy <sreekanth.reddy@broadcom.com>
      Tested-by: NMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
      Signed-off-by: NMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      c666d3be
    • M
      scsi: mpt3sas: fix oops in error handlers after shutdown/unload · 9ff549ff
      Mauricio Faria de Oliveira 提交于
      This patch adds checks for 'ioc->remove_host' in the SCSI error handlers, so
      not to access pointers/resources potentially freed in the PCI shutdown/module
      unload path.  The error handlers may be invoked after shutdown/unload,
      depending on other components.
      
      This problem was observed with kexec on a system with a mpt3sas based adapter
      and an infiniband adapter which takes long enough to shutdown:
      
      The mpt3sas driver finished shutting down / disabled interrupt handling, thus
      some commands have not finished and timed out.
      
      Since the system was still running (waiting for the infiniband adapter to
      shutdown), the scsi error handler for task abort of mpt3sas was invoked, and
      hit an oops -- either in scsih_abort() because 'ioc->scsi_lookup' was NULL
      without commit dbec4c90 ("scsi: mpt3sas: lockless command submission"), or
      later up in scsih_host_reset() (with or without that commit), because it
      eventually called mpt3sas_base_get_iocstate().
      
      After the above commit, the oops in scsih_abort() does not occur anymore
      (_scsih_scsi_lookup_find_by_scmd() is no longer called), but that commit is
      too big and out of the scope of linux-stable, where this patch might help, so
      still go for the changes.
      
      Also, this might help to prevent similar errors in the future, in case code
      changes and possibly tries to access freed stuff.
      
      Note the fix in scsih_host_reset() is still important anyway.
      Signed-off-by: NMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
      Acked-by: NSreekanth Reddy <Sreekanth.Reddy@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      9ff549ff
  8. 11 1月, 2018 6 次提交
  9. 04 1月, 2018 1 次提交
    • C
      scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag. · f49d4aed
      Chaitra P B 提交于
      1. In IO path, setting of "ATA command pending" flag early before device
         removal, invalid device handle etc., checks causes any new commands
         to be always returned with SAM_STAT_BUSY and when the driver removes
         the drive the SML issues SYNC Cache command and that command is
         always returned with SAM_STAT_BUSY and thus making SYNC Cache command
         to requeued.
      
      2. If the driver gets an ATA PT command for a SATA drive then the driver
         set "ATA command pending" flag in device specific data structure not
         to allow any further commands until the ATA PT command is completed.
         However, after setting the flag if the driver decides to return the
         command back to upper layers without actually issuing to the firmware
         (i.e., returns from qcmd failure return paths) then the corresponding
         flag is not cleared and this prevents the driver from sending any new
         commands to the drive.
      
      This patch fixes above two issues by setting of "ATA command pending"
      flag after checking for whether device deleted, invalid device handle,
      device busy with task management. And by setting "ATA command pending"
      flag to false in all of the qcmd failure return paths after setting the
      flag.
      Signed-off-by: NChaitra P B <chaitra.basappa@broadcom.com>
      Signed-off-by: NSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      f49d4aed
  10. 05 12月, 2017 1 次提交
  11. 09 11月, 2017 2 次提交
  12. 04 11月, 2017 9 次提交