11 Feb, 2020

1 commit

  • commit aa8679736a82386551eb9f3ea0e6ebe2c0e99104 upstream.

    Clang warns:

    ../drivers/scsi/qla4xxx/ql4_os.c:4148:3: warning: misleading
    indentation; statement is not part of the previous 'if'
    [-Wmisleading-indentation]
    if (ha->fw_dump)
    ^
    ../drivers/scsi/qla4xxx/ql4_os.c:4144:2: note: previous statement is
    here
    if (ha->queues)
    ^
    1 warning generated.

    This warning occurs because there is a space after the tab on this
    line. Remove it so that the indentation is consistent with the Linux
    kernel coding style and clang no longer warns.

    Fixes: 068237c87c64 ("[SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure")
    Link: https://github.com/ClangBuiltLinux/linux/issues/819
    Link: https://lore.kernel.org/r/20191218015252.20890-1-natechancellor@gmail.com
    Acked-by: Manish Rangankar
    Reviewed-by: Nick Desaulniers
    Signed-off-by: Nathan Chancellor
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Nathan Chancellor
     

23 Jan, 2020

1 commit

  • commit 3fe3d2428b62822b7b030577cd612790bdd8c941 upstream.

    The variable init_fw_cb is released twice, resulting in a double free
    bug. The call to the function dma_free_coherent() before goto is removed to
    get rid of potential double free.

    Fixes: 2a49a78ed3c8 ("[SCSI] qla4xxx: added IPv6 support.")
    Link: https://lore.kernel.org/r/1572945927-27796-1-git-send-email-bianpan2016@163.com
    Signed-off-by: Pan Bian
    Acked-by: Manish Rangankar
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Pan Bian
     

09 Jan, 2020

1 commit

  • [ Upstream commit fee92f25777789d73e1936b91472e9c4644457c8 ]

    On this error path we call qla4xxx_mem_free() and then the caller also
    calls qla4xxx_free_adapter() which calls qla4xxx_mem_free(). It leads to a
    couple double frees:

    drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha->chap_dma_pool' double freed
    drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha->fw_ddb_dma_pool' double freed

    Fixes: afaf5a2d341d ("[SCSI] Initial Commit of qla4xxx")
    Link: https://lore.kernel.org/r/20191203094421.hw7ex7qr3j2rbsmx@kili.mountain
    Signed-off-by: Dan Carpenter
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Dan Carpenter
     

21 May, 2019

1 commit


13 Apr, 2019

1 commit


26 Mar, 2019

