1. 02 5月, 2013 1 次提交
    • H
      [SCSI] fnic: FIP VLAN Discovery Feature Support · d3c995f1
      Hiral Patel 提交于
      FIP VLAN discovery discovers the FCoE VLAN that will be used by all other FIP
      protocols as well as by the FCoE encapsulation for Fibre Channel payloads on
      the established virtual link. One of the goals of FC-BB-5 was to be as
      nonintrusive as possible on initiators and targets, and therefore FIP VLAN
      discovery occurs in the native VLAN used by the initiator or target to
      exchange Ethernet traffic. The FIP VLAN discovery protocol is the only FIP
      protocol running on the native VLAN; all other FIP protocols run on the
      discovered FCoE VLANs.
      
      If an administrator has manually configured FCoE VLANs on ENodes and FCFs,
      there is no need to use this protocol. FIP and FCoE will run over the
      configured VLANs.
      
      An ENode without FCoE VLANs configuration would use this automated discovery
      protocol to discover over which VLANs FCoE is running.
      
      The ENode sends a FIP VLAN discovery request to a multicast MAC address called
      All-FCF-MACs, which is a multicast MAC address to which all FCFs listen.
      
      All FCFs that can be reached in the native VLAN of the ENode are expected to
      respond on the same VLAN with a response that lists one or more FCoE VLANs
      that are available for the ENode's VN_Port login. This protocol has the sole
      purpose of allowing the ENode to discover all the available FCoE VLANs.
      
      Now the ENode may enable a subset of these VLANs for FCoE Running the FIP
      protocol in these VLANs on a per VLAN basis. And FCoE data transactions also
      would occur on this VLAN. Hence, Except for FIP VLAN discovery, all other FIP
      and FCoE traffic runs on the selected FCoE VLAN.  Its only the FIP VLAN
      Discovery protocol that is permitted to run on the Default native VLAN of the
      system.
      
      [**** NOTE ****]
      We are working on moving this feature definitions and functionality to libfcoe
      module. We need this patch to be approved, as Suse is looking forward to merge
      this feature in SLES 11 SP3 release.  Once this patch is approved, we will
      submit patch which should move vlan discovery feature to libfoce.
      
      [Fengguang Wu <fengguang.wu@intel.com>: kmalloc cast removal]
      Signed-off-by: NAnantha Prakash T <atungara@cisco.com>
      Signed-off-by: NHiral Patel <hiralpat@cisco.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      d3c995f1
  2. 23 2月, 2013 5 次提交
    • H
      [SCSI] fnic: Fnic Trace Utility · 4d7007b4
      Hiral Patel 提交于
      Fnic Trace utility is a tracing functionality built directly into fnic driver
      to trace events. The benefit that trace buffer brings to fnic driver is the
      ability to see what it happening inside the fnic driver. It also provides the
      capability to trace every IO event inside fnic driver to debug panics, hangs
      and potentially IO corruption issues. This feature makes it easy to find
      problems in fnic driver and it also helps in tracking down strange bugs in a
      more manageable way. Trace buffer is shared across all fnic instances for
      this implementation.
      Signed-off-by: NHiral Patel <hiralpat@cisco.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      4d7007b4
    • H
      [SCSI] fnic: New debug flags and debug log messages · 14eb5d90
      Hiral Patel 提交于
      Added new fnic debug flags for identifying IO state at every stage of IO while
      debugging and also added more log messages for better debugging capability.
      Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com>
      Signed-off-by: NHiral Patel <hiralpat@cisco.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      14eb5d90
    • H
      [SCSI] fnic: fnic driver may hit BUG_ON on device reset · a0bf1ca2
      Hiral Patel 提交于
      The issue was observed when LUN Reset is issued through IOCTL or sg_reset
      utility.
      
      fnic driver issues LUN RESET to firmware. On successful completion of device
      reset, driver cleans up all the pending IOs that were issued prior to device
      reset. These pending IOs are expected to be in ABTS_PENDING state. This works
      fine, when the device reset operation resulted from midlayer, but not when
      device reset was triggered from IOCTL path as the pending IOs were not in
      ABTS_PENDING state. execution path hits panic if the pending IO is not in
      ABTS_PENDING state.
      
      Changes:
      The fix replaces BUG_ON check in fnic_clean_pending_aborts() with marking
      pending IOs as ABTS_PENDING if they were not in ABTS_PENDING state and skips
      if they were already in ABTS_PENDING state. An extra check is added to validate
      the abort status of the commands after a delay of 2 * E_D_TOV using a
      helper function. The helper function returns 1 if it finds any pending IO in
      ABTS_PENDING state, belong to the LUN on which device reset was issued else 0.
      With this, device reset operation returns success only if the helper funciton
      returns 0, otherwise it returns failure.
      
      Other changes:
      - Removed code in fnic_clean_pending_aborts() that returns failure if it finds
        io_req NULL, instead of returning failure added code to continue with next io
      - Added device reset flags for debugging in fnic_terminate_rport_io,
        fnic_rport_exch_reset, and fnic_clean_pending_aborts
      Signed-off-by: NNarsimhulu Musini <nmusini@cisco.com>
      Signed-off-by: NHiral Patel <hiralpat@cisco.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      a0bf1ca2
    • H
      [SCSI] fnic: Fix SGEs limit · cfe16d5d
      Hiral Patel 提交于
      Driver allows IOs with more SGEs than max SGEs supported by Palo. The current
      max SGEs supported by the fnic driver is 1024. The current register settings
      on Palo supports a max of 256 only. Palo would return any IO with more than
      256 SGEs with an error indicating INVALID_SGLS. Fnic driver should limit the
      max supported SGLs in the driver to 256 to avoid this error.
      Signed-off-by: NSesidhar Baddela <sebaddel@cisco.com>
      Signed-off-by: NHiral Patel <hiralpat@cisco.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      cfe16d5d
    • H
      [SCSI] fnic: fixing issues in device and firmware reset code · 03298552
      Hiral Patel 提交于
      1. Handling overlapped firmware resets
           This fix serialize multiple firmware resets to avoid situation where fnic
           device fails to come up for link up event, when firmware resets are issued
           back to back. If there are overlapped firmware resets are issued,
           the firmware reset operation checks whether there is any firmware reset in
           progress, if so it polls for its completion in a loop with 100ms delay.
      
      2. Handling device reset timeout
           fnic_device_reset code has been modified to handle Device reset timeout:
           - Issue terminate on device reset timeout.
           - Introduced flags field (one of the scratch fields in scsi_cmnd).
           With this, device reset request would have DEVICE_RESET flag set for other
           routines to determine the type of the request.
           Also modified fnic_terminate_rport_io, fnic_rport_exch_rset, completion
           routines to handle SCSI commands with DEVICE_RESET flag.
      
      3. LUN/Device Reset hangs when issued through IOCTL using utilities like
         sg_reset.
           Each SCSI command is associated with a valid tag, fnic uses this tag to
           retrieve associated scsi command on completion. the LUN/Device Reset issued
           through IOCTL resulting into a SCSI command that is not associated with a
           valid tag. So fnic fails to retrieve associated scsi command on completion,
           which causes hang. This fix allocates tag, associates it with the
           scsi command and frees the tag, when the operation completed.
      
      4. Preventing IOs during firmware reset.
           Current fnic implementation allows IO submissions during firmware reset.
           This fix synchronizes IO submissions and firmware reset operations.
           It ensures that IOs issued to fnic prior to reset will be issued to the
           firmware before firmware reset.
      Signed-off-by: NNarsimhulu Musini <nmusini@cisco.com>
      Signed-off-by: NHiral Patel <hiralpat@cisco.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      03298552
  3. 29 1月, 2013 1 次提交
  4. 04 1月, 2013 1 次提交
    • G
      Drivers: scsi: remove __dev* attributes. · 6f039790
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Adam Radford <linuxraid@lsi.com>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6f039790
  5. 30 6月, 2011 1 次提交
  6. 31 3月, 2011 1 次提交
  7. 13 2月, 2011 2 次提交
  8. 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
  9. 08 10月, 2010 1 次提交
  10. 06 9月, 2010 1 次提交
  11. 11 8月, 2010 1 次提交
  12. 28 7月, 2010 3 次提交
    • J
      [SCSI] libfcoe: fcoe: fnic: add FIP VN2VN point-to-multipoint support · e10f8c66
      Joe Eykholt 提交于
      The FC-BB-6 committee is proposing a new FIP usage model called
      VN_port to VN_port mode.  It allows VN_ports to discover each other
      over a loss-free L2 Ethernet without any FCF or Fibre-channel fabric
      services.  This is point-to-multipoint.  There is also a variant
      of this called point-to-point which provides for making sure there
      is just one pair of ports operating over the Ethernet fabric.
      
      We add these new states:  VNMP_START, _PROBE1, _PROBE2, _CLAIM, and _UP.
      These usually go quickly in that sequence.  After waiting a random
      amount of time up to 100 ms in START, we select a pseudo-random
      proposed locally-unique port ID and send out probes in states PROBE1
      and PROBE2, 100 ms apart.  If no probe responses are heard, we
      proceed to CLAIM state 400 ms later and send a claim notification.
      We wait another 400 ms to receive claim responses, which give us
      a list of the other nodes on the network, including their FC-4
      capabilities.  After another 400 ms we go to VNMP_UP state and
      should start interoperating with any of the nodes for whic we
      receivec claim responses.  More details are in the spec.j
      
      Add the new mode as FIP_MODE_VN2VN.  The driver must specify
      explicitly that it wants to operate in this mode.  There is
      no automatic detection between point-to-multipoint and fabric
      mode, and the local port initialization is affected, so it isn't
      anticipated that there will ever be any such automatic switchover.
      
      It may eventually be possible to have both fabric and VN2VN
      modes on the same L2 network, which may be done by two separate
      local VN_ports (lports).
      
      When in VN2VN mode, FIP replaces libfc's fabric-oriented discovery
      module with its own simple code that adds remote ports as they
      are discovered from incoming claim notifications and responses.
      These hooks are placed by fcoe_disc_init().
      
      A linear list of discovered vn_ports is maintained under the
      fcoe_ctlr struct.  It is expected to be short for now, and
      accessed infrequently.  It is kept under RCU for lock-ordering
      reasons.  The lport and/or rport mutexes may be held when we
      need to lookup a fcoe_vnport during an ELS send.
      
      Change fcoe_ctlr_encaps() to lookup the destination vn_port in
      the list of peers for the destination MAC address of the
      FIP-encapsulated frame.
      
      Add a new function fcoe_disc_init() to initialize just the
      discovery portion of libfcoe for VN2VN mode.
      Signed-off-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      e10f8c66
    • J
      [SCSI] libfcoe: fcoe: fnic: change fcoe_ctlr_init interface to specify mode · 3d902ac0
      Joe Eykholt 提交于
      There are three modes that libfcoe currently supports, and a new one
      is coming.  Change the fcoe_ctlr_init() interface to add the mode
      desired.  This should not change any functionality.
      Signed-off-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      3d902ac0
    • R
      [SCSI] fnic: fnic_scsi.c: clean up · 0db6f435
      Roel Kluin 提交于
      In fnic_abort_cmd() and fnic_device_reset() assign `rport' earlier to make
      FNIC_SCSI_DBG() calls cleaner.
      
      In fnic_clean_pending_aborts() `rport' is not used.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Acked-by: NAbhijeet Joglekar <abjoglek@cisco.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      0db6f435
  13. 12 4月, 2010 3 次提交
  14. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  15. 18 2月, 2010 3 次提交
  16. 05 12月, 2009 8 次提交
  17. 23 8月, 2009 1 次提交
    • V
      [SCSI] fcoe, fnic, libfc: modifies current code paths to use EM anchor list · 52ff878c
      Vasu Dev 提交于
      Modifies current code to use EM anchor list in EM allocation, EM free,
      EM reset, exch allocation and exch lookup code paths.
      
       1. Modifies fc_exch_mgr_alloc to accept EM match function and then
          have allocated EM added to the lport using fc_exch_mgr_add API
          while also updating EM kref for newly added EM.
      
       2. Updates fc_exch_mgr_free API to accept only lport pointer instead
          EM and then have this API free all EMs of the lport from EM anchor
          list.
      
       3. Removes single lport pointer link from the EM, which was used in
          associating lport pointer in newly allocated exchange. Instead have
          lport pointer passed along new exchange allocation call path and
          then store passed lport pointer in newly allocated exchange, this
          will allow a single EM instance to be used across more than one
          lport and used in EM reset to reset only lport specific exchanges.
      
       4. Modifies fc_exch_mgr_reset to reset all EMs from the EM anchor list
          of the lport, adds additional exch lport pointer (ep->lp) check for
          shared EM case to reset exchange specific to a lport requested reset.
      
       5. Updates exch allocation API fc_exch_alloc to use EM anchor list and
          its anchor match func pointer. The fc_exch_alloc will walk the list
          of EMs until it finds a match, a match will be either null match
          func pointer or call to match function returning true value.
      
       6. Updates fc_exch_recv to accept incoming frame on local port using
          only lport pointer and frame pointer without specifying EM instance
          of incoming frame. Instead modified fc_exch_recv to locate EM for the
          incoming frame by matching xid of incoming frame against a EM xid range.
          This change was required to use EM list in libfc Rx path and after this
          change the lport fc_exch_mgr pointer emp is not needed anymore, so
          removed emp pointer.
      
       7. Updates fnic for removed lport emp pointer and above modified libfc APIs
          fc_exch_recv, fc_exch_mgr_alloc and fc_exch_mgr_free.
      
       8. Removes exch_get and exch_put from libfc_function_template as these
          are no longer needed with EM anchor list and its match function use.
          Also removes its default function fc_exch_get.
      
      A defect this patch introduced regarding the libfc initialization order in
      the fnic driver was fixed by Joe Eykholt <jeykholt@cisco.com>.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      52ff878c
  18. 26 6月, 2009 2 次提交
  19. 24 5月, 2009 1 次提交
  20. 14 5月, 2009 1 次提交