1. 19 Feb, 2012 2 commits
  2. 28 Feb, 2011 1 commit
  3. 28 Jul, 2010 1 commit
  4. 16 May, 2010 1 commit
    • Robert Love's avatar
      [SCSI] libfc: Move the port_id into lport · 7b2787ec
      Robert Love authored
      This patch creates a port_id member in struct fc_lport.
      This allows libfc to just deal with fc_lport instances
      instead of calling into the fc_host to get the port_id.
      
      This change helps in only using symbols necessary for
      operation from the libfc structures. libfc still needs
      to change the fc_host_port_id() if the port_id changes
      so the presentation layer (scsi_transport_fc) can provide
      the user with the correct value, but libfc shouldn't
      rely on the presentation layer for operational values.
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      7b2787ec
  5. 04 Dec, 2009 7 commits
  6. 10 Sep, 2009 4 commits
    • Joe Eykholt's avatar
      [SCSI] libfc: send GPN_ID in reaction to single-port RSCNs. · 2ab7e1ec
      Joe Eykholt authored
      When an RSCN indicates changes to individual remote ports,
      don't blindly log them out and then back in.  Instead, determine
      whether they're still in the directory, by doing GPN_ID.
      
      If that is successful, call login, which will send ADISC and reverify,
      otherwise, call logoff.  Perhaps we should just delete the rport,
      not send LOGO, but it seems safer.
      
      Also, fix a possible issue where if a mix of records in the RSCN
      cause us to queue disc_ports for disc_single and then we decide
      to do full rediscovery, we leak memory for those disc_ports queued.
      
      So, go through the list of disc_ports even if doing full discovery.
      Free the disc_ports in any case.  If any of the disc_single() calls
      return error, do a full discovery.
      
      The ability to fill in GPN_ID requests was added to fc_ct_fill().
      For this, it needs the FC_ID to be passed in as an arg.
      The did parameter for fc_elsct_send() is used for that, since the
      actual D_DID will always be 0xfffffc for all CT requests so far.
      Signed-off-by: default avatarJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      2ab7e1ec
    • Joe Eykholt's avatar
      [SCSI] libfc: use ADISC to verify rport login state · 370c3bd0
      Joe Eykholt authored
      When rport_login is called on an rport that is already thought
      to be logged in, use ADISC.  If that fails, redo PLOGI.
      This is less disruptive after fabric changes that don't affect
      the state of the target.
      
      Implement the sending of ADISC via fc_els_fill.
      
      Add ADISC state to the rport state machine.  This is entered from READY
      and returns to READY after successful completion.  If it fails, the rport
      is either logged off and deleted or re-does PLOGI.
      Signed-off-by: default avatarJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      370c3bd0
    • Joe Eykholt's avatar
      [SCSI] libfc: change elsct to use FC_ID instead of rdata · a46f327a
      Joe Eykholt authored
      tt.elsct_send is used by both FCP and by the rport state machine.
      After further patches, these two modules will use different
      structures for the remote port.
      
      So, change elsct_send to use the FC_ID instead of the fc_rport_priv
      as its argument.  It currently only uses the FC_ID anyway.
      
      For CT requests the destination FC_ID is still implicitly 0xfffffc.
      After further patches the did arg on CT requests will be used to
      specify the FC_ID being inquired about for GPN_ID or other queries.
      Signed-off-by: default avatarJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      a46f327a
    • Joe Eykholt's avatar
      [SCSI] libfc: make fc_rport_priv the primary rport interface. · 9fb9d328
      Joe Eykholt authored
      The rport and discovery modules deal with remote ports
      before fc_remote_port_add() can be done, because the
      full set of rport identifiers is not known at early stages.
      
      In preparation for splitting the fc_rport/fc_rport_priv allocation,
      make fc_rport_priv the primary interface for the remote port and
      discovery engines.
      
      The FCP / SCSI layers still deal with fc_rport and
      fc_rport_libfc_priv, however.
      Signed-off-by: default avatarJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      9fb9d328
  7. 21 Jun, 2009 1 commit
  8. 29 Dec, 2008 1 commit
    • Robert Love's avatar
      [SCSI] libfc: A modular Fibre Channel library · 42e9a92f
      Robert Love authored
      libFC is composed of 4 blocks supported by an exchange manager
      and a framing library. The upper 4 layers are fc_lport, fc_disc,
      fc_rport and fc_fcp. A LLD that uses libfc could choose to
      either use libfc's block, or using the transport template
      defined in libfc.h, override one or more blocks with its own
      implementation.
      
      The EM (Exchange Manager) manages exhcanges/sequences for all
      commands- ELS, CT and FCP.
      
      The framing library frames ELS and CT commands.
      
      The fc_lport block manages the library's representation of the
      host's FC enabled ports.
      
      The fc_disc block manages discovery of targets as well as
      handling changes that occur in the FC fabric (via. RSCN events).
      
      The fc_rport block manages the library's representation of other
      entities in the FC fabric. Currently the library uses this block
      for targets, its peer when in point-to-point mode and the
      directory server, but can be extended for other entities if
      needed.
      
      The fc_fcp block interacts with the scsi-ml and handles all
      I/O.
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      [jejb: added include of delay.h to fix ppc64 compile prob spotted by sfr]
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      42e9a92f