2 commits

  • In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid NULL
    pointer dereference.

    Signed-off-by: Kangjie Lu
    Acked-by: Manish Rangankar
    Reviewed-by: Mukesh Ojha
    Signed-off-by: Martin K. Petersen

    Kangjie Lu
     
  • Clang -Wuninitialized notices that on is_qla40XX we never allocate any DMA
    memory in get_fw_boot_info() but attempt to free it anyway:

    drivers/scsi/qla4xxx/ql4_os.c:5915:7: error: variable 'buf_dma' is used uninitialized whenever 'if' condition is false
    [-Werror,-Wsometimes-uninitialized]
    if (!(val & 0x07)) {
    ^~~~~~~~~~~~~
    drivers/scsi/qla4xxx/ql4_os.c:5985:47: note: uninitialized use occurs here
    dma_free_coherent(&ha->pdev->dev, size, buf, buf_dma);
    ^~~~~~~
    drivers/scsi/qla4xxx/ql4_os.c:5915:3: note: remove the 'if' if its condition is always true
    if (!(val & 0x07)) {
    ^~~~~~~~~~~~~~~~~~~
    drivers/scsi/qla4xxx/ql4_os.c:5885:20: note: initialize the variable 'buf_dma' to silence this warning
    dma_addr_t buf_dma;
    ^
    = 0

    Skip the call to dma_free_coherent() here.

    Fixes: 2a991c215978 ("[SCSI] qla4xxx: Boot from SAN support for open-iscsi")
    Signed-off-by: Arnd Bergmann
    Reviewed-by: Nathan Chancellor
    Signed-off-by: Martin K. Petersen

    Arnd Bergmann
     

10 Mar, 2019

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: arcmsr, qla2xxx, lpfc,
    hisi_sas, target/iscsi and target/core.

    Additionally Christoph refactored gdth as part of the dma changes. The
    major mid-layer change this time is the removal of bidi commands and
    with them the whole of the osd/exofs driver and filesystem. This is a
    major simplification for block and mq in particular"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (240 commits)
    scsi: cxgb4i: validate tcp sequence number only if chip version pf
    scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c
    scsi: mpt3sas: Add missing breaks in switch statements
    scsi: aacraid: Fix missing break in switch statement
    scsi: kill command serial number
    scsi: csiostor: drop serial_number usage
    scsi: mvumi: use request tag instead of serial_number
    scsi: dpt_i2o: remove serial number usage
    scsi: st: osst: Remove negative constant left-shifts
    scsi: ufs-bsg: Allow reading descriptors
    scsi: ufs: Allow reading descriptor via raw upiu
    scsi: ufs-bsg: Change the calling convention for write descriptor
    scsi: ufs: Remove unused device quirks
    Revert "scsi: ufs: disable vccq if it's not needed by UFS device"
    scsi: megaraid_sas: Remove a bunch of set but not used variables
    scsi: clean obsolete return values of eh_timed_out
    scsi: sd: Optimal I/O size should be a multiple of physical block size
    scsi: MAINTAINERS: SCSI initiator and target tweaks
    scsi: fcoe: make use of fip_mode enum complete
    ...

    Linus Torvalds
     

20 Jan, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "A set of 17 fixes. Most of these are minor or trivial.

    The one fix that may be serious is the isci one: the bug can cause hba
    parameters to be set from uninitialized memory. I don't think it's
    exploitable, but you never know"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: cxgb4i: add wait_for_completion()
    scsi: qla1280: set 64bit coherent mask
    scsi: ufs: Fix geometry descriptor size
    scsi: megaraid_sas: Retry reads of outbound_intr_status reg
    scsi: qedi: Add ep_state for login completion on un-reachable targets
    scsi: ufs: Fix system suspend status
    scsi: qla2xxx: Use correct number of vectors for online CPUs
    scsi: hisi_sas: Set protection parameters prior to adding SCSI host
    scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes
    scsi: isci: initialize shost fully before calling scsi_add_host()
    scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs
    scsi: smartpqi_init: fix boolean expression in pqi_device_remove_start
    scsi: core: Synchronize request queue PM status only on successful resume
    scsi: pm80xx: reduce indentation
    scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param
    scsi: megaraid_sas: correct an info message
    scsi: target/iscsi: fix error msg typo when create lio_qr_cache failed
    scsi: sd: Fix cache_type_store()

    Linus Torvalds
     

12 Jan, 2019

1 commit

  • In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
    we are expecting to fall through.

    Notice that, in this particular case, I replaced "allow fall-through" with
    a "fall through" annotation, which is what GCC is expecting to find.

    Signed-off-by: Gustavo A. R. Silva
    Acked-by: Nilesh Javali
    Signed-off-by: Martin K. Petersen

    Gustavo A. R. Silva
     

09 Jan, 2019

1 commit


08 Jan, 2019

1 commit

  • We already need to zero out memory for dma_alloc_coherent(), as such
    using dma_zalloc_coherent() is superflous. Phase it out.

    This change was generated with the following Coccinelle SmPL patch:

    @ replace_dma_zalloc_coherent @
    expression dev, size, data, handle, flags;
    @@

    -dma_zalloc_coherent(dev, size, handle, flags)
    +dma_alloc_coherent(dev, size, handle, flags)

    Suggested-by: Christoph Hellwig
    Signed-off-by: Luis Chamberlain
    [hch: re-ran the script on the latest tree]
    Signed-off-by: Christoph Hellwig

    Luis Chamberlain
     

19 Dec, 2018

1 commit

  • Most SCSI drivers want to enable "clustering", that is merging of
    segments so that they might span more than a single page. Remove the
    ENABLE_CLUSTERING define, and require drivers to explicitly set
    DISABLE_CLUSTERING to disable this feature.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Christoph Hellwig
     

07 Nov, 2018

2 commits


25 Oct, 2018

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly updates of the usual drivers: UFS, esp_scsi, NCR5380,
    qla2xxx, lpfc, libsas, hisi_sas.

    In addition there's a set of mostly small updates to the target
    subsystem a set of conversions to the generic DMA API, which do have
    some potential for issues in the older drivers but we'll handle those
    as case by case fixes.

    A new myrs driver for the DAC960/mylex raid controllers to replace the
    block based DAC960 which is also being removed by Jens in this merge
    window.

    Plus the usual slew of trivial changes"

    [ "myrs" stands for "MYlex Raid Scsi". Obviously. Silly of me to even
    wonder. There's also a "myrb" driver, where the 'b' stands for
    'block'. Truly, somebody has got mad naming skillz. - Linus ]

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (237 commits)
    scsi: myrs: Fix the processor absent message in processor_show()
    scsi: myrs: Fix a logical vs bitwise bug
    scsi: hisi_sas: Fix NULL pointer dereference
    scsi: myrs: fix build failure on 32 bit
    scsi: fnic: replace gross legacy tag hack with blk-mq hack
    scsi: mesh: switch to generic DMA API
    scsi: ips: switch to generic DMA API
    scsi: smartpqi: fully convert to the generic DMA API
    scsi: vmw_pscsi: switch to generic DMA API
    scsi: snic: switch to generic DMA API
    scsi: qla4xxx: fully convert to the generic DMA API
    scsi: qla2xxx: fully convert to the generic DMA API
    scsi: qla1280: switch to generic DMA API
    scsi: qedi: fully convert to the generic DMA API
    scsi: qedf: fully convert to the generic DMA API
    scsi: pm8001: switch to generic DMA API
    scsi: nsp32: switch to generic DMA API
    scsi: mvsas: fully convert to the generic DMA API
    scsi: mvumi: switch to generic DMA API
    scsi: mpt3sas: switch to generic DMA API
    ...

    Linus Torvalds
     

18 Oct, 2018

1 commit


03 Oct, 2018

1 commit

  • After bfcb79fca19d ("PCI/ERR: Run error recovery callbacks for all affected
    devices"), AER errors are always cleared by the PCI core and drivers don't
    need to do it themselves.

    Remove calls to pci_cleanup_aer_uncorrect_error_status() from device
    driver error recovery functions.

    Signed-off-by: Oza Pawandeep
    [bhelgaas: changelog, remove PCI core changes, remove unused variables]
    Signed-off-by: Bjorn Helgaas

    Oza Pawandeep
     

28 Sep, 2018

1 commit

  • The check for a non-zero drvr_wait is redundant as the same check is performed
    earlier in the outer while loop, the inner check will always be true if we
    reached this point inside the while loop. Remove the redundant if check.

    Detected by cppcheck:
    (warning) Identical inner 'if' condition is always true.

    Signed-off-by: Colin Ian King
    Acked-by: Manish Rangankar
    Signed-off-by: Martin K. Petersen

    Colin Ian King
     

13 Jun, 2018

1 commit

  • The kmalloc() function has a 2-factor argument form, kmalloc_array(). This
    patch replaces cases of:

    kmalloc(a * b, gfp)

    with:
    kmalloc_array(a * b, gfp)

    as well as handling cases of:

    kmalloc(a * b * c, gfp)

    with:

    kmalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kmalloc_array(array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    kmalloc(4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    The tools/ directory was manually excluded, since it has its own
    implementation of kmalloc().

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    type TYPE;
    expression THING, E;
    @@

    (
    kmalloc(
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    kmalloc(
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    kmalloc(
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    kmalloc(
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    kmalloc(
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    kmalloc(
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    kmalloc(
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    kmalloc(
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    kmalloc(
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    kmalloc(
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    identifier SIZE, COUNT;
    @@

    - kmalloc
    + kmalloc_array
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    kmalloc(
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kmalloc(
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kmalloc(
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kmalloc(
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kmalloc(
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kmalloc(
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kmalloc(
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kmalloc(
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    kmalloc(
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kmalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kmalloc(
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kmalloc(
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kmalloc(
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    kmalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    kmalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kmalloc(
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kmalloc(C1 * C2 * C3, ...)
    |
    kmalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kmalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kmalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kmalloc(
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kmalloc(sizeof(THING) * C2, ...)
    |
    kmalloc(sizeof(TYPE) * C2, ...)
    |
    kmalloc(C1 * C2 * C3, ...)
    |
    kmalloc(C1 * C2, ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kmalloc
    + kmalloc_array
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

29 May, 2018

1 commit

  • The BLK_EH_NOT_HANDLED implies nothing happen, but very often that
    is not what is happening - instead the driver already completed the
    command. Fix the symbolic name to reflect that a little better.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

04 Apr, 2018

1 commit

  • Somewhat nasty merge due to conflicts between "33b28357dd00 scsi:
    qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan" and "2b5b96473efc
    scsi: qla2xxx: Fix FC-NVMe LUN discovery"

    Merge is non-trivial and has been verified by Qlogic (Cavium)

    Signed-off-by: James E.J. Bottomley

    James Bottomley
     

22 Feb, 2018

1 commit


14 Feb, 2018

1 commit


13 Feb, 2018

2 commits


04 Jan, 2018

1 commit


02 Nov, 2017

1 commit

  • In preparation for unconditionally passing the struct timer_list pointer to
    all timer callbacks, switch to using the new timer_setup() and from_timer()
    to pass the timer pointer explicitly.

    Cc: QLogic-Storage-Upstream@qlogic.com
    Cc: "James E.J. Bottomley"
    Cc: "Martin K. Petersen"
    Cc: linux-scsi@vger.kernel.org
    Signed-off-by: Kees Cook
    Reviewed-by: Martin K. Petersen
    Acked-by: Manish Rangankar

    Kees Cook
     

27 Apr, 2017

1 commit


07 Apr, 2017

1 commit


12 Jan, 2017

1 commit


05 Jan, 2017

1 commit


08 Dec, 2016

1 commit


09 Nov, 2016

1 commit


02 Sep, 2016

1 commit

  • We get 1 warning when build kernel with W=1:
    drivers/scsi/qla4xxx/ql4_nx.c:1846:10: warning: no previous prototype for 'ql4_84xx_ipmdio_rd_reg' [-Wmissing-prototypes]

    In fact, this function is only used in the file in which it is declared
    and don't need a declaration, but can be made static. This patch marks
    this function with 'static'.

    Signed-off-by: Baoyou Xie
    Acked-by: Nilesh Javali
    Signed-off-by: Martin K. Petersen

    Baoyou Xie
     

24 Feb, 2016

1 commit

  • The qla4_83xx_rd_reg_indirect() function can fail when it is unable to
    read a register, but not all callers check its return value before using
    the register data, and gcc correctly warns about this:

    qla4xxx/ql4_83xx.c: In function 'qla4_83xx_process_reset_template':
    qla4xxx/ql4_83xx.c:1073:36: warning: 'value' may be used uninitialized in this function
    ha->reset_tmplt.array[index++] = value;
    ^
    qla4xxx/ql4_83xx.c:1050:11: note: 'value' was declared here
    uint32_t value;
    ^
    qla4xxx/ql4_83xx.c:902:8: warning: 'value' may be used uninitialized in this function
    value &= p_rmw_hdr->test_mask;
    ^
    qla4xxx/ql4_83xx.c:895:11: note: 'value' was declared here
    uint32_t value;
    ^
    In file included from ../include/linux/io.h:25:0,
    from ../include/linux/pci.h:31,
    from ../drivers/scsi/qla4xxx/ql4_def.h:16,
    from ../drivers/scsi/qla4xxx/ql4_83xx.c:10:
    asm/io.h:101:2: warning: 'value' may be used uninitialized in this function
    asm volatile("str %1, %0"
    ^
    qla4xxx/ql4_83xx.c:874:11: note: 'value' was declared here
    uint32_t value;
    ^

    Unfortunately, I don't see any helpful way to add proper error handling
    for this case, and the failure scenario for rd_reg seems rather obscure,
    so this bails out and makes the rd_reg accessor set the result to
    0xffffffff so we at least get a predictable value.

    Signed-off-by: Arnd Bergmann
    Acked-by: Nilesh Javali
    Signed-off-by: Martin K. Petersen

    Arnd Bergmann
     

14 Nov, 2015

1 commit

  • Pull final round of SCSI updates from James Bottomley:
    "Sorry for the delay in this patch which was mostly caused by getting
    the merger of the mpt2/mpt3sas driver, which was seen as an essential
    item of maintenance work to do before the drivers diverge too much.
    Unfortunately, this caused a compile failure (detected by linux-next),
    which then had to be fixed up and incubated.

    In addition to the mpt2/3sas rework, there are updates from pm80xx,
    lpfc, bnx2fc, hpsa, ipr, aacraid, megaraid_sas, storvsc and ufs plus
    an assortment of changes including some year 2038 issues, a fix for a
    remove before detach issue in some drivers and a couple of other minor
    issues"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (141 commits)
    mpt3sas: fix inline markers on non inline function declarations
    sd: Clear PS bit before Mode Select.
    ibmvscsi: set max_lun to 32
    ibmvscsi: display default value for max_id, max_lun and max_channel.
    mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl()
    scsi: pmcraid: replace struct timeval with ktime_get_real_seconds()
    mvumi: 64bit value for seconds_since1970
    be2iscsi: Fix bogus WARN_ON length check
    scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice
    mpt3sas: Bump mpt3sas driver version to 09.102.00.00
    mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs
    mpt2sas, mpt3sas: Update the driver versions
    mpt3sas: setpci reset kernel oops fix
    mpt3sas: Added OEM Gen2 PnP ID branding names
    mpt3sas: Refcount fw_events and fix unsafe list usage
    mpt3sas: Refcount sas_device objects and fix unsafe list usage
    mpt3sas: sysfs attribute to report Backup Rail Monitor Status
    mpt3sas: Ported WarpDrive product SSS6200 support
    mpt3sas: fix for driver fails EEH, recovery from injected pci bus error
    mpt3sas: Manage MSI-X vectors according to HBA device type
    ...

    Linus Torvalds
     

10 Nov, 2015

1 commit

  • This patch changes the !blk-mq path to the same defaults as the blk-mq
    I/O path by always enabling block tagging, and always using host wide
    tags. We've had blk-mq available for a few releases so bugs with
    this mode should have been ironed out, and this ensures we get better
    coverage of over tagging setup over different configs.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jens Axboe
    Reviewed-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

15 Oct, 2015

1 commit


25 Jun, 2015

1 commit

  • Pull networking updates from David Miller:

    1) Add TX fast path in mac80211, from Johannes Berg.

    2) Add TSO/GRO support to ibmveth, from Thomas Falcon

    3) Move away from cached routes in ipv6, just like ipv4, from Martin
    KaFai Lau.

    4) Lots of new rhashtable tests, from Thomas Graf.

    5) Run ingress qdisc lockless, from Alexei Starovoitov.

    6) Allow servers to fetch TCP packet headers for SYN packets of new
    connections, for fingerprinting. From Eric Dumazet.

    7) Add mode parameter to pktgen, for testing receive. From Alexei
    Starovoitov.

    8) Cache access optimizations via simplifications of build_skb(), from
    Alexander Duyck.

    9) Move page frag allocator under mm/, also from Alexander.

    10) Add xmit_more support to hv_netvsc, from KY Srinivasan.

    11) Add a counter guard in case we try to perform endless reclassify
    loops in the packet scheduler.

    12) Extern flow dissector to be programmable and use it in new "Flower"
    classifier. From Jiri Pirko.

    13) AF_PACKET fanout rollover fixes, performance improvements, and new
    statistics. From Willem de Bruijn.

    14) Add netdev driver for GENEVE tunnels, from John W Linville.

    15) Add ingress netfilter hooks and filtering, from Pablo Neira Ayuso.

    16) Fix handling of epoll edge triggers in TCP, from Eric Dumazet.

    17) Add an ECN retry fallback for the initial TCP handshake, from Daniel
    Borkmann.

    18) Add tail call support to BPF, from Alexei Starovoitov.

    19) Add several pktgen helper scripts, from Jesper Dangaard Brouer.

    20) Add zerocopy support to AF_UNIX, from Hannes Frederic Sowa.

    21) Favor even port numbers for allocation to connect() requests, and
    odd port numbers for bind(0), in an effort to help avoid
    ip_local_port_range exhaustion. From Eric Dumazet.

    22) Add Cavium ThunderX driver, from Sunil Goutham.

    23) Allow bpf programs to access skb_iif and dev->ifindex SKB metadata,
    from Alexei Starovoitov.

    24) Add support for T6 chips in cxgb4vf driver, from Hariprasad Shenai.

    25) Double TCP Small Queues default to 256K to accomodate situations
    like the XEN driver and wireless aggregation. From Wei Liu.

    26) Add more entropy inputs to flow dissector, from Tom Herbert.

    27) Add CDG congestion control algorithm to TCP, from Kenneth Klette
    Jonassen.

    28) Convert ipset over to RCU locking, from Jozsef Kadlecsik.

    29) Track and act upon link status of ipv4 route nexthops, from Andy
    Gospodarek.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1670 commits)
    bridge: vlan: flush the dynamically learned entries on port vlan delete
    bridge: multicast: add a comment to br_port_state_selection about blocking state
    net: inet_diag: export IPV6_V6ONLY sockopt
    stmmac: troubleshoot unexpected bits in des0 & des1
    net: ipv4 sysctl option to ignore routes when nexthop link is down
    net: track link-status of ipv4 nexthops
    net: switchdev: ignore unsupported bridge flags
    net: Cavium: Fix MAC address setting in shutdown state
    drivers: net: xgene: fix for ACPI support without ACPI
    ip: report the original address of ICMP messages
    net/mlx5e: Prefetch skb data on RX
    net/mlx5e: Pop cq outside mlx5e_get_cqe
    net/mlx5e: Remove mlx5e_cq.sqrq back-pointer
    net/mlx5e: Remove extra spaces
    net/mlx5e: Avoid TX CQE generation if more xmit packets expected
    net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion
    net/mlx5e: Remove re-assignment of wq type in mlx5e_enable_rq()
    net/mlx5e: Use skb_shinfo(skb)->gso_segs rather than counting them
    net/mlx5e: Static mapping of netdev priv resources to/from netdev TX queues
    net/mlx4_en: Use HW counters for rx/tx bytes/packets in PF device
    ...

    Linus Torvalds