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
     

03 Dec, 2013

1 commit


16 Nov, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual earth-shaking, news-breaking, rocket science pile from
    trivial.git"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
    doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
    doc: add missing files to timers/00-INDEX
    timekeeping: Fix some trivial typos in comments
    mm: Fix some trivial typos in comments
    irq: Fix some trivial typos in comments
    NUMA: fix typos in Kconfig help text
    mm: update 00-INDEX
    doc: Documentation/DMA-attributes.txt fix typo
    DRM: comment: `halve' -> `half'
    Docs: Kconfig: `devlopers' -> `developers'
    doc: typo on word accounting in kprobes.c in mutliple architectures
    treewide: fix "usefull" typo
    treewide: fix "distingush" typo
    mm/Kconfig: Grammar s/an/a/
    kexec: Typo s/the/then/
    Documentation/kvm: Update cpuid documentation for steal time and pv eoi
    treewide: Fix common typo in "identify"
    __page_to_pfn: Fix typo in comment
    Correct some typos for word frequency
    clk: fixed-factor: Fix a trivial typo
    ...

    Linus Torvalds
     

14 Oct, 2013

1 commit

  • Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound),
    the driver core clears the driver data to NULL after device_release
    or on probe failure. Thus, it is not needed to manually clear the
    device driver data to NULL.

    Signed-off-by: Jingoo Han
    Cc: James Bottomley
    Signed-off-by: Jiri Kosina

    Jingoo Han
     

24 Sep, 2013

1 commit

  • Use pcie_get_readrq()/pcie_set_readrq() to simplify code.

    Jon Mason proposed a similar patch a couple years ago (see below).

    [bhelgaas: validate pcie_max_read_reqsz, add pointer to Jon's patch]
    Reference: http://lkml.kernel.org/r/1309191190-14670-1-git-send-email-jdmason@kudzu.us
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    Cc: Jiang Liu
    Cc: Anil Gurumurthy
    Cc: Vijaya Mohan Guvva
    Cc: "James E.J. Bottomley"

    Yijing Wang
     

07 Sep, 2013

1 commit

  • Pull trivial tree from Jiri Kosina:
    "The usual trivial updates all over the tree -- mostly typo fixes and
    documentation updates"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (52 commits)
    doc: Documentation/cputopology.txt fix typo
    treewide: Convert retrun typos to return
    Fix comment typo for init_cma_reserved_pageblock
    Documentation/trace: Correcting and extending tracepoint documentation
    mm/hotplug: fix a typo in Documentation/memory-hotplug.txt
    power: Documentation: Update s2ram link
    doc: fix a typo in Documentation/00-INDEX
    Documentation/printk-formats.txt: No casts needed for u64/s64
    doc: Fix typo "is is" in Documentations
    treewide: Fix printks with 0x%#
    zram: doc fixes
    Documentation/kmemcheck: update kmemcheck documentation
    doc: documentation/hwspinlock.txt fix typo
    PM / Hibernate: add section for resume options
    doc: filesystems : Fix typo in Documentations/filesystems
    scsi/megaraid fixed several typos in comments
    ppc: init_32: Fix error typo "CONFIG_START_KERNEL"
    treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks
    page_isolation: Fix a comment typo in test_pages_isolated()
    doc: fix a typo about irq affinity
    ...

    Linus Torvalds
     

04 Sep, 2013

1 commit


03 Sep, 2013

1 commit


05 Jul, 2013

1 commit

  • Pull first round of SCSI updates from James Bottomley:
    "The patch set is mostly driver updates (usf, zfcp, lpfc, mpt2sas,
    megaraid_sas, bfa, ipr) and a few bug fixes. Also of note is that the
    Buslogic driver has been rewritten to a better coding style and 64 bit
    support added. We also removed the libsas limitation on 16 bytes for
    the command size (currently no drivers make use of this)"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (101 commits)
    [SCSI] megaraid: minor cut and paste error fixed.
    [SCSI] ufshcd-pltfrm: remove unnecessary dma_set_coherent_mask() call
    [SCSI] ufs: fix register address in UIC error interrupt handling
    [SCSI] ufshcd-pltfrm: add missing empty slot in ufs_of_match[]
    [SCSI] ufs: use devres functions for ufshcd
    [SCSI] ufs: Fix the response UPIU length setting
    [SCSI] ufs: rework link start-up process
    [SCSI] ufs: remove version check before IS reg clear
    [SCSI] ufs: amend interrupt configuration
    [SCSI] ufs: wrap the i/o access operations
    [SCSI] storvsc: Update the storage protocol to win8 level
    [SCSI] storvsc: Increase the value of scsi timeout for storvsc devices
    [SCSI] MAINTAINERS: Add myself as the maintainer for BusLogic SCSI driver
    [SCSI] BusLogic: Port driver to 64-bit.
    [SCSI] BusLogic: Fix style issues
    [SCSI] libiscsi: Added new boot entries in the session sysfs
    [SCSI] aacraid: Fix for arrays are going offline in the system. System hangs
    [SCSI] ipr: IOA Status Code(IOASC) update
    [SCSI] sd: Update WRITE SAME heuristics
    [SCSI] fnic: potential dead lock in fnic_is_abts_pending()
    ...

    Linus Torvalds
     

29 Jun, 2013

1 commit


27 Jun, 2013

5 commits