02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

26 Aug, 2017

1 commit

  • Avoid that the following compiler warning is reported when building
    with W=1:

    drivers/scsi/scsi_transport_srp.c:92:19: warning: comparison is always false due to limited range of data type [-Wtype-limits]

    Signed-off-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

07 Feb, 2017

2 commits


15 Jul, 2015

1 commit

  • We might return res which is not initialized. Also
    reduce code duplication by exporting srp_parse_tmo so
    srp_tmo_set can reuse it.

    Detected by Coverity.

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Jenny Falkovich
    Reviewed-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Sagi Grimberg
     

25 Mar, 2014

1 commit

  • This patch fixes the following two kernel-doc warnings:

    Warning(drivers/scsi/scsi_transport_srp.c:819): No description found for parameter 'rport'
    Warning(include/scsi/scsi_transport_srp.h:75): Excess struct/union/enum/typedef member 'deleted' description in 'srp_rport'

    Signed-off-by: Bart Van Assche
    Reported-by: Masanari Iida
    Acked-by: Sebastian Riemer
    Signed-off-by: Roland Dreier

    Bart Van Assche
     

22 Jan, 2014

2 commits

  • The following command has been used to verify that the kernel-doc
    tool no longer complains about undocumented fields:

    scripts/kernel-doc -html drivers/scsi/scsi_transport_srp.c \
    include/scsi/scsi_transport_srp.h >srp-transport-doc.html

    Signed-off-by: Bart Van Assche
    Acked-by: Sebastian Riemer
    Acked-by: Randy Dunlap
    Signed-off-by: Roland Dreier

    Bart Van Assche
     
  • The rport timers must be stopped before the SRP initiator destroys the
    resources associated with the SCSI host. This is necessary because
    otherwise the callback functions invoked from the SRP transport layer
    could trigger a use-after-free. Stopping the rport timers before
    invoking scsi_remove_host() can trigger long delays in the SCSI error
    handler if a transport layer failure occurs while scsi_remove_host()
    is in progress. Hence move the code for stopping the rport timers from
    srp_rport_release() into a new function and invoke that function after
    scsi_remove_host() has finished. This patch fixes the following
    sporadic kernel crash:

    kernel BUG at include/asm-generic/dma-mapping-common.h:64!
    invalid opcode: 0000 [#1] SMP
    RIP: 0010:[] [] srp_unmap_data+0x121/0x130 [ib_srp]
    Call Trace:
    [] srp_free_req+0x3c/0x80 [ib_srp]
    [] srp_finish_req+0x48/0x70 [ib_srp]
    [] srp_terminate_io+0x4b/0x60 [ib_srp]
    [] __rport_fail_io_fast+0x75/0x80 [scsi_transport_srp]
    [] rport_fast_io_fail_timedout+0x88/0xc0 [scsi_transport_srp]
    [] worker_thread+0x170/0x2a0
    [] kthread+0x96/0xa0
    [] child_rip+0xa/0x20

    Signed-off-by: Bart Van Assche
    Signed-off-by: Roland Dreier

    Bart Van Assche
     

09 Nov, 2013

3 commits

  • Add support for periodically reconnecting to an SRP target until
    the dev_loss timer expires. After the tenth reconnection attempt,
    gradually slow down subsequent reconnect attempts.

    Signed-off-by: Bart Van Assche
    Acked-by: David Dillow
    Signed-off-by: Roland Dreier

    Bart Van Assche
     
  • Add the necessary functions in the SRP transport module to allow an
    SRP initiator driver to implement transport layer error handling
    similar to the functionality already provided by the FC transport
    layer. This includes:

    - Support for implementing fast_io_fail_tmo, the time that should
    elapse after having detected a transport layer problem and
    before failing I/O.
    - Support for implementing dev_loss_tmo, the time that should
    elapse after having detected a transport layer problem and
    before removing a remote port.

    Signed-off-by: Bart Van Assche
    Acked-by: David Dillow
    Signed-off-by: Roland Dreier

    Bart Van Assche
     
  • Keep the rport data structure around after srp_remove_host() has
    finished until cleanup of the IB transport layer has finished
    completely. This is necessary because later patches use the rport
    pointer inside the queuecommand callback. Without this patch
    accessing the rport from inside a queuecommand callback is racy
    because srp_remove_host() must be invoked before scsi_remove_host()
    and because the queuecommand callback could get invoked after
    srp_remove_host() has finished. In other words, without this patch
    the queuecommand callback can get invoked after the rport data
    structure has been freed.

    Signed-off-by: Bart Van Assche
    Acked-by: David Dillow
    Signed-off-by: Roland Dreier

    Bart Van Assche
     

01 Dec, 2012

1 commit

  • Make it possible to disconnect the IB RC connection used by the SRP
    protocol to communicate with a target.

    Have the SRP transport layer create a sysfs "delete" attribute for
    initiator drivers that support this functionality.

    Signed-off-by: Bart Van Assche
    Acked-by: David Dillow
    Cc: FUJITA Tomonori
    Cc: Robert Jennings
    Signed-off-by: Roland Dreier

    Bart Van Assche
     

13 Oct, 2007

4 commits

  • This moves tsk_mgmt_response callback in struct scsi_host_template to
    struct scsi_transport_template since struct scsi_transport_template is
    more suitable for the task management stuff.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • This adds minimum target driver support:

    - srp_rport_{add,del} calls scsi_tgt_it_nexus_{create,destroy} for
    target drivers.

    - add a callback to notify target drivers of the nexus operation
    results to srp_function_template.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • This adds a 'roles' attribute to rport like transport_fc. The role can
    be initiator or target. That is, the initiator driver creates target
    remote ports and the target driver creates initiator remote ports.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • This adds srp transport class that works with ib_srp and ibmvscsi.

    It creates only /sys/class/{srp_host,srp_remote_ports} and
    srp_remote_ports has only "port_id" attribute.

    viola:/sys/class/srp_remote_ports/port-0:1# ls
    device port_id subsystem uevent
    viola:/sys/class/srp_remote_ports/port-0:1# cat port_id
    4c:49:4e:55:58:20:56:49:4f:00:00:00:00:00:00:00

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori