02 Sep, 2016

1 commit


20 May, 2016

1 commit


10 May, 2016

1 commit

  • The caller assumes that "itnim" is NULL on error and non-NULL on success
    but really "itnim" is uninitialized on error. This function should just
    use normal error handling where it returns zero on success and negative
    on failure.

    Signed-off-by: Dan Carpenter
    Acked-by: Anil Gurumurthy
    Signed-off-by: Martin K. Petersen

    Dan Carpenter
     

24 Feb, 2016

2 commits

  • __bfa_trc() compiles to 115 bytes of machine code.
    With this .config: http://busybox.net/~vda/kernel_config
    there are 1494 calls of __bfa_trc().

    __bfa_trc32() is very similar, so it is uninlined too.
    However, it appears to be unused, therefore this patch
    ifdefs it out.

    Change in code size is about 130,000 bytes:

    text data bss dec hex filename
    85975426 22294712 20627456 128897594 7aed23a vmlinux.before
    85842882 22294584 20627456 128764922 7accbfa vmlinux

    [mkp: Removed unused __bfa_trc32()]

    Signed-off-by: Denys Vlasenko
    Acked-by: Anil Gurumurthy
    CC: Fabian Frederick
    CC: Anil Gurumurthy
    CC: Christoph Hellwig
    CC: Guenter Roeck
    CC: Ben Hutchings
    CC: James Bottomley
    CC: linux-kernel@vger.kernel.org
    CC: linux-scsi@vger.kernel.org
    Signed-off-by: Martin K. Petersen

    Denys Vlasenko
     
  • BFA_MFG_NAME is "QLogic" which is only 7 bytes, but we are copying 8
    bytes. It's harmless because the badding byte is likely zero but it
    makes static checkers complain.

    Signed-off-by: Dan Carpenter
    Acked-by: Anil Gurumurthy
    Signed-off-by: Martin K. Petersen

    Dan Carpenter
     

03 Dec, 2015

4 commits


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
     

07 Sep, 2015

2 commits


13 Aug, 2015

1 commit


17 Apr, 2015

1 commit

  • This kthread is not loop at all due to break at the end of the loop. Make
    that function linear, with no while loop.

    And remove an unnecessary cast.

    Signed-off-by: Jiri Slaby
    Cc: Anil Gurumurthy
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

24 Nov, 2014

1 commit

  • Drop the now unused reason argument from the ->change_queue_depth method.
    Also add a return value to scsi_adjust_queue_depth, and rename it to
    scsi_change_queue_depth now that it can be used as the default
    ->change_queue_depth implementation.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     

20 Nov, 2014

1 commit


12 Nov, 2014

3 commits

  • Remove the tagged argument from scsi_adjust_queue_depth, and just let it
    handle the queue depth. For most drivers those two are fairly separate,
    given that most modern drivers don't care about the SCSI "tagged" status
    of a command at all, and many old drivers allow queuing of multiple
    untagged commands in the driver.

    Instead we start out with the ->simple_tags flag set before calling
    ->slave_configure, which is how all drivers actually looking at
    ->simple_tags except for one worke anyway. The one other case looks
    broken, but I've kept the behavior as-is for now.

    Except for that we only change ->simple_tags from the ->change_queue_type,
    and when rejecting a tag message in a single driver, so keeping this
    churn out of scsi_adjust_queue_depth is a clear win.

    Now that the usage of scsi_adjust_queue_depth is more obvious we can
    also remove all the trivial instances in ->slave_alloc or ->slave_configure
    that just set it to the cmd_per_lun default.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Martin K. Petersen

    Christoph Hellwig
     
  • Allow a driver to ask for block layer tags by setting .use_blk_tags in the
    host template, in which case it will always see a valid value in
    request->tag, similar to the behavior when using blk-mq. This means even
    SCSI "untagged" commands will now have a tag, which is especially useful
    when using a host-wide tag map.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     
  • Remove the ordered_tags field, we haven't been issuing ordered tags based
    on it since the big barrier rework in 2010.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Bart Van Assche
    Reviewed-by: Martin K. Petersen

    Christoph Hellwig
     

29 Jul, 2014

3 commits


26 Jul, 2014

