1. 09 1月, 2012 1 次提交
  2. 29 8月, 2011 1 次提交
    • M
      [SCSI] scsi scan: don't fail scans when host is in recovery · 76e4e12f
      Mike Christie 提交于
      The problem is that if we are doing a scsi scan then the device goes
      into recovery then we will wait for the recovery to complete. It waits
      because scsi-ml will send inquiries or report luns and the queueing code
      will have been blocked due to the host not being ready. However, if we
      are in recovery and then a scan is started the scan will silently fail
      and some devices will not be added.
      
      It is easy to hit the problem where devices do not show up with
      FC where we are doing tests that disrupt the target controllers.
      When the controller is disruprted (reboot, or setting firmware, etc),
      and we cause the dev loss tmo to fire then devices will be removed
      Then when the problem has been fixed, the rport will be scanned and
      devices should be added back. But if we cause another disruption before
      scanning has started then devices will not get added back. If the problem
      is not started until the scan is started then the devices will be added
      back.
      
      This patch fixes that problem by not failing scans when the host
      is in recovery. We will let scsi-ml send the IO and let the queueing
      and scsi error handling deal with it like is done if we went into
      recovery while scanning.
      
      For recovery cases where the host is being torn down then with the
      patch we will still fail the scan since there is not point in scanning.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      76e4e12f
  3. 27 8月, 2011 1 次提交
  4. 31 3月, 2011 1 次提交
  5. 17 11月, 2010 1 次提交
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  6. 11 9月, 2010 1 次提交
  7. 03 6月, 2010 1 次提交
  8. 05 12月, 2009 2 次提交
  9. 07 11月, 2009 1 次提交
  10. 02 10月, 2009 1 次提交
  11. 13 6月, 2009 1 次提交
    • J
      [SCSI] FC Pass Thru support · 9e4f5e29
      James Smart 提交于
      Attached is the ELS/CT pass-thru patch for the FC Transport. The patch
      creates a generic framework that lays on top of bsg and the SGIO v4 ioctl
      in order to pass transaction requests to LLDD's.
      
      The interface supports the following operations:
        On an fc_host basis:
          Request login to the specified N_Port_ID, creating an fc_rport.
          Request logout of the specified N_Port_ID, deleting an fc_rport
          Send ELS request to specified N_Port_ID w/o requiring a login, and
            wait for ELS response.
          Send CT request to specified N_Port_ID and wait for CT response.
            Login is required, but LLDD is allowed to manage login and decide
            whether it stays in place after the request is satisfied.
          Vendor-Unique request. Allows a LLDD-specific request to be passed
            to the LLDD, and the passing of a response back to the application.
        On an fc_rport basis:
          Send ELS request to nport and wait for ELS response.
          Send CT request to nport and wait for CT response.
      
      The patch also exports several headers from include/scsi such that
      they can be available to user-space applications:
        include/scsi/scsi.h
        include/scsi/scsi_netlink.h
        include/scsi/scsi_netlink_fc.h
        include/scsi/scsi_bsg_fc.h
      
      For further information, refer to the last RFC:
      http://marc.info/?l=linux-scsi&m=123436574018579&w=2
      
      Note: Documentation is still spotty and will be added later.
      
      [bharrosh@panasas.com: update for new block API]
      Signed-off-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      9e4f5e29
  12. 09 10月, 2008 1 次提交
  13. 27 7月, 2008 2 次提交
  14. 22 7月, 2008 1 次提交
  15. 03 5月, 2008 1 次提交
  16. 20 4月, 2008 1 次提交
  17. 08 4月, 2008 1 次提交
    • M
      [SCSI] scsi_error: add target reset handler · 30bd7df8
      Mike Christie 提交于
      The problem is that serveral drivers are sending a target reset from the
      device reset handler, and if we have multiple devices a target reset gets
      sent for each device when only one would be sufficient. And if we do a target
      reset it affects all the commands on the target so the device reset handler
      code only cleaning up one devices's commands makes programming the driver a
      little more difficult than it should be.
      
      This patch adds a target reset handler, which drivers can use to send
      a target reset. If successful it cleans up the commands for a devices
      accessed through that starget.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      30bd7df8
  18. 12 2月, 2008 1 次提交
    • J
      [SCSI] update SG_ALL to avoid causing chaining · 4660c8ed
      James Bottomley 提交于
      Since the sg chaining patches went in, our current value of 255 for
      SG_ALL excites chaining on some drivers which cannot support it (and
      would thus oops).  Redefine SG_ALL to mean no sg table size
      preference, but use the single allocation (non chained) limit.  This
      also helps for drivers that use it to size an internal table.
      
      We'll do an opt in system later where truly chaining supporting
      drivers can define their sg_tablesize to be anything up to
      SCSI_MAX_SG_CHAIN_ELEMENTS.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      4660c8ed
  19. 08 2月, 2008 1 次提交
  20. 31 1月, 2008 2 次提交
    • J
      [SCSI] remove use_sg_chaining · d3f46f39
      James Bottomley 提交于
      With the sg table code, every SCSI driver is now either chain capable
      or broken (or has sg_tablesize set so chaining is never activated), so
      there's no need to have a check in the host template.
      
      Also tidy up the code by moving the scatterlist size defines into the
      SCSI includes and permit the last entry of the scatterlist pools not
      to be a power of two.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      d3f46f39
    • B
      [SCSI] implement scsi_data_buffer · 30b0c37b
      Boaz Harrosh 提交于
      In preparation for bidi we abstract all IO members of scsi_cmnd,
      that will need to duplicate, into a substructure.
      
      - Group all IO members of scsi_cmnd into a scsi_data_buffer
        structure.
      - Adjust accessors to new members.
      - scsi_{alloc,free}_sgtable receive a scsi_data_buffer instead of
        scsi_cmnd. And work on it.
      - Adjust scsi_init_io() and  scsi_release_buffers() for above
        change.
      - Fix other parts of scsi_lib/scsi.c to members migration. Use
        accessors where appropriate.
      
      - fix Documentation about scsi_cmnd in scsi_host.h
      
      - scsi_error.c
        * Changed needed members of struct scsi_eh_save.
        * Careful considerations in scsi_eh_prep/restore_cmnd.
      
      - sd.c and sr.c
        * sd and sr would adjust IO size to align on device's block
          size so code needs to change once we move to scsi_data_buff
          implementation.
        * Convert code to use scsi_for_each_sg
        * Use data accessors where appropriate.
      
      - tgt: convert libsrp to use scsi_data_buffer
      
      - isd200: This driver still bangs on scsi_cmnd IO members,
        so need changing
      
      [jejb: rebased on top of sg_table patches fixed up conflicts
      and used the synergy to eliminate use_sg and sg_count]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      30b0c37b
  21. 16 10月, 2007 1 次提交
  22. 13 10月, 2007 4 次提交
  23. 20 7月, 2007 1 次提交
  24. 01 6月, 2007 1 次提交
    • C
      [SCSI] introduce shost_priv helper · bcd92c9f
      Christoph Hellwig 提交于
      Currently accessing the scsi host private data is rather messy because
      it comes as an unsigned long that always needs a cast first.  This patch
      introduces a helper that does the cast called shost_priv.  It's similar
      in spirit to netdev_priv for network drivers.
      
      This is the first patch introducing the macro, and the second patch
      in the series will convert esp and it's subdrivers as an example.
      Further conversion will wait until the helper is in the tree to make
      patch juggling easier.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      bcd92c9f
  25. 22 5月, 2007 1 次提交
  26. 20 3月, 2007 1 次提交
  27. 12 3月, 2007 1 次提交
  28. 26 11月, 2006 1 次提交
    • F
      [SCSI] export scsi-ml functions needed by tgt_scsi_lib and its LLDs · b58d9154
      FUJITA Tomonori 提交于
      This patch contains the needed changes to the scsi-ml for the target
      mode support.
      
      Note, per the last review we moved almost all the fields we added
      to the scsi_cmnd to our internal data structure which we are going
      to try and kill off when we can replace it with support from other
      parts of the kernel.
      
      The one field we left on was the offset variable. This is needed to handle
      the case where the target gets request that is so large that it cannot
      execute it in one dma operation. So max_secotors or a segment limit may
      limit the size of the transfer. In this case our tgt core code will
      break up the command into managable transfers and send them to the
      LLD one at a time. The offset is then used to tell the LLD where in
      the command we are at. Is there another field on the scsi_cmd for
      that?
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      b58d9154
  29. 23 11月, 2006 1 次提交
  30. 16 11月, 2006 1 次提交
  31. 12 10月, 2006 1 次提交
    • M
      [SCSI] Add ability to scan scsi busses asynchronously · 3e082a91
      Matthew Wilcox 提交于
      Since it often takes around 20-30 seconds to scan a scsi bus, it's
      highly advantageous to do this in parallel with other things.  The bulk
      of this patch is ensuring that devices don't change numbering, and that
      all devices are discovered prior to trying to start init.  For those
      who build SCSI as modules, there's a new scsi_wait_scan module that will
      ensure all bus scans are finished.
      
      This patch only handles drivers which call scsi_scan_host.  Fibre Channel,
      SAS, SATA, USB and Firewire all need additional work.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      3e082a91
  32. 31 8月, 2006 1 次提交
  33. 27 6月, 2006 1 次提交
  34. 15 5月, 2006 1 次提交
    • T
      [PATCH] SCSI: implement shost->host_eh_scheduled · ee7863bc
      Tejun Heo 提交于
      libata needs to invoke EH without scmd.  This patch adds
      shost->host_eh_scheduled to implement such behavior.
      
      Currently the only user of this feature is libata and no general
      interface is defined.  This patch simply adds handling for
      host_eh_scheduled where needed and exports scsi_eh_wakeup() to
      modules.  The rest is upto libata.  This is the result of the
      following discussion.
      
      http://thread.gmane.org/gmane.linux.scsi/23853/focus=9760
      
      In short, SCSI host is not supposed to know about exceptions unrelated
      to specific device or command.  Such exceptions should be handled by
      transport layer proper.  However, the distinction is not essential to
      ATA and libata is planning to depart from SCSI, so, for the time
      being, libata will be using SCSI EH to handle such exceptions.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      ee7863bc