1. 07 4月, 2014 1 次提交
    • N
      target: Add TFO->abort_task for aborted task resources release · 131e6abc
      Nicholas Bellinger 提交于
      Now that TASK_ABORTED status is not generated for all cases by
      TMR ABORT_TASK + LUN_RESET, a new TFO->abort_task() caller is
      necessary in order to give fabric drivers a chance to unmap
      hardware / software resources before the se_cmd descriptor is
      released via the normal TFO->release_cmd() codepath.
      
      This patch adds TFO->aborted_task() in core_tmr_abort_task()
      in place of the original transport_send_task_abort(), and
      also updates all fabric drivers to implement this caller.
      
      The fabric drivers that include changes to perform cleanup
      via ->aborted_task() are:
      
        - iscsi-target
        - iser-target
        - srpt
        - tcm_qla2xxx
      
      The fabric drivers that currently set ->aborted_task() to
      NOPs are:
      
        - loopback
        - tcm_fc
        - usb-gadget
        - sbp-target
        - vhost-scsi
      
      For the latter five, there appears to be no additional cleanup
      required before invoking TFO->release_cmd() to release the
      se_cmd descriptor.
      
      v2 changes:
        - Move ->aborted_task() call into transport_cmd_finish_abort (Alex)
      
      Cc: Alex Leung <amleung21@yahoo.com>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Vu Pham <vu@mellanox.com>
      Cc: Chris Boot <bootc@bootc.net>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      131e6abc
  2. 26 11月, 2013 1 次提交
  3. 17 10月, 2013 1 次提交
  4. 12 10月, 2013 1 次提交
  5. 08 7月, 2013 1 次提交
  6. 13 12月, 2012 1 次提交
  7. 19 11月, 2012 1 次提交
  8. 06 11月, 2012 1 次提交
  9. 31 10月, 2012 2 次提交
  10. 03 10月, 2012 2 次提交
  11. 18 9月, 2012 2 次提交
  12. 10 9月, 2012 9 次提交
  13. 18 7月, 2012 1 次提交
    • R
      target: Allow for target_submit_cmd() returning errors · d6dfc868
      Roland Dreier 提交于
      We want it to be possible for target_submit_cmd() to return errors up
      to its fabric module callers.  For now just update the prototype to
      return an int, and update all callers to handle non-zero return values
      as an error.
      
      This is immediately useful for tcm_qla2xxx to fix a long-standing active
      I/O session shutdown race, but tcm_fc, usb-gadget, and sbp-target the
      fabric maintainers need to check + ACK that handling a target_submit_cmd()
      failure due to session shutdown does not introduce regressions
      
      (nab: Respin against for-next after initial NACK + update docbook comment +
            fix double se_cmd init in exception path for usb-gadget)
      
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Arun Easi <arun.easi@qlogic.com>
      Cc: Chris Boot <bootc@bootc.net>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d6dfc868
  14. 17 7月, 2012 2 次提交
  15. 10 5月, 2012 1 次提交
    • S
      usb-gadget: Initial merge of target module for UASP + BOT · c52661d6
      Sebastian Andrzej Siewior 提交于
      This fabric uses the target framework to provide a usb gadget
      device.  This gadget supports the USB Attached SCSI Protocol (UASP)
      and Bulk Only Transfers (BOT or BBB). BOT is the primary interface,
      UAS is the alternative interface.
      
      It has been tested with dummy_hcd on HS and SS. On SS USB3 are
      supported. I also took my omap device and tried it there against
      WindowsXP.  UAS implements basic command passing (i.e. read/write
      requests) and TASK MANAGEMENT functions are missing.
      
      I had to add a little of error recovery to BOT because Windows was
      issuing some strange commands and it does not complain after the
      gadget responded with CSW.status=1.
      
      (nab: Move to drivers/usb/gadget as per Sebastian to address legacy
            limitations for built-in gadget code)
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c52661d6