4 commits

  • Use macro definition

    Signed-off-by: Fabian Frederick
    Acked-by: Anil Gurumurthy
    Signed-off-by: Christoph Hellwig

    Fabian Frederick
     
  • This patch remove variables that are initialized with a constant,
    are never updated, and are only used as parameter of return.
    Return the constant instead of using a variable.

    Verified by compilation only.

    The coccinelle script that find and fixes this issue is:
    //
    @@
    type T;
    constant C;
    identifier ret;
    @@
    - T ret = C;
    ... when != ret
    when strict
    return
    - ret
    + C
    ;
    //

    Signed-off-by: Peter Senna Tschudin
    Acked-by: Sudarsana Kalluru
    Signed-off-by: Christoph Hellwig

    Peter Senna Tschudin
     
  • bfa_swap_words() shifts its argument (assumed to be 64-bit) by 32 bits
    each way. In two places the argument type is dma_addr_t, which may be
    32-bit, in which case the effect of the bit shift is undefined:

    drivers/scsi/bfa/bfa_fcpim.c: In function 'bfa_ioim_send_ioreq':
    drivers/scsi/bfa/bfa_fcpim.c:2497:4: warning: left shift count >= width of type [enabled by default]
    addr = bfa_sgaddr_le(sg_dma_address(sg));
    ^
    drivers/scsi/bfa/bfa_fcpim.c:2497:4: warning: right shift count >= width of type [enabled by default]
    drivers/scsi/bfa/bfa_fcpim.c:2509:4: warning: left shift count >= width of type [enabled by default]
    addr = bfa_sgaddr_le(sg_dma_address(sg));
    ^
    drivers/scsi/bfa/bfa_fcpim.c:2509:4: warning: right shift count >= width of type [enabled by default]

    Avoid this by adding casts to u64 in bfa_swap_words().

    Compile-tested only.

    Signed-off-by: Ben Hutchings
    Reviewed-by: Martin K. Petersen
    Acked-by: Anil Gurumurthy
    Cc: stable@vger.kernel.org
    Fixes: f16a17507b09 ('[SCSI] bfa: remove all OS wrappers')
    Signed-off-by: Christoph Hellwig

    Ben Hutchings
     
  • Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

    Signed-off-by: Joe Perches
    Acked-by: Anil Gurumurthy
    Signed-off-by: Christoph Hellwig

    Joe Perches
     

20 May, 2014

1 commit

  • bfa_fcb_pbc_vport_create() is called only from bfa_fcs_pbc_vport_init(),
    that is called only from bfad_drv_start() with bfad_lock spinlock held.
    So the patch replaces GFP_KERNEL with GFP_ATOMIC to avoid
    sleeping in atomic spinlock context.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Acked-by: Anil Gurumurthy
    Signed-off-by: Christoph Hellwig

    Alexey Khoroshilov
     

20 Mar, 2014

1 commit


16 Mar, 2014

3 commits

  • For various error conditions the bfa driver just returns
    'DID_ERROR', which carries no information at all about the
    actual source of error.
    This patch updates the error handling to return a correct
    error code, depending on the type of error occurred.

    Signed-off-by: Hannes Reinecke
    Acked-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • Fixed following smatch warnings in bfa.
    drivers/scsi/bfa/bfa_ioc.c:3882 bfa_sfp_show_comp() error: memcpy()
    'des' too small (64 vs 248)
    drivers/scsi/bfa/bfa_ioc.c:6859 bfa_flash_status_read() warn: unsigned
    'status' is never less than zero.
    drivers/scsi/bfa/bfa_ioc.c:6881 bfa_flash_status_read() warn: unsigned
    'status' is never less than zero.
    drivers/scsi/bfa/bfa_ioc.c:6917 bfa_flash_read_start() warn: unsigned
    'status' is never less than zero.
    drivers/scsi/bfa/bfa_ioc.c:7043 bfa_flash_raw_read() warn: unsigned
    'status' is never less than zero.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • Add the missing unlock before return from function bfad_iocmd_cfg_trunk()
    in the error handling case.

    Signed-off-by: Wei Yongjun
    Acked-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Wei Yongjun
     

23 Jan, 2014

1 commit


19 Dec, 2013

8 commits

  • Patch includes changes to upgrade bfa driver version to 3.2.23.0 and use
    firmware version 3.2.3.0

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • As per the FCP specs, the timeout for issuing ABTS is 20 sec; not 21
    sec. Hence setting the TOV to 20 sec.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • Observed Auto mode in the HBA side while doing manual D-Port test on the
    switch side. Mode is not passed to BFA from firmware when the test is
    triggered by switch side. BFA just blindly using Auto mode.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • This patch set fixes the issue of brocade management utility hang
    (bcu/HCM) when faa attributes are queried from multiple application
    threads. Hang was due to race between the threads and completion handler
    corruption.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • In direct attach mode, if port features like QoS/Trunk/FEC/CR are
    enabled, driver can receive PLOGI from the target before firmware
    notifies lport online to the driver. In case the lport is not yet online
    and a PLOGI is received, send a reject to the peer port, instead of
    dropping it on the floor.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • This patch addresses the issue of port not being registered with SCSI
    layer on bfa or firmware initialization failure and subsequently failure
    in collecting driver traces for debugging port init failures. Also it
    has minor changes related to bfad state machine clean up.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • This patch includes change to enable firmware patch simplication
    feature. This feature is targeted to address the requirement to have
    independent patch release for firmware. Prior to 3.2.3, releasing a
    patch fix for firmware requires changes to bfa, to use new firmware
    images. But with these changes, if the new firmware is flashed on to the
    HBA with brocade adapter management utilites, driver uses the new
    firmware after checking the patch release byte in the firmware version.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva
     
  • Bfa driver crash is observed while pushing the firmware on to chinook
    quad port card due to uninitialized bfi_image_ct2 access which gets
    initialized only for CT2 ASIC based cards after request_firmware().
    For quard port chinook (CT2 ASIC based), bfi_image_ct2 is not getting
    initialized as there is no check for chinook PCI device ID before
    request_firmware and instead bfi_image_cb is initialized as it is the
    default case for card type check.

    This patch includes changes to read the right firmware for quad port chinook.

    Signed-off-by: Vijaya Mohan Guvva
    Cc: stable@vger.kernel.org
    Signed-off-by: James Bottomley

    Vijaya Mohan Guvva