1. 04 Jan, 2018 7 commits
    • Randy Dunlap's avatar
      scsi: doc: fix iscsi-related kernel-doc warnings · ccd4a430
      Randy Dunlap authored
      Fix kernel-doc warnings in drivers/scsi/ that are related to iscsi
      support interfaces.
      
      Fixes these kernel-doc warnings: (tested by adding these files to a new
      target.rst documentation file: WIP)
      
      ../drivers/scsi/libiscsi.c:2740: warning: No description found for parameter 'dd_size'
      ../drivers/scsi/libiscsi.c:2740: warning: No description found for parameter 'id'
      ../drivers/scsi/libiscsi.c:2961: warning: No description found for parameter 'cls_conn'
      ../drivers/scsi/iscsi_tcp.c:313: warning: No description found for parameter 'conn'
      ../drivers/scsi/iscsi_tcp.c:363: warning: No description found for parameter 'conn'
      ../drivers/scsi/libiscsi_tcp.c:810: warning: No description found for parameter 'tcp_conn'
      ../drivers/scsi/libiscsi_tcp.c:810: warning: No description found for parameter 'segment'
      ../drivers/scsi/libiscsi_tcp.c:887: warning: No description found for parameter 'offloaded'
      ../drivers/scsi/libiscsi_tcp.c:887: warning: No description found for parameter 'status'
      ../drivers/scsi/libiscsi_tcp.c:887: warning: Excess function parameter 'offload' description in 'iscsi_tcp_recv_skb'
      ../drivers/scsi/libiscsi_tcp.c:964: warning: Excess function parameter 'conn' description in 'iscsi_tcp_task_init'
      ../drivers/scsi/libiscsi_tcp.c:964: warning: Excess function parameter 'sc' description in 'iscsi_tcp_task_init'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
      Cc: linux-scsi@vger.kernel.org
      Cc: target-devel@vger.kernel.org
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: linux-rdma@vger.kernel.org
      Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ccd4a430
    • Chaitra P B's avatar
      scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag. · f49d4aed
      Chaitra P B authored
      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: default avatarChaitra P B <chaitra.basappa@broadcom.com>
      Signed-off-by: default avatarSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      f49d4aed
    • Colin Ian King's avatar
      scsi: lpfc: fix a couple of minor indentation issues · 8fd03fd1
      Colin Ian King authored
      Several statements are indented too far, fix these
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8fd03fd1
    • Colin Ian King's avatar
      scsi: lpfc: don't dereference localport before it has been null checked · 5c665aeb
      Colin Ian King authored
      localport is being dereferenced to assign lport and then immediately
      afterwards localport is being sanity checked to see if it is null.  Fix
      this by only dereferencing localport until after it has been null
      checked.
      
      Detected by CoverityScan, CID#1463038 ("Dereference before null check")
      
      Fixes: 3a8cefbfc5ee ("scsi: lpfc: Beef up stat counters for debug")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      5c665aeb
    • James Smart's avatar
      scsi: scsi_transport_fc: fix typos on 64/128 GBit define names · cc019a5a
      James Smart authored
      The define names specified 64Bit/128Bit, not 64GBIT/128GBIT.  Correct
      the names.
      Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      cc019a5a
    • Andy Shevchenko's avatar
      scsi: libsas: remove private hex2bin() implementation · 9ea4e076
      Andy Shevchenko authored
      The function sas_parse_addr() could be easily substituted by hex2bin()
      which is in kernel library code.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Tested-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      9ea4e076
    • Rafael David Tinoco's avatar
      scsi: libiscsi: Allow sd_shutdown on bad transport · d7549412
      Rafael David Tinoco authored
      If, for any reason, userland shuts down iscsi transport interfaces
      before proper logouts - like when logging in to LUNs manually, without
      logging out on server shutdown, or when automated scripts can't
      umount/logout from logged LUNs - kernel will hang forever on its
      sd_sync_cache() logic, after issuing the SYNCHRONIZE_CACHE cmd to all
      still existent paths.
      
      PID: 1 TASK: ffff8801a69b8000 CPU: 1 COMMAND: "systemd-shutdow"
       #0 [ffff8801a69c3a30] __schedule at ffffffff8183e9ee
       #1 [ffff8801a69c3a80] schedule at ffffffff8183f0d5
       #2 [ffff8801a69c3a98] schedule_timeout at ffffffff81842199
       #3 [ffff8801a69c3b40] io_schedule_timeout at ffffffff8183e604
       #4 [ffff8801a69c3b70] wait_for_completion_io_timeout at ffffffff8183fc6c
       #5 [ffff8801a69c3bd0] blk_execute_rq at ffffffff813cfe10
       #6 [ffff8801a69c3c88] scsi_execute at ffffffff815c3fc7
       #7 [ffff8801a69c3cc8] scsi_execute_req_flags at ffffffff815c60fe
       #8 [ffff8801a69c3d30] sd_sync_cache at ffffffff815d37d7
       #9 [ffff8801a69c3da8] sd_shutdown at ffffffff815d3c3c
      
      This happens because iscsi_eh_cmd_timed_out(), the transport layer
      timeout helper, would tell the queue timeout function (scsi_times_out)
      to reset the request timer over and over, until the session state is
      back to logged in state. Unfortunately, during server shutdown, this
      might never happen again.
      
      Other option would be "not to handle" the issue in the transport
      layer. That would trigger the error handler logic, which would also need
      the session state to be logged in again.
      
      Best option, for such case, is to tell upper layers that the command was
      handled during the transport layer error handler helper, marking it as
      DID_NO_CONNECT, which will allow completion and inform about the
      problem.
      
      After the session was marked as ISCSI_STATE_FAILED, due to the first
      timeout during the server shutdown phase, all subsequent cmds will fail
      to be queued, allowing upper logic to fail faster.
      Signed-off-by: default avatarRafael David Tinoco <rafael.tinoco@canonical.com>
      Reviewed-by: default avatarLee Duncan <lduncan@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      d7549412
  2. 21 Dec, 2017 20 commits
  3. 15 Dec, 2017 13 commits