1. 16 12月, 2005 2 次提交
  2. 15 12月, 2005 1 次提交
    • M
      [SCSI] Convert SCSI mid-layer to scsi_execute_async · 6e68af66
      Mike Christie 提交于
      Add scsi helpers to create really-large-requests and convert
      scsi-ml to scsi_execute_async().
      
      Per Jens's previous comments, I placed this function in scsi_lib.c.
      I made it follow all the queue's limits - I think I did at least :), so
      I removed the warning on the function header.
      
      I think the scsi_execute_* functions should eventually take a request_queue
      and be placed some place where the dm-multipath hw_handler can use them
      if that failover code is going to stay in the kernel. That conversion
      patch will be sent in another mail though.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6e68af66
  3. 14 12月, 2005 3 次提交
  4. 07 11月, 2005 3 次提交
  5. 03 11月, 2005 1 次提交
  6. 31 10月, 2005 1 次提交
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
  7. 29 10月, 2005 8 次提交
    • J
      [SCSI] update fc_transport for removal of block/unblock functions · 19a7b4ae
      James.Smart@Emulex.Com 提交于
      We recently went back to implement a board reset. When we perform the
      reset, we wanted to tear down the internal data structures and rebuild
      them. Unfortunately, when it came to the rport structure, things were
      odd. If we deleted them, the scsi targets and sdevs would be
      torn down. Not a good thing for a temporary reset. We could block the
      rports, but we either maintain the internal structures to keep the
      rport reference (perhaps even replicating what's in the transport),
      or we have to fatten the fc transport with new search routines to find
      the rport (and deal with a case of a dangling rport that the driver
      forgets).
      
      It dawned on me that we had actually reached this state incorrectly.
      When the fc transport first started, we did the block/unblock first, then
      added the rport interface. The purpose of block/unblock is to hide the
      temporary disappearance of the rport (e.g. being deleted, then readded).
      Why are we making the driver do the block/unblock ? We should be making
      the transport have only an rport add/delete, and the let the transport
      handle the block/unblock.
      
      So... This patch removes the existing fc_remote_port_block/unblock
      functions. It moves the block/unblock functionality into the
      fc_remote_port_add/delete functions.  Updates for the lpfc driver are
      included. Qlogic driver updates are also enclosed, thanks to the
      contributions of Andrew Vasquez. [Note: the qla2xxx changes are
      relative to the scsi-misc-2.6 tree as of this morning - which does
      not include the recent patches sent by Andrew]. The zfcp driver does
      not use the block/unblock functions.
      
      One last comment: The resulting behavior feels very clean. The LLDD is
      concerned only with add/delete, which corresponds to the physical
      disappearance.  However, the fact that the scsi target and sdevs are
      not immediately torn down after the LLDD calls delete causes an
      interesting scenario... the midlayer can call the xxx_slave_alloc and
      xxx_queuecommand functions with a sdev that is at the location the
      rport used to be. The driver must validate the device exists when it
      first enters these functions. In thinking about it, this has always
      been the case for the LLDD and these routines. The existing drivers
      already check for existence. However, this highlights that simple
      validation via data structure dereferencing needs to be watched.
      To deal with this, a new transport function, fc_remote_port_chkready()
      was created that LLDDs should call when they first enter these two
      routines. It validates the rport state, and returns a scsi result
      which could be returned. In addition to solving the above, it also
      creates consistent behavior from the LLDD's when the block and deletes
      are occuring.
      
      Rejections fixed up and
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      19a7b4ae
    • J
      [SCSI] introduce sfoo_printk, sfoo_id, sfoo_channel helpers · 01d7b3b8
      Jeff Garzik 提交于
      New dev_printk wrappers, which allow us to shrink code, and
      eliminate direct references to host/channel/id/lun members:
      	scmd_printk()
      
      Introduce wrappers for highly common idioms, which may also help us
      eliminate some ->{channel,id} references in the future:
      	{scmd,sdev}_id()
      	{scmd,sdev}_channel()
      
      The scmd_* wrappers are present in scsi/scsi_device.h because they all
      employ the dereference chain cmd->device->$member.  We would prefer to
      use static inline functions rather than macros, but that would have a
      
      Rejections fixed up and
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      01d7b3b8
    • J
      13ec92b3
    • A
      [SCSI] Add an 'Issue LIP' device attribute in fc_transport class · 91ca7b01
      Andrew Vasquez 提交于
      Ok, here's a patch to add such a common API for fc transport users.
      Relevant LLD changes (lpfc and qla2xxx) also present.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      91ca7b01
    • C
      07ba3a95
    • C
      [SCSI] sas: add flag for locally attached PHYs · ac01bbbd
      Christoph Hellwig 提交于
      Add a flag to mark a PHY as attached to the HBA as opposed to beeing on
      an expander.  This is needed because various features are only supported
      on those.  This is a crude hack, the proper fix would be to use
      different classes for host-attached vs expander phys.  I'm looking into
      that.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      ac01bbbd
    • C
      [SCSI] scsi_transport_sas: support link error attributes · c3ee74c4
      Christoph Hellwig 提交于
      For now supporting the ->get_linkerrors method is mandatory.  I'll
      probably be beaten to implement the .show_foo variables and different
      types of attributes soon..
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      c3ee74c4
    • J
      [SCSI] move the mid-layer printk's over to shost/starget/sdev_printk · 9ccfc756
      James Bottomley 提交于
      This should eliminate (at least in the mid layer) to make numeric
      assumptions about any of the enumeration variables.  As a side effect,
      it will also make all the messages consistent and line us up nicely for
      the error logging strategy (if it ever shows itself again).
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      9ccfc756
  8. 28 10月, 2005 1 次提交
  9. 26 9月, 2005 1 次提交
  10. 21 9月, 2005 2 次提交
  11. 19 9月, 2005 2 次提交
  12. 16 9月, 2005 1 次提交
    • A
      [SCSI] change port speed definitions for scsi_transport_fc · 1832a586
      Andreas Herrmann 提交于
      obviously FC Port Speeds in scsi_transport_fc.h are defined according
      to FC-HBA:
      
      #define FC_PORTSPEED_1GBIT              1
      #define FC_PORTSPEED_2GBIT              2
      #define FC_PORTSPEED_10GBIT             4
      #define FC_PORTSPEED_4GBIT              8
      
      Problem is, whoever invented FC-HBA did not care about FC-FS or
      FC-GS-x. Following FC-FS/FC-GS-x defintions of port speeds would look
      like:
      
      1 GBit: 0x0001
      2 GBit: 0x0002
      4 GBit: 0x0004
      10GBit: 0x0008
      
      (and new in FC-LS:
      8 Gbit: 0x0010
      16GBit: 0x0020)
      
      I really appreciate if scsi_transport_fc.h would define port speeds
      according to FC-GS-x/FC-FS. Thus mapping of port speed capabilities to
      values defined in scsi_transport_fc.h can be avoided in the LLDD.
      
      Attached is a patch to change the definitions.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1832a586
  13. 11 9月, 2005 2 次提交
  14. 10 9月, 2005 1 次提交
    • C
      [SCSI] SAS transport class · c7ebbbce
      Christoph Hellwig 提交于
      The SAS transport class contains common code to deal with SAS HBAs, an
      aproximated representation of SAS topologies in the driver model,
      and various sysfs attributes to expose these topologies and managment
      interfaces to userspace.
      
      In addition to the basic SCSI core objects this transport class introduces
      two additional intermediate objects:  The SAS PHY as represented by struct
      sas_phy defines an "outgoing" PHY on a SAS HBA or Expander, and the SAS
      remote PHY represented by struct sas_rphy defines an "incoming" PHY on a
      SAS Expander or end device.  Note that this is purely a software concept, the
      underlying hardware for a PHY and a remote PHY is the exactly the same.
      
      There is no concept of a SAS port in this code, users can see what PHYs
      form a wide port based on the port_identifier attribute, which is the same
      for all PHYs in a port.
      
      This submission doesn't handle hot-plug addition or removal of SAS devices
      and thus doesn't do scanning in a workqueue yet, that will be added in
      phase2 after this submission.  In a third phase I will add additional
      managment infrastructure.
      
      I think this submission is ready for 2.6.14, but additional comments are
      of course very welcome.
      
      I'd like to thanks James Smart a lot for his very useful input on the
      design.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      c7ebbbce
  15. 07 9月, 2005 2 次提交
  16. 29 8月, 2005 3 次提交
  17. 28 8月, 2005 1 次提交
  18. 15 8月, 2005 1 次提交
  19. 09 8月, 2005 1 次提交
    • J
      [SCSI] fix target scanning oops with fc transport class · 5c44cd2a
      James.Smart@Emulex.Com 提交于
      We have some nasty issues with 2.6.12-rc6. Any request to scan on
      the lpfc or qla2xxx FC adapters will oops. What is happening is the
      system is defaulting to non-transport registered targets, which
      inherit the parent of the scan. On this second scan, performed by
      the attribute, the parent becomes the shost instead of the rport.
      The slave functions in the 2 FC adapters use starget_to_rport()
      routines, which incorrectly map the shost as an rport pointer.
      
      Additionally, this pointed out other weaknesses:
      - If the target structure is torn down outside of the transport,
        we have no method for it to be regenerated at the proper parent.
      - We have race conditions on the target being allocated by both
        the midlayer scan (parent=shost) and by the fc transport
        (parent=rport).
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      5c44cd2a
  20. 08 8月, 2005 1 次提交
    • J
      [SCSI] add global timeout to the scsi mid-layer · b21a4138
      James Bottomley 提交于
      There are certain rogue devices (and the aic7xxx driver) that return
      BUSY or QUEUE_FULL forever.  This code will apply a global timeout (of
      the total number of retries times the per command timer) to a given
      command.  If it is exceeded, the command is completed regardless of its
      state.
      
      The patch also removes the unused field in the command: timeout and
      timeout_total.
      
      This solves the problem of detecting an endless loop in the mid-layer
      because of BUSY/QUEUE_FULL bouncing, but will not recover the device.
      In the aic7xxx case, the driver can be recovered by sending a bus reset,
      so possibly this should be tied into the error handler?
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      b21a4138
  21. 06 8月, 2005 1 次提交
  22. 04 8月, 2005 1 次提交
    • J
      [SCSI] add missing hold_mcs parameter to the spi transport class · d872ebe4
      James Bottomley 提交于
      This parameter is important only to people who take the time to tune the
      margin control settings, otherwise it's completely irrelevant.  However,
      just in case anyone should want to do this, it's appropriate to include
      the parameter.
      
      I don't do anything with it in DV by design, so the parameter will come
      up as off by default, so if anyone actually wants to play with the
      margin control settings they'll have to enable it under the
      spi_transport class first.
      
      I also updated the transfer settings display to report all of the PPR
      settings instead of only DT, IU and QAS
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d872ebe4