14 Oct, 2013

1 commit


01 Jun, 2013

1 commit

  • So far, we could only increase the s390dbf log level after an FCP
    device has been initially set online for it to create the dbf entries
    required to adjust the level.

    Introduce zfcp.dbflevel as counterpart to the already existing
    zfcp.dbfsize to enable debugging of e.g. setting an FCP device online.

    Signed-off-by: Steffen Maier
    Signed-off-by: James Bottomley

    Steffen Maier
     

24 Sep, 2012

2 commits

  • If the mapping of FCP device bus ID and corresponding subchannel
    is modified while the Linux image is suspended, the resume of FCP
    devices can fail. During resume, zfcp gets callbacks from cio regarding
    the modified subchannels but they can be arbitrarily mixed with the
    restore/resume callback. Since the cio callbacks would trigger
    adapter recovery, zfcp could wakeup before the resume callback.
    Therefore, ignore the cio callbacks regarding subchannels while
    being suspended. We can safely do so, since zfcp does not deal itself
    with subchannels. For problem determination purposes, we still trace the
    ignored callback events.

    The following kernel messages could be seen on resume:

    kernel: : parent should not be sleeping

    As part of adapter reopen recovery, zfcp performs auto port scanning
    which can erroneously try to register new remote ports with
    scsi_transport_fc and the device core code complains about the parent
    (adapter) still sleeping.

    kernel: zfcp.3dff9c: :\
    Setting up the QDIO connection to the FCP adapter failed

    kernel: zfcp.574d43: :\
    ERP cannot recover an error on the FCP device

    In such cases, the adapter gave up recovery and remained blocked along
    with its child objects: remote ports and LUNs/scsi devices. Even the
    adapter shutdown as part of giving up recovery failed because the ccw
    device state remained disconnected. Later, the corresponding remote
    ports ran into dev_loss_tmo. As a result, the LUNs were erroneously
    not available again after resume.

    Even a manually triggered adapter recovery (e.g. sysfs attribute
    failed, or device offline/online via sysfs) could not recover the
    adapter due to the remaining disconnected state of the corresponding
    ccw device.

    Signed-off-by: Steffen Maier
    Cc: #2.6.32+
    Signed-off-by: James Bottomley

    Steffen Maier
     
  • The pl vector has scount elements, i.e. pl[scount-1] is the last valid
    element. For maximum sized requests, payload->counter == scount after
    the last loop iteration. Therefore, do bounds checking first (with
    boolean shortcut) to not access the invalid element pl[scount].

    Do not trust the maximum sbale->scount value from the HBA
    but ensure we won't access the pl vector out of our allocated bounds.
    While at it, clean up scoping and prevent unnecessary memset.

    Minor fix for 86a9668a8d29ea711613e1cb37efa68e7c4db564
    "[SCSI] zfcp: support for hardware data router"

    Signed-off-by: Steffen Maier
    Reviewed-by: Martin Peschke
    Cc: #3.2+
    Signed-off-by: James Bottomley

    Steffen Maier
     

20 Jul, 2012

1 commit

  • Remove the file name from the comment at top of many files. In most
    cases the file name was wrong anyway, so it's rather pointless.

    Also unify the IBM copyright statement. We did have a lot of sightly
    different statements and wanted to change them one after another
    whenever a file gets touched. However that never happened. Instead
    people start to take the old/"wrong" statements to use as a template
    for new files.
    So unify all of them in one go.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

01 Nov, 2011

1 commit

  • Fix several compile errors on s390 caused by splitting module.h.

    Some include additions [e.g. qdio_setup.c, zfcp_qdio.c] are in
    anticipation of pending changes queued for s390 that increase
    the modular use footprint.

    [PG: added additional obvious changes since Heiko's original patch]

    Signed-off-by: Heiko Carstens
    Signed-off-by: Paul Gortmaker

    Heiko Carstens
     

27 Aug, 2011

1 commit


22 Dec, 2010

5 commits

  • This patch is the final cleanup of the redesign from the zfcp tracing.
    Structures and elements which were used by multiple areas of the
    former debug tracing are now changed to the new scheme.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • This patch is the continuation to redesign the zfcp tracing to a more
    straight-forward and easy to extend scheme.

    This patch deals with all trace records of the zfcp SCSI area.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • This patch is the continuation to redesign the zfcp tracing to a more
    straight-forward and easy to extend scheme.

    This patch deals with all trace records of the zfcp HBA area.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • This patch is the continuation to redesign the zfcp tracing to a more
    straight-forward and easy to extend scheme.

    This patch deals with all trace records of the zfcp SAN area.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • The tracing environment of the zfcp LLD has become very bulky and hard
    to maintain. Small changes involve a large modification process which
    is error-prone and not effective. This patch is the first of a set to
    redesign the zfcp tracing to a more straight-forward and easy to
    extend scheme. It removes all interpretation and visualization parts
    and focuses on bare logging of the information.

    This patch deals with all trace records of the zfcp error recovery.

    Signed-off-by: Swen schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     

08 Oct, 2010

1 commit

  • With the change that drivers have to explicitly request the serial
    number for SCSI commands, this field should not be part of the zfcp
    traces. It is not worth the effort to request the serial number only
    for tracing purposes, so simply remove this field from the debug
    traces.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     

17 Sep, 2010

1 commit

  • This is the large change to switch from using the data in
    zfcp_unit to zfcp_scsi_dev. Keeping everything working requires doing
    the switch in one piece. To ensure that no code keeps using the data
    in zfcp_unit, this patch also removes the data from zfcp_unit that is
    now being replaced with zfcp_scsi_dev.

    For zfcp, the scsi_device together with zfcp_scsi_dev exist from the
    call of slave_alloc to the call of slave_destroy. The data in
    zfcp_scsi_dev is initialized in zfcp_scsi_slave_alloc and the LUN is
    opened; the final shutdown for the LUN is run from slave_destroy.

    Where the scsi_device or zfcp_scsi_dev is needed, the pointer to the
    scsi_device is passed as function argument and inside the function
    converted to the pointer to zfcp_scsi_dev; this avoids back and forth
    conversion betweeen scsi_device and zfcp_scsi_dev.

    While changing the function arguments from zfcp_unit to scsi_device,
    the functions names are renamed form "unit" to "lun". This is to have
    a seperation between zfcp_scsi_dev/LUN and the zfcp_unit; only code
    referring to the remaining configuration information in zfcp_unit
    struct uses "unit".

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     

28 Jul, 2010

2 commits

  • Introduce support for DIF/DIX in zfcp: Report the capabilities for the
    Scsi_host, map the protection data when issuing I/O requests and
    handle the new error codes. Also add the fsf data_direction field to
    the hba trace, it is useful information for debugging in that area.
    This is an EXPERIMENTAL feature for now.

    Signed-off-by: Felix Beck
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Felix Beck
     
  • Initialize allocated memory to zero to prevent access on error. This
    prevents a possible error in the error handling path.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     

30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

18 Feb, 2010

3 commits


18 Jan, 2010

1 commit

  • Advance the correct pointer when inserting the linebreak for the HBA
    trace. It was missing in the output since the pointer to the output
    buffer was never advanced, and the linebreak character was overwritten
    later.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     

05 Dec, 2009

6 commits

  • Remove some redundancies in FC related code and trace:
    - drop redundant data from SAN trace (local s_id that only changes
    during link down, ls_code that is already part of payload, d_id in
    ct response trace that is always the same as in ct request trace)
    - use one common fsf struct to hold zfcp data for ct and els requests
    - leverage common fsf struct for FC passthrough job data, allocate it
    with dd_bsg_data for passthrough requests and unify common code for
    ct and els passthrough request
    - simplify callback handling in zfcp_fc

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Instead of assigning 4 bytes with the highest byte masked out, use a 3
    byte array with the ntoh24 and h24ton helper functions, thus
    eliminating the need for the ZFCP_DID_MASK.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • The well-known-address (WKA) port handling code is part of the FC code
    in zfcp. Move everything WKA related to the zfcp_fc files and use the
    common zfcp_fc prefix for structs and functions. Drop the unused key
    management service while renaming the struct, no request could ever
    reach this service in zfcp and it is obsolete anyway.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Use common code definitions for FC GPN_FT and GID_PN
    instead of inventing private ones. Move the private structs still
    required inside zfcp to zfcp_fc header file.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Use common data structures for FCP CMND, FCP RSP and related
    definitions and remove zfcp private definitions. Split the FCP CMND
    setup and FCP RSP evaluation code in seperate functions. Use inline
    functions to not negatively impact the I/O path.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Replace the local reference counting by already available mechanisms
    offered by kref. Where possible existing device structures were used,
    including the same functionality.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     

05 Sep, 2009

7 commits


24 May, 2009

1 commit


13 Mar, 2009

2 commits

  • The current number based id ERP logging is replaced by a string
    based tag version. The benefit is an easier location of the code in
    question and the removal of the lengthy array referencing the
    individual messages.
    The string (7 bytes) based version does not use more space since those
    bytes were "used" anyway due to the alignment of the structure.
    The encoding of the 7 byte string is as follows
    [0-1] = filename
    [2-5] = task/function
    [6] = section
    Due to the character of this string (fixed length) a string
    termination is not required here.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • The status read response FSF_STATUS_READ_SUB_ERROR_PORT is not
    defined in the specs and therefore not valid.
    All occurrences are removed from the code.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     

30 Dec, 2008

3 commits

  • Remove a message that was emitted for a port that could not initially
    be opened. This is a rare case when the port discovery hits an
    initiator port and only confuses the user with an initator port logged
    in the message. Remove the whole special case: The failed "open port"
    request triggers required follow-up actions anyway.

    Signed-off-by: Christof Schmitt
    Acked-by: Felix Beck
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Add the support to send CT and ELS requests as unchained FSF requests. This is
    required for older hardware and was somehow omitted during the cleanup of the
    FSF layer. The req_count and resp_count attributes are unused, so remove them
    instead of adding a special case for setting them. Also add debug data and a
    warning, when the ct request hits a limit.

    Signed-off-by: Christof Schmitt
    Acked-by: Martin Petermann
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • With the change to the dev_ message macros, the macro to get the busid
    is only used in a few places. Remove it and directly get the dev_name
    from the device.

    